/* ============================================================
   MON CRYPTO — Dark Luxury CSS
   Noir profond + Or + Vert profit + Rouge perte
   ============================================================ */

:root {
    --bg:          #08090e;
    --bg-card:     #0e1018;
    --bg-card2:    #131520;
    --border:      rgba(255,255,255,0.06);
    --border-gold: rgba(240,180,41,0.3);
    --gold:        #f0b429;
    --gold-light:  #fcd34d;
    --gold-dim:    rgba(240,180,41,0.12);
    --green:       #00d395;
    --green-dim:   rgba(0,211,149,0.1);
    --red:         #ff4d6a;
    --red-dim:     rgba(255,77,106,0.1);
    --blue:        #4f8ef7;
    --blue-dim:    rgba(79,142,247,0.1);
    --white:       #ffffff;
    --gray-100:    #e8eaf0;
    --gray-400:    #6b7280;
    --gray-500:    #4b5563;
    --gray-600:    #374151;

    --radius-sm:   6px;
    --radius:      12px;
    --radius-lg:   18px;
    --radius-xl:   24px;
    --shadow:      0 4px 24px rgba(0,0,0,0.4);
    --shadow-gold: 0 0 30px rgba(240,180,41,0.15);
    --sidebar-w:   240px;
    --topbar-h:    60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--gray-100);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: 'DM Sans', sans-serif; cursor: pointer; }
input, select { font-family: 'DM Sans', sans-serif; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gray-600); border-radius: 2px; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
#authPage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* BACKGROUND ANIMÉ */
.auth-bg {
    position: fixed; inset: 0; z-index: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(240,180,41,0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(79,142,247,0.04) 0%, transparent 60%),
                var(--bg);
}
.auth-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width:400px; height:400px; top:-100px; left:-100px; background:rgba(240,180,41,0.06); animation-delay:0s; }
.orb2 { width:300px; height:300px; bottom:-80px; right:-80px; background:rgba(0,211,149,0.05); animation-delay:-3s; }
.orb3 { width:250px; height:250px; top:50%; left:50%; background:rgba(79,142,247,0.04); animation-delay:-5s; }
@keyframes orbFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(30px,-20px) scale(1.05); }
    66%      { transform: translate(-20px,30px) scale(0.95); }
}
.auth-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.auth-container {
    position: relative; z-index: 1;
    display: flex;
    width: 100%; max-width: 1100px;
    min-height: 100vh;
    margin: 0 auto;
}

/* AUTH LEFT */
.auth-left {
    flex: 1;
    padding: 60px 48px;
    display: flex; flex-direction: column;
    justify-content: center;
    gap: 36px;
}
.auth-brand {
    display: flex; align-items: center; gap: 12px;
}
.brand-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg);
    font-size: 1.2rem; font-weight: 900;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-gold);
}
.brand-name {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: white;
}

.ai-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(0,211,149,0.08);
    border: 1px solid rgba(0,211,149,0.2);
    color: var(--green);
    font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    border-radius: 20px;
    width: fit-content;
}
.ai-dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:0.5; transform:scale(0.8); }
}

.auth-title {
    font-family: 'Syne', sans-serif;
    font-size: 3rem; font-weight: 800;
    line-height: 1.15;
    color: white;
}
.gold-text { color: var(--gold); }
.auth-subtitle {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.7;
}

/* STATS */
.auth-stats {
    display: flex; gap: 12px;
}
.stat-pill {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    flex: 1;
}
.stat-val { font-family:'Syne',sans-serif; font-weight:800; font-size:1.2rem; color:var(--gold); }
.stat-lbl { font-size:0.7rem; color:var(--gray-400); margin-top:2px; }

/* TICKER */
.crypto-ticker {
    overflow: hidden;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.ticker-track {
    display: flex; gap: 24px;
    animation: tickerScroll 20s linear infinite;
    width: max-content;
}
.ticker-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; white-space: nowrap;
}
.ticker-symbol { font-weight: 700; color: white; }
.ticker-price  { color: var(--gray-400); }
.ticker-change.up   { color: var(--green); }
.ticker-change.down { color: var(--red); }
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* AUTH RIGHT */
.auth-right {
    width: 460px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
}
.auth-form-wrap { width: 100%; }
.form-header { margin-bottom: 28px; }
.form-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem; font-weight: 800;
    color: white; margin-bottom: 6px;
}
.form-header p { font-size: 0.85rem; color: var(--gray-400); }

