/* Portail Affiliation EspaceCommerce — d'apres le design CD "Portail Affiliation"
   (glassmorphism: panneaux translucides flous, champs "recessed", sidebar fixe).
   Structure/donnees restent 100% Jinja/Flask; ce fichier ne fait que la couche visuelle. */
:root {
    --aff-primary: #3b82f6;
    --aff-primary-hover: #60a5fa;
    --aff-success: #22c55e;
    --aff-danger: #ef4444;
    --aff-warning: #f59e0b;
    --aff-bg: #0b0f19;
    --aff-text: #f8fafc;
    --aff-text-muted: #94a3b8;
    --aff-text-faint: #64748b;
    --aff-border: rgba(255, 255, 255, 0.08);
    --aff-bg-input: rgba(11, 15, 25, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--aff-bg);
    color: var(--aff-text);
    line-height: 1.6;
}

h1, h2 { font-family: 'Outfit', sans-serif; }

a { color: var(--aff-primary-hover); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 8px; }

.aff-layout { display: flex; min-height: 100vh; }

/* Panneau de verre translucide flou — appliqué directement aux elements qui en
   ont besoin (sidebar/card/panel/user/auth-wrap), pas de classe separee a ajouter
   dans les templates. */
.aff-sidebar, .aff-user, .aff-card, .aff-panel, .aff-auth-wrap {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--aff-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.aff-sidebar {
    width: 264px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: 0;
    border-right: 1px solid var(--aff-border);
    border-top: none; border-bottom: none; border-left: none;
}

.aff-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 6px;
    margin-bottom: 20px;
}

.aff-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; }
.aff-brand span { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 16px; }

.aff-user {
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
    object-fit: cover;
}

.aff-user .name { font-weight: 600; font-size: 14px; }
.aff-user .code { font-size: 12px; color: var(--aff-text-faint); font-family: monospace; margin-top: 2px; }

.aff-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.aff-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--aff-text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.aff-nav a i { font-size: 18px; flex-shrink: 0; }
.aff-nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--aff-text); }
.aff-nav a.active { background: var(--aff-primary); color: #fff; font-weight: 600; }

.aff-sidebar-footer { margin-top: 12px; }

.aff-sidebar-legal {
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: var(--aff-text-muted);
}
.aff-sidebar-legal a { color: var(--aff-text-muted); text-decoration: none; }
.aff-sidebar-legal a:hover { color: var(--aff-text); text-decoration: underline; }

.aff-btn-logout {
    display: block;
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    text-decoration: none;
    text-align: center;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.aff-btn-logout:hover { background: var(--aff-danger); color: white; border-color: var(--aff-danger); }

.aff-main {
    flex: 1;
    margin-left: 264px;
    padding: 36px 40px;
    max-width: 1180px;
}

.aff-main h1 { font-size: 28px; font-weight: 800; margin-bottom: 22px; }

.aff-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.aff-card {
    border-radius: 16px;
    padding: 20px;
}

.aff-card .label {
    font-size: 12px;
    color: var(--aff-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.aff-card .value {
    font-size: 30px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.aff-card .value.amber { color: var(--aff-warning); }
.aff-card .value.green { color: var(--aff-success); }
.aff-card .value.blue { color: var(--aff-primary); }

.aff-cad-tag { font-size: 11px; font-weight: 600; opacity: .55; margin-left: 4px; vertical-align: middle; }
.aff-usd-approx { display: block; font-size: 11px; font-weight: 400; opacity: .55; margin-top: 2px; }

.aff-panel {
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.aff-panel h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.aff-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.aff-table th, .aff-table td { text-align: left; padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.aff-table th { color: var(--aff-text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--aff-border); padding: 8px 10px; }

.aff-empty { color: var(--aff-text-muted); padding: 20px 0; text-align: center; }

.aff-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.aff-badge.pending, .aff-badge.email_pending, .aff-badge.ready_for_review, .aff-badge.pending_manual { background: rgba(245, 158, 11, 0.15); color: var(--aff-warning); }
.aff-badge.approved, .aff-badge.active, .aff-badge.available, .aff-badge.completed { background: rgba(34, 197, 94, 0.15); color: var(--aff-success); }
.aff-badge.paid, .aff-badge.processing { background: rgba(59, 130, 246, 0.15); color: var(--aff-primary-hover); }
.aff-badge.suspended, .aff-badge.rejected, .aff-badge.clawed_back, .aff-badge.failed { background: rgba(239, 68, 68, 0.15); color: var(--aff-danger); }

.aff-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin: 0 0 16px;
    font-size: 13.5px;
    border: 1px solid transparent;
}

.aff-alert.success { background: rgba(34, 197, 94, 0.12); color: var(--aff-success); border-color: rgba(34, 197, 94, 0.3); }
.aff-alert.danger { background: rgba(239, 68, 68, 0.12); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.aff-alert.warning { background: rgba(245, 158, 11, 0.12); color: var(--aff-warning); border-color: rgba(245, 158, 11, 0.3); }
.aff-alert.info { background: rgba(59, 130, 246, 0.12); color: var(--aff-primary-hover); border-color: rgba(59, 130, 246, 0.3); }

/* Formulaires — champs "recessed" (creux), effet ressort au focus */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--aff-text-muted);
}

.form-group input, .form-group textarea, .form-group select, .aff-panel select, .aff-panel input[type="file"] {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(11, 15, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    color: var(--aff-text);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group textarea { min-height: 90px; resize: vertical; }

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 10px;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--aff-primary); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.btn-primary:hover { background: var(--aff-primary-hover); }
.btn-secondary { background: transparent; color: var(--aff-text); border: 1px solid rgba(255, 255, 255, 0.1); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.06); }

/* Pages d'authentification (sans sidebar) */
.aff-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.15), transparent), var(--aff-bg);
}

.aff-auth-wrap {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: 24px;
}

.aff-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.aff-auth-brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; }
.aff-auth-brand span { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

.aff-auth-wrap h1 { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.aff-auth-subtitle { color: var(--aff-text-muted); font-size: 14px; text-align: center; margin-bottom: 24px; }

.aff-links { margin-top: 22px; text-align: center; font-size: 13px; color: var(--aff-text-muted); display: flex; justify-content: space-between; }
.aff-links.center { justify-content: center; }

.aff-link-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: rgba(11, 15, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: monospace;
    font-size: 13px;
    color: #cbd5e1;
    word-break: break-all;
    margin-bottom: 12px;
}

.aff-menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--aff-border); color: var(--aff-text); border-radius: 8px; width: 40px; height: 40px; font-size: 22px; cursor: pointer; align-items: center; justify-content: center; }

/* Mobile et tablette (revu le 2026-09-06 : la barre laterale restait fixe a gauche et ecrasait le contenu) */
@media (max-width: 860px) {
    .aff-layout { flex-direction: column; }
    .aff-sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--aff-border); overflow: visible; }
    .aff-brand { margin-bottom: 0; }
    .aff-menu-btn { display: inline-flex; }
    .aff-user, .aff-nav, .aff-sidebar-footer { display: none; }
    .aff-sidebar.open .aff-user { display: flex; margin-top: 12px; }
    .aff-sidebar.open .aff-nav { display: flex; margin-top: 8px; }
    .aff-sidebar.open .aff-sidebar-footer { display: block; }
    .aff-nav a { padding: 12px 14px; font-size: 15px; }
    .aff-main { margin-left: 0; padding: 16px; max-width: 100%; }
    .aff-main h1 { font-size: 22px; margin-bottom: 16px; }
    .aff-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .aff-card .value { font-size: 22px; }
    .aff-panel { padding: 16px; }
    .aff-link-box { flex-wrap: wrap; }
    .aff-link-box #aff-link, .aff-link-box span { word-break: break-all; font-size: 13px; flex: 1 1 100%; }
    .aff-table-wrap, .aff-panel { overflow-x: auto; }
    .aff-table { min-width: 520px; }
    .aff-kit-grid, .aff-mat-grid { grid-template-columns: 1fr; }
    .aff-linkbar { position: static; }
    .aff-linkbar-grid { grid-template-columns: 1fr; }
}
/* Telephone seulement (la tablette garde les 3 boites de Mon reseau cote a cote, validee par Stephane) */
@media (max-width: 640px) {
    .aff-network-grid { grid-template-columns: 1fr !important; }
    .aff-network-grid .aff-panel { text-align: left !important; }
    .aff-network-grid code, .aff-network-grid pre, .aff-network-grid .aff-link-box span { word-break: break-all; white-space: normal; }
}
@media (max-width: 480px) {
    .aff-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   Trousses marketing (liste + detail) — 2026-09-04
   ============================================================ */
.aff-kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.aff-kit-card { display: flex; flex-direction: column; margin-bottom: 0; transition: transform .2s, box-shadow .2s; }
.aff-kit-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.aff-kit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.aff-kit-head h3 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; margin: 0; line-height: 1.3; }
.aff-kit-tags { display: flex; gap: 6px; flex-shrink: 0; }
.aff-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(59, 130, 246, 0.15); color: var(--aff-primary-hover); border: 1px solid rgba(59, 130, 246, 0.25); }
.aff-tag.cur { background: rgba(34, 197, 94, 0.12); color: var(--aff-success); border-color: rgba(34, 197, 94, 0.25); }
.aff-tag.muted { background: rgba(148, 163, 184, 0.12); color: var(--aff-text-muted); border-color: rgba(148, 163, 184, 0.2); }
.aff-kit-desc { color: var(--aff-text-muted); font-size: 12.5px; margin: 0 0 14px; flex: 1; }
.aff-kit-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.aff-kit-stat { text-align: center; padding: 8px 4px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--aff-border); border-radius: 10px; }
.aff-kit-stat .v { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 17px; color: var(--aff-text); line-height: 1.1; }
.aff-kit-stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--aff-text-faint); margin-top: 3px; }
.aff-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.aff-step { padding: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--aff-border); border-radius: 12px; }
.aff-step .n { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(59, 130, 246, 0.15); color: var(--aff-primary-hover); font-family: 'Outfit', sans-serif; font-weight: 800; margin-bottom: 10px; }
.aff-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.aff-step p { font-size: 12.5px; color: var(--aff-text-muted); }

/* Barre de lien collante (campagne, langue, page de destination, lien, partage) */
.aff-linkbar { position: sticky; top: 12px; z-index: 50; background: rgba(15, 20, 33, 0.92); backdrop-filter: blur(12px); border: 1px solid rgba(59, 130, 246, 0.25); border-radius: 16px; padding: 16px 18px; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.aff-linkbar-grid { display: grid; grid-template-columns: 1.1fr .6fr 1.1fr 2fr auto; gap: 12px; align-items: end; }
.aff-linkbar label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--aff-primary-hover); margin-bottom: 6px; }
.aff-linkbar select, .aff-linkbar input { width: 100%; padding: 10px 12px; background: var(--aff-bg-input); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px; color: var(--aff-text); font-size: 13px; font-family: inherit; }
.aff-linkbar .aff-link-input { display: flex; gap: 0; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.06); }
.aff-linkbar .aff-link-input input { border: none; border-radius: 0; font-family: monospace; font-size: 12.5px; }
.aff-linkbar .aff-link-input button { border: none; border-radius: 0; padding: 0 16px; white-space: nowrap; flex-shrink: 0; }
.aff-share { display: flex; gap: 6px; }
.aff-icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid rgba(255, 255, 255, 0.12); color: var(--aff-text); cursor: pointer; font-size: 17px; text-decoration: none; transition: all .15s; }
.aff-icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.aff-icon-btn.fb:hover { color: #1877f2; border-color: #1877f2; }
.aff-icon-btn.li:hover { color: #0a66c2; border-color: #0a66c2; }
.aff-icon-btn.pin:hover { color: #e60023; border-color: #e60023; }
.aff-icon-btn.x:hover { color: #fff; border-color: #fff; }
.aff-icon-btn.rd:hover { color: #ff4500; border-color: #ff4500; }
.aff-icon-btn.ok { color: var(--aff-success); border-color: var(--aff-success); }
.aff-icon-btn.dl { color: var(--aff-success); border-color: rgba(34, 197, 94, 0.35); }
.aff-icon-btn.dl:hover { background: rgba(34, 197, 94, 0.12); }

/* Sections repliables */
.aff-section { margin-bottom: 16px; }
.aff-section-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.aff-section-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.aff-section-head h2 i { color: var(--aff-primary-hover); }
.aff-count { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--aff-text-muted); }
.aff-section-head .chev { transition: transform .25s; color: var(--aff-text-muted); font-size: 18px; }
.aff-section.closed .chev { transform: rotate(-90deg); }
.aff-section-body { margin-top: 16px; }
.aff-section.closed .aff-section-body { display: none; }
.aff-hint { font-size: 12.5px; color: var(--aff-text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

/* Cartes de materiel */
.aff-mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.aff-mat { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--aff-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s; }
.aff-mat:hover { transform: translateY(-2px); }
.aff-mat-preview { background: rgba(0, 0, 0, 0.35); height: 150px; display: flex; align-items: center; justify-content: center; padding: 12px; cursor: zoom-in; }
.aff-mat-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.aff-mat-preview video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.aff-mat-preview.tall { height: 360px; cursor: default; }
.aff-mat-info { padding: 10px 12px 12px; }
.aff-mat-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.aff-dim { font-family: monospace; font-size: 11px; color: var(--aff-text-faint); white-space: nowrap; }
.aff-mat-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.aff-caption { font-size: 12px; white-space: pre-line; color: #cbd5e1; background: var(--aff-bg-input); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 10px; max-height: 150px; overflow: auto; margin-top: 10px; }

/* Courriels et textes */
.aff-camp { border: 1px solid rgba(59, 130, 246, 0.2); background: rgba(59, 130, 246, 0.05); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.aff-camp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; user-select: none; }
.aff-camp-head strong { color: var(--aff-primary-hover); }
.aff-camp-head .chev { transition: transform .25s; color: var(--aff-text-muted); }
.aff-camp.closed .chev { transform: rotate(-90deg); }
.aff-camp-body { padding: 0 16px 16px; }
.aff-camp.closed .aff-camp-body { display: none; }
.aff-camp-desc { font-size: 12.5px; color: var(--aff-text-muted); padding: 0 16px 12px; margin-top: -6px; }
.aff-camp.closed .aff-camp-desc { display: none; }
.aff-email { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--aff-border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.aff-email-subject { font-weight: 700; border-bottom: 1px solid var(--aff-border); padding-bottom: 8px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.aff-email-preview { font-size: 12px; color: var(--aff-text-faint); margin-bottom: 8px; }
.aff-email-body { white-space: pre-line; font-size: 13px; color: #cbd5e1; }
.aff-social { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--aff-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.aff-social-text { white-space: pre-line; font-size: 13.5px; margin-bottom: 10px; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.btn-success { background: rgba(34, 197, 94, 0.15); color: var(--aff-success); border: 1px solid rgba(34, 197, 94, 0.3); }
.btn-success:hover { background: rgba(34, 197, 94, 0.25); }
.btn-warning { background: rgba(245, 158, 11, 0.15); color: var(--aff-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.btn-warning:hover { background: rgba(245, 158, 11, 0.25); }
.aff-mc-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; border-radius: 12px; background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.25); }

/* Modales (lightbox, Mailchimp, confirmation) */
.aff-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.aff-modal-overlay.active { display: flex; }
.aff-modal { background: #111827; border: 1px solid var(--aff-border); border-radius: 16px; padding: 22px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.aff-modal.lightbox { max-width: min(1100px, 95vw); background: #000; padding: 8px; text-align: center; }
.aff-modal.lightbox img { max-width: 100%; max-height: 85vh; object-fit: contain; }
.aff-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.aff-modal-head h3 { font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 700; margin: 0; }
.aff-modal-close { background: none; border: none; color: var(--aff-text-muted); font-size: 24px; cursor: pointer; line-height: 1; }
.aff-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 1000px) {
    .aff-linkbar { position: static; }
    .aff-linkbar-grid { grid-template-columns: 1fr 1fr; }
    .aff-linkbar-grid .span2 { grid-column: 1 / -1; }
}
