/* =========================================================
   SAPPHIRE ACADEMY — APP UI
========================================================= */
:root {
    --navy-dark: #040914;
    --navy: #071326;
    --navy-light: #0c1d38;
    --panel: rgba(10, 25, 49, .82);
    --blue: #0878ff;
    --blue-bright: #2d8dff;
    --blue-dark: #0054c7;
    --cyan: #42c6ff;
    --white: #f5f8ff;
    --gray: #91a0b7;
    --muted: #62718a;
    --green: #35d39a;
    --orange: #ffad4a;
    --purple: #9b7cff;
    --red: #ff5f73;
    --border: rgba(255,255,255,.075);
    --shadow: 0 22px 70px rgba(0,0,0,.28);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--navy-dark);
    color: var(--white);
    line-height: 1.5;
    min-height: 100vh;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 20px;
    background: #000;
    transition: opacity .8s ease, visibility .8s ease;
    overflow: hidden;
}
.splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(8,120,255,.25), transparent 68%);
    filter: blur(12px);
}
.splash-logo-wrap { position: relative; width: 210px; height: 270px; display: grid; place-items: center; }
.splash-logo-wrap img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 2; animation: logoIn 1.2s ease both; }
.light-beam {
    position: absolute;
    z-index: 3;
    width: 16px;
    height: 360px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
    filter: blur(7px);
    transform: rotate(28deg) translateX(-260px);
    animation: beam 1.35s ease .15s both;
    pointer-events: none;
}
.splash p { letter-spacing: 7px; font-size: 11px; font-weight: 800; color: #b9d6ff; }
.splash-loader { width: 100px; height: 2px; background: #182238; overflow: hidden; }
.splash-loader::after { content:""; display:block; width:40%; height:100%; background:var(--blue); animation: load 1.45s ease-in-out infinite; }

@keyframes logoIn { from { opacity:0; transform:scale(.82); } to { opacity:1; transform:scale(1); } }
@keyframes beam { to { transform: rotate(28deg) translateX(260px); } }
@keyframes load { 50% { transform: translateX(150%); } 100% { transform: translateX(280%); } }

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 255px;
    padding: 26px 16px;
    background: rgba(3,9,20,.92);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(22px);
    z-index: 200;
    display: flex;
    flex-direction: column;
}
.brand { display:flex; align-items:center; gap:11px; padding: 0 10px 30px; }
.brand img { width: 42px; height:42px; object-fit:contain; }
.brand strong { display:block; font-size:15px; }
.brand span { display:block; color:var(--blue-bright); font-size:9px; letter-spacing:3px; font-weight:800; margin-top:2px; }
.sidebar-label { color:#4e607b; font-size:9px; font-weight:800; letter-spacing:2px; padding: 0 12px 9px; }
.side-nav { display:grid; gap:5px; }
.nav-item {
    border:0; color:var(--gray); background:transparent; border-radius:10px;
    padding:12px 13px; display:flex; align-items:center; gap:12px; text-align:left;
    transition:.25s; font-weight:600; font-size:13px;
}
.nav-item span { width:20px; text-align:center; color:#60728d; font-size:17px; }
.nav-item:hover { color:var(--white); background:rgba(255,255,255,.035); }
.nav-item.active { color:white; background:linear-gradient(90deg, rgba(8,120,255,.2), rgba(8,120,255,.06)); box-shadow: inset 2px 0 var(--blue); }
.nav-item.active span { color:var(--blue-bright); }

.sidebar-bottom { margin-top:auto; }
.profile-card { border:1px solid var(--border); background:rgba(255,255,255,.025); border-radius:12px; padding:11px; display:flex; align-items:center; gap:9px; }
.profile-card .avatar { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:linear-gradient(145deg,#0878ff,#123d87); font-size:10px; font-weight:800; }
.profile-card strong { display:block; font-size:11px; }
.profile-card span { display:block; color:var(--muted); font-size:9px; }
.profile-card button { margin-left:auto; border:0; background:none; color:#667894; }

.main { margin-left:255px; width:calc(100% - 255px); min-width:0; }
.topbar {
    height:88px; padding:0 42px; display:flex; align-items:center; justify-content:space-between;
    position:sticky; top:0; z-index:100; background:rgba(4,9,20,.78); border-bottom:1px solid var(--border);
    backdrop-filter: blur(20px);
}
.eyebrow { display:block; color:#53708f; font-size:9px; font-weight:800; letter-spacing:2.2px; margin-bottom:3px; }
.topbar h1 { font-size:20px; line-height:1.2; }
.topbar-actions { display:flex; align-items:center; gap:14px; }
.market-status { font-size:11px; color:#9bacbf; display:flex; align-items:center; gap:7px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 12px var(--green); }
.icon-btn, .mobile-menu { border:1px solid var(--border); color:#a7b6cc; background:rgba(255,255,255,.025); border-radius:9px; width:36px; height:36px; }
.mobile-menu { display:none; }

.view { display:none; padding:34px 42px 50px; max-width:1600px; margin:auto; }
.view.active { display:block; animation:viewIn .35s ease; }
@keyframes viewIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }

.welcome-row { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:28px; }
.welcome-row h2, .section-intro h2 { font-size:30px; letter-spacing:-.7px; }
.muted, .section-intro p { color:var(--gray); font-size:12px; }
.section-intro { margin-bottom:28px; }
.section-intro.compact { display:flex; justify-content:space-between; align-items:end; gap:20px; }
.section-intro h2 { margin-top:5px; }
.section-intro.compact { margin-bottom:20px; }

.btn { border:0; border-radius:9px; padding:11px 16px; text-decoration:none; display:inline-flex; justify-content:center; align-items:center; gap:9px; color:white; font-size:12px; font-weight:800; transition:.25s; }
.btn.primary { background:linear-gradient(135deg,var(--blue),#0064e6); box-shadow:0 9px 25px rgba(8,120,255,.18); }
.btn.primary:hover { transform:translateY(-2px); box-shadow:0 13px 30px rgba(8,120,255,.28); }
.btn.secondary { background:transparent; border:1px solid var(--border); color:#b5c1d3; }
.btn.secondary:hover { border-color:rgba(8,120,255,.55); color:white; }
.btn.full { width:100%; }

.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:14px; }
.stat-card, .panel { background:linear-gradient(145deg,rgba(11,28,54,.88),rgba(6,17,34,.82)); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); }
.stat-card { min-height:145px; padding:19px; position:relative; overflow:hidden; }
.stat-card::after { content:""; position:absolute; width:100px; height:100px; right:-45px; top:-45px; background:radial-gradient(circle,rgba(8,120,255,.13),transparent 68%); }
.stat-card span:not(.stat-icon) { color:var(--gray); font-size:11px; display:block; margin-bottom:6px; }
.stat-card strong { font-size:25px; letter-spacing:-.7px; display:block; }
.stat-card small { color:var(--muted); font-size:9px; display:block; margin-top:6px; }
.stat-icon { width:31px; height:31px; display:grid; place-items:center; border-radius:8px; margin-bottom:17px; background:rgba(8,120,255,.12); color:var(--blue-bright); font-size:14px; }
.stat-icon.green { color:var(--green); background:rgba(53,211,154,.09); }
.stat-icon.purple { color:var(--purple); background:rgba(155,124,255,.1); }
.stat-icon.orange { color:var(--orange); background:rgba(255,173,74,.1); }

.dashboard-grid { display:grid; grid-template-columns:1.6fr 1fr; gap:14px; }
.panel { padding:19px; min-width:0; }
.performance-panel { min-height:330px; grid-row:span 2; }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:18px; }
.panel-kicker { color:#4f7199; font-size:8px; font-weight:900; letter-spacing:2px; display:block; margin-bottom:4px; }
.panel h3 { font-size:15px; }
.period-tabs { display:flex; gap:3px; padding:3px; background:rgba(255,255,255,.025); border-radius:7px; }
.period { border:0; background:transparent; color:#687a95; font-size:9px; padding:6px 8px; border-radius:5px; }
.period.active { background:#153258; color:white; }
.chart { height:230px; position:relative; padding:10px 5px 22px 40px; }
.chart-grid { position:absolute; inset:10px 0 22px 40px; display:flex; flex-direction:column; justify-content:space-between; border-bottom:1px solid rgba(255,255,255,.04); }
.chart-grid::before { content:""; position:absolute; inset:0; background:repeating-linear-gradient(to bottom, rgba(255,255,255,.045) 0 1px, transparent 1px 25%); }
.chart-grid span { position:relative; color:#445773; font-size:8px; transform:translateY(-5px); }
.chart-line { position:absolute; left:47px; right:8px; bottom:31px; top:18px; display:flex; align-items:flex-end; gap:1.5%; }
.chart-line i { flex:1; background:linear-gradient(to top,rgba(8,120,255,.18),rgba(45,141,255,.85)); border-radius:3px 3px 0 0; min-width:4px; }
.chart-labels { position:absolute; left:48px; right:7px; bottom:3px; display:flex; justify-content:space-between; color:#445773; font-size:8px; }
.chart-line-overlay { position:absolute; left:47px; right:8px; bottom:31px; height:80%; background:linear-gradient(155deg,transparent 0 14%, rgba(66,198,255,.35) 14.3% 14.8%, transparent 15% 30%, rgba(66,198,255,.4) 30.3% 30.8%, transparent 31% 48%, rgba(66,198,255,.55) 48.3% 48.8%, transparent 49% 66%, rgba(66,198,255,.5) 66.3% 66.8%, transparent 67%); opacity:.35; }
.live-mini { min-height:155px; }
.live-badge { display:inline-flex; align-items:center; gap:6px; color:#ff6d7d; font-size:8px; font-weight:900; letter-spacing:1px; padding:5px 7px; background:rgba(255,95,115,.08); border:1px solid rgba(255,95,115,.13); border-radius:6px; }
.live-badge b { width:5px; height:5px; background:#ff5f73; border-radius:50%; box-shadow:0 0 8px #ff5f73; }
.live-preview { display:flex; align-items:center; gap:11px; margin:0 0 15px; }
.live-avatar { width:40px; height:40px; border-radius:10px; display:grid; place-items:center; background:linear-gradient(135deg,#0878ff,#153f83); font-size:10px; font-weight:900; }
.live-preview strong { font-size:12px; display:block; }
.live-preview p { color:var(--muted); font-size:9px; }
.analysis-row { display:flex; align-items:center; justify-content:space-between; }
.analysis-row span { display:block; color:var(--gray); font-size:11px; }
.analysis-row strong { display:block; color:var(--green); margin-top:3px; font-size:14px; }
.analysis-number { font-size:17px; font-weight:800; color:white; }
.analysis-number small { font-size:8px; color:var(--muted); }
.risk-bar, .progress-track { height:5px; background:#14223a; border-radius:10px; overflow:hidden; margin:15px 0 10px; }
.risk-bar span, .progress-track span { display:block; height:100%; background:linear-gradient(90deg,var(--blue),var(--cyan)); border-radius:inherit; }
.mini-meta { display:flex; justify-content:space-between; color:var(--muted); font-size:8px; }
.progress-percent { color:var(--blue-bright); font-size:12px; font-weight:800; }
.bootcamp-next { display:flex; align-items:center; gap:10px; }
.module-number { width:36px; height:36px; display:grid; place-items:center; background:#102a4b; color:var(--blue-bright); border-radius:8px; font-size:11px; font-weight:900; }
.bootcamp-next strong { font-size:11px; }
.bootcamp-next p { color:var(--muted); font-size:8px; }
.circle-btn { margin-left:auto; border:1px solid var(--border); background:transparent; color:white; width:30px; height:30px; border-radius:50%; }

.section-intro h2 { font-size:32px; }
.live-hero { min-height:360px; display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:center; overflow:hidden; }
.live-hero-content { padding:15px; }
.live-hero-content h3 { font-size:28px; max-width:560px; margin:16px 0 10px; }
.live-hero-content p { color:var(--gray); max-width:560px; font-size:13px; }
.session-meta { display:flex; gap:20px; color:#8192aa; font-size:10px; margin:18px 0 22px; }
.live-screen { min-height:280px; border-radius:11px; position:relative; overflow:hidden; border:1px solid rgba(8,120,255,.25); background:linear-gradient(145deg,#071c39,#020811); display:grid; place-items:center; }
.screen-grid { position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:35px 35px; transform:perspective(300px) rotateX(45deg) scale(1.4); transform-origin:center bottom; opacity:.7; }
.screen-content { position:relative; text-align:center; display:grid; gap:6px; }
.screen-content span { color:#ff5f73; font-size:9px; font-weight:900; letter-spacing:2px; }
.screen-content strong { font-size:27px; letter-spacing:3px; }
.screen-content small { color:#5f7696; }
.subheading { margin:30px 0 13px; }
.subheading h3 { font-size:17px; }
.session-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.session-card { padding:20px; }
.session-date { display:inline-block; color:var(--blue-bright); font-size:9px; font-weight:900; letter-spacing:1px; background:rgba(8,120,255,.09); padding:5px 7px; border-radius:5px; }
.session-card h3 { margin:18px 0 4px; }
.session-card p { color:var(--muted); font-size:10px; margin-bottom:16px; }
.session-card > strong { display:block; font-size:12px; margin-bottom:17px; }
.recordings { display:grid; gap:9px; }
.recording { padding:12px 15px; display:flex; align-items:center; gap:12px; }
.play { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; background:#102e52; color:var(--blue-bright); font-size:10px; }
.recording strong { font-size:11px; }
.recording p { color:var(--muted); font-size:9px; }
.recording button { margin-left:auto; background:transparent; color:#7890ae; border:0; font-size:10px; }

.market-controls { display:flex; gap:7px; }
select, input { color:#eaf1ff; background:#09182f; border:1px solid var(--border); border-radius:8px; padding:10px 11px; width:100%; }
select { cursor:pointer; }
.market-controls select { width:auto; min-width:110px; }
.trading-terminal { padding:0; overflow:hidden; }
.terminal-toolbar, .terminal-bottom { padding:11px 14px; display:flex; align-items:center; gap:14px; border-bottom:1px solid var(--border); }
.pair-title { font-size:12px; font-weight:900; }
.price-placeholder { color:#5d708c; font-size:9px; }
.toolbar-tools { margin-left:auto; display:flex; gap:5px; }
.toolbar-tools button { width:28px; height:25px; border:1px solid var(--border); background:transparent; color:#7185a1; border-radius:5px; }
.tv-wrap { height:580px; background:#020711; padding:10px; }
.tv-placeholder { height:100%; position:relative; overflow:hidden; border:1px solid rgba(255,255,255,.035); background:linear-gradient(#071226,#030813); display:grid; place-items:center; }
.tv-placeholder::before { content:""; position:absolute; inset:0; background:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size:50px 50px; }
.tv-watermark { position:absolute; left:18px; top:14px; color:#324563; font-size:9px; font-weight:900; letter-spacing:2px; }
.tv-placeholder p { position:relative; font-size:20px; font-weight:800; }
.tv-placeholder small { position:absolute; bottom:20px; color:#3f506b; font-size:9px; }
.candles { position:absolute; inset:13% 8% 18%; }
.candles i { position:absolute; bottom:0; width:12px; border-radius:2px; background:linear-gradient(to top,#0878ff,#42c6ff); box-shadow:0 0 12px rgba(8,120,255,.15); }
.candles i::before { content:""; position:absolute; width:1px; height:35px; background:#49b6ff; left:50%; top:-24px; }
.terminal-bottom { border-top:1px solid var(--border); border-bottom:0; color:#5c708d; font-size:9px; }

.ai-layout { display:grid; grid-template-columns:1.35fr .9fr; gap:15px; align-items:start; }
.ai-form { padding:23px; }
.ai-chip { color:#8cc9ff; font-size:8px; font-weight:900; border:1px solid rgba(8,120,255,.25); padding:6px 8px; border-radius:6px; background:rgba(8,120,255,.07); }
.field-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-bottom:18px; }
.field-grid label { color:#8192aa; font-size:9px; font-weight:700; display:grid; gap:6px; }
.field-grid input, .field-grid select { font-size:11px; }
.form-note { color:#4f617c; font-size:8px; margin-top:10px; line-height:1.6; }
.ai-results { display:grid; gap:14px; }
.ai-result-main { min-height:170px; position:relative; overflow:hidden; }
.ai-result-main::before { content:""; position:absolute; width:160px; height:160px; right:-40px; top:-45px; border-radius:50%; background:radial-gradient(circle,rgba(8,120,255,.2),transparent 70%); }
.result-orb { width:44px; height:44px; display:grid; place-items:center; border-radius:50%; color:white; background:linear-gradient(145deg,#0878ff,#14396d); box-shadow:0 0 35px rgba(8,120,255,.3); margin-bottom:17px; }
.ai-result-main > strong { display:block; font-size:29px; margin-top:3px; }
.ai-result-main p { color:var(--gray); font-size:10px; max-width:380px; margin-top:3px; }
.result-grid { display:grid; grid-template-columns:1fr 1fr; padding:0; overflow:hidden; }
.result-grid > div { padding:18px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); }
.result-grid > div:nth-child(even) { border-right:0; }
.result-grid span { display:block; color:var(--muted); font-size:9px; }
.result-grid strong { display:block; font-size:15px; margin-top:5px; }
.result-grid small { color:#4f617c; font-size:8px; }
.scenario { display:grid; grid-template-columns:55px 1fr 70px; align-items:center; gap:9px; margin-top:13px; font-size:9px; color:#778ba7; }
.scenario strong { text-align:right; color:var(--green); font-size:9px; }
.scenario-bar { height:5px; border-radius:10px; background:#13233c; overflow:hidden; }
.scenario-bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#0878ff,#42c6ff); }

.bootcamp-hero { display:flex; justify-content:space-between; align-items:center; min-height:170px; padding:27px; margin-bottom:16px; background:radial-gradient(circle at 80% 30%,rgba(8,120,255,.13),transparent 35%), linear-gradient(145deg,rgba(11,28,54,.88),rgba(6,17,34,.82)); }
.bootcamp-hero h3 { font-size:28px; margin:4px 0; }
.bootcamp-hero p { color:var(--gray); font-size:10px; }
.progress-ring { width:105px; height:105px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--blue) 68%, #13243e 0); position:relative; }
.progress-ring::before { content:""; position:absolute; width:81px; height:81px; border-radius:50%; background:#08162b; }
.progress-ring span { position:relative; font-size:17px; font-weight:900; }
.module-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.module-card { padding:19px; min-height:185px; display:flex; flex-direction:column; }
.module-card > span { color:#4f7199; font-size:9px; font-weight:900; }
.module-card h3 { margin:16px 0 5px; }
.module-card p { color:var(--muted); font-size:10px; }
.module-card > div { margin-top:auto; color:var(--green); font-size:9px; font-weight:800; }
.module-card.current { border-color:rgba(8,120,255,.35); box-shadow:0 0 0 1px rgba(8,120,255,.06), var(--shadow); }
.module-card.current .btn { margin-top:auto; }
.module-card.locked { opacity:.58; }

.app-footer { display:flex; justify-content:space-between; color:#344762; font-size:9px; padding:20px 0 0; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns:repeat(2,1fr); }
    .dashboard-grid { grid-template-columns:1fr; }
    .performance-panel { grid-row:auto; }
    .ai-layout { grid-template-columns:1fr; }
    .module-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 800px) {
    .sidebar { transform:translateX(-100%); transition:.3s; box-shadow:20px 0 60px rgba(0,0,0,.4); }
    .sidebar.open { transform:none; }
    .main { margin-left:0; width:100%; }
    .mobile-menu { display:block; }
    .topbar { padding:0 18px; gap:12px; }
    .topbar > div:first-of-type { flex:1; }
    .market-status { display:none; }
    .view { padding:27px 18px 40px; }
    .welcome-row, .section-intro.compact { align-items:flex-start; flex-direction:column; }
    .stat-grid { grid-template-columns:1fr 1fr; }
    .live-hero { grid-template-columns:1fr; }
    .live-screen { min-height:220px; }
    .session-grid, .module-grid { grid-template-columns:1fr; }
    .field-grid { grid-template-columns:1fr; }
    .tv-wrap { height:450px; }
    .market-controls { width:100%; }
    .market-controls select { flex:1; }
    .app-footer { flex-direction:column; gap:5px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns:1fr; }
    .stat-card { min-height:125px; }
    .welcome-row h2, .section-intro h2 { font-size:25px; }
    .topbar h1 { font-size:17px; }
    .panel { padding:15px; }
    .result-grid { grid-template-columns:1fr; }
    .result-grid > div { border-right:0; }
    .bootcamp-hero { align-items:flex-start; gap:20px; }
    .progress-ring { width:80px; height:80px; flex:0 0 80px; }
    .progress-ring::before { width:61px; height:61px; }
}

/* =========================================================
   AUTH SCREEN
========================================================= */
.hidden:not(.splash) { display: none !important; }

.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    background: var(--navy-dark);
    overflow: hidden;
}
.auth-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(8,120,255,.18), transparent 68%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
}
.auth-card {
    position: relative;
    width: min(380px, 90vw);
    background: linear-gradient(145deg,rgba(11,28,54,.92),rgba(6,17,34,.92));
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px 28px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand img { width: 42px; height: 42px; object-fit: contain; }
.auth-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand strong { font-size: 16px; }
.auth-brand span { font-size: 9px; letter-spacing: .12em; color: var(--muted); }

.auth-tabs { display: flex; gap: 6px; background: rgba(255,255,255,.04); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; }
.auth-tab.active { background: var(--blue); color: white; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--gray); font-weight: 700; }
.auth-form input {
    background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 9px;
    padding: 11px 12px; color: white; font-size: 13px;
}
.auth-error { color: var(--red); font-size: 11px; min-height: 14px; }
.auth-success { color: var(--green); font-size: 11px; }

/* =========================================================
   MODULE MODAL
========================================================= */
.modal-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(2,6,15,.72);
    display: grid; place-items: center;
    padding: 20px;
}
.modal-card { position: relative; width: min(560px, 100%); max-height: 84vh; overflow-y: auto; padding: 28px; }
.modal-close {
    position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.06);
    border: 0; color: white; width: 30px; height: 30px; border-radius: 8px; font-size: 13px;
}
.modal-card h2 { margin: 8px 0 4px; font-size: 20px; }
.modal-body { margin: 18px 0; color: #c3cee0; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }

.module-card { cursor: pointer; transition: transform .2s, border-color .2s; }
.module-card:hover { transform: translateY(-3px); border-color: rgba(8,120,255,.4); }
.module-card.locked { cursor: pointer; }

/* =========================================================
   TRADE JOURNAL
========================================================= */
.trade-quick-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.trade-quick-form select, .trade-quick-form input {
    background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 10px; color: white; font-size: 12px;
}
.trade-quick-form button { grid-column: 1 / -1; }
.trade-mini-list { display: flex; flex-direction: column; gap: 8px; }
.trade-mini-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 12px; background: rgba(255,255,255,.03); border-radius: 8px; font-size: 12px;
}
.pnl-pos { color: var(--green); }
.pnl-neg { color: var(--red); }
.small-empty { font-size: 12px; padding: 10px 0; }

/* =========================================================
   ADMIN PANEL
========================================================= */
.admin-panel { margin-bottom: 22px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { text-align: left; color: var(--muted); font-size: 10px; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.small { padding: 7px 10px; font-size: 10px; }

.role-badge { padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.role-badge.admin { background: rgba(255,173,74,.15); color: var(--orange); }
.role-badge.member { background: rgba(8,120,255,.12); color: var(--blue-bright); }

.admin-module-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.admin-module-row strong { flex: 1 1 220px; font-size: 13px; }
.admin-module-row span { flex: 2 1 260px; font-size: 11px; }
.admin-add-module { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.admin-add-module input {
    background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 8px;
    padding: 9px 10px; color: white; font-size: 12px;
}
.admin-add-module input#newModuleTitle { flex: 2 1 180px; }
.admin-add-module input#newModuleDesc { flex: 2 1 200px; }
.admin-add-module input#newModuleDuration { flex: 0 1 80px; }