/* FORMS */
.field-group { margin-bottom: 18px; }
.field-group label {
    display: flex; justify-content: space-between;
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--gray-400); margin-bottom: 8px;
}
.field-group input, .field-group select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.9rem; color: white;
    transition: border-color 0.2s, background 0.2s;
    outline: none; appearance: none;
}
.field-group input:focus, .field-group select:focus {
    border-color: var(--gold);
    background: rgba(240,180,41,0.04);
}
.field-group select option { background: var(--bg-card2); color: white; }
.field-group input::placeholder { color: var(--gray-500); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.eye-btn {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    font-size: 0.9rem; opacity: 0.5;
    cursor: pointer; padding: 4px;
}
.forgot-link { color: var(--gold); font-weight: 600; font-size: 0.72rem; text-transform: none; letter-spacing: 0; }
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-wrap {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.82rem; color: var(--gray-400);
    margin-bottom: 18px; cursor: pointer;
}
.checkbox-wrap a { color: var(--gold); }

/* BUTTONS */
.btn-primary {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); border: none; border-radius: var(--radius-sm);
    font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem;
    letter-spacing: 0.03em;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(240,180,41,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(240,180,41,0.4); }
.btn-primary:disabled { opacity: 0.6; transform: none; }

.btn-gold {
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(240,180,41,0.25);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(240,180,41,0.4); }

.btn-outline-gold {
    padding: 10px 22px;
    background: transparent;
    color: var(--gold); border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s; width: 100%;
}
.btn-outline-gold:hover { background: var(--gold-dim); }

.switch-link { font-size: 0.82rem; color: var(--gray-400); text-align: center; margin-top: 20px; }
.switch-link a { color: var(--gold); font-weight: 600; }

/* MSG BOX */
.msg-box {
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.82rem; margin-bottom: 16px;
}
.msg-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,211,149,0.2); }
.msg-error   { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(255,77,106,0.2); }

/* ============================================================
   APP PAGE
   ============================================================ */
#appPage { display: flex; min-height: 100vh; }

/* SIDEBAR */
#sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 100;
    display: flex; flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-brand {
    padding: 20px 18px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border);
}
.brand-icon-sm {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); font-size: 0.9rem; font-weight: 900;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.brand-name-sm {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 0.78rem; letter-spacing: 0.12em; color: white;
}
.sidebar-nav { flex: 1; padding: 16px 10px; overflow-y: auto; }
.nav-group-label {
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--gray-500); padding: 12px 10px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--gray-400); font-size: 0.84rem; font-weight: 500;
    transition: all 0.15s; margin-bottom: 2px; cursor: pointer;
    position: relative;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: white; }
.nav-item.active { background: var(--gold-dim); color: var(--gold); }
.nav-item.active svg { stroke: var(--gold); }
.nav-live {
    margin-left: auto;
    font-size: 0.58rem; font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--green);
    background: var(--green-dim);
    padding: 2px 6px; border-radius: 4px;
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border);
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm); margin-bottom: 6px;
}
.user-avatar-sm {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); font-weight: 800; font-size: 0.84rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-name-sm  { font-size: 0.82rem; font-weight: 600; color: white; }
.user-balance-sm { font-size: 0.72rem; color: var(--gold); margin-top: 1px; }
.logout-btn {
    width: 100%; padding: 8px;
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gray-400); font-size: 0.78rem;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; transition: all 0.15s;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* MAIN */
#mainContent {
    margin-left: var(--sidebar-w);
    flex: 1; display: flex; flex-direction: column;
    min-height: 100vh;
}
.topbar {
    height: var(--topbar-h);
    background: rgba(8,9,14,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 24px; gap: 14px;
    position: sticky; top: 0; z-index: 50;
}
.menu-toggle { display: none; background: none; border: none; color: var(--gray-400); }
.topbar-title {
    flex: 1; font-family: 'Syne', sans-serif;
    font-weight: 700; font-size: 0.88rem;
    letter-spacing: 0.04em; color: white;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.market-pill {
    font-size: 0.72rem; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--gray-400);
}
.notif-btn {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400); position: relative; cursor: pointer;
}
.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--gold); border-radius: 50%;
    border: 1px solid var(--bg);
}
.topbar-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); font-weight: 800; font-size: 0.82rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

.page-content { flex: 1; padding: 28px 24px; max-width: 1200px; }
.section { animation: fadeUp 0.25s ease both; }
.section.hidden { display: none !important; }
@keyframes fadeUp {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}
.section-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.greeting { font-size: 0.78rem; color: var(--gray-400); font-weight: 500; }
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem; font-weight: 800; color: white;
}
.section-sub { font-size: 0.82rem; color: var(--gray-400); margin-top: 3px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-pills { display: flex; gap: 8px; align-items: center; }
.perf-pill {
    display: flex; gap: 6px; align-items: center;
    padding: 6px 14px; border-radius: 20px;
    font-size: 0.76rem; font-weight: 700;
    background: var(--green-dim); color: var(--green);
    border: 1px solid rgba(0,211,149,0.2);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.balance-hero {
    background: linear-gradient(135deg, var(--bg-card2) 0%, rgba(240,180,41,0.04) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
    position: relative; overflow: hidden;
}
.balance-hero::before {
    content: '';
    position: absolute; top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(240,180,41,0.08) 0%, transparent 70%);
}
.balance-label { font-size: 0.75rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.balance-amount {
    font-family: 'Syne', sans-serif;
    font-size: 2.8rem; font-weight: 800;
    color: white; letter-spacing: -0.02em; line-height: 1.1;
}
.balance-change {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.84rem; margin-top: 8px; color: var(--green);
}
.change-period { color: var(--gray-400); }
.mini-chart { width: 180px; height: 60px; }

/* CHART */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 20px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chart-title { font-weight: 700; font-size: 0.9rem; color: white; }
.chart-periods { display: flex; gap: 4px; }
.period-btn {
    padding: 5px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: none; color: var(--gray-400);
    font-size: 0.75rem; font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.period-btn.active { background: var(--gold-dim); color: var(--gold); border-color: var(--border-gold); }

/* DASH GRID */
.dash-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.dash-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
}
.dash-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dash-card-title { font-weight: 700; font-size: 0.88rem; color: white; }
.dash-card-sub { font-size: 0.72rem; color: var(--gray-400); }
.live-badge {
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em;
    color: var(--green); animation: livePulse 2s ease-in-out infinite;
}
.card-link {
    background: none; border: none; color: var(--gold);
    font-size: 0.76rem; font-weight: 600; cursor: pointer;
    margin-top: 14px; display: block; text-align: right;
    transition: opacity 0.15s;
}
.card-link:hover { opacity: 0.8; }

/* SIGNAL MINI */
.signal-mini {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.signal-mini:last-child { border: none; }
.signal-mini-icon {
    width: 30px; height: 30px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800; flex-shrink: 0;
}
.signal-mini-icon.buy  { background: var(--green-dim); color: var(--green); }
.signal-mini-icon.sell { background: var(--red-dim);   color: var(--red); }
.signal-mini-name { font-size: 0.84rem; font-weight: 600; color: white; }
.signal-mini-conf { font-size: 0.72rem; color: var(--gray-400); }
.signal-mini-pct  { margin-left: auto; font-size: 0.78rem; font-weight: 700; }

/* POSITION MINI */
.pos-mini {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.pos-mini:last-child { border: none; }
.pos-icon {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--gold-dim); border: 1px solid var(--border-gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800; color: var(--gold); flex-shrink: 0;
}
.pos-name  { font-size: 0.84rem; font-weight: 600; color: white; }
.pos-qty   { font-size: 0.72rem; color: var(--gray-400); }
.pos-val   { margin-left: auto; font-size: 0.84rem; font-weight: 700; color: white; }
.pos-pnl   { font-size: 0.7rem; font-weight: 600; }
.pos-pnl.up   { color: var(--green); }
.pos-pnl.down { color: var(--red); }

/* ACTIVITY */
.activity-mini {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.activity-mini:last-child { border: none; }
.act-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.act-dot.green { background: var(--green); }
.act-dot.gold  { background: var(--gold); }
.act-dot.red   { background: var(--red); }
.act-dot.blue  { background: var(--blue); }
.act-text { font-size: 0.82rem; color: var(--gray-100); flex: 1; }
.act-time { font-size: 0.7rem; color: var(--gray-400); white-space: nowrap; }

/* ============================================================
   MARCHÉ
   ============================================================ */
.search-input {
    padding: 8px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: white; font-size: 0.84rem; outline: none; width: 200px;
    transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--gray-500); }

.market-status {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; color: var(--green); font-weight: 600;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-dot.green { background: var(--green); animation: pulse 2s infinite; }

.market-table-wrap { overflow-x: auto; }
.market-table {
    width: 100%; border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden;
}
.market-table thead tr { border-bottom: 1px solid var(--border); }
.market-table th {
    padding: 14px 16px; text-align: left;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gray-400);
}
.market-table td {
    padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}
.market-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.market-table tbody tr:last-child td { border: none; }

.crypto-cell { display: flex; align-items: center; gap: 12px; }
.crypto-logo {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800;
    flex-shrink: 0;
}
.crypto-name   { font-weight: 700; color: white; font-size: 0.88rem; }
.crypto-symbol { font-size: 0.72rem; color: var(--gray-400); }
.price-cell    { font-weight: 700; color: white; font-size: 0.88rem; }
.change-cell   { font-weight: 700; font-size: 0.84rem; }
.change-cell.up   { color: var(--green); }
.change-cell.down { color: var(--red); }
.mcap-cell { font-size: 0.82rem; color: var(--gray-400); }
.sparkline { width: 80px; height: 32px; }
.btn-trade {
    padding: 6px 14px;
    background: var(--gold-dim); color: var(--gold);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm); font-size: 0.76rem; font-weight: 700;
    cursor: pointer; transition: all 0.15s;
}
.btn-trade:hover { background: var(--gold); color: var(--bg); }

/* ============================================================
   PORTEFEUILLE
   ============================================================ */
.portfolio-summary {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px;
    margin-bottom: 20px;
}
.psummary-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
}
.psummary-card.main { border-color: var(--border-gold); background: linear-gradient(135deg, var(--bg-card2), rgba(240,180,41,0.04)); }
.psummary-label { font-size: 0.7rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.psummary-val { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800; color: white; }
.psummary-change { font-size: 0.78rem; color: var(--green); margin-top: 4px; }

.portfolio-grid {
    display: grid; grid-template-columns: 280px 1fr; gap: 16px;
}
.donut-legend { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-name { color: var(--gray-400); flex: 1; }
.legend-pct  { font-weight: 700; color: white; }

/* POSITIONS */
.position-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.position-row:last-child { border: none; }
.position-logo {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800; flex-shrink: 0;
}
.position-name { font-weight: 700; color: white; font-size: 0.88rem; }
.position-qty  { font-size: 0.74rem; color: var(--gray-400); }
.position-val  { margin-left: auto; text-align: right; }
.position-usd  { font-weight: 700; color: white; font-size: 0.9rem; }
.position-pnl  { font-size: 0.74rem; font-weight: 600; margin-top: 2px; }
.position-pnl.up   { color: var(--green); }
.position-pnl.down { color: var(--red); }

/* ============================================================
   SIGNAUX IA
   ============================================================ */
.ai-status-pill {
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,211,149,0.06);
    border: 1px solid rgba(0,211,149,0.15);
    color: var(--green); font-size: 0.78rem; font-weight: 600;
    padding: 8px 16px; border-radius: 20px;
}
.ai-pulse {
    width: 8px; height: 8px; background: var(--green);
    border-radius: 50%; flex-shrink: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

.ai-metrics {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    margin-bottom: 24px;
}
.ai-metric {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; text-align: center;
}
.ai-metric-val {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem; font-weight: 800; color: white;
}
.ai-metric-val.green { color: var(--green); }
.ai-metric-val.red   { color: var(--red); }
.ai-metric-val.gold  { color: var(--gold); }
.ai-metric-lbl { font-size: 0.72rem; color: var(--gray-400); margin-top: 4px; }

.signals-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px;
}
.signal-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}
.signal-card:hover { transform: translateY(-2px); }
.signal-card.buy  { border-left: 3px solid var(--green); }
.signal-card.sell { border-left: 3px solid var(--red); }
.signal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.signal-crypto { display: flex; align-items: center; gap: 10px; }
.signal-logo {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 800; flex-shrink: 0;
}
.signal-name    { font-weight: 700; color: white; font-size: 0.92rem; }
.signal-price   { font-size: 0.76rem; color: var(--gray-400); }
.signal-dir {
    padding: 5px 12px; border-radius: var(--radius-sm);
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em;
}
.signal-dir.buy  { background: var(--green-dim); color: var(--green); }
.signal-dir.sell { background: var(--red-dim);   color: var(--red); }
.signal-conf-wrap { margin-bottom: 12px; }
.signal-conf-label { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--gray-400); margin-bottom: 6px; }
.signal-conf-pct { font-weight: 700; color: white; }
.signal-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.signal-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.signal-reasoning { font-size: 0.78rem; color: var(--gray-400); line-height: 1.5; margin-bottom: 14px; }
.signal-footer { display: flex; justify-content: space-between; align-items: center; }
.signal-time { font-size: 0.7rem; color: var(--gray-500); }
.signal-action {
    padding: 6px 14px; border-radius: var(--radius-sm);
    font-size: 0.76rem; font-weight: 700; cursor: pointer; border: none;
    transition: all 0.15s;
}
.signal-action.buy  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,211,149,0.2); }
.signal-action.sell { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(255,77,106,0.2); }
.signal-action:hover { opacity: 0.8; }

/* ============================================================
   PACKS
   ============================================================ */
.packs-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    margin-bottom: 32px;
}
.pack-card {
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px;
    transition: all 0.2s; position: relative; overflow: hidden;
}
.pack-card:hover { border-color: var(--border-gold); transform: translateY(-3px); box-shadow: var(--shadow-gold); }
.pack-card.featured { border-color: var(--border-gold); background: linear-gradient(135deg, var(--bg-card2), rgba(240,180,41,0.04)); }
.pack-card.featured::before {
    content: '⭐ RECOMMANDÉ';
    position: absolute; top: 16px; right: 16px;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em;
    color: var(--gold); background: var(--gold-dim);
    padding: 3px 8px; border-radius: 4px;
}
.pack-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; color: var(--gray-400); text-transform: uppercase; margin-bottom: 12px; }
.pack-name  { font-family:'Syne',sans-serif; font-size:1.3rem; font-weight:800; color:white; margin-bottom:6px; }
.pack-return { font-size: 2rem; font-weight: 800; color: var(--gold); font-family:'Syne',sans-serif; line-height:1.1; }
.pack-duration { font-size: 0.78rem; color: var(--gray-400); margin-bottom: 18px; }
.pack-allocation { margin-bottom: 20px; }
.alloc-title { font-size: 0.7rem; color: var(--gray-400); font-weight: 600; margin-bottom: 10px; }
.alloc-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.alloc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.alloc-name { font-size: 0.78rem; color: var(--gray-100); flex: 1; }
.alloc-pct  { font-size: 0.76rem; font-weight: 700; color: white; }
.pack-input-wrap { margin-bottom: 12px; }
.pack-input {
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 14px; color: white; font-size: 0.88rem; outline: none;
    transition: border-color 0.2s;
}
.pack-input:focus { border-color: var(--gold); }
.pack-btn {
    width: 100%; padding: 11px;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.86rem; cursor: pointer;
    transition: all 0.2s;
}
.pack-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(240,180,41,0.3); }

