﻿  :root {
    --font-main: 'Comfortaa', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bg-deep: #0A0E1A;
    --bg-card: #111827;
    --bg-card2: #1a2235;
    --gold: #D4AF37;
    --gold-light: #F0D060;
    --gold-dim: rgba(212,175,55,0.15);
    --text-main: #E8E4D9;
    --text-muted: #8892A4;
    --text-dim: #5a6478;
    --border: rgba(212,175,55,0.2);
    --border-subtle: rgba(255,255,255,0.06);
    --radius: 12px;
    --radius-lg: 20px;

    /* Stage colors */
    --s1: #1E4BD8; --s2: #22C55E; --s3: #EF4444;
    --s4: #F97316; --s5: #92400E; --s6: #9CA3AF;
    --s7: #EAB308; --s8: #1F2937; --s9: #B8860B;
    --s10: #F8FAFC;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* â”€â”€ SCREEN SYSTEM â”€â”€ */
  .screen { display: none; min-height: 100vh; }
  .screen.active { display: flex; flex-direction: column; }

  /* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
     LANDING / CONNEXION
  â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#screen-landing {
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(212,175,55,0.12) 0%, transparent 70%),
                var(--bg-deep);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    padding: 60px 20px;
    position: relative;
  }

  .hex-bg {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0.04;
  }
  .hex-bg svg { width: 100%; height: 100%; }

  .landing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 460px;
    padding: 48px 40px;
    position: relative;
    box-shadow: 0 0 80px rgba(212,175,55,0.08), 0 40px 80px rgba(0,0,0,0.5);
    animation: cardFloatIn .5s ease both;
  }

  @keyframes cardFloatIn {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .brand {
    text-align: center;
    margin-bottom: 36px;
  }
  .brand-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--gold), #a07820);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
  }
  .brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px; font-weight: 900;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
  }
  .brand p {
    font-size: 11px; color: var(--text-muted);
    letter-spacing: 1.5px; text-transform: uppercase;
    margin-top: 4px;
  }

  .tab-row {
    display: flex; gap: 4px;
    background: var(--bg-deep);
    border-radius: 10px; padding: 4px;
    margin-bottom: 28px;
  }
  .tab-btn {
    flex: 1; padding: 10px;
    border: none; background: transparent;
    color: var(--text-muted); font-size: 13px; font-weight: 500;
    border-radius: 8px; cursor: pointer; transition: all .2s;
    font-family: var(--font-main);
  }
  .tab-btn.active {
    background: var(--gold);
    color: #0A0E1A;
  }

  .form-group { margin-bottom: 18px; }
  label {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--text-muted); letter-spacing: 0.5px;
    text-transform: uppercase; margin-bottom: 6px;
  }
  input, select, textarea {
    width: 100%; padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color .2s;
  }
  input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
  }
  input::placeholder { color: var(--text-dim); }

  .btn-gold {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--gold), #a07820);
    border: none; border-radius: 10px;
    color: #0A0E1A; font-weight: 700; font-size: 14px;
    letter-spacing: 0.5px; cursor: pointer;
    transition: all .2s;
    font-family: var(--font-main);
  }
  .btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212,175,55,0.3); }

  .btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted); font-size: 13px;
    cursor: pointer; transition: all .2s;
    font-family: var(--font-main);
  }
  .btn-outline:hover { border-color: var(--gold); color: var(--gold); }

  .pseudo-check {
    display: flex; align-items: center; gap: 8px;
    margin-top: 6px; font-size: 12px;
  }
  .pseudo-ok { color: #22C55E; }
  .pseudo-no { color: #EF4444; }

  .msg-info {
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 8px; padding: 12px 14px;
    font-size: 12px; color: var(--gold);
    margin-bottom: 18px;
  }

  /* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
     BACK-OFFICE LAYOUT
  â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
  #screen-user, #screen-admin {
    flex-direction: row;
  }

  .sidebar {
    width: 240px; min-height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column;
    padding: 24px 0;
    flex-shrink: 0;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
  }

  .sidebar-brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
  }
  .sidebar-brand .logo-sm {
    display: flex; align-items: center; gap: 10px;
  }
  .logo-icon-sm {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--gold), #a07820);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
  }
  .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 15px; font-weight: 700;
    letter-spacing: 1px; color: var(--gold);
  }

  .user-badge {
    margin: 0 12px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
  }
  .user-badge .ub-name {
    font-size: 13px; font-weight: 600; color: var(--text-main);
  }
  .user-badge .ub-grade {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
  }
  .stage-dot {
    display: inline-block;
    width: 8px; height: 8px; border-radius: 50%;
    margin-right: 6px;
    background: var(--s1);
  }

  .nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
  }
  .nav-section-label {
    font-size: 10px; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-dim);
    padding: 8px 8px 4px;
  }
  .nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer; transition: all .15s;
    font-size: 13px; color: var(--text-muted);
    border: none; background: transparent; width: 100%;
    text-align: left; font-family: var(--font-main);
  }
  .nav-item:hover { background: var(--bg-deep); color: var(--text-main); }
  .nav-item.active {
    background: var(--gold-dim);
    color: var(--gold);
  }
  .nav-icon { font-size: 16px; width: 20px; text-align: center; }

  .main-content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
    max-height: 100vh;
  }

  /* â”€â”€ PAGE HEADER â”€â”€ */
  .page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .page-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px; font-weight: 700;
    color: var(--text-main);
  }
  .page-header p {
    font-size: 13px; color: var(--text-muted); margin-top: 4px;
  }

  /* â”€â”€ CARDS GRID â”€â”€ */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }
  .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
  }
  .stat-card .sc-label {
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-bottom: 8px;
  }
  .stat-card .sc-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px; font-weight: 700;
    color: var(--text-main);
  }
  .stat-card .sc-sub {
    font-size: 11px; color: var(--text-muted); margin-top: 4px;
  }
  .stat-card.gold-card {
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(212,175,55,0.05));
    border-color: var(--border);
  }
  .stat-card.gold-card .sc-value { color: var(--gold); }

  /* â”€â”€ SECTION CARDS â”€â”€ */
  .section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
  }
  .section-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: space-between;
  }
  .section-card-header h3 {
    font-size: 14px; font-weight: 600;
    color: var(--text-main);
  }
  .section-card-body { padding: 20px; }

  /* â”€â”€ TABLEAU GRID â”€â”€ */
  .tableau-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }
  .tableau-cell {
    aspect-ratio: 1;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 10px; cursor: pointer;
    transition: all .2s;
    padding: 4px;
    text-align: center;
  }
  .tableau-cell:hover { border-color: var(--gold); transform: scale(1.04); }
  .tableau-cell .tc-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px; color: var(--text-dim); margin-bottom: 2px;
  }
  .tableau-cell .tc-pseudo {
    font-size: 9px; font-weight: 600;
    color: var(--text-main); word-break: break-all; line-height: 1.2;
  }
  .tableau-cell.occupied { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.04); }
  .tableau-cell.mine { border-color: var(--gold); background: var(--gold-dim); }
  .tableau-cell.mine .tc-pseudo { color: var(--gold); }
  .tableau-cell.empty .tc-pseudo { color: var(--text-dim); font-style: italic; }

  /* â”€â”€ STAGES BAR â”€â”€ */
  .stages-list { display: flex; flex-direction: column; gap: 8px; }
  .stage-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    transition: all .15s;
  }
  .stage-item.current { border-color: var(--gold); background: var(--gold-dim); }
  .stage-item.completed { opacity: 0.7; }
  .stage-item.locked { opacity: 0.35; }
  .stage-badge {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: white;
    flex-shrink: 0;
  }
  .stage-info { flex: 1; }
  .stage-info .si-name {
    font-size: 13px; font-weight: 600; color: var(--text-main);
  }
  .stage-info .si-sub {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
  }
  .stage-status {
    font-size: 11px; font-weight: 600; padding: 4px 10px;
    border-radius: 20px;
  }
  .stage-status.done { background: rgba(34,197,94,0.1); color: #22C55E; }
  .stage-status.active { background: var(--gold-dim); color: var(--gold); }
  .stage-status.locked { background: var(--bg-card2); color: var(--text-dim); }

  /* â”€â”€ E-WALLET â”€â”€ */
  .wallet-total {
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
  }
  .wallet-total .wt-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-muted); margin-bottom: 8px;
  }
  .wallet-total .wt-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px; font-weight: 700; color: var(--gold);
  }

  .wallet-rows { display: flex; flex-direction: column; gap: 8px; }
  .wallet-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-deep);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
  }
  .wr-label { font-size: 13px; color: var(--text-muted); }
  .wr-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px; font-weight: 600; color: var(--text-main);
  }
  .wr-amount.positive { color: #22C55E; }
  .wr-amount.negative { color: #EF4444; }

  /* â”€â”€ TABLE â”€â”€ */
  .data-table { width: 100%; border-collapse: collapse; }
  .data-table th {
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); text-align: left;
    padding: 12px 14px; border-bottom: 1px solid var(--border-subtle);
  }
  .data-table td {
    padding: 12px 14px; font-size: 13px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
  }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table tr:hover td { background: var(--bg-deep); }
  .mono { font-family: 'JetBrains Mono', monospace; }
  .badge {
    display: inline-flex; align-items: center;
    padding: 3px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
  }
  .badge-green { background: rgba(34,197,94,0.1); color: #22C55E; }
  .badge-yellow { background: rgba(212,175,55,0.1); color: var(--gold); }
  .badge-blue { background: rgba(30,75,216,0.2); color: #7099FF; }
  .badge-red { background: rgba(239,68,68,0.1); color: #EF4444; }

  /* â”€â”€ ADMIN CAISSES â”€â”€ */
  .caisse-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px;
    margin-bottom: 24px;
  }
  .caisse-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-subtle);
  }
  .caisse-card.balance { border-color: var(--border); }
  .caisse-card .cc-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-bottom: 8px;
  }
  .caisse-card .cc-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px; font-weight: 700;
  }
  .cc-in { color: #22C55E; }
  .cc-out { color: #EF4444; }
  .cc-bal { color: var(--gold); }

  /* â”€â”€ RECOMPENSES â”€â”€ */
  .rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .reward-card {
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
  }
  .reward-card:hover { border-color: var(--gold); transform: translateY(-2px); }
  .reward-icon { font-size: 32px; margin-bottom: 8px; }
  .reward-name { font-size: 13px; font-weight: 600; color: var(--text-main); }
  .reward-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

  /* â”€â”€ ARBRE D â”€â”€ */
  .arbre-d {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 12px;
  }
  .arbre-row-label {
    font-size: 11px; color: var(--text-muted);
    margin-bottom: 6px;
  }
  .ad-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 600;
    border: 1px solid var(--border-subtle);
  }
  .ad-cell.filled { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.3); color: #22C55E; }
  .ad-cell.mine { background: var(--gold-dim); border-color: var(--border); color: var(--gold); }
  .ad-cell.empty { background: var(--bg-deep); color: var(--text-dim); }

  /* â”€â”€ PROGRESS BAR â”€â”€ */
  .progress-wrap { margin: 10px 0; }
  .progress-label {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--text-muted); margin-bottom: 6px;
  }
  .progress-bar {
    height: 6px; background: var(--bg-deep);
    border-radius: 3px; overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 3px;
    transition: width .5s ease;
  }

  /* â”€â”€ CONGRATS â”€â”€ */
  #screen-congrats {
    align-items: center; justify-content: center;
    background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(212,175,55,0.2), transparent 70%),
                var(--bg-deep);
    text-align: center; padding: 40px 20px;
  }
  .congrats-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 56px 48px;
    max-width: 520px;
  }
  .congrats-emoji { font-size: 64px; margin-bottom: 20px; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
  .congrats-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 26px; color: var(--gold); margin-bottom: 12px;
  }
  .congrats-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

  /* â”€â”€ TOPBAR â”€â”€ */
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky; top: 0; z-index: 10;
  }
  .topbar-left { display: flex; align-items: center; gap: 12px; }
  .topbar-right { display: flex; align-items: center; gap: 12px; }
  .topbar-title { font-size: 14px; font-weight: 600; color: var(--text-main); }

  /* â”€â”€ FORMS â”€â”€ */
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-note {
    font-size: 11px; color: var(--text-muted);
    margin-top: 6px; padding: 8px 10px;
    background: var(--bg-deep);
    border-radius: 6px;
    border-left: 3px solid var(--border);
  }

  .amount-display {
    background: var(--gold-dim);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px; font-weight: 700;
    color: var(--gold); text-align: center;
    margin: 14px 0;
  }

  /* â”€â”€ ADMIN LOGIN â”€â”€ */
  .admin-login {
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    max-width: 400px; width: 100%;
    padding: 40px;
  }
  .admin-login-badge {
    text-align: center; margin-bottom: 28px;
  }
  .admin-login-badge .alb-icon {
    font-size: 36px; margin-bottom: 8px;
  }
  .admin-login-badge h2 {
    font-family: 'Playfair Display', serif;
    color: var(--gold); font-size: 20px;
  }
  .admin-login-badge p {
    font-size: 12px; color: var(--text-muted); margin-top: 4px;
  }

  /* â”€â”€ SIDE NAV ADMIN â”€â”€ */
  .sidebar.admin-sidebar {
    border-right-color: rgba(212,175,55,0.2);
  }
  .admin-sidebar .nav-item.active {
    background: rgba(212,175,55,0.12);
  }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

  /* â”€â”€ RESPONSIVE â”€â”€ */
  @media (max-width: 768px) {
    .sidebar { width: 200px; }
    .main-content { padding: 16px; }
    .caisse-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .tableau-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
    #screen-user, #screen-admin { flex-direction: column; }
    .sidebar { width: 100%; min-height: unset; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  }

  /* â”€â”€ UTILS â”€â”€ */
  .text-gold { color: var(--gold); }
  .text-muted { color: var(--text-muted); }
  .text-green { color: #22C55E; }
  .text-red { color: #EF4444; }
  .mt-4 { margin-top: 16px; }
  .mb-4 { margin-bottom: 16px; }
  .flex { display: flex; }
  .items-center { align-items: center; }
  .gap-2 { gap: 8px; }
  .gap-3 { gap: 12px; }
  .justify-between { justify-content: space-between; }
  .w-full { width: 100%; }
  .divider { height: 1px; background: var(--border-subtle); margin: 20px 0; }

  /* Transfer modal */
  .modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); z-index: 100;
    align-items: center; justify-content: center;
    padding: 20px;
  }
  .modal-overlay.open { display: flex; }
  .modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 440px;
    padding: 32px;
  }
  .modal-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px; color: var(--text-main); margin-bottom: 20px;
  }
  .modal-close {
    float: right; background: none; border: none;
    color: var(--text-muted); font-size: 18px; cursor: pointer;
  }

  .notification {
    position: fixed; top: 20px; right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 200;
    transform: translateX(120%);
    transition: transform .3s, opacity .3s;
    max-width: 300px;
    opacity: 0;
  }
  .notification.show { transform: translateX(0); opacity: 1; }
  .notification.success { border-left: 3px solid #22C55E; }
  .notification.error { border-left: 3px solid #EF4444; }
  .notification.info { border-left: 3px solid var(--gold); }

  /* Toasts (shared with dashboard) */
  .toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    min-width: 260px;
    max-width: 340px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: slideInToast .22s ease;
    font-family: var(--font-main);
  }
  @keyframes slideInToast {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: none; }
  }
  .toast.hide { animation: slideOutToast .18s ease forwards; }
  @keyframes slideOutToast {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateX(24px); }
  }
  .toast.success { border-left: 3px solid #22C55E; }
  .toast.error { border-left: 3px solid #EF4444; }
  .toast.info { border-left: 3px solid var(--gold); }
  .toast.gold { border-left: 3px solid var(--gold); }

  .input-with-btn {
    display: flex; gap: 8px;
  }
  .input-with-btn input { flex: 1; }
  .btn-sm {
    padding: 8px 14px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted); font-size: 12px;
    cursor: pointer; font-family: var(--font-main);
    white-space: nowrap; transition: all .2s;
  }
  .btn-sm:hover { border-color: var(--gold); color: var(--gold); }

  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

  .profile-header {
    display: flex; align-items: center; gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-card2), var(--bg-card));
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
  }
  .avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--s1), #0d2a8a);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700;
    color: white; flex-shrink: 0;
    border: 3px solid var(--gold);
  }
  .profile-info h2 {
    font-size: 18px; font-weight: 700; color: var(--text-main);
  }
  .profile-info p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

  .info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  }
  .info-item {
    background: var(--bg-deep);
    border-radius: 8px; padding: 12px 14px;
    border: 1px solid var(--border-subtle);
  }
  .info-item .ii-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 4px; }
  .info-item .ii-val { font-size: 13px; color: var(--text-main); font-weight: 500; }

  .parrain-code {
    background: var(--gold-dim);
    border: 1px dashed var(--gold);
    border-radius: 8px; padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; color: var(--gold);
    margin-bottom: 16px; text-align: center;
  }

  .parrain-detect-box {
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
  }
  .parrain-detect-box label { margin-bottom: 8px; }
  .parrain-link-input-wrap { display: flex; gap: 8px; margin-bottom: 8px; }
  .parrain-link-input-wrap input { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  .parrain-status { display: flex; align-items: center; gap: 8px; font-size: 12px; min-height: 20px; }
  .parrain-status .ok { color: #22C55E; font-weight: 600; }
  .parrain-status .no { color: #EF4444; font-weight: 600; }
  .parrain-status .wait { color: var(--text-dim); }
  .parrain-confirmed {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
  }
  .parrain-confirmed .p-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #a07820);
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px; color: #0A0E1A;
  }
  .pending-notice {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #f59e0b;
    line-height: 1.7;
  }
  .ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 14px;
  }
  .input-with-btn { display: flex; gap: 8px; }
  .input-with-btn input { flex: 1; }
  .pseudo-check { font-size: 12px; margin-top: 6px; }
  .mt-4 { margin-top: 16px; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }
  .card:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    box-shadow: 0 12px 24px rgba(0,0,0,.22);
  }
  .card-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 16px;
  }
  .card-sm { padding: 14px 16px; }

  .members-card-box { width: 100%; max-width: 320px; }
  .members-count-sm { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
  .members-scroll { max-height: 420px; overflow-y: auto; font-size: 12px; }
  .members-row {
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }
