/* ============================================================
   MFD P2P — Cyber control panel
   ============================================================ */
:root {
    --bg-0: #05080d;
    --bg-1: #0a0f17;
    --bg-2: #0f1622;
    --bg-3: #131c2c;
    --line: rgba(0, 212, 255, 0.10);
    --line-2: rgba(0, 212, 255, 0.18);
    --text: #d6dee8;
    --text-dim: #7e8a9a;
    --text-faint: #4d5a6c;
    --accent-cyan: #00d4ff;
    --accent-green: #00ff9d;
    --accent-magenta: #ff2a6d;
    --accent-amber: #ffb547;
    --accent-violet: #b487ff;
    --shadow-glow: 0 0 0 1px rgba(0, 212, 255, 0.15), 0 8px 40px rgba(0, 212, 255, 0.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background:
        radial-gradient(1200px 800px at 80% -10%, rgba(0, 212, 255, 0.06), transparent 60%),
        radial-gradient(1000px 700px at -10% 110%, rgba(255, 42, 109, 0.05), transparent 60%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Subtle grid background */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: 0;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 50%, transparent 100%);
}

a { color: var(--accent-cyan); text-decoration: none; transition: color .18s ease; }
a:hover { color: #fff; }

.mono { font-family: "JetBrains Mono", "SF Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace; font-feature-settings: "tnum"; letter-spacing: 0.01em; }

/* Layout */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; position: relative; z-index: 1; }
.layout--auth { display: flex; align-items: center; justify-content: center; }

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, rgba(10,15,23,0.95), rgba(10,15,23,0.85));
    border-right: 1px solid var(--line);
    padding: 20px 14px;
    position: sticky; top: 0; height: 100vh;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand-mark {
    width: auto;
    height: 38px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.30));
}
.brand-mark img {
    height: 100%;
    width: auto;
    max-width: 110px;
    display: block;
    object-fit: contain;
}
.brand-mark--text {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
    box-shadow: 0 0 16px rgba(0,212,255,0.45), inset 0 0 10px rgba(255,255,255,0.15);
    color: #001020; font-weight: 800; font-size: 14px;
    font-family: "JetBrains Mono", monospace;
    display: grid; place-items: center;
    filter: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: #fff; font-weight: 700; letter-spacing: 0.04em; font-size: 13px; }
.brand-text span { color: var(--text-dim); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav a:hover { background: rgba(0, 212, 255, 0.04); color: #fff; }
.nav a.is-active {
    background: linear-gradient(90deg, rgba(0,212,255,0.10), rgba(0,212,255,0.02));
    color: #fff;
    border-color: var(--line-2);
    box-shadow: inset 2px 0 0 var(--accent-cyan);
}
.nav a svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0.85; }
.nav-section { color: var(--text-faint); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; padding: 14px 12px 6px; }

.sidebar-foot { position: absolute; bottom: 14px; left: 14px; right: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sidebar-foot .avatar {
    width: 32px; height: 32px; border-radius: 50%; background: rgba(0,212,255,0.12); color: var(--accent-cyan);
    display: grid; place-items: center; font-weight: 700; font-size: 12px;
    border: 1px solid var(--line-2);
}
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who b { display: block; color: #fff; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { color: var(--text-faint); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.sidebar-foot .icon-btn { background: transparent; border: 1px solid var(--line); color: var(--text-dim); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.sidebar-foot .icon-btn:hover { color: var(--accent-magenta); border-color: var(--accent-magenta); }

/* Main */
.main { padding: 18px 24px 60px; min-width: 0; }
.topbar {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15,22,34,0.6), rgba(15,22,34,0.3));
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
}
.topbar .crumb { color: var(--text-dim); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.topbar .crumb b { color: #fff; font-weight: 700; }
.topbar .grow { flex: 1; }

.ticker {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0,255,157,0.04);
    font-size: 12px;
}
.ticker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); animation: pulse 2s infinite; }
.ticker .lbl { color: var(--text-faint); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }
.ticker .val { color: var(--accent-green); font-weight: 600; }
.ticker .ch { color: var(--text-dim); }
.ticker .ch.up { color: var(--accent-green); }
.ticker .ch.down { color: var(--accent-magenta); }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

/* Cards */
.card {
    background: linear-gradient(180deg, rgba(19,28,44,0.7), rgba(15,22,34,0.5));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(400px 200px at 100% 0%, rgba(0,212,255,0.06), transparent 60%);
    pointer-events: none;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.card-head .grow { flex: 1; }

/* KPI cards (compact) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi {
    position: relative;
    padding: 11px 14px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(0,212,255,0.04) 0%, transparent 50%),
        linear-gradient(180deg, rgba(19,28,44,0.7), rgba(15,22,34,0.4));
    overflow: hidden;
}
.kpi__label { color: var(--text-dim); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; }
.kpi__value { margin-top: 2px; font-family: "JetBrains Mono", monospace; font-size: 20px; color: #fff; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.kpi__value.neon-green { color: var(--accent-green); text-shadow: 0 0 20px rgba(0,255,157,0.4); }
.kpi__value.neon-cyan { color: var(--accent-cyan); text-shadow: 0 0 20px rgba(0,212,255,0.4); }
.kpi__value.neon-magenta { color: var(--accent-magenta); text-shadow: 0 0 20px rgba(255,42,109,0.4); }
.kpi__sub { margin-top: 3px; font-size: 10px; color: var(--text-faint); line-height: 1.3; }
.kpi__corner { position: absolute; top: 8px; right: 8px; opacity: 0.22; }
.kpi__corner svg { width: 14px; height: 14px; }

/* Period stats card (replaces inventory position, with date filter) */
.period-card { padding: 14px 16px; }

/* Generic preset button (used by .period-card__filter and --row variants) */
.period-card .preset,
.period-card__filter--row .preset {
    padding: 6px 11px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-radius: 8px;
    cursor: pointer;
    transition: all .14s ease;
    line-height: 1;
}
.period-card .preset:hover,
.period-card__filter--row .preset:hover { color: #fff; border-color: var(--line-2); background: rgba(0,212,255,0.05); }
.period-card .preset.is-active,
.period-card__filter--row .preset.is-active {
    background: rgba(0,212,255,0.12);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan), 0 0 12px rgba(0,212,255,0.25);
}
.period-card__filter--row .preset-group { display: flex; gap: 4px; flex-wrap: wrap; }
.period-card__filter--row input[type="date"] {
    background: rgba(5,8,13,0.6);
    border: 1px solid var(--line-2);
    color: #fff;
    padding: 7px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 11px;
    font-feature-settings: "tnum";
    color-scheme: dark;
    min-width: 130px;
}
.period-card__filter--row input[type="date"]:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.18);
}
.period-card__filter--row .btn { padding: 7px 14px; font-size: 11px; }
.period-card__rows { display: flex; flex-direction: column; gap: 10px; }
.period-card__row {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
}
.period-card__row:last-child { border-bottom: 0; }
.period-card__row .lbl { color: var(--text-dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
.period-card__row .val { font-family: "JetBrains Mono", monospace; font-size: 16px; color: #fff; font-weight: 600; }
.period-card__row .val.pos { color: var(--accent-green); }
.period-card__row .val.neg { color: var(--accent-magenta); }
.period-card__row .val.cyan { color: var(--accent-cyan); }
.period-card__sub { font-size: 10px; color: var(--text-faint); margin-top: 1px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(10,15,23,0.4); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t thead th {
    text-align: left;
    padding: 10px 14px;
    background: rgba(0,212,255,0.04);
    color: var(--text-faint);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.t tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,212,255,0.05);
    vertical-align: middle;
}
table.t tbody tr:hover td { background: rgba(0,212,255,0.03); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t .num { text-align: right; font-family: "JetBrains Mono", monospace; }
table.t .pos { color: var(--accent-green); }
table.t .neg { color: var(--accent-magenta); }
table.t .row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Pills / chips */
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: transparent;
    line-height: 1;
}
.pill--buy { color: var(--accent-cyan); background: rgba(0,212,255,0.06); }
.pill--sell { color: var(--accent-green); background: rgba(0,255,157,0.06); }
.pill--admin { color: var(--accent-magenta); background: rgba(255,42,109,0.06); }
.pill--member { color: var(--text-dim); background: rgba(255,255,255,0.02); }
.pill--inactive { color: var(--text-faint); border-style: dashed; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--line-2);
    background: rgba(0,212,255,0.03);
    color: var(--text);
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all .15s ease;
    text-transform: none;
    line-height: 1;
}
.btn:hover { color: #fff; background: rgba(0,212,255,0.08); border-color: var(--accent-cyan); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: linear-gradient(135deg, var(--accent-cyan), #009ad9); color: #001625; border-color: transparent; box-shadow: 0 0 0 1px rgba(0,212,255,0.3), 0 6px 24px rgba(0,212,255,0.25); }
.btn--primary:hover { color: #001625; filter: brightness(1.1); }
.btn--green { background: linear-gradient(135deg, var(--accent-green), #00b070); color: #001a10; border-color: transparent; box-shadow: 0 0 0 1px rgba(0,255,157,0.3), 0 6px 24px rgba(0,255,157,0.25); }
.btn--green:hover { color: #001a10; filter: brightness(1.1); }
.btn--magenta { background: linear-gradient(135deg, var(--accent-magenta), #b8003d); color: #160006; border-color: transparent; }
.btn--magenta:hover { color: #160006; filter: brightness(1.1); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 10px; font-size: 11px; }
.btn--icon { padding: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--text-dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
.field input, .field select, .field textarea {
    background: rgba(5,8,13,0.6);
    border: 1px solid var(--line-2);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    transition: border-color .15s, background .15s, box-shadow .15s;
    font-feature-settings: "tnum";
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0,212,255,0.04);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.field .hint { color: var(--text-faint); font-size: 11px; }
.field--error input, .field--error select { border-color: var(--accent-magenta); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.toggle { display: inline-flex; gap: 4px; padding: 4px; background: rgba(5,8,13,0.6); border: 1px solid var(--line); border-radius: 12px; }
.toggle button {
    padding: 8px 14px;
    border: 0; background: transparent; color: var(--text-dim);
    font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
    border-radius: 8px; cursor: pointer; transition: all .12s;
}
.toggle button.is-active { color: #001a10; }
.toggle button[data-side="BUY"].is-active { background: linear-gradient(135deg, var(--accent-cyan), #009ad9); color: #001625; }
.toggle button[data-side="SELL"].is-active { background: linear-gradient(135deg, var(--accent-green), #00b070); color: #001a10; }

/* Modal */
.modal-back {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    overflow-y: auto;
    padding: 20px;
}
.modal-back.is-open {
    display: block;
    animation: fadeIn .2s ease;
}
.modal {
    width: 100%; max-width: 540px;
    margin: 5vh auto 5vh;
    background: linear-gradient(180deg, rgba(19,28,44,0.95), rgba(10,15,23,0.95));
    border: 1px solid var(--line-2);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.1);
}
.modal-head {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; color: #fff; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.modal-head .grow { flex: 1; }
.modal-body { padding: 18px; }
.modal-foot {
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    display: flex; gap: 10px; justify-content: flex-end;
    align-items: center;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Flash */
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; border: 1px solid; display: flex; align-items: center; gap: 10px; }
.flash--ok { color: var(--accent-green); border-color: rgba(0,255,157,0.3); background: rgba(0,255,157,0.05); }
.flash--err { color: var(--accent-magenta); border-color: rgba(255,42,109,0.3); background: rgba(255,42,109,0.05); }
.flash--info { color: var(--accent-cyan); border-color: var(--line-2); background: rgba(0,212,255,0.05); }

/* Login page */
.auth-card {
    width: 100%; max-width: 400px;
    padding: 32px;
    border-radius: 18px;
    border: 1px solid var(--line-2);
    background: linear-gradient(180deg, rgba(15,22,34,0.85), rgba(10,15,23,0.95));
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,212,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.auth-card h1 { margin: 0 0 4px; color: #fff; font-size: 22px; }
.auth-card p { margin: 0 0 24px; color: var(--text-dim); font-size: 13px; }
.auth-card .field { margin-bottom: 14px; }

/* Page header */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-head .grow { flex: 1; }

/* Empty state */
.empty {
    padding: 40px 20px; text-align: center; color: var(--text-dim);
    border: 1px dashed var(--line-2); border-radius: 14px;
    background: rgba(0,212,255,0.02);
}
.empty h4 { color: #fff; margin: 0 0 6px; font-weight: 600; }

/* Filter bar */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filterbar .field { flex: 0 0 auto; }
.filterbar input, .filterbar select { padding: 8px 10px; font-size: 12px; }

/* Tag */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: rgba(255,255,255,0.05); color: var(--text-dim); }

/* Charts */
.chart-card { padding: 20px; }
.chart-card canvas { display: block; width: 100% !important; height: 240px !important; }

/* Two-column layout in dashboard */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
@media (max-width: 1024px) { .grid-2 { grid-template-columns: 1fr; } }

/* Mobile */
@media (max-width: 880px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; padding: 12px; }
    .sidebar-foot { position: relative; bottom: auto; left: auto; right: auto; margin-top: 8px; }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .nav a { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 8px; font-size: 12px; }
    .nav-section { display: none; }
    .main { padding: 14px; }
    .kpi__value { font-size: 20px; }
}

/* Subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.15); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

/* Helper utilities */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.gap-14 { gap: 14px; }
.mb-14 { margin-bottom: 14px; }
.mt-14 { margin-top: 14px; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }
.text-magenta { color: var(--accent-magenta); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { opacity: 0.6; }
.f-mono { font-family: "JetBrains Mono", monospace; font-feature-settings: "tnum"; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fw-600 { font-weight: 600; }
.uppercase { text-transform: uppercase; letter-spacing: 0.12em; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* Card pickers (user / exchange / bank in trade modal) */
.modal--lg { max-width: 720px; }
.toggle--sm button { padding: 6px 10px; font-size: 11px; }

.picker-section { margin-top: 14px; }
.picker-section:first-child { margin-top: 0; }
.picker-label {
    color: var(--text-faint); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    font-weight: 600; margin-bottom: 8px;
}
.picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.pick-card {
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    padding: 12px 14px;
    background: rgba(5,8,13,0.5);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    transition: all .14s ease;
    position: relative;
    overflow: hidden;
}
.pick-card:hover {
    background: rgba(0,212,255,0.05);
    border-color: var(--line-2);
}
.pick-card.is-active {
    background: linear-gradient(135deg, rgba(0,255,157,0.10), rgba(0,212,255,0.06));
    border-color: var(--accent-green);
    box-shadow: 0 0 0 1px var(--accent-green), 0 0 20px rgba(0,255,157,0.18);
    color: #fff;
}
.pick-card.is-active::after {
    content: "✓";
    position: absolute; top: 6px; right: 8px;
    color: var(--accent-green);
    font-weight: 700; font-size: 12px;
}
.pick-card__avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    color: #001020; font-weight: 700; font-size: 13px; flex: 0 0 auto;
    font-family: "JetBrains Mono", monospace;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
}
.pick-card__icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: grid; place-items: center;
    background: rgba(0,212,255,0.08);
    color: var(--accent-cyan);
    flex: 0 0 auto;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700; font-size: 11px;
    letter-spacing: 0.05em;
    border: 1px solid var(--line-2);
}
.pick-card__main { flex: 1; min-width: 0; line-height: 1.2; }
.pick-card__title { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-card__sub { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pick-empty {
    font-size: 12px; color: var(--text-faint);
    padding: 14px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 12px;
}

/* Number grid (in trade modal) — wider gap, tighter on mobile */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

/* Profit summary card inside trade modal */
.profit-summary {
    border: 1px solid var(--line-2);
    border-radius: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0,255,157,0.04) 0%, rgba(0,212,255,0.03) 100%);
}
.profit-summary__row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0;
    font-size: 13px;
}
.profit-summary__row + .profit-summary__row { border-top: 1px solid var(--line); }
.profit-summary__row .lbl { color: var(--text-dim); }
.profit-summary__row .val { color: #fff; }
.profit-summary__row--total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line-2) !important;
    font-size: 15px;
}
.profit-summary__row--total .lbl {
    color: var(--text); font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px;
}
.profit-summary__row--total .val {
    color: var(--accent-green);
    text-shadow: 0 0 24px rgba(0,255,157,0.4);
    font-size: 18px;
}
.profit-summary--neg .profit-summary__row--total .val {
    color: var(--accent-magenta);
    text-shadow: 0 0 24px rgba(255,42,109,0.4);
}

/* Bank picker (autocomplete with logos) */
.bank-picker { position: relative; }
.bank-picker input {
    background: rgba(5,8,13,0.6);
    border: 1px solid var(--line-2);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    transition: border-color .14s ease, box-shadow .14s ease;
}
.bank-picker input:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.12); }
.bank-picker__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
    background: rgba(10,15,23,0.98);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.bank-picker__item {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background .12s ease;
}
.bank-picker__item:hover,
.bank-picker__item.is-focused {
    background: rgba(0,212,255,0.08);
    color: #fff;
}
.bank-picker__item img {
    width: 44px; height: 28px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 3px;
    flex: 0 0 auto;
}
.bank-picker__item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Exchange chips — branded color badge with initials, optional logo overlay */
.xc-chip {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
    border-radius: 7px;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700; letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    overflow: hidden;
}
.xc-chip--sm  { width: 24px; height: 24px; font-size: 9px;  }
.xc-chip--md  { width: 32px; height: 32px; font-size: 11px; }
.xc-chip--lg  { width: 44px; height: 44px; font-size: 13px; border-radius: 9px; }
.xc-chip__init { z-index: 1; }
.xc-chip img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 12%;
    z-index: 2;
    background: inherit;
}

/* Exchange picker (same DOM structure as bank picker) */
.xc-picker { position: relative; }
.xc-picker__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    z-index: 200;
    max-height: 280px; overflow-y: auto;
    background: rgba(10,15,23,0.98);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.xc-picker__item {
    width: 100%;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    background: transparent;
    border: 0; border-radius: 8px;
    color: var(--text);
    font-family: inherit; font-size: 13px;
    cursor: pointer; text-align: left;
    transition: background .12s ease;
}
.xc-picker__item:hover, .xc-picker__item.is-focused { background: rgba(0,212,255,0.08); color: #fff; }
.xc-picker__item span.xc-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bank chip logo (shown in banks list table) */
.bank-chip-logo {
    width: 48px; height: 32px;
    border-radius: 5px;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    overflow: hidden;
}
.bank-chip-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.bank-chip-logo--ph { color: #001020; font-weight: 700; font-size: 13px; font-family: "JetBrains Mono", monospace; }
/* Specific overrides — Fibabanka logo is white-on-transparent → needs dark background */
.bank-chip-logo[data-bg="dark"],
.bank-picker__item[data-bg="dark"] img { background: #0d0d0d !important; }

/* Improved page-head + button wrap */
.btn { white-space: nowrap; }
.btn--green, .btn--primary { white-space: nowrap; }

/* Period filter row — all in line with Filtrele button */
.period-card__filter--row {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.period-card__filter--row .preset-group { display: flex; gap: 4px; }
.period-card__filter--row input[type="date"] { padding: 6px 8px; font-size: 11px; }
.period-card__filter--row .btn { padding: 6px 12px; font-size: 11px; }

/* People grid (Hesaplar / Profiller page) */
.people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.person-card {
    background: linear-gradient(180deg, rgba(19,28,44,0.7), rgba(15,22,34,0.5));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    overflow: hidden;
    position: relative;
}
.person-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(420px 220px at 100% 0%, rgba(0,212,255,0.06), transparent 60%);
    pointer-events: none;
}
.person-card__head {
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 12px; border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
    position: relative;
}
.person-card__avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
    color: #001020; font-weight: 700; font-size: 16px;
    display: grid; place-items: center;
    font-family: "JetBrains Mono", monospace;
    box-shadow: 0 0 16px rgba(0,212,255,0.25);
    flex: 0 0 auto;
}
.person-card__name strong { display: block; color: #fff; font-size: 15px; }
.person-card__name span { color: var(--text-faint); font-size: 10px; letter-spacing: 0.18em; }
.person-card__inv { text-align: right; line-height: 1.1; font-size: 18px; font-weight: 600; }
.person-card__inv-lbl { display: block; color: var(--text-faint); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; margin-top: 2px; }
.person-card__section { margin-top: 10px; position: relative; }
.person-card__section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.person-card__section-title { color: var(--text-dim); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.person-card__empty {
    padding: 10px 12px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--text-faint);
    font-size: 12px;
    text-align: center;
}
.account-row { display: flex; flex-wrap: wrap; gap: 6px; }
.account-chip {
    flex: 1 1 220px;
    min-width: 200px;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    background: rgba(0,212,255,0.03);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.account-chip.is-inactive { opacity: 0.4; }
.account-chip__main { flex: 1; min-width: 0; }
.account-chip__title { color: #fff; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chip__sub { color: var(--text-faint); font-size: 11px; margin-top: 2px; }

/* API connect modal notice block (NOT flex like .flash) */
.api-notice {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: rgba(0,212,255,0.05);
    font-size: 12px;
    line-height: 1.55;
    color: var(--text);
}
.api-notice p { margin: 0 0 6px; }
.api-notice p:last-child { margin-bottom: 0; }
.api-notice b { color: var(--accent-cyan); font-weight: 700; }

/* Live balance pill on exchange chips */
.balance-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border-radius: 5px;
    background: rgba(0,255,157,0.10);
    color: var(--accent-green);
    border: 1px solid rgba(0,255,157,0.25);
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0;
}
.balance-pill--err {
    background: rgba(255,42,109,0.10);
    color: var(--accent-magenta);
    border-color: rgba(255,42,109,0.30);
}
.account-chip--exchange .account-chip__sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Trade detail page */
.trade-detail__grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
@media (max-width: 1024px) { .trade-detail__grid { grid-template-columns: 1fr; } }
.trade-detail__big {
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: linear-gradient(180deg, rgba(19,28,44,0.85), rgba(10,15,23,0.65));
    position: relative;
}
.trade-detail__hero {
    display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
    margin-bottom: 12px;
}
.trade-detail__hero .num { font-family: "JetBrains Mono", monospace; font-size: 32px; color: #fff; font-weight: 600; }
.trade-detail__row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
}
.trade-detail__row:last-child { border-bottom: 0; }
.trade-detail__row .lbl { color: var(--text-dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
.trade-detail__row .val { color: #fff; font-family: "JetBrains Mono", monospace; }

table.t tbody tr.is-clickable { cursor: pointer; }
table.t tbody tr.is-clickable:hover td { background: rgba(0,212,255,0.05); }

/* Hex ornament */
.hex-orn {
    position: absolute; top: -10px; right: -10px;
    width: 80px; height: 80px;
    opacity: 0.06;
    pointer-events: none;
}