.sub-title { font-family:'Syne',sans-serif; font-weight:700; font-size:1rem; color:white; margin-bottom:14px; }
.my-pack-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px;
    display: flex; align-items: center; gap: 16px; margin-bottom: 10px;
}
.my-pack-name { font-weight: 700; color: white; font-size: 0.9rem; }
.my-pack-meta { font-size: 0.75rem; color: var(--gray-400); margin-top: 2px; }
.my-pack-val  { margin-left: auto; font-family:'Syne',sans-serif; font-size:1.1rem; font-weight:800; color:var(--gold); }
.my-pack-pnl  { font-size: 0.74rem; font-weight: 600; color: var(--green); text-align: right; margin-top: 2px; }

/* ============================================================
   DÉPÔTS / RETRAITS
   ============================================================ */
.deposit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.deposit-form { display: flex; flex-direction: column; gap: 0; }
.amount-input-wrap { position: relative; }
.currency-symbol {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--gold); font-weight: 700; font-size: 0.9rem;
}
.amount-input-wrap input { padding-left: 32px; }
.field-hint { font-size: 0.72rem; color: var(--gray-400); margin-top: 5px; }
.amount-presets { display: flex; gap: 8px; margin: 12px 0; }
.amount-presets button {
    flex: 1; padding: 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--gray-400); font-size: 0.76rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.amount-presets button:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.mt-4 { margin-top: 20px; }
.mb-3 { margin-bottom: 14px; }

/* MOVEMENT HISTORY */
.movement-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.movement-item:last-child { border: none; }
.movement-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.movement-icon.deposit  { background: var(--green-dim); }
.movement-icon.withdraw { background: var(--red-dim); }
.movement-label { font-size: 0.86rem; font-weight: 600; color: white; }
.movement-date  { font-size: 0.72rem; color: var(--gray-400); }
.movement-amount { margin-left: auto; font-weight: 700; }
.movement-status {
    font-size: 0.68rem; font-weight: 700; padding: 2px 8px;
    border-radius: 4px; margin-left: 8px;
}
.status-pending  { background: rgba(240,180,41,0.1); color: var(--gold); }
.status-approved { background: var(--green-dim); color: var(--green); }
.status-rejected { background: var(--red-dim); color: var(--red); }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.your-rank-pill {
    padding: 8px 18px; border-radius: 20px;
    background: var(--gold-dim); border: 1px solid var(--border-gold);
    font-size: 0.82rem; color: var(--gray-400);
}
.your-rank-pill strong { color: var(--gold); }

.podium {
    display: flex; align-items: flex-end; justify-content: center;
    gap: 12px; margin-bottom: 24px;
}
.podium-item {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    flex: 1; max-width: 200px;
}
.podium-avatar {
    border-radius: 50%; border: 3px solid;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif; font-weight: 800;
}
.podium-item:nth-child(1) .podium-avatar { width:60px; height:60px; border-color:var(--gray-400); font-size:1.2rem; }
.podium-item:nth-child(2) .podium-avatar { width:76px; height:76px; border-color:var(--gold);     font-size:1.4rem; }
.podium-item:nth-child(3) .podium-avatar { width:60px; height:60px; border-color:#cd7f32;         font-size:1.2rem; }
.podium-name  { font-size: 0.84rem; font-weight: 700; color: white; }
.podium-perf  { font-size: 0.76rem; font-weight: 700; }
.podium-block {
    width: 100%; border-radius: var(--radius) var(--radius) 0 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800;
}
.podium-item:nth-child(1) .podium-block { height:80px;  background:var(--bg-card2); color:var(--gray-400); }
.podium-item:nth-child(2) .podium-block { height:110px; background:var(--gold-dim); color:var(--gold); }
.podium-item:nth-child(3) .podium-block { height:60px;  background:rgba(205,127,50,0.1); color:#cd7f32; }

.leader-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.leader-row:last-child { border: none; }
.leader-row.me { background: var(--gold-dim); border-radius: var(--radius-sm); padding: 14px 12px; border: 1px solid var(--border-gold); }
.leader-rank { font-family:'Syne',sans-serif; font-weight:800; font-size:1rem; color:var(--gray-400); width:32px; text-align:center; }
.leader-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.84rem; flex-shrink: 0;
}
.leader-name  { font-size: 0.88rem; font-weight: 600; color: white; flex: 1; }
.leader-perf  { font-weight: 800; font-size: 0.9rem; }
.leader-badge {
    font-size: 0.65rem; font-weight: 700; padding: 3px 8px;
    border-radius: 4px; letter-spacing: 0.04em;
}
.badge-diamond { background: rgba(79,142,247,0.1); color: var(--blue); }
.badge-gold    { background: var(--gold-dim); color: var(--gold); }
.badge-silver  { background: rgba(255,255,255,0.06); color: var(--gray-400); }
.badge-bronze  { background: rgba(205,127,50,0.1); color: #cd7f32; }

/* ============================================================
   PROFIL
   ============================================================ */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-avatar-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #e8a020);
    color: var(--bg); font-family:'Syne',sans-serif; font-size:1.6rem; font-weight:800;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-name  { font-family:'Syne',sans-serif; font-size:1.1rem; font-weight:800; color:white; }
.profile-email { font-size:0.8rem; color:var(--gray-400); margin-top:2px; }
.kyc-badge {
    display: inline-block; margin-top: 6px;
    font-size: 0.7rem; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; background: rgba(240,180,41,0.1);
    color: var(--gold); border: 1px solid var(--border-gold);
}
.kyc-badge.approved { background: var(--green-dim); color: var(--green); border-color: rgba(0,211,149,0.2); }
.mt-3 { margin-top: 16px; }

/* ============================================================
   GLASS CARDS
   ============================================================ */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.card-title-sm { font-weight: 700; font-size: 0.88rem; color: white; margin-bottom: 16px; }

/* ============================================================
   MODAL
   ============================================================ */
.overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; backdrop-filter: blur(8px); padding: 20px;
}
.modal {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 480px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
    from { opacity:0; transform:scale(0.92) translateY(16px); }
    to   { opacity:1; transform:scale(1)    translateY(0); }
}
.modal-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 22px 24px 0;
    padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family:'Syne',sans-serif; font-size:1.05rem; font-weight:800; color:white; }
.modal-header button { background:none; border:none; font-size:1.6rem; color:var(--gray-400); cursor:pointer; line-height:1; }

/* TRADE MODAL */
.trade-tabs { display: flex; border-bottom: 1px solid var(--border); }
.trade-tab {
    flex: 1; padding: 12px;
    background: none; border: none; font-size: 0.84rem; font-weight: 600;
    color: var(--gray-400); cursor: pointer;
    border-bottom: 2px solid transparent; transition: all 0.15s;
}
.trade-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.trade-preview {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; margin: 12px 0;
}
.preview-row {
    display: flex; justify-content: space-between;
    font-size: 0.82rem; padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.preview-row:last-child { border: none; }
.preview-row span:first-child { color: var(--gray-400); }
.preview-row span:last-child  { font-weight: 600; color: white; }

/* FILE DROP */
.file-drop {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px; text-align: center;
    cursor: pointer; transition: border-color 0.2s;
}
.file-drop:hover { border-color: var(--gold); }

/* ============================================================
   TOAST
   ============================================================ */
#toastArea {
    position: fixed; bottom: 24px; right: 20px;
    display: flex; flex-direction: column-reverse; gap: 10px;
    z-index: 9999; pointer-events: none;
}
.toast {
    pointer-events: all;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px; min-width: 280px; max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: flex; align-items: flex-start; gap: 12px;
    animation: toastIn 0.3s cubic-bezier(0.16,1,0.3,1);
    border-left: 3px solid var(--gold);
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--gold); }
@keyframes toastIn {
    from { opacity:0; transform:translateX(20px); }
    to   { opacity:1; transform:translateX(0); }
}
.toast-icon  { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.toast-title { font-weight: 700; font-size: 0.84rem; color: white; }
.toast-msg   { font-size: 0.75rem; color: var(--gray-400); margin-top: 2px; }

/* ============================================================
   UTILS
   ============================================================ */
.hidden { display: none !important; }
.sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 99;
}
.sidebar-backdrop.show { display: block; }
.empty-state { font-size: 0.82rem; color: var(--gray-400); text-align: center; padding: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: 1fr 1fr; }
    .packs-grid { grid-template-columns: 1fr 1fr; }
    .portfolio-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    #sidebar { transform: translateX(-100%); }
    #sidebar.open { transform: translateX(0); }
    #mainContent { margin-left: 0; }
    .menu-toggle { display: flex; }
    .auth-left { display: none; }
    .auth-right { width: 100%; border-left: none; }
    .dash-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .deposit-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .ai-metrics { grid-template-columns: repeat(2, 1fr); }
    .portfolio-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .packs-grid { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .balance-amount { font-size: 2rem; }
    .balance-hero { flex-direction: column; gap: 16px; }
    .mini-chart { width: 100%; }
    .ai-metrics { grid-template-columns: repeat(2, 1fr); }
    .podium { gap: 6px; }
    .portfolio-summary { grid-template-columns: 1fr; }
}