/* ============================================================
   FX战士 · MARKET TERMINAL
   CRT / neon / retro terminal design system
   ============================================================ */

:root {
    --bg: #03070c;
    --bg-soft: #061019;
    --panel: rgba(7, 17, 26, 0.9);
    --panel-solid: #07131d;
    --panel-raised: rgba(10, 24, 36, 0.94);
    --line: rgba(102, 220, 255, 0.18);
    --line-strong: rgba(102, 230, 255, 0.4);
    --text: #d9f3ff;
    --text-soft: #b3d1df;
    --muted: #718d9f;
    --dim: #4b6373;
    --cyan: #58e7ff;
    --cyan-bright: #9bf4ff;
    --blue: #2f8cff;
    --magenta: #ff46c8;
    --green: #2df5a5;
    --green-soft: rgba(45, 245, 165, 0.14);
    --red: #ff426b;
    --red-soft: rgba(255, 66, 107, 0.14);
    --amber: #ffc857;
    --candle-up: #2df5a5;
    --candle-down: #ff426b;
    --chart-grid: rgba(104, 220, 255, 0.11);
    --chart-text: #7392a4;
    --chart-cross: rgba(180, 240, 255, 0.45);
    --chart-bg: transparent;
    --ma5: #ffc857;
    --ma10: #bd83ff;
    --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Noto Sans Mono CJK SC", "Microsoft YaHei", ui-monospace, monospace;
    --font-display: "Arial Narrow", "Roboto Condensed", "DIN Condensed", "Microsoft YaHei", sans-serif;
    --radius: 3px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --glow-cyan: 0 0 22px rgba(88, 231, 255, 0.22);
    --glow-green: 0 0 22px rgba(45, 245, 165, 0.25);
    --glow-red: 0 0 24px rgba(255, 66, 107, 0.28);
    --max-width: 1720px;
}

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

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(ellipse at 18% -10%, rgba(21, 94, 130, 0.34), transparent 45%),
        radial-gradient(ellipse at 82% 18%, rgba(70, 25, 118, 0.18), transparent 38%),
        linear-gradient(180deg, #03070c 0%, #040a11 50%, #020509 100%);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(105, 220, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(105, 220, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(88, 231, 255, 0.075), transparent 50%),
        linear-gradient(90deg, rgba(255, 70, 200, 0.02), transparent 30%, transparent 70%, rgba(88, 231, 255, 0.025));
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.16s ease, opacity 0.16s ease;
}

a:hover {
    color: var(--cyan-bright);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img,
svg {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--cyan);
    color: #021018;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: #03090e;
}

::-webkit-scrollbar-thumb {
    background: #1b495e;
    border: 2px solid #03090e;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a718f;
}

/* CRT layers */
.crt-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    overflow: hidden;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 10, 16, 0.22) 3px,
        rgba(0, 10, 16, 0.22) 4px
    );
    opacity: 0.6;
    animation: scan-drift 9s linear infinite;
}

.crt-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 46%, rgba(0, 0, 0, 0.28) 78%, rgba(0, 0, 0, 0.64) 100%),
        linear-gradient(90deg, rgba(255, 70, 200, 0.014), transparent 25%, transparent 75%, rgba(88, 231, 255, 0.014));
}

.crt-flicker {
    position: absolute;
    inset: 0;
    background: rgba(120, 235, 255, 0.018);
    animation: crt-flicker 7s steps(1) infinite;
}

.crt-grain {
    position: absolute;
    inset: -40%;
    opacity: 0.035;
    background-image:
        radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, #fff 0 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, #fff 0 1px, transparent 1px);
    background-size: 31px 37px, 43px 29px, 53px 47px;
    animation: grain-shift 0.6s steps(2) infinite;
}

@keyframes scan-drift {
    from { transform: translateY(0); }
    to { transform: translateY(8px); }
}

@keyframes crt-flicker {
    0%, 96%, 100% { opacity: 0.3; }
    97% { opacity: 0.72; }
    98% { opacity: 0.12; }
}

@keyframes grain-shift {
    0% { transform: translate(0, 0); }
    50% { transform: translate(2px, -1px); }
    100% { transform: translate(-1px, 1px); }
}

.app-frame {
    position: relative;
    z-index: 1;
    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   CARBON / CHROME / GENERIC
   ============================================================ */

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted) !important; }
.dim { color: var(--dim); }
.accent { color: var(--cyan); padding: 0 2px; }
.ok { color: var(--green) !important; }
.danger { color: var(--red) !important; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.text-up { color: var(--green) !important; }
.text-down { color: var(--red) !important; }
.text-right { text-align: right; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

.panel {
    position: relative;
    background:
        linear-gradient(145deg, rgba(11, 27, 40, 0.92), rgba(5, 13, 21, 0.94)),
        repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), var(--shadow);
    backdrop-filter: blur(6px);
}

.panel::before,
.panel::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    pointer-events: none;
    opacity: 0.8;
}

.panel::before {
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--cyan);
    border-left: 1px solid var(--cyan);
}

.panel::after {
    right: -1px;
    bottom: -1px;
    border-right: 1px solid rgba(255, 70, 200, 0.55);
    border-bottom: 1px solid rgba(255, 70, 200, 0.55);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(88, 231, 255, 0.045), transparent 60%);
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.panel-code {
    font-size: 9px;
    letter-spacing: 0.14em;
    color: var(--muted);
    white-space: nowrap;
}

.panel-link {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.panel-link:hover {
    color: var(--cyan-bright);
}

.kicker,
.admin-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.live-dot,
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(45, 245, 165, 0.08), 0 0 12px var(--green);
    animation: pulse-dot 2s infinite;
    flex: 0 0 auto;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(45, 245, 165, 0.08), 0 0 12px var(--green); }
    50% { opacity: 0.52; box-shadow: 0 0 0 5px rgba(45, 245, 165, 0.02), 0 0 4px var(--green); }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-size: 9px;
    line-height: 1.4;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: var(--muted);
    background: rgba(4, 11, 17, 0.6);
}

.status-ok { color: var(--green); border-color: rgba(45, 245, 165, 0.28); background: rgba(45, 245, 165, 0.06); }
.status-danger { color: var(--red); border-color: rgba(255, 66, 107, 0.35); background: rgba(255, 66, 107, 0.08); }
.status-gold { color: var(--amber); border-color: rgba(255, 200, 87, 0.4); background: rgba(255, 200, 87, 0.08); }
.status-closed { color: var(--muted); }

.mini-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid var(--line);
    background: rgba(88, 231, 255, 0.04);
    color: var(--text-soft);
    font-size: 9px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.cat-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border: 1px solid var(--line);
    background: rgba(88, 231, 255, 0.04);
    color: var(--cyan);
    font-size: 8px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Buttons */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: rgba(9, 25, 36, 0.8);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.2;
    overflow: hidden;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.5s ease;
}

.btn:hover::before {
    transform: translateX(120%);
}

.btn:hover {
    transform: translateY(-1px);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: var(--glow-cyan);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    color: #021119;
    border-color: rgba(88, 231, 255, 0.75);
    background: linear-gradient(135deg, #8af2ff, #45d9ff 45%, #1fb8ea);
    box-shadow: 0 0 24px rgba(88, 231, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover {
    color: #01090d;
    background: linear-gradient(135deg, #b4f8ff, #66e5ff 45%, #34c8f8);
    box-shadow: 0 0 34px rgba(88, 231, 255, 0.38);
}

.btn-secondary {
    border-color: rgba(255, 70, 200, 0.42);
    background: rgba(255, 70, 200, 0.08);
    color: #ffc1ec;
}

.btn-secondary:hover {
    border-color: var(--magenta);
    box-shadow: 0 0 24px rgba(255, 70, 200, 0.22);
}

.btn-ghost {
    border-color: var(--line);
    background: rgba(5, 13, 21, 0.55);
    color: var(--text-soft);
}

.btn-danger {
    border-color: rgba(255, 66, 107, 0.62);
    background: rgba(255, 66, 107, 0.12);
    color: #ff9ab0;
}

.btn-danger:hover {
    border-color: var(--red);
    box-shadow: var(--glow-red);
    color: #fff;
}

.btn-long {
    border-color: rgba(45, 245, 165, 0.55);
    background: linear-gradient(135deg, rgba(45, 245, 165, 0.22), rgba(10, 56, 42, 0.82));
    color: #87ffd1;
}

.btn-long:hover {
    border-color: var(--green);
    box-shadow: var(--glow-green);
    background: linear-gradient(135deg, rgba(45, 245, 165, 0.35), rgba(10, 56, 42, 0.9));
}

.btn-short {
    border-color: rgba(255, 66, 107, 0.55);
    background: linear-gradient(135deg, rgba(255, 66, 107, 0.22), rgba(56, 10, 24, 0.82));
    color: #ff9cb2;
}

.btn-short:hover {
    border-color: var(--red);
    box-shadow: var(--glow-red);
    background: linear-gradient(135deg, rgba(255, 66, 107, 0.35), rgba(56, 10, 24, 0.9));
}

.btn-block { width: 100%; }
.btn-lg { min-height: 48px; padding: 12px 24px; font-size: 12px; }
.btn-sm { min-height: 31px; padding: 6px 11px; font-size: 10px; }
.btn-xs { min-height: 26px; padding: 4px 9px; font-size: 9px; }
.btn-arrow { font-size: 15px; line-height: 1; }
.btn .order-arrow { font-size: 20px; line-height: 1; }

/* Forms */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-label em {
    font-style: normal;
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 0.14em;
}

.field-inline-hint {
    margin-left: auto;
    color: var(--muted);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.field-hint,
.form-hint {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: rgba(1, 7, 12, 0.72);
    color: var(--text);
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    appearance: none;
}

.input::placeholder { color: #4a6575; }

.input:hover { border-color: rgba(88, 231, 255, 0.3); }

.input:focus {
    border-color: var(--cyan);
    background: rgba(3, 13, 21, 0.9);
    box-shadow: 0 0 0 3px rgba(88, 231, 255, 0.08);
}

.input-sm {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 11px;
}

select.input {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
        linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

.form-alert {
    padding: 11px 13px;
    border: 1px solid rgba(255, 66, 107, 0.38);
    border-left: 3px solid var(--red);
    background: rgba(255, 66, 107, 0.08);
    color: #ffb0c1;
    font-size: 11px;
    line-height: 1.6;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 11px;
    cursor: pointer;
}

.checkbox-field input {
    width: 15px;
    height: 15px;
    accent-color: var(--cyan);
}

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

.money-input,
.inline-money {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    background: rgba(1, 7, 12, 0.72);
}

.money-prefix,
.inline-money span {
    padding: 0 11px;
    color: var(--cyan);
    font-size: 15px;
}

.money-input .input,
.inline-money .input {
    border: 0;
    background: transparent;
    min-height: 44px;
}

.money-input .input:focus,
.inline-money .input:focus {
    box-shadow: none;
}

/* Flash & toast */
.flash-stack {
    position: fixed;
    top: 18px;
    right: max(18px, calc((100vw - var(--max-width)) / 2 + 20px));
    z-index: 880;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(440px, calc(100vw - 30px));
    pointer-events: none;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--cyan);
    background: rgba(4, 14, 22, 0.96);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5), 0 0 25px rgba(88, 231, 255, 0.08);
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.55;
    pointer-events: auto;
    animation: flash-in 0.3s ease both;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.flash-success { border-left-color: var(--green); box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5), 0 0 28px rgba(45, 245, 165, 0.12); }
.flash-error { border-left-color: var(--red); box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5), 0 0 28px rgba(255, 66, 107, 0.12); }
.flash-warning { border-left-color: var(--amber); }
.flash-info { border-left-color: var(--cyan); }

.flash-prompt {
    color: var(--cyan);
    font-weight: 700;
}

.flash-success .flash-prompt { color: var(--green); }
.flash-error .flash-prompt { color: var(--red); }

.flash-message { flex: 1; }

.flash-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
    padding: 0 2px;
}

.flash-close:hover { color: #fff; }

.flash-out {
    opacity: 0;
    transform: translateX(18px);
}

@keyframes flash-in {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-stack {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 920;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--line-strong);
    background: rgba(4, 16, 25, 0.96);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), var(--glow-cyan);
    color: var(--text);
    font-size: 11px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-mark { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.toast-success .toast-mark { background: var(--green); box-shadow: 0 0 8px var(--green); }
.toast-error .toast-mark { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 890;
    background: rgba(0, 5, 9, 0.76);
    backdrop-filter: blur(4px);
    animation: fade-in 0.2s ease both;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-panel {
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    animation: modal-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    box-shadow: 0 30px 110px rgba(0, 0, 0, 0.72), 0 0 70px rgba(88, 231, 255, 0.08);
}

.modal-sm { width: min(470px, 100%); }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(88, 231, 255, 0.07), transparent);
    flex: 0 0 auto;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    flex: 0 0 auto;
}

.modal-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    padding: 0 4px;
}

.modal-close:hover { color: var(--red); }
.modal-open { overflow: hidden; }
.modal-open .modal-backdrop { display: block; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-color: #1b495e #03090e;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    font-size: 11px;
}

.data-table th {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(88, 231, 255, 0.025);
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(102, 220, 255, 0.075);
    vertical-align: middle;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(88, 231, 255, 0.035);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table.compact th { padding: 8px 10px; }
.data-table.compact td { padding: 8px 10px; }

.cell-sub {
    display: block;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
    margin-top: 1px;
}

.symbol-stack { display: flex; flex-direction: column; gap: 1px; }
.symbol-stack b { color: var(--text); }
.symbol-stack small { color: var(--muted); font-size: 9px; }

.side-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.side-long { color: var(--green); border-color: rgba(45, 245, 165, 0.32); background: var(--green-soft); }
.side-short { color: var(--red); border-color: rgba(255, 66, 107, 0.32); background: var(--red-soft); }

.table-action {
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--cyan);
    font-size: 10px;
    padding: 2px 3px;
    white-space: nowrap;
}

.table-action:hover { color: #fff; text-decoration: underline; }
.table-action.danger { color: #ff718e; }
.inline-form { display: inline-flex; align-items: center; }
.row-actions { display: flex; align-items: center; gap: 8px; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    padding: 42px 20px;
    color: var(--muted);
}

.empty-state.small { padding: 26px 16px; }
.empty-glyph { font-size: 30px; color: var(--cyan); opacity: 0.55; line-height: 1; }
.empty-state p { font-size: 11px; }
.empty-hint { color: var(--dim); font-size: 9px; letter-spacing: 0.06em; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

/* Forms layout */
.page-shell {
    flex: 1;
    padding: 26px 0 50px;
    min-width: 0;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 34px;
    padding: 24px 2px 25px;
}

.page-hero-copy { max-width: 820px; }

.editorial-title {
    margin: 12px 0 10px;
    font-family: var(--font-display);
    font-size: clamp(38px, 5vw, 74px);
    font-weight: 900;
    line-height: 0.94;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: #e4f6ff;
    text-shadow: 0 0 40px rgba(88, 231, 255, 0.12);
}

.editorial-title span {
    color: transparent;
    -webkit-text-stroke: 1px rgba(88, 231, 255, 0.76);
    text-shadow: 0 0 36px rgba(88, 231, 255, 0.16);
}

.editorial-title .cursor {
    font-style: normal;
    color: var(--cyan);
    font-size: 0.55em;
    animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
    0%, 45% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ============================================================
   TOP BAR / NAV
   ============================================================ */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    box-shadow: 0 0 12px var(--cyan);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: var(--text);
    line-height: 1;
}

.brand:hover { color: var(--text); }

.brand-mark {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-family: var(--font-display);
    font-size: 29px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-fx {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(88, 231, 255, 0.5);
}

.brand-slash { color: var(--magenta); font-size: 20px; }
.brand-jp { color: var(--text); font-size: 25px; letter-spacing: 0.04em; }

.brand-sub {
    color: var(--muted);
    font-size: 7px;
    letter-spacing: 0.22em;
    font-weight: 400;
}

.brand-sub b { color: var(--cyan); font-weight: 400; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-cluster {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 8px;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.status-cluster b { color: var(--green); font-weight: 400; }

.user-chip {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 12px;
    border-left: 1px solid var(--line);
    color: var(--text);
    min-width: 120px;
}

.user-chip:hover { color: var(--text); background: rgba(88, 231, 255, 0.035); }
.user-chip-name { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.user-chip-meta { font-size: 8px; color: var(--muted); letter-spacing: 0.02em; }

.icon-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(4, 12, 19, 0.6);
    color: var(--muted);
    font-size: 15px;
}

.icon-button:hover { color: var(--red); border-color: rgba(255, 66, 107, 0.4); }

.main-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    min-height: 49px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(5, 15, 24, 0.7), rgba(4, 10, 17, 0.25));
}

.nav-links {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 20px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-right: 1px solid rgba(102, 220, 255, 0.07);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -1px;
    height: 1px;
    background: var(--cyan);
    opacity: 0;
    box-shadow: 0 0 10px var(--cyan);
    transition: opacity 0.16s ease;
}

.nav-link:hover { color: var(--text); background: rgba(88, 231, 255, 0.025); }
.nav-link.is-active { color: var(--cyan); background: rgba(88, 231, 255, 0.045); }
.nav-link.is-active::after { opacity: 1; }

.nav-code {
    color: var(--dim);
    font-size: 8px;
}

.nav-link.is-active .nav-code { color: var(--magenta); }

.nav-clock {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-shadow: 0 0 14px rgba(88, 231, 255, 0.4);
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 45px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    align-items: center;
    justify-content: center;
}

.nav-toggle span {
    width: 17px;
    height: 1px;
    background: var(--cyan);
    transition: transform 0.2s ease;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 16px 0 22px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.05em;
}

.footer-line {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
}

.footer-line b { color: var(--text-soft); font-weight: 400; }
.footer-sep { color: var(--dim); }
.footer-clock { margin-left: auto; color: var(--cyan); letter-spacing: 0.14em; }
.footer-sub { display: flex; justify-content: space-between; gap: 14px; margin-top: 5px; color: var(--dim); font-size: 8px; flex-wrap: wrap; }

/* ============================================================
   AUTH
   ============================================================ */

.auth-page {
    background:
        radial-gradient(ellipse at 22% 45%, rgba(33, 130, 169, 0.22), transparent 38%),
        radial-gradient(ellipse at 82% 20%, rgba(116, 35, 127, 0.16), transparent 40%),
        #03070c;
}

.auth-page .app-frame { max-width: 1540px; }
.auth-page .topbar { min-height: 68px; }
.auth-stage {
    min-height: calc(100vh - 190px);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.72fr);
    align-items: center;
    gap: 7vw;
    padding: 45px 4vw;
}

.auth-stage-register { align-items: center; }

.auth-visual {
    position: relative;
    max-width: 720px;
    padding: 10px 0;
}

.auth-kicker {
    margin-bottom: 20px;
    color: var(--cyan);
    font-size: 9px;
    letter-spacing: 0.22em;
}

.auth-title {
    font-family: var(--font-display);
    font-size: clamp(52px, 7.2vw, 118px);
    font-weight: 900;
    line-height: 0.82;
    letter-spacing: -0.055em;
    text-transform: uppercase;
    color: #e5f7ff;
    margin-bottom: 28px;
    text-shadow: 0 0 60px rgba(88, 231, 255, 0.12);
}

.auth-title span {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 70, 200, 0.72);
    text-shadow: 0 0 30px rgba(255, 70, 200, 0.12);
}

.auth-copy {
    max-width: 550px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.9;
}

.auth-copy strong { color: var(--cyan); }

.auth-terminal {
    margin-top: 36px;
    max-width: 510px;
    border: 1px solid var(--line);
    background: rgba(3, 11, 18, 0.82);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-terminal-head {
    display: flex;
    justify-content: space-between;
    padding: 7px 11px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 0.13em;
}

.terminal-line {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 9px;
    padding: 7px 11px;
    color: var(--text-soft);
    font-size: 9px;
    border-bottom: 1px solid rgba(102, 220, 255, 0.045);
}

.terminal-line:last-child { border-bottom: 0; }
.terminal-line i { color: var(--dim); font-style: normal; }
.terminal-line b { font-weight: 400; color: var(--muted); font-size: 8px; letter-spacing: 0.08em; }
.terminal-line.dim { color: var(--muted); }

.cursor { animation: cursor-blink 1s steps(1) infinite; color: var(--cyan); }

.auth-panel {
    padding: 0 24px 22px;
    background: linear-gradient(160deg, rgba(9, 25, 37, 0.96), rgba(4, 12, 19, 0.98));
}

.auth-panel .panel-head {
    margin: 0 -24px 22px;
    padding: 0 24px;
    min-height: 56px;
}

.auth-switch {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.auth-noise {
    margin-top: 16px;
    color: var(--dim);
    font-size: 7px;
    letter-spacing: 0.12em;
    text-align: center;
}

.account-blueprint {
    margin-top: 30px;
    max-width: 510px;
    border-top: 1px solid var(--line);
}

.blueprint-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(102, 220, 255, 0.08);
    font-size: 10px;
}

.blueprint-row span { color: var(--muted); }
.blueprint-row b { color: var(--text); font-weight: 400; letter-spacing: 0.03em; }

.auth-mark {
    margin-top: 26px;
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(88, 231, 255, 0.08);
    letter-spacing: 0.05em;
}

/* ============================================================
   TICKER
   ============================================================ */

.ticker-rail {
    display: flex;
    align-items: stretch;
    height: 33px;
    border: 1px solid var(--line);
    background: rgba(3, 10, 16, 0.75);
    overflow: hidden;
    margin-top: 14px;
}

.ticker-label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border-right: 1px solid var(--line);
    background: rgba(88, 231, 255, 0.06);
    color: var(--cyan);
    font-size: 8px;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.ticker-viewport { flex: 1; overflow: hidden; position: relative; }

.ticker-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 85%, rgba(3, 10, 16, 0.9));
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    white-space: nowrap;
    animation: ticker-scroll 52s linear infinite;
    width: max-content;
}

.ticker-rail:hover .ticker-track { animation-play-state: paused; }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 18px;
    border-right: 1px solid rgba(102, 220, 255, 0.06);
    font-size: 9px;
    color: var(--muted);
}

.ticker-item b { color: var(--text-soft); font-weight: 700; letter-spacing: 0.04em; }
.ticker-item i { color: var(--dim); font-style: normal; font-size: 8px; }
.ticker-item span { color: var(--text); }
.ticker-item em { font-style: normal; font-size: 8px; }
.ticker-item.up em { color: var(--green); }
.ticker-item.down em { color: var(--red); }

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================================================
   LANDING
   ============================================================ */

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
    gap: 5vw;
    align-items: center;
    padding: 55px 2vw 50px;
    min-height: 530px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(58px, 7.7vw, 124px);
    font-weight: 900;
    line-height: 0.82;
    letter-spacing: -0.055em;
    margin: 20px 0 24px;
    text-transform: uppercase;
    color: #e7f8ff;
    text-shadow: 0 0 60px rgba(88, 231, 255, 0.12);
}

.glitch-text {
    position: relative;
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: 1px rgba(88, 231, 255, 0.72);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    -webkit-text-stroke: 0;
    color: var(--cyan);
    opacity: 0.25;
    clip-path: inset(40% 0 40% 0);
}

.glitch-text::before {
    transform: translateX(3px);
    color: var(--magenta);
    animation: glitch-a 4s steps(1) infinite;
}

.glitch-text::after {
    transform: translateX(-3px);
    animation: glitch-b 4.6s steps(1) infinite;
}

@keyframes glitch-a {
    0%, 94%, 100% { clip-path: inset(40% 0 40% 0); opacity: 0.18; }
    95% { clip-path: inset(10% 0 65% 0); opacity: 0.65; }
    96% { clip-path: inset(72% 0 8% 0); opacity: 0.48; }
}

@keyframes glitch-b {
    0%, 92%, 100% { clip-path: inset(58% 0 22% 0); opacity: 0.15; }
    93% { clip-path: inset(20% 0 58% 0); opacity: 0.45; }
    94% { clip-path: inset(78% 0 4% 0); opacity: 0.55; }
}

.hero-lead {
    max-width: 690px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.9;
}

.hero-lead b { color: var(--cyan); font-weight: 400; }

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 36px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.05em;
}

.hero-stats-inline span { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-stats-inline b { color: var(--cyan); font-family: var(--font-display); font-size: 24px; letter-spacing: -0.03em; }

.hero-terminal {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 425px;
}

.market-matrix { flex: 1; padding: 6px 0; }

.matrix-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(102, 220, 255, 0.06);
    transition: background 0.16s ease;
}

.matrix-row:last-child { border-bottom: 0; }
.matrix-row:hover { background: rgba(88, 231, 255, 0.03); }

.matrix-symbol { display: grid; grid-template-columns: auto auto; gap: 1px 8px; align-items: center; }
.matrix-symbol .cat-tag { grid-row: span 2; }
.matrix-symbol b { color: var(--text); font-size: 12px; letter-spacing: 0.04em; }
.matrix-symbol small { color: var(--muted); font-size: 9px; grid-column: 2; }
.matrix-quote { text-align: right; }

.locked {
    color: var(--dim);
    font-size: 8px;
    letter-spacing: 0.12em;
}

.terminal-readout {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 7px;
    letter-spacing: 0.1em;
}

.terminal-readout b { color: var(--text-soft); font-weight: 400; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    margin-bottom: 46px;
}

.feature-card {
    min-height: 230px;
    padding: 22px 20px 20px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover { transform: translateY(-4px); border-color: rgba(88, 231, 255, 0.35); }

.feature-index {
    position: absolute;
    top: 14px;
    right: 15px;
    color: var(--dim);
    font-size: 9px;
    letter-spacing: 0.1em;
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: var(--cyan);
    font-size: 19px;
    margin-bottom: 26px;
    background: rgba(88, 231, 255, 0.04);
    box-shadow: inset 0 0 18px rgba(88, 231, 255, 0.04);
}

.feature-card h2 { font-size: 15px; line-height: 1.35; margin-bottom: 9px; color: var(--text); }
.feature-card p { color: var(--muted); font-size: 10px; line-height: 1.75; }

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 28px 30px;
    margin-bottom: 45px;
    background:
        linear-gradient(90deg, rgba(88, 231, 255, 0.08), transparent 55%),
        linear-gradient(160deg, rgba(10, 26, 38, 0.95), rgba(4, 11, 18, 0.95));
}

.cta-band h2 { font-size: clamp(20px, 2.2vw, 32px); margin-top: 7px; color: var(--text); letter-spacing: -0.02em; }

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-hero { margin-bottom: 14px; }

.dashboard-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
    gap: 28px;
    align-items: center;
    padding: 34px 38px;
    min-height: 310px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 50%, rgba(88, 231, 255, 0.09), transparent 32%),
        linear-gradient(145deg, rgba(10, 27, 39, 0.96), rgba(4, 11, 18, 0.97));
}

.dashboard-hero-main::after {
    width: 180px;
    height: 180px;
    right: 5%;
    bottom: -80px;
    border: 1px solid rgba(255, 70, 200, 0.13);
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(255, 70, 200, 0.06);
}

.dashboard-hero .editorial-title { font-size: clamp(40px, 5vw, 74px); margin-top: 16px; }
.dashboard-hero .editorial-title span { color: var(--cyan); -webkit-text-stroke: 0; }

.equity-orbit {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 0 20px 30px;
    border-left: 1px solid var(--line);
    min-height: 190px;
}

.equity-orbit-ring {
    position: absolute;
    width: 230px;
    height: 230px;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    border: 1px dashed rgba(88, 231, 255, 0.14);
    border-radius: 50%;
    animation: orbit-spin 34s linear infinite;
}

.equity-orbit-ring::before,
.equity-orbit-ring::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
}

.equity-orbit-ring::before { top: 16px; left: 38px; }
.equity-orbit-ring::after { bottom: 25px; right: 44px; background: var(--magenta); box-shadow: 0 0 12px var(--magenta); }

@keyframes orbit-spin { to { transform: translateY(-50%) rotate(360deg); } }

.equity-label { color: var(--muted); font-size: 8px; letter-spacing: 0.18em; }
.equity-value {
    margin: 7px 0 2px;
    color: var(--cyan-bright);
    font-family: var(--font-display);
    font-size: clamp(34px, 3.7vw, 56px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 0 34px rgba(88, 231, 255, 0.22);
}
.equity-sub { font-size: 10px; }
.equity-split { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; color: var(--muted); font-size: 9px; }
.equity-split b { color: var(--text-soft); font-weight: 400; margin-left: 3px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 126px;
    padding: 17px 18px;
    background: linear-gradient(160deg, rgba(9, 23, 35, 0.9), rgba(4, 11, 18, 0.92));
}

.stat-label { color: var(--muted); font-size: 8px; letter-spacing: 0.11em; }
.stat-card strong { color: var(--text); font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.stat-card strong small { color: var(--dim); font-size: 13px; font-weight: 400; margin-left: 2px; }
.stat-foot { margin-top: auto; color: var(--muted); font-size: 9px; }
.stat-foot a { color: var(--cyan); }

.credit-meter {
    display: block;
    width: 100%;
    height: 3px;
    background: rgba(102, 220, 255, 0.1);
    overflow: hidden;
}

.credit-meter i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    box-shadow: 0 0 9px rgba(45, 245, 165, 0.4);
    transition: width 0.35s ease;
}

.credit-meter.large { height: 5px; }

.tier-top, .tier-elite { color: var(--green) !important; }
.tier-steady { color: var(--cyan) !important; }
.tier-rookie { color: var(--text-soft) !important; }
.tier-risk { color: var(--amber) !important; }
.tier-danger { color: #ff9c5b !important; }
.tier-zero { color: var(--red) !important; }

.nav-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px 0;
}

.nav-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 152px;
    padding: 19px 19px 16px;
    color: var(--text);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.nav-card:hover { transform: translateY(-3px); color: var(--text); border-color: rgba(88, 231, 255, 0.34); }
.nav-card::after { transition: opacity 0.2s ease; }
.nav-card:hover::after { opacity: 1; border-color: var(--magenta); }

.nav-card-index { color: var(--dim); font-size: 9px; margin-bottom: 18px; }
.nav-card h2 { font-size: 17px; margin-bottom: 4px; color: var(--text); }
.nav-card p { color: var(--muted); font-size: 9px; }
.nav-card-cta { margin-top: auto; color: var(--cyan); font-size: 8px; letter-spacing: 0.12em; }

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 12px;
    margin-top: 12px;
}

.positions-panel, .activity-panel { min-height: 260px; }

.symbol-link { color: var(--text); display: flex; flex-direction: column; gap: 1px; }
.symbol-link b { font-size: 11px; }
.symbol-link small { color: var(--muted); font-size: 9px; }
.symbol-link:hover { color: var(--cyan); }

.activity-list { padding: 4px 0; }

.activity-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(102, 220, 255, 0.06);
}

.activity-row:last-child { border-bottom: 0; }
.activity-mark { width: 27px; height: 27px; display: flex; align-items: center; justify-content: center; border: 1px solid; font-size: 13px; flex: 0 0 auto; }
.activity-mark.up { color: var(--green); border-color: rgba(45, 245, 165, 0.25); background: var(--green-soft); }
.activity-mark.down { color: var(--red); border-color: rgba(255, 66, 107, 0.25); background: var(--red-soft); }
.activity-main { flex: 1; min-width: 0; }
.activity-main b { display: block; font-size: 10px; color: var(--text); }
.activity-main b small { color: var(--muted); font-weight: 400; }
.activity-main span { display: block; color: var(--muted); font-size: 8px; }
.activity-pnl { font-size: 11px; }

.pnl-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 16px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
}

.pnl-summary b { color: var(--text-soft); font-weight: 400; }
.activity-panel { display: flex; flex-direction: column; }

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 4px;
    margin-left: 2px;
    background: rgba(88, 231, 255, 0.1);
    color: var(--cyan);
    font-size: 8px;
    font-weight: 400;
}

.product-card { overflow: hidden; }

/* effects handled by trade.js classes */
.effect-profit { animation: profit-flash 1.6s ease; }
.effect-loss { animation: loss-flash 1.6s ease; }

@keyframes profit-flash {
    0%, 100% { box-shadow: none; }
    25% { box-shadow: inset 0 0 150px rgba(45, 245, 165, 0.16), 0 0 45px rgba(45, 245, 165, 0.12); }
}
@keyframes loss-flash {
    0%, 100% { box-shadow: none; }
    25% { box-shadow: inset 0 0 150px rgba(255, 66, 107, 0.16), 0 0 45px rgba(255, 66, 107, 0.12); }
}

.is-shaking { animation: terminal-shake 0.8s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes terminal-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, -1px, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 1px, 0); }
    40%, 60% { transform: translate3d(4px, -1px, 0); }
}

/* ============================================================
   TRADE TERMINAL
   ============================================================ */

.trade-page .app-frame { max-width: 1780px; }
.trade-page .page-shell { padding-top: 14px; }

.terminal-statusbar {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    min-height: 30px;
    padding: 5px 2px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(102, 220, 255, 0.09);
}

.terminal-statusbar span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.terminal-statusbar b { color: var(--text-soft); font-weight: 400; }
.terminal-statusbar .statusbar-end { margin-left: auto; }

.trade-layout {
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr) 326px;
    gap: 12px;
    align-items: start;
}

.markets-panel {
    position: sticky;
    top: 12px;
}

.markets-panel {
    max-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    padding: 1px;
    background: rgba(102, 220, 255, 0.08);
}

.category-tab {
    display: flex;
    text-decoration: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 8px 10px;
    border: 0;
    background: #06111a;
    color: var(--muted);
    text-align: left;
    transition: background 0.16s ease, color 0.16s ease;
}

.category-tab span { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.category-tab small { font-size: 6px; letter-spacing: 0.08em; color: var(--dim); }
.category-tab:hover { background: rgba(88, 231, 255, 0.05); color: var(--text); }
.category-tab.is-active { background: rgba(88, 231, 255, 0.09); color: var(--cyan); box-shadow: inset 0 -1px 0 var(--cyan); }
.category-tab.is-active small { color: rgba(88, 231, 255, 0.55); }

.market-lists { flex: 1; overflow-y: auto; min-height: 160px; }
.market-list { display: block; }

.market-row { position: relative; }
.market-row .market-item { padding-right: 12px; }

.market-item {
    position: relative;
    text-decoration: none;
    color: inherit;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(102, 220, 255, 0.055);
    background: transparent;
    color: var(--text);
    text-align: left;
    transition: background 0.14s ease;
}

.market-item:hover { background: rgba(88, 231, 255, 0.04); }
.market-item.is-active { background: linear-gradient(90deg, rgba(88, 231, 255, 0.1), rgba(88, 231, 255, 0.015)); }
.market-item.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.market-item-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.market-code-line { display: inline-flex; align-items: center; gap: 5px; }
.market-item-main b { font-size: 11px; letter-spacing: 0.02em; color: var(--text); }
.code-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1px solid rgba(102, 220, 255, 0.16);
    color: var(--dim);
    font-size: 8px;
    line-height: 1;
    transition: color 0.14s ease, border-color 0.14s ease;
}
.market-item:hover .code-copy, .code-copy:focus { color: var(--cyan); border-color: rgba(88, 231, 255, 0.45); }
.market-item-main small { color: var(--muted); font-size: 8px; }
.market-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0; flex: 0 0 auto; }
.market-item-price { font-size: 10px; color: var(--text-soft); }
.market-item-change { font-size: 8px; min-height: 12px; }
.position-indicator { color: var(--magenta); font-size: 6px; font-style: normal; margin-right: 2px; }
.market-item-side { position: relative; }
.market-item-side .position-indicator { position: absolute; left: -8px; top: 1px; }


.markets-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 11px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 7px;
    letter-spacing: 0.04em;
    margin-top: auto;
}

.chart-column, .order-column { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.order-column .order-panel { position: static; }

.quote-panel { overflow: hidden; }

.quote-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 18px 13px;
}

.quote-identity { min-width: 0; }
.quote-category { display: inline-flex; padding: 1px 6px; margin-bottom: 5px; border: 1px solid var(--line); color: var(--cyan); font-size: 8px; letter-spacing: 0.1em; }
.quote-symbol-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quote-symbol-line h1 { color: var(--text); font-family: var(--font-display); font-size: clamp(28px, 3vw, 42px); font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.quote-name { color: var(--muted); font-size: 10px; }

.copy-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    background: rgba(88, 231, 255, 0.03);
    color: var(--muted);
    padding: 4px 7px;
    font-size: 7px;
    letter-spacing: 0.08em;
}

.copy-button:hover { color: var(--cyan); border-color: rgba(88, 231, 255, 0.4); }

.quote-price-block { text-align: right; flex: 0 0 auto; }
.quote-price {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(30px, 3.3vw, 46px);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--text);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.quote-price.price-up { color: var(--green); text-shadow: 0 0 25px rgba(45, 245, 165, 0.22); }
.quote-price.price-down { color: var(--red); text-shadow: 0 0 25px rgba(255, 66, 107, 0.22); }
.quote-change { margin-top: 5px; font-size: 11px; text-align: right; }
.quote-stamp { display: block; margin-top: 6px; color: var(--dim); font-size: 8px; }

.quote-metrics {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(1, 6, 10, 0.3);
}

.quote-metrics span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 9px;
    border-right: 1px solid rgba(102, 220, 255, 0.055);
    min-width: 0;
}
.quote-metrics span:last-child { border-right: 0; }
.quote-metrics i { color: var(--dim); font-size: 7px; font-style: normal; letter-spacing: 0.1em; }
.quote-metrics b { color: var(--text-soft); font-size: 9px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.quote-warning {
    padding: 8px 15px;
    border-top: 1px solid rgba(255, 200, 87, 0.2);
    background: rgba(255, 200, 87, 0.05);
    color: #e0bf82;
    font-size: 9px;
}

.chart-panel { overflow: hidden; }

.chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(88, 231, 255, 0.04), transparent);
}

.chart-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chart-legend { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.chart-legend i { display: inline-block; width: 11px; height: 2px; margin-left: 4px; }
.chart-legend i.ma5 { background: var(--ma5); }
.chart-legend i.ma10 { background: var(--ma10); }
.chart-legend i.vol { background: rgba(88, 231, 255, 0.6); height: 5px; width: 8px; }

.chart-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chart-hint { color: var(--dim); font-size: 7px; }

.kline-stage {
    position: relative;
    width: 100%;
    height: 440px;
    min-height: 340px;
    background:
        linear-gradient(180deg, rgba(2, 8, 13, 0.5), rgba(3, 10, 16, 0.16)),
        radial-gradient(ellipse at 50% 0%, rgba(88, 231, 255, 0.035), transparent 60%);
    overflow: hidden;
}

.kline-canvas { position: relative; z-index: 2; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.kline-fallback { position: absolute; inset: 0; z-index: 1; } 
.kline-fallback-svg { display: block; width: 100%; height: 100%; }
.kline-canvas.is-dragging { cursor: grabbing; }

.kline-loading {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: var(--muted);
    font-size: 8px;
    letter-spacing: 0.14em;
    background: rgba(3, 9, 14, 0.72);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.loader-bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.loader-bars i { width: 3px; height: 6px; background: var(--cyan); animation: loader-bounce 0.8s ease-in-out infinite alternate; }
.loader-bars i:nth-child(2) { animation-delay: 0.1s; height: 12px; }
.loader-bars i:nth-child(3) { animation-delay: 0.2s; height: 17px; }
.loader-bars i:nth-child(4) { animation-delay: 0.3s; height: 9px; }

@keyframes loader-bounce { from { transform: scaleY(0.4); opacity: 0.3; } to { transform: scaleY(1); opacity: 1; } }

.kline-error {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #e7ae7f;
    background: rgba(5, 10, 15, 0.8);
    font-size: 10px;
    z-index: 2;
}

.kline-tooltip {
    position: absolute;
    width: 178px;
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    background: rgba(3, 13, 21, 0.94);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 3;
    backdrop-filter: blur(3px);
}

.kt-head { display: flex; justify-content: space-between; gap: 5px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 4px; }
.kt-head b { color: var(--text-soft); font-size: 8px; font-weight: 400; }
.kt-head span { font-size: 8px; }
.kt-grid { display: grid; grid-template-columns: 24px 1fr 24px 1fr; gap: 1px 5px; color: var(--muted); font-size: 8px; }
.kt-grid b { color: var(--text); font-weight: 400; text-align: right; }

.chart-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 7px 14px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 7px;
    letter-spacing: 0.08em;
}

.positions-table { min-width: 1120px; }
.risk-pair { display: flex; flex-direction: column; gap: 0; color: var(--muted); font-size: 8px; }

/* Order panel */
.order-panel { overflow: hidden; }
.order-form { padding: 14px; display: flex; flex-direction: column; gap: 14px; }

.order-symbol-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(88, 231, 255, 0.06), rgba(88, 231, 255, 0.015));
}
.order-symbol-card div { display: flex; flex-direction: column; }
.order-symbol-card b { font-size: 15px; color: var(--cyan); letter-spacing: 0.02em; }
.order-symbol-card small { color: var(--muted); font-size: 8px; }
.order-symbol-card > span { color: var(--dim); font-size: 8px; letter-spacing: 0.1em; }

.order-fieldset { border: 0; display: flex; flex-direction: column; gap: 7px; }
.leverage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }

.leverage-option { position: relative; cursor: pointer; }
.leverage-option input { position: absolute; opacity: 0; pointer-events: none; }
.leverage-option > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 8px 3px;
    border: 1px solid var(--line);
    background: rgba(3, 10, 16, 0.6);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.leverage-option b { color: var(--text-soft); font-size: 14px; letter-spacing: -0.02em; }
.leverage-option small { color: var(--dim); font-size: 7px; }
.leverage-option:hover > span { border-color: rgba(88, 231, 255, 0.32); }
.leverage-option input:checked + span {
    border-color: var(--cyan);
    background: rgba(88, 231, 255, 0.1);
    box-shadow: inset 0 0 18px rgba(88, 231, 255, 0.06);
}
.leverage-option input:checked + span b { color: var(--cyan); }

.stepper { display: flex; border: 1px solid var(--line); background: rgba(1, 7, 12, 0.72); }
.stepper .input { border: 0; text-align: center; min-height: 40px; background: transparent; font-size: 14px; font-weight: 700; padding: 5px; }
.stepper .input:focus { box-shadow: none; }
.stepper button { width: 35px; border: 0; background: rgba(88, 231, 255, 0.04); color: var(--cyan); font-size: 16px; }
.stepper button:hover { background: rgba(88, 231, 255, 0.12); }

.preset-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.preset-chip {
    padding: 2px 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 8px;
}
.preset-chip:hover { color: var(--cyan); border-color: rgba(88, 231, 255, 0.4); }

.order-estimate {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 10px;
    border: 1px dashed rgba(102, 220, 255, 0.18);
    background: rgba(88, 231, 255, 0.025);
    font-size: 8px;
    color: var(--muted);
}
.order-estimate span { display: flex; justify-content: space-between; gap: 10px; }
.order-estimate b { color: var(--text-soft); font-weight: 400; }

.risk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.risk-fields .input { min-height: 35px; font-size: 10px; }

.order-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.order-buttons .btn { padding-left: 8px; padding-right: 8px; font-size: 9px; letter-spacing: 0.04em; }

.order-disclaimer { color: var(--dim); font-size: 7px; line-height: 1.5; text-align: center; }

.credit-panel { padding-bottom: 2px; }
.credit-score-row { display: flex; align-items: center; gap: 12px; padding: 14px 14px 10px; }
.credit-score-row strong { color: var(--text); font-family: var(--font-display); font-size: 34px; line-height: 1; letter-spacing: -0.03em; }
.credit-score-row strong small { color: var(--dim); font-size: 10px; font-weight: 400; }
.credit-score-row .credit-meter { flex: 1; }
.credit-rules-mini { display: flex; justify-content: space-between; gap: 8px; padding: 0 14px 11px; color: var(--muted); font-size: 7px; flex-wrap: wrap; }
.credit-rules-mini i { font-style: normal; font-weight: 700; }
.credit-rules-mini i.up { color: var(--green); }
.credit-rules-mini i.down { color: var(--red); }
.credit-log-list { border-top: 1px solid var(--line); }
.credit-log-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; padding: 6px 14px; border-bottom: 1px solid rgba(102, 220, 255, 0.05); font-size: 8px; align-items: center; }
.credit-log-row span:nth-child(2) { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-log-row small { color: var(--dim); font-size: 7px; }
.credit-log-empty { padding: 12px 14px; color: var(--dim); font-size: 8px; }

.tactics-panel { padding-bottom: 10px; }
.tactics-preview { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 14px 4px; }
.tactics-preview span { padding: 2px 6px; border: 1px solid rgba(102, 220, 255, 0.12); color: var(--muted); font-size: 8px; }

.stats-mini { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; gap: 1px; background: rgba(102, 220, 255, 0.06); }
.stats-mini > div { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; background: rgba(5, 14, 21, 0.96); }
.stats-mini span { color: var(--dim); font-size: 7px; }
.stats-mini b { color: var(--text-soft); font-size: 10px; font-weight: 400; }
.stats-mini i { font-style: normal; }

.tactics-list { display: flex; flex-direction: column; gap: 15px; }
.tactics-list article { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.tactics-list article > span { color: var(--magenta); font-size: 10px; padding-top: 2px; }
.tactics-list h3 { font-size: 13px; margin-bottom: 3px; color: var(--text); }
.tactics-list p { color: var(--muted); font-size: 10px; line-height: 1.75; }

.risk-modal-meta { display: flex; gap: 12px; align-items: center; padding: 9px 10px; margin-bottom: 14px; border: 1px solid var(--line); background: rgba(88, 231, 255, 0.03); font-size: 9px; color: var(--muted); }
.risk-modal-meta b { color: var(--cyan); font-size: 13px; }
.risk-modal-meta span:last-child { margin-left: auto; color: var(--text-soft); }

.blowup-dialog { border-color: rgba(255, 66, 107, 0.55); box-shadow: 0 0 90px rgba(255, 66, 107, 0.18), var(--shadow); }
.blowup-dialog .panel-head { border-bottom-color: rgba(255, 66, 107, 0.25); background: linear-gradient(90deg, rgba(255, 66, 107, 0.1), transparent); }
.blowup-glyph { text-align: center; color: var(--red); font-size: 48px; line-height: 1; animation: pulse-danger 1.8s infinite; }
.blowup-dialog h2 { text-align: center; color: var(--red); font-family: var(--font-display); font-size: 28px; letter-spacing: 0.06em; margin: 12px 0 8px; text-shadow: 0 0 24px rgba(255, 66, 107, 0.35); }
.blowup-text { text-align: center; color: var(--text-soft); font-size: 11px; }
.blowup-code { text-align: center; margin-top: 18px; padding: 8px; border: 1px dashed rgba(255, 66, 107, 0.25); color: #d97586; font-size: 8px; letter-spacing: 0.12em; }

@keyframes pulse-danger { 0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(255, 66, 107, 0.45); } 50% { opacity: 0.55; text-shadow: 0 0 45px rgba(255, 66, 107, 0.8); } }

/* ============================================================
   LOAN
   ============================================================ */

.loan-hero, .rank-hero, .exchange-hero { align-items: center; }

.loan-limit-card {
    min-width: 330px;
    max-width: 410px;
    padding: 18px;
    background:
        radial-gradient(circle at 90% 0%, rgba(88, 231, 255, 0.12), transparent 50%),
        linear-gradient(145deg, rgba(9, 25, 37, 0.96), rgba(4, 11, 18, 0.96));
}

.limit-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; letter-spacing: 0.12em; }
.loan-limit-card > strong { display: block; margin: 12px 0 10px; font-family: var(--font-display); font-size: 44px; line-height: 1; font-weight: 900; letter-spacing: -0.04em; color: var(--cyan-bright); text-shadow: 0 0 30px rgba(88, 231, 255, 0.22); }
.limit-track { height: 5px; background: rgba(88, 231, 255, 0.12); overflow: hidden; }
.limit-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); box-shadow: 0 0 12px rgba(45, 245, 165, 0.45); }
.limit-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 8px; }
.limit-tier { margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 9px; letter-spacing: 0.05em; }

.loan-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 15px 17px;
}
.metric span { color: var(--muted); font-size: 8px; letter-spacing: 0.1em; }
.metric strong { color: var(--text); font-family: var(--font-display); font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.metric strong em { color: var(--muted); font-family: var(--font-mono); font-size: 10px; font-style: normal; font-weight: 400; margin-left: 3px; }
.metric small { color: var(--dim); font-size: 8px; }

.loan-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.loan-form-panel { padding-bottom: 4px; }
.loan-form-panel form { padding: 16px; }
.loan-presets { margin-top: 0; }
.loan-preview { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 9px 10px; border: 1px dashed rgba(102, 220, 255, 0.16); background: rgba(88, 231, 255, 0.025); color: var(--muted); font-size: 8px; }
.loan-preview b { color: var(--text-soft); font-weight: 400; }
.loan-form-panel .form-alert { margin: 16px; }

.loan-rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 6px 16px 14px; border: 1px solid var(--line); background: rgba(102, 220, 255, 0.08); }
.loan-rule-grid > div { padding: 10px; background: rgba(4, 12, 19, 0.9); }
.loan-rule-grid span { color: var(--magenta); font-size: 8px; }
.loan-rule-grid p { color: var(--muted); font-size: 8px; line-height: 1.65; margin-top: 3px; }

.loan-card-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.loan-card { position: relative; padding: 13px; border: 1px solid var(--line); background: rgba(4, 12, 19, 0.8); }
.loan-card.is-overdue { border-color: rgba(255, 66, 107, 0.4); background: rgba(255, 66, 107, 0.035); }
.loan-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.loan-card-head > div { display: flex; flex-direction: column; gap: 1px; }
.loan-card-head b { color: var(--text); font-family: var(--font-display); font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; }
.loan-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 11px 0; }
.loan-breakdown > div { display: flex; flex-direction: column; gap: 1px; }
.loan-breakdown span { color: var(--dim); font-size: 7px; }
.loan-breakdown b { color: var(--text-soft); font-size: 9px; font-weight: 400; }
.loan-progress { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--muted); font-size: 7px; }
.loan-progress i { flex: 1; height: 3px; background: rgba(102, 220, 255, 0.1); overflow: hidden; }
.loan-progress i b { display: block; height: 100%; background: var(--cyan); }
.loan-progress em { font-style: normal; color: var(--dim); font-size: 7px; }
.loan-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-top: 9px; border-top: 1px solid var(--line); }
.inline-repay-form { display: flex; align-items: center; gap: 5px; }
.inline-money { min-width: 128px; }
.inline-money .input { min-height: 30px; font-size: 9px; }
.inline-money span { padding: 0 7px; font-size: 11px; }
.inline-note { color: var(--dim); font-size: 7px; margin-top: 7px; }

.loan-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.closed-loan-list { padding: 4px 0; }
.closed-loan-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid rgba(102, 220, 255, 0.06); font-size: 8px; color: var(--muted); }
.closed-loan-row:last-child { border-bottom: 0; }
.closed-loan-row > div { min-width: 120px; display: flex; flex-direction: column; }
.closed-loan-row b { color: var(--text-soft); font-size: 9px; }
.closed-loan-row small { color: var(--dim); font-size: 7px; }
.closed-loan-row em { margin-left: auto; font-style: normal; }

/* ============================================================
   EXCHANGE
   ============================================================ */

.exchange-balance-card {
    min-width: 320px;
    max-width: 400px;
    padding: 18px;
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 70, 200, 0.1), transparent 55%),
        linear-gradient(145deg, rgba(9, 25, 37, 0.96), rgba(4, 11, 18, 0.96));
}
.exchange-balance-card > span { color: var(--muted); font-size: 8px; letter-spacing: 0.14em; }
.exchange-balance-card > strong { display: block; margin-top: 7px; font-family: var(--font-display); font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; color: var(--text); }
.wallet-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wallet-tags span { padding: 2px 6px; border: 1px solid var(--line); color: var(--muted); font-size: 7px; }
.wallet-swatch { display: flex; gap: 3px; height: 28px; align-items: flex-end; margin-top: 12px; padding: 4px; border: 1px solid var(--line); }
.wallet-swatch i { flex: 1; height: 60%; background: var(--green); opacity: 0.8; }
.wallet-swatch i:nth-child(2), .wallet-swatch i:nth-child(4) { height: 90%; background: var(--red); }
.wallet-swatch i:nth-child(3) { height: 45%; }

.exchange-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 375px;
    padding: 0 0 15px;
}
.product-card.is-equipped { border-color: rgba(45, 245, 165, 0.38); }
.product-visual {
    position: relative;
    height: 128px;
    margin-bottom: 13px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 30%, rgba(88, 231, 255, 0.15), transparent 45%),
        linear-gradient(135deg, rgba(9, 30, 44, 0.85), rgba(4, 10, 17, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-icon { position: relative; z-index: 2; font-size: 46px; color: var(--cyan); text-shadow: 0 0 30px rgba(88, 231, 255, 0.32); }
.product-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(88, 231, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(88, 231, 255, 0.05) 1px, transparent 1px); background-size: 20px 20px; }
.product-visual.skin-amber { background: radial-gradient(circle at 50% 50%, rgba(255, 188, 80, 0.18), transparent 50%), rgba(20, 13, 5, 0.9); }
.product-visual.skin-amber .product-icon { color: var(--amber); text-shadow: 0 0 30px rgba(255, 200, 87, 0.35); }
.product-visual.skin-ice { background: radial-gradient(circle at 50% 50%, rgba(180, 140, 255, 0.18), transparent 50%), rgba(8, 10, 25, 0.9); }
.product-visual.skin-ice .product-icon { color: #cba9ff; text-shadow: 0 0 30px rgba(187, 131, 255, 0.35); }
.product-visual.neon-scan { background: repeating-linear-gradient(0deg, rgba(88, 231, 255, 0.08) 0 1px, transparent 1px 5px), rgba(3, 12, 18, 0.9); }
.product-visual.neon-glitch { background: radial-gradient(circle at 50% 50%, rgba(255, 70, 200, 0.2), transparent 55%), rgba(20, 5, 18, 0.9); }
.product-visual.neon-glitch .product-icon { color: var(--magenta); text-shadow: 0 0 30px rgba(255, 70, 200, 0.45); }
.product-visual.fee_free { background: radial-gradient(circle at 50% 50%, rgba(45, 245, 165, 0.16), transparent 55%), rgba(4, 19, 14, 0.9); }
.product-visual.fee_free .product-icon { color: var(--green); }
.equipped-tag, .soldout-tag { position: absolute; top: 8px; left: 8px; z-index: 3; padding: 2px 6px; border: 1px solid; font-size: 7px; letter-spacing: 0.1em; background: rgba(3, 10, 15, 0.8); }
.equipped-tag { color: var(--green); border-color: rgba(45, 245, 165, 0.35); }
.soldout-tag { color: var(--red); border-color: rgba(255, 66, 107, 0.35); }
.product-type-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 15px; }
.product-type { color: var(--cyan); font-size: 7px; letter-spacing: 0.12em; }
.product-type-cn { color: var(--dim); font-size: 7px; }
.product-card h2 { padding: 0 15px; margin: 6px 0 4px; font-size: 16px; color: var(--text); letter-spacing: -0.01em; }
.product-card > p { padding: 0 15px; min-height: 42px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.product-meta { display: flex; flex-wrap: wrap; gap: 9px; padding: 10px 15px; margin-top: auto; border-top: 1px solid rgba(102, 220, 255, 0.06); color: var(--dim); font-size: 8px; }
.product-meta b { color: var(--text-soft); font-weight: 400; }
.product-actions { padding: 10px 15px 0; }
.product-actions .btn { min-height: 34px; font-size: 9px; }
.exchange-history { margin-bottom: 12px; }

.effect-preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.effect-preview { display: flex; flex-direction: column; gap: 14px; min-height: 120px; padding: 13px; overflow: hidden; }
.effect-preview > span { color: var(--muted); font-size: 7px; letter-spacing: 0.12em; }
.mini-candles { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 55px; }
.mini-candles i { width: 5px; height: 30%; background: var(--green); opacity: 0.8; position: relative; }
.mini-candles i::before { content: ""; position: absolute; left: 2px; width: 1px; top: -8px; bottom: -6px; background: inherit; }
.mini-candles i:nth-child(2), .mini-candles i:nth-child(5) { height: 65%; background: var(--red); }
.mini-candles i:nth-child(3), .mini-candles i:nth-child(6) { height: 45%; }
.skin-amber .mini-candles i { background: var(--amber); }
.skin-amber .mini-candles i:nth-child(2), .skin-amber .mini-candles i:nth-child(5) { background: #ff7a4d; }
.skin-ice .mini-candles i { background: #7ee6ff; }
.skin-ice .mini-candles i:nth-child(2), .skin-ice .mini-candles i:nth-child(5) { background: #b58aff; }
.preview-scanlines { height: 55px; background: repeating-linear-gradient(0deg, rgba(88, 231, 255, 0.35) 0 1px, transparent 1px 5px); }
.preview-glitch { height: 55px; display: flex; align-items: center; justify-content: center; color: var(--magenta); font-family: var(--font-display); font-size: 25px; font-weight: 900; letter-spacing: -0.05em; text-shadow: 2px 0 rgba(88, 231, 255, 0.5), -2px 0 rgba(255, 70, 200, 0.5); }

/* ============================================================
   RANK
   ============================================================ */

.rank-self-card {
    min-width: 300px;
    padding: 17px 19px;
    background: linear-gradient(145deg, rgba(9, 25, 37, 0.96), rgba(4, 11, 18, 0.96));
}
.rank-self-card > span { color: var(--muted); font-size: 8px; letter-spacing: 0.13em; }
.rank-self-card > strong { display: block; font-family: var(--font-display); font-size: 42px; line-height: 1.1; letter-spacing: -0.04em; color: var(--cyan); }
.rank-self-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rank-self-card > div b { font-size: 12px; color: var(--text); }
.rank-self-card > div em { font-style: normal; color: var(--text-soft); font-size: 11px; }
.rank-self-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }

.podium-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.podium-card { padding: 18px; overflow: hidden; background: linear-gradient(160deg, rgba(9, 24, 36, 0.95), rgba(4, 11, 18, 0.96)); }
.podium-card.place-1 { border-color: rgba(255, 200, 87, 0.36); background: radial-gradient(circle at 50% 0, rgba(255, 200, 87, 0.1), transparent 55%), linear-gradient(160deg, rgba(14, 25, 32, 0.96), rgba(4, 11, 18, 0.96)); }
.podium-card.is-me { box-shadow: inset 0 0 40px rgba(88, 231, 255, 0.05); }
.podium-top { display: flex; justify-content: space-between; align-items: flex-start; }
.podium-rank { font-family: var(--font-display); font-size: 42px; line-height: 0.9; font-weight: 900; color: transparent; -webkit-text-stroke: 1px rgba(88, 231, 255, 0.35); }
.place-1 .podium-rank { -webkit-text-stroke-color: rgba(255, 200, 87, 0.7); }
.podium-avatar { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; margin: 17px 0 9px; border: 1px solid var(--line); background: rgba(88, 231, 255, 0.05); color: var(--cyan); font-size: 18px; font-weight: 700; }
.place-1 .podium-avatar { border-color: rgba(255, 200, 87, 0.35); color: var(--amber); background: rgba(255, 200, 87, 0.06); }
.podium-card h2 { display: flex; align-items: center; gap: 7px; font-size: 17px; color: var(--text); }
.podium-card h2 i { font-style: normal; color: var(--cyan); font-size: 7px; border: 1px solid rgba(88, 231, 255, 0.25); padding: 1px 4px; }
.podium-assets { display: block; margin: 3px 0 12px; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--cyan-bright); }
.podium-stats { display: flex; gap: 15px; flex-wrap: wrap; color: var(--muted); font-size: 8px; }
.podium-stats b { color: var(--text-soft); font-weight: 400; }
.podium-foot { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--dim); font-size: 8px; }

.rank-table-panel { overflow: hidden; }
.rank-head-actions { display: flex; align-items: center; gap: 10px; }
.rank-table { min-width: 1000px; }
.rank-table tr.is-first { background: linear-gradient(90deg, rgba(255, 200, 87, 0.055), transparent 55%); }
.rank-table tr.is-me { background: rgba(88, 231, 255, 0.05); box-shadow: inset 2px 0 0 var(--cyan); }
.rank-table tr.is-me.is-first { background: linear-gradient(90deg, rgba(255, 200, 87, 0.08), rgba(88, 231, 255, 0.03)); }
.rank-number { color: var(--muted); font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.is-first .rank-number { color: var(--amber); }
.is-me .rank-number { color: var(--cyan); }
.rank-user { display: flex; align-items: center; gap: 8px; }
.rank-avatar { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: rgba(88, 231, 255, 0.035); color: var(--cyan); font-size: 10px; }
.rank-user b { color: var(--text); font-size: 11px; display: flex; align-items: center; gap: 5px; }
.you-tag { font-style: normal; color: var(--cyan); font-size: 6px; border: 1px solid rgba(88, 231, 255, 0.3); padding: 0 3px; }
.rank-assets { color: var(--text); font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.is-first .rank-assets { color: var(--amber); }
.credit-inline { display: inline-flex; align-items: baseline; gap: 1px; font-size: 11px; }
.credit-inline small { color: var(--dim); font-size: 7px; }
.achievement-inline { color: var(--amber); font-size: 9px; }
.rank-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 8px; }

/* ============================================================
   PROFILE
   ============================================================ */

.profile-hero { margin-bottom: 12px; }
.profile-identity {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 25px 27px;
    background:
        radial-gradient(circle at 90% 40%, rgba(88, 231, 255, 0.08), transparent 35%),
        linear-gradient(145deg, rgba(10, 26, 38, 0.96), rgba(4, 11, 18, 0.96));
}
.profile-avatar { position: relative; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
.profile-avatar > span { position: relative; z-index: 2; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); background: rgba(88, 231, 255, 0.06); color: var(--cyan); font-size: 23px; font-weight: 700; }
.avatar-ring { position: absolute; inset: 0; border: 1px dashed rgba(88, 231, 255, 0.2); border-radius: 50%; animation: orbit-spin 22s linear infinite; }
.profile-name h1 { margin: 4px 0 7px; font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.profile-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tier-badge { padding: 2px 7px; border: 1px solid currentColor; font-size: 8px; letter-spacing: 0.05em; opacity: 0.9; }
.profile-equity { text-align: right; min-width: 210px; padding-left: 22px; border-left: 1px solid var(--line); }
.profile-equity span { display: block; color: var(--muted); font-size: 8px; letter-spacing: 0.12em; }
.profile-equity strong { display: block; margin: 4px 0 2px; font-family: var(--font-display); font-size: 35px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; color: var(--cyan-bright); }
.profile-equity em { font-style: normal; font-size: 9px; }

.profile-stat-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    margin-top: 1px;
    background: rgba(102, 220, 255, 0.08);
    border: 1px solid var(--line);
    border-top: 0;
}
.profile-stat-strip > div { display: flex; flex-direction: column; gap: 1px; padding: 11px 16px; background: rgba(4, 12, 19, 0.92); }
.profile-stat-strip span { color: var(--muted); font-size: 8px; }
.profile-stat-strip b { color: var(--text); font-size: 14px; font-weight: 700; }
.profile-stat-strip b small { color: var(--dim); font-size: 8px; font-weight: 400; }

.profile-subnav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    background: rgba(4, 12, 19, 0.96);
    backdrop-filter: blur(10px);
}
.profile-subnav a { padding: 9px 16px; color: var(--muted); font-size: 9px; white-space: nowrap; border-right: 1px solid rgba(102, 220, 255, 0.07); }
.profile-subnav a:hover { color: var(--cyan); background: rgba(88, 231, 255, 0.04); }

.profile-overview-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 12px; margin-bottom: 12px; }
.overview-card { min-height: 186px; }
.performance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; }
.performance-grid > div { display: flex; flex-direction: column; gap: 3px; }
.performance-grid span { color: var(--muted); font-size: 8px; }
.performance-grid strong { color: var(--text); font-family: var(--font-display); font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; }
.performance-grid strong small { font-size: 11px; color: var(--muted); }
.performance-grid strong em { font-style: normal; }
.perf-bar { display: block; height: 3px; background: rgba(102, 220, 255, 0.1); margin-top: 3px; }
.perf-bar b { display: block; height: 100%; background: var(--green); }
.loadout-list { padding: 6px 16px; }
.loadout-list > div { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid rgba(102, 220, 255, 0.06); }
.loadout-list > div:last-child { border-bottom: 0; }
.loadout-list span { color: var(--muted); font-size: 8px; min-width: 72px; }
.loadout-list b { color: var(--text-soft); font-size: 9px; font-weight: 400; }
.loadout-swatch { margin-left: auto; width: 38px; height: 8px; background: var(--cyan); }
.loadout-swatch.skin-amber { background: var(--amber); }
.loadout-swatch.skin-ice { background: #bd83ff; }
.loadout-swatch.neon-glitch { background: var(--magenta); }
.loadout-swatch.neon-scan { background: repeating-linear-gradient(90deg, var(--cyan) 0 3px, transparent 3px 6px); }
.loadout-icon { margin-left: auto; color: var(--cyan); font-style: normal; font-size: 13px; }
.loadout-link { display: block; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 9px; }

.profile-section { margin-bottom: 12px; scroll-margin-top: 54px; }
.achievement-progress { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.achievement-progress .credit-meter { flex: 1; }
.achievement-progress em { color: var(--muted); font-size: 8px; font-style: normal; white-space: nowrap; }
.achievement-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
.subheading { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.04em; color: var(--text-soft); margin: 4px 0 10px; }
.subheading span { color: var(--muted); font-size: 8px; font-weight: 400; }
.subheading.positive { color: var(--green); }
.subheading.negative { color: var(--red); }

.achievement-grid { display: flex; flex-direction: column; gap: 6px; }
.achievement-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); background: rgba(3, 10, 16, 0.56); }
.achievement-card.locked { opacity: 0.42; filter: grayscale(0.55); }
.achievement-card.unlocked.positive { border-color: rgba(45, 245, 165, 0.26); background: linear-gradient(90deg, rgba(45, 245, 165, 0.055), rgba(3, 10, 16, 0.52)); }
.achievement-card.unlocked.negative { border-color: rgba(255, 66, 107, 0.24); background: linear-gradient(90deg, rgba(255, 66, 107, 0.05), rgba(3, 10, 16, 0.52)); }
.achievement-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid currentColor; color: var(--muted); font-size: 13px; }
.unlocked.positive .achievement-icon { color: var(--green); }
.unlocked.negative .achievement-icon { color: var(--red); }
.achievement-card h4 { font-size: 10px; color: var(--text); }
.achievement-card p { color: var(--muted); font-size: 8px; line-height: 1.45; margin-top: 1px; }
.achievement-state { color: var(--dim); font-size: 7px; text-align: right; white-space: nowrap; }
.achievement-state small { display: block; font-size: 6px; }
.unlocked .achievement-state { color: var(--cyan); }

.trade-ledger { min-width: 1140px; }
.time-stack { display: flex; flex-direction: column; }
.time-stack small { color: var(--dim); font-size: 7px; }
.status-closed { color: var(--muted); }
.profile-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.record-list { padding: 4px 0; }
.record-list.compact { margin-top: 4px; }
.record-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid rgba(102, 220, 255, 0.06); font-size: 8px; color: var(--muted); }
.record-row:last-child { border-bottom: 0; }
.record-row > div { display: flex; flex-direction: column; min-width: 120px; }
.record-row b { color: var(--text-soft); font-size: 9px; font-weight: 400; }
.record-row small { color: var(--dim); font-size: 7px; }
.record-row em { margin-left: auto; font-style: normal; }

.inventory-strip { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 14px; border-top: 1px solid var(--line); }
.inventory-strip > span { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border: 1px solid var(--line); color: var(--muted); font-size: 7px; }
.inventory-strip i { color: var(--cyan); font-style: normal; }
.inventory-strip b { color: var(--cyan); font-weight: 400; }

.credit-timeline { padding: 10px 14px; display: flex; flex-direction: column; gap: 0; }
.credit-event { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(102, 220, 255, 0.06); font-size: 9px; }
.credit-event:last-child { border-bottom: 0; }
.credit-event-delta { font-size: 13px; font-weight: 700; }
.credit-event.plus .credit-event-delta { color: var(--green); }
.credit-event.minus .credit-event-delta { color: var(--red); }
.credit-event > div { display: flex; flex-direction: column; }
.credit-event b { color: var(--text-soft); font-size: 9px; font-weight: 400; }
.credit-event small { color: var(--dim); font-size: 7px; }
.credit-event em { color: var(--muted); font-style: normal; }

/* ============================================================
   ADMIN
   ============================================================ */

.admin-page {
    background:
        radial-gradient(ellipse at 80% 0, rgba(33, 98, 127, 0.18), transparent 45%),
        radial-gradient(ellipse at 0 70%, rgba(92, 28, 88, 0.1), transparent 38%),
        #03070c;
}

.admin-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(5, 14, 22, 0.98), rgba(3, 8, 13, 0.99));
    z-index: 20;
}

.admin-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; padding: 22px 20px 17px; border-bottom: 1px solid var(--line); color: var(--text); }
.admin-brand .brand-fx { font-family: var(--font-display); font-size: 29px; font-weight: 900; }
.admin-brand .brand-slash { color: var(--magenta); font-size: 17px; }
.admin-brand .brand-jp { font-family: var(--font-display); font-size: 23px; font-weight: 900; }
.admin-brand small { flex-basis: 100%; color: var(--dim); font-size: 7px; letter-spacing: 0.22em; }

.admin-identity { display: flex; align-items: center; gap: 9px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.admin-identity div { display: flex; flex-direction: column; }
.admin-identity b { color: var(--text); font-size: 11px; }
.admin-identity small { color: var(--dim); font-size: 6px; letter-spacing: 0.15em; }

.admin-nav { padding: 9px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.admin-nav-link { position: relative; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; color: var(--muted); border: 1px solid transparent; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.admin-nav-link:hover { color: var(--text); background: rgba(88, 231, 255, 0.03); }
.admin-nav-link.is-active { border-color: rgba(88, 231, 255, 0.16); background: linear-gradient(90deg, rgba(88, 231, 255, 0.09), rgba(88, 231, 255, 0.01)); color: var(--cyan); }
.admin-nav-link.is-active::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.admin-nav-icon { color: inherit; font-size: 13px; text-align: center; }
.admin-nav-link > span:nth-child(2) { display: flex; flex-direction: column; gap: 0; }
.admin-nav-link b { font-size: 10px; font-weight: 400; }
.admin-nav-link small { color: var(--dim); font-size: 6px; letter-spacing: 0.1em; }
.admin-nav-link i { font-style: normal; color: var(--dim); font-size: 7px; }

.admin-sidebar-foot { margin-top: auto; padding: 12px 17px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 8px; color: var(--dim); }
.admin-sidebar-foot a { color: var(--muted); }
.admin-sidebar-foot a:hover { color: var(--cyan); }
.admin-sidebar-foot span { font-size: 6px; letter-spacing: 0.08em; color: #354b59; }

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; padding: 22px 28px 17px; border-bottom: 1px solid var(--line); background: rgba(4, 11, 17, 0.6); }
.admin-topbar-kicker { color: var(--muted); font-size: 7px; letter-spacing: 0.18em; }
.admin-topbar h1 { color: var(--text); font-family: var(--font-display); font-size: 31px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-top: 3px; }
.admin-topbar-right { display: flex; align-items: center; gap: 10px; }
.admin-clock { color: var(--cyan); font-size: 9px; letter-spacing: 0.1em; }
.admin-flash-stack { position: static; width: auto; margin: 12px 28px 0; }
.admin-content { padding: 20px 28px 35px; flex: 1; min-width: 0; }
.admin-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 28px; border-top: 1px solid var(--line); color: var(--dim); font-size: 7px; letter-spacing: 0.08em; }

.admin-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.admin-section-head h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; color: var(--text); margin: 3px 0 4px; }
.admin-section-head p { color: var(--muted); font-size: 9px; max-width: 700px; }

.admin-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.admin-metric { display: flex; flex-direction: column; gap: 2px; padding: 15px 16px; min-height: 108px; overflow: hidden; }
.admin-metric > span { color: var(--muted); font-size: 7px; letter-spacing: 0.08em; }
.admin-metric > strong { color: var(--text); font-family: var(--font-display); font-size: 31px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.admin-metric > small { color: var(--dim); font-size: 7px; margin-top: auto; }
.metric-corner { position: absolute; right: 11px; top: 11px; color: rgba(88, 231, 255, 0.18); font-style: normal; font-size: 9px; }

.admin-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr); gap: 10px; }
.panel-span-2 { grid-column: 1 / -1; }
.admin-dashboard-grid > .panel { min-width: 0; }
.system-status-list { padding: 6px 14px; }
.system-status-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(102, 220, 255, 0.06); font-size: 8px; }
.system-status-list > div:last-child { border-bottom: 0; }
.system-status-list span { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.system-status-list b { color: var(--text-soft); font-size: 8px; font-weight: 400; text-align: right; }
.admin-quick-actions { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.admin-user-mini-list { padding: 4px 0; }
.admin-user-mini { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 7px 14px; border-bottom: 1px solid rgba(102, 220, 255, 0.05); font-size: 9px; }
.admin-user-mini > span { color: var(--dim); font-size: 8px; }
.admin-user-mini b { color: var(--text-soft); font-weight: 400; }
.admin-user-mini em { color: var(--cyan); font-style: normal; font-size: 9px; }
.admin-user-mini i { color: var(--dim); font-style: normal; font-size: 7px; }
.exposure-list { padding: 4px 0; }
.exposure-list > div { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 7px 14px; border-bottom: 1px solid rgba(102, 220, 255, 0.05); font-size: 9px; }
.exposure-list span { color: var(--text-soft); }
.exposure-list b { color: var(--cyan); font-weight: 400; }
.exposure-list small { color: var(--dim); font-size: 7px; }

.admin-search { display: flex; gap: 6px; }
.admin-filter-bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; }
.admin-filter-bar .input { width: auto; min-width: 135px; }
.field-inline { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.admin-summary-chip { display: flex; align-items: baseline; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); background: rgba(88, 231, 255, 0.03); }
.admin-summary-chip span { color: var(--dim); font-size: 7px; letter-spacing: 0.08em; }
.admin-summary-chip b { color: var(--text); font-size: 12px; }
.admin-edit-panel { margin-bottom: 10px; }
.admin-edit-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px; }
.admin-edit-form .field { min-width: 150px; }
.admin-edit-meta { display: flex; flex-wrap: wrap; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 7px; }

.admin-users-table { min-width: 1120px; }
.admin-user-cell { display: flex; flex-direction: column; gap: 0; }
.admin-user-cell span { color: var(--dim); font-size: 7px; }
.admin-user-cell b { color: var(--text); font-size: 10px; }
.admin-row-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.admin-symbol-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
.admin-symbol-form .admin-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-symbols-table { min-width: 1000px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.settings-grid > .panel { min-width: 0; }
.settings-grid form { padding: 15px; }
.settings-grid .system-status-list { padding: 6px 14px; }
.api-endpoints { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border: 1px dashed rgba(102, 220, 255, 0.17); background: rgba(88, 231, 255, 0.02); }
.api-endpoints span { color: var(--dim); font-size: 7px; letter-spacing: 0.1em; }
.api-endpoints code { color: var(--muted); font-size: 8px; word-break: break-all; }
.toggle-card { display: flex; gap: 13px; padding: 13px; border: 1px solid var(--line); background: rgba(3, 10, 16, 0.5); }
.toggle-card.is-on { border-color: rgba(255, 66, 107, 0.25); background: rgba(255, 66, 107, 0.035); }
.toggle-card h3 { font-size: 12px; margin-bottom: 4px; color: var(--text); }
.toggle-card p { color: var(--muted); font-size: 8px; line-height: 1.65; margin-bottom: 6px; }
.switch { display: inline-block; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track { display: block; width: 38px; height: 20px; border: 1px solid var(--line); background: rgba(2, 8, 13, 0.8); padding: 2px; }
.switch-track i { display: block; width: 14px; height: 14px; background: var(--dim); transition: transform 0.2s ease, background 0.2s ease; }
.switch input:checked + .switch-track { border-color: rgba(255, 66, 107, 0.4); }
.switch input:checked + .switch-track i { transform: translateX(17px); background: var(--red); box-shadow: 0 0 8px rgba(255, 66, 107, 0.5); }
.loan-config-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.admin-achievement-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; margin-bottom: 10px; flex-wrap: wrap; }
.admin-achievement-user { display: flex; align-items: center; gap: 10px; }
.admin-achievement-user > div { display: flex; flex-direction: column; }
.admin-achievement-user b { font-size: 13px; color: var(--text); }
.admin-achievement-user small { color: var(--muted); font-size: 8px; }
.admin-achievement-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.admin-achievement-stats > div { display: flex; flex-direction: column; }
.admin-achievement-stats span { color: var(--muted); font-size: 7px; }
.admin-achievement-stats b { color: var(--text); font-family: var(--font-display); font-size: 22px; line-height: 1.2; font-weight: 800; }
.admin-achievement-stats b small { color: var(--dim); font-size: 8px; }
.admin-achievement-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-achievement-list { padding: 5px 0; }
.admin-achievement-row { display: grid; grid-template-columns: 27px 1fr auto auto; gap: 8px; align-items: center; padding: 7px 12px; border-bottom: 1px solid rgba(102, 220, 255, 0.05); }
.admin-achievement-row:last-child { border-bottom: 0; }
.admin-achievement-row.is-unlocked { background: rgba(45, 245, 165, 0.025); }
.admin-achievement-row.is-unlocked.negative { background: rgba(255, 66, 107, 0.025); }
.admin-ach-icon { color: var(--dim); font-size: 13px; text-align: center; }
.is-unlocked .admin-ach-icon { color: var(--green); }
.is-unlocked.negative .admin-ach-icon { color: var(--red); }
.admin-achievement-row > div { display: flex; flex-direction: column; }
.admin-achievement-row b { color: var(--text-soft); font-size: 9px; font-weight: 400; }
.admin-achievement-row small { color: var(--dim); font-size: 7px; line-height: 1.4; }

.admin-product-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; padding: 16px; }
.admin-product-form .admin-form-actions { grid-column: 1 / -1; }
.admin-products-table { min-width: 1050px; }
.admin-product-cell { display: flex; align-items: center; gap: 8px; }
.admin-product-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--cyan); }
.admin-product-cell div { display: flex; flex-direction: column; }
.admin-product-cell b { font-size: 9px; color: var(--text); }
.admin-product-cell small { color: var(--dim); font-size: 7px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.audit-log-list { max-height: 520px; overflow-y: auto; }
.audit-log-row { display: flex; gap: 9px; padding: 8px 13px; border-bottom: 1px solid rgba(102, 220, 255, 0.06); align-items: flex-start; }
.audit-action { flex: 0 0 auto; padding: 1px 5px; border: 1px solid var(--line); color: var(--cyan); font-size: 6px; letter-spacing: 0.05em; }
.audit-log-row > div { display: flex; flex-direction: column; }
.audit-log-row b { color: var(--text-soft); font-size: 8px; font-weight: 400; line-height: 1.5; }
.audit-log-row small { color: var(--dim); font-size: 7px; }

.danger-zone { margin: 14px; padding: 15px; border: 1px solid rgba(255, 66, 107, 0.35); background: linear-gradient(135deg, rgba(255, 66, 107, 0.06), rgba(3, 10, 16, 0.6)); }
.danger-zone-head { display: flex; justify-content: space-between; color: var(--red); font-size: 7px; letter-spacing: 0.12em; }
.danger-zone h3 { margin: 12px 0 5px; font-size: 14px; color: #ff9bae; }
.danger-zone p { color: var(--muted); font-size: 8px; line-height: 1.7; }
.danger-form { display: flex; align-items: flex-end; gap: 8px; margin: 13px 0 8px; flex-wrap: wrap; }
.danger-form .field { min-width: 180px; flex: 1; }
.danger-zone small { color: var(--dim); font-size: 7px; }

.admin-login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.admin-login-wrap { position: relative; z-index: 2; width: min(440px, calc(100vw - 30px)); }
.admin-login-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin-bottom: 16px; }
.admin-login-brand .brand-fx { font-family: var(--font-display); font-size: 38px; font-weight: 900; }
.admin-login-brand .brand-slash { color: var(--magenta); font-size: 22px; }
.admin-login-brand .brand-jp { font-family: var(--font-display); font-size: 31px; font-weight: 900; }
.admin-login-brand small { flex-basis: 100%; color: var(--dim); font-size: 7px; letter-spacing: 0.24em; }
.admin-login-panel { padding: 0 24px 22px; }
.admin-login-panel .panel-head { margin: 0 -24px 22px; padding: 0 24px; min-height: 54px; }
.admin-login-note { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--dim); font-size: 7px; line-height: 1.6; text-align: center; }
.admin-back-link { display: block; margin-top: 16px; color: var(--muted); font-size: 8px; text-align: center; }

/* ============================================================
   SKINS / NEON
   ============================================================ */

body.skin-cyan {
    --candle-up: #54eaff;
    --candle-down: #ff46c8;
    --chart-grid: rgba(84, 234, 255, 0.12);
    --ma5: #ffdd73;
    --ma10: #bca4ff;
}

body.skin-amber {
    --candle-up: #ffc857;
    --candle-down: #ff6a4a;
    --chart-grid: rgba(255, 200, 87, 0.1);
    --ma5: #71eaff;
    --ma10: #ff9b72;
}

body.skin-ice {
    --candle-up: #8df3ff;
    --candle-down: #b985ff;
    --chart-grid: rgba(141, 243, 255, 0.1);
    --ma5: #ffd76e;
    --ma10: #ff6bc8;
}

body.neon-scan .scanlines {
    opacity: 1;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 1px,
        rgba(0, 12, 20, 0.4) 2px,
        rgba(0, 12, 20, 0.4) 4px
    );
}

body.neon-scan .crt-flicker { background: rgba(88, 231, 255, 0.034); }
body.neon-scan .panel { box-shadow: inset 0 0 35px rgba(88, 231, 255, 0.025), var(--shadow), 0 0 24px rgba(88, 231, 255, 0.04); }

body.neon-glitch .panel::after {
    border-color: var(--magenta);
    filter: drop-shadow(0 0 4px rgba(255, 70, 200, 0.8));
}

body.neon-glitch .brand-fx,
body.neon-glitch .quote-symbol-line h1,
body.neon-glitch .equity-value {
    text-shadow: 2px 0 rgba(255, 70, 200, 0.25), -1px 0 rgba(88, 231, 255, 0.4);
}

body.neon-glitch .topbar::after {
    background: linear-gradient(90deg, var(--magenta), var(--cyan), transparent);
    box-shadow: 0 0 12px var(--magenta);
}

body.neon-glitch .main-nav { box-shadow: inset 0 -1px 0 rgba(255, 70, 200, 0.18); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1560px) {
    .trade-layout { grid-template-columns: 232px minmax(0, 1fr) 305px; }
    .quote-metrics { grid-template-columns: repeat(4, 1fr); }
    .quote-metrics span:nth-child(4n) { border-right: 0; }
    .quote-metrics span:nth-child(-n+4) { border-bottom: 1px solid rgba(102, 220, 255, 0.055); }
    .kline-stage { height: 405px; }
}

@media (max-width: 1380px) {
    .exchange-grid { grid-template-columns: repeat(3, 1fr); }
    .effect-preview-grid { grid-template-columns: repeat(3, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-card { min-height: 190px; }
    .landing-hero { gap: 35px; }
    .trade-layout { grid-template-columns: 222px minmax(0, 1fr) 286px; }
    .order-form { padding: 12px; }
    .nav-link { padding: 0 14px; }
    .admin-metric-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
    .landing-hero { grid-template-columns: 1fr; padding-top: 40px; }
    .hero-terminal { min-height: 330px; max-width: 760px; }
    .dashboard-hero-main { grid-template-columns: 1fr; }
    .equity-orbit { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; min-height: 0; }
    .equity-orbit-ring { right: 10%; }
    .nav-card-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-columns { grid-template-columns: 1fr; }
    .trade-layout { grid-template-columns: 224px minmax(0, 1fr); }
    .order-column {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: start;
    }
    .order-panel { grid-row: span 3; }
    .order-column .credit-panel,
    .order-column .tactics-panel,
    .order-column .stats-mini { position: static; }
    .loan-layout { grid-template-columns: 1fr; }
    .loan-form-panel .loan-rule-grid { grid-template-columns: repeat(4, 1fr); }
    .loan-metrics { grid-template-columns: repeat(2, 1fr); }
    .profile-identity { grid-template-columns: 70px 1fr; }
    .profile-equity { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; text-align: left; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
    .profile-equity span { flex-basis: 100%; }
    .profile-overview-grid { grid-template-columns: 1fr; }
    .achievement-columns { grid-template-columns: 1fr; }
    .profile-two-col { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 220px minmax(0, 1fr); }
    .admin-dashboard-grid { grid-template-columns: 1fr; }
    .panel-span-2 { grid-column: auto; }
    .admin-achievement-columns { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .admin-symbol-form, .admin-product-form { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
    .app-frame { width: min(100% - 24px, var(--max-width)); }
    .auth-stage { grid-template-columns: 1fr; gap: 35px; padding: 40px 2vw; min-height: auto; }
    .auth-visual { max-width: 100%; }
    .auth-title { font-size: clamp(50px, 13vw, 90px); }
    .auth-panel { max-width: 560px; }
    .topbar { min-height: 66px; }
    .status-cluster { display: none; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 49px;
        left: 0;
        right: 0;
        z-index: 60;
        flex-direction: column;
        background: rgba(4, 12, 19, 0.98);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    }
    .main-nav { position: relative; }
    .main-nav.nav-open .nav-links { display: flex; }
    .nav-link { min-height: 44px; border-bottom: 1px solid rgba(102, 220, 255, 0.06); border-right: 0; }
    .nav-toggle.nav-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
    .nav-toggle.nav-open span:nth-child(2) { opacity: 0; }
    .nav-toggle.nav-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
    .nav-clock { display: none; }
    .trade-layout { grid-template-columns: 1fr; }
    .markets-panel { position: static; max-height: none; }
    .market-lists { max-height: 300px; }
    .order-column { grid-column: auto; grid-template-columns: 1fr 1fr; }
    .order-panel { grid-row: auto; }
    .chart-toolbar { align-items: flex-start; }
    .chart-hint { display: none; }
    .kline-stage { height: 390px; }
    .loan-bottom-grid { grid-template-columns: 1fr; }
    .loan-form-panel .loan-rule-grid { grid-template-columns: repeat(2, 1fr); }
    .exchange-grid { grid-template-columns: repeat(2, 1fr); }
    .podium-grid { grid-template-columns: 1fr; }
    .podium-card { display: grid; grid-template-columns: 60px 1fr; column-gap: 14px; align-items: center; }
    .podium-top { grid-column: 2; grid-row: 1; }
    .podium-avatar { grid-column: 1; grid-row: 1 / span 3; margin: 0; align-self: start; }
    .podium-card h2 { grid-column: 2; grid-row: 2; }
    .podium-assets { grid-column: 2; grid-row: 3; margin: 0 0 8px; }
    .podium-stats { grid-column: 2; grid-row: 4; }
    .podium-foot { grid-column: 2; grid-row: 5; }
    .podium-rank { font-size: 30px; }
    .profile-stat-strip { grid-template-columns: repeat(3, 1fr); }
    .profile-stat-strip > div:nth-child(4), .profile-stat-strip > div:nth-child(5) { border-top: 1px solid var(--line); }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .admin-brand { padding: 17px 18px 11px; }
    .admin-identity { border-bottom: 0; padding: 9px 18px; }
    .admin-nav { flex-direction: row; overflow-x: auto; padding: 8px; border-top: 1px solid var(--line); }
    .admin-nav-link { flex: 0 0 auto; min-width: 126px; grid-template-columns: 20px auto; }
    .admin-nav-link i { display: none; }
    .admin-nav-link small { display: none; }
    .admin-sidebar-foot { display: none; }
    .admin-topbar { padding: 18px 20px 14px; }
    .admin-content { padding: 16px 20px 28px; }
    .admin-metric-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-topbar-right .admin-clock { display: none; }
    .admin-flash-stack { margin: 10px 20px 0; }
}

@media (max-width: 720px) {
    .app-frame { width: calc(100% - 20px); }
    .topbar { flex-wrap: wrap; padding: 8px 0; }
    .brand-mark { font-size: 25px; }
    .brand-jp { font-size: 21px; }
    .user-chip { min-width: 0; border-left: 0; border-right: 1px solid var(--line); padding: 2px 10px 2px 0; }
    .user-chip-meta { display: none; }
    .topbar-right { gap: 8px; }
    .brand-sub { font-size: 6px; }
    .page-shell { padding-top: 16px; }
    .page-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding: 18px 0; }
    .editing .page-hero { padding-top: 8px; }
    .loan-limit-card, .exchange-balance-card, .rank-self-card { min-width: 0; width: 100%; max-width: none; }
    .landing-hero { padding: 25px 0 30px; min-height: auto; }
    .hero-title { font-size: clamp(47px, 17vw, 80px); margin: 16px 0 18px; }
    .hero-lead { font-size: 12px; }
    .hero-actions .btn { flex: 1 1 auto; }
    .hero-stats-inline { gap: 14px; margin-top: 24px; }
    .hero-stats-inline b { font-size: 20px; }
    .hero-terminal { min-height: 280px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: auto; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 22px; }
    .ticker-label { padding: 0 8px; font-size: 7px; }
    .dashboard-hero-main { padding: 22px 20px; }
    .dashboard-hero .editorial-title { font-size: 40px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 13px; min-height: 106px; }
    .stat-card strong { font-size: 23px; }
    .nav-card-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .nav-card { min-height: 130px; padding: 14px; }
    .nav-card h2 { font-size: 14px; }
    .nav-card p { font-size: 8px; }
    .nav-card-index { margin-bottom: 10px; }
    .quote-head { flex-direction: column; gap: 10px; }
    .quote-price-block { text-align: left; }
    .quote-change, .quote-stamp { text-align: left; }
    .quote-metrics { grid-template-columns: repeat(2, 1fr); }
    .quote-metrics span:nth-child(2n) { border-right: 0; }
    .quote-metrics span:nth-child(-n+6) { border-bottom: 1px solid rgba(102, 220, 255, 0.055); }
    .kline-stage { height: 340px; }
    .chart-toolbar { flex-direction: column; }
    .chart-actions { width: 100%; }
    .chart-actions .btn { flex: 1; }
    .order-column { grid-template-columns: 1fr; }
    .order-panel { grid-row: auto; }
    .loan-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
    .loan-form-panel .loan-rule-grid { grid-template-columns: 1fr; }
    .loan-breakdown { grid-template-columns: 1fr 1fr; }
    .exchange-grid { grid-template-columns: 1fr; }
    .effect-preview-grid { grid-template-columns: 1fr 1fr; }
    .profile-identity { grid-template-columns: 55px 1fr; padding: 18px; gap: 12px; }
    .profile-avatar { width: 55px; height: 55px; }
    .profile-avatar > span { width: 45px; height: 45px; font-size: 18px; }
    .profile-stat-strip { grid-template-columns: 1fr 1fr; }
    .profile-stat-strip > div { padding: 9px 12px; }
    .profile-stat-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .performance-grid { gap: 10px; }
    .achievement-card { grid-template-columns: 27px minmax(0, 1fr); }
    .achievement-state { grid-column: 2; text-align: left; }
    .achievement-columns { padding: 12px; }
    .credit-event { grid-template-columns: 32px 1fr auto; }
    .rank-head-actions { flex-wrap: wrap; }
    .admin-topbar { align-items: center; }
    .admin-topbar h1 { font-size: 24px; }
    .admin-topbar-right { gap: 5px; }
    .admin-topbar-right .status-pill { display: none; }
    .admin-content { padding: 13px 12px 24px; }
    .admin-metric-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
    .admin-metric { min-height: 92px; padding: 11px; }
    .admin-metric > strong { font-size: 24px; }
    .admin-section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .admin-section-head h2 { font-size: 23px; }
    .admin-symbol-form, .admin-product-form { grid-template-columns: 1fr; padding: 12px; }
    .admin-edit-form { flex-direction: column; align-items: stretch; }
    .admin-edit-form .field { min-width: 0; }
    .admin-edit-meta { gap: 8px; }
    .admin-achievement-stats { gap: 12px; }
    .admin-achievement-row { grid-template-columns: 24px 1fr auto; }
    .admin-achievement-row .inline-form,
    .admin-achievement-row .status-pill { grid-column: 2 / -1; justify-self: start; }
    .admin-user-mini { grid-template-columns: 17px 1fr auto; }
    .admin-user-mini i { display: none; }
    .danger-form { flex-direction: column; align-items: stretch; }
    .footer-clock { margin-left: 0; }
    .footer-sub { flex-direction: column; gap: 3px; }
    .flash-stack { top: 10px; right: 10px; width: calc(100vw - 20px); }
    .modal { padding: 10px; align-items: flex-start; padding-top: 40px; }
    .modal-body { padding: 15px; }
    .modal-foot { flex-wrap: wrap; }
}

@media (max-width: 460px) {
    .stat-grid, .nav-card-grid { grid-template-columns: 1fr; }
    .nav-card { min-height: 108px; }
    .order-buttons { grid-template-columns: 1fr; }
    .risk-fields { grid-template-columns: 1fr; }
    .loan-metrics { grid-template-columns: 1fr; }
    .effect-preview-grid { grid-template-columns: 1fr; }
    .profile-badges { gap: 4px; }
    .topbar-right .btn { padding: 6px 8px; min-height: 30px; font-size: 8px; }
    .brand-sub { display: none; }
    .ticker-item { padding: 0 11px; }
    .auth-panel { padding: 0 16px 18px; }
    .auth-panel .panel-head { margin: 0 -16px 18px; padding: 0 16px; }
    .admin-nav-link { min-width: 110px; }
    .admin-nav-link b { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
    .ticker-track { animation: none; }
    .scanlines, .crt-flicker, .crt-grain { display: none; }
}

/* ============================================================
   MULTI-PROVIDER ADMIN
   ============================================================ */

.provider-summary-chip {
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.provider-summary-chip .status-pill { margin-left: 2px; }
.settings-single-form { display: block; }
.settings-grid form { padding: 0; }
.provider-config-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}
.provider-config-body > .btn { align-self: flex-start; }
.provider-source-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
.provider-source-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(3, 10, 16, 0.58);
    transition: border-color 0.16s ease, background 0.16s ease;
}
.provider-source-card.is-active {
    border-color: rgba(88, 231, 255, 0.42);
    background: linear-gradient(145deg, rgba(88, 231, 255, 0.075), rgba(3, 10, 16, 0.6));
    box-shadow: inset 0 0 22px rgba(88, 231, 255, 0.035);
}
.provider-source-head { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.provider-source-head b { font-size: 12px; color: var(--text); }
.provider-source-card p { color: var(--muted); font-size: 8px; line-height: 1.65; min-height: 42px; }
.provider-source-meta { display: flex; justify-content: space-between; gap: 6px; color: var(--dim); font-size: 7px; letter-spacing: 0.04em; }
.provider-endpoints-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.provider-endpoints-line code {
    padding: 2px 5px;
    border: 1px solid rgba(102, 220, 255, 0.1);
    color: var(--muted);
    font-size: 7px;
}
.provider-credentials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
.credential-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(3, 10, 16, 0.5);
}
.credential-head { display: flex; flex-direction: column; gap: 2px; }
.credential-head span { color: var(--text-soft); font-size: 9px; letter-spacing: 0.08em; }
.credential-head b { font-size: 7px; font-weight: 400; letter-spacing: 0.06em; }
.credential-card .input { min-height: 36px; font-size: 10px; }
.credential-card .checkbox-field { font-size: 8px; color: var(--muted); }
.rate-limit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border: 1px solid var(--line);
    background: rgba(102, 220, 255, 0.08);
}
.rate-limit-grid > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 9px 10px;
    background: rgba(3, 10, 16, 0.8);
}
.rate-limit-grid span { color: var(--muted); font-size: 7px; }
.rate-limit-grid b { color: var(--cyan); font-size: 11px; font-weight: 400; }
.rate-limit-grid small { color: var(--dim); font-size: 6px; }
.settings-admin-security { margin-top: 12px; grid-template-columns: minmax(0, 620px); }
.settings-admin-security .provider-config-body { padding: 16px; }

@media (max-width: 1200px) {
    .provider-source-grid,
    .provider-credentials { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .provider-source-grid,
    .provider-credentials { grid-template-columns: 1fr; }
    .rate-limit-grid { grid-template-columns: 1fr; }
    .settings-admin-security { grid-template-columns: 1fr; }
}

.provider-source-card.is-auto {
    border-color: rgba(255, 70, 200, 0.25);
    background: linear-gradient(145deg, rgba(255, 70, 200, 0.05), rgba(3, 10, 16, 0.62));
}
.provider-source-card.is-auto.is-active {
    border-color: rgba(255, 70, 200, 0.5);
    box-shadow: inset 0 0 26px rgba(255, 70, 200, 0.04), 0 0 22px rgba(255, 70, 200, 0.05);
}
.provider-source-card.is-auto .provider-source-head b { color: #ffc1ec; }
.credential-card.keyless-card { justify-content: center; border-style: dashed; }
.credential-card.keyless-card .form-hint { margin: 0; }

/* ============================================================
   SYMBOL SEARCH IN TRADE PANEL
   ============================================================ */

.markets-panel { overflow: visible; }
.market-search-wrap { position: relative; z-index: 70; border-bottom: 1px solid var(--line); }
.market-search {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    background: rgba(3, 10, 16, 0.72);
}
.market-search-icon { color: var(--cyan); font-size: 15px; line-height: 1; }
.market-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 10px;
    padding: 4px 0;
}
.market-search-input::placeholder { color: var(--dim); }
.market-search kbd {
    border: 1px solid var(--line);
    padding: 1px 4px;
    color: var(--dim);
    font-size: 6px;
    font-family: var(--font-mono);
    white-space: nowrap;
}
.market-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 90;
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--line-strong);
    border-top: 0;
    background: rgba(4, 14, 22, 0.99);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.65), 0 0 28px rgba(88, 231, 255, 0.07);
}
.market-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(102, 220, 255, 0.07);
    color: var(--text);
}
.market-search-result:last-child { border-bottom: 0; }
.market-search-result:hover, .market-search-result.is-focus {
    background: rgba(88, 231, 255, 0.075);
    color: var(--text);
}
.market-search-result-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.market-search-result-main b { color: var(--cyan); font-size: 10px; }
.market-search-result-main small { color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.market-search-result-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.market-search-result-meta span { color: var(--dim); font-size: 7px; }
.market-search-result-meta em { color: var(--text-soft); font-style: normal; font-size: 8px; }
.market-search-empty { padding: 16px 12px; color: var(--muted); font-size: 9px; text-align: center; }
.market-search-more { padding: 7px 10px; color: var(--dim); font-size: 7px; text-align: center; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
    .markets-panel { overflow: visible; }
    .market-search-results { position: absolute; max-height: 45vh; }
}

/* ============================================================
   BEGINNER GUIDE / ONBOARDING
   ============================================================ */

.guide-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
    gap: 26px;
    padding: 32px;
    margin-bottom: 16px;
    background:
        radial-gradient(circle at 82% 18%, rgba(88, 231, 255, 0.13), transparent 32%),
        linear-gradient(135deg, rgba(8, 24, 36, 0.98), rgba(4, 12, 19, 0.98));
}
.guide-hero h1 { font-size: clamp(27px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.035em; margin: 14px 0 14px; }
.guide-hero-copy > p { max-width: 620px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.guide-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.guide-hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: center; }
.guide-hero-stats > div { border: 1px solid var(--line); background: rgba(2, 9, 15, 0.72); padding: 14px; }
.guide-hero-stats span { display: block; color: var(--dim); font-size: 7px; letter-spacing: 0.12em; text-transform: uppercase; }
.guide-hero-stats b { display: block; color: var(--cyan); font-size: 19px; margin: 5px 0 2px; }
.guide-hero-stats small { color: var(--muted); font-size: 7px; letter-spacing: 0.1em; }
.guide-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.guide-step { display: flex; gap: 16px; padding: 20px; }
.guide-step-no { flex: 0 0 auto; font-family: var(--font-display); font-size: 32px; line-height: 1; color: rgba(88, 231, 255, 0.32); }
.guide-step h2 { font-size: 17px; margin: 7px 0 8px; }
.guide-step p { color: var(--muted); font-size: 11px; line-height: 1.72; margin: 0 0 7px; }
.guide-step code { color: var(--cyan); font-size: 10px; border: 1px solid var(--line); padding: 0 4px; }
.guide-note { color: var(--dim) !important; font-size: 9px !important; border-left: 2px solid rgba(88, 231, 255, 0.3); padding-left: 8px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.guide-body { padding: 16px 18px 20px; }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.guide-list li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; border-bottom: 1px solid rgba(102, 220, 255, 0.08); padding-bottom: 11px; }
.guide-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.guide-list b { color: var(--cyan); font-size: 9px; }
.guide-list span { color: var(--muted); font-size: 10px; line-height: 1.65; }
.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; background: linear-gradient(90deg, rgba(88, 231, 255, 0.08), rgba(4, 12, 19, 0.98)); }
.guide-cta h2 { font-size: 20px; margin: 6px 0 4px; }
.guide-cta p { color: var(--muted); font-size: 10px; margin: 0; }

.onboarding-panel { width: min(640px, 100%); }
.onboarding-body { padding: 22px; }
.onboarding-body h2 { font-size: 25px; margin: 10px 0 6px; }
.onboarding-body > p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0 0 17px; }
.onboarding-steps { display: grid; gap: 8px; margin-bottom: 18px; }
.onboarding-step { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); padding: 11px 12px; background: rgba(2, 9, 15, 0.6); }
.onboarding-step b { flex: 0 0 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(88, 231, 255, 0.4); color: var(--cyan); font-size: 9px; }
.onboarding-step div { min-width: 0; }
.onboarding-step strong { display: block; font-size: 11px; margin-bottom: 2px; }
.onboarding-step span { display: block; color: var(--muted); font-size: 9px; line-height: 1.55; }
.onboarding-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.onboarding-actions .btn { flex: 1 1 auto; justify-content: center; }
.onboarding-skip { border: 0; background: transparent; color: var(--dim); font-size: 9px; padding: 6px; }
.onboarding-skip:hover { color: var(--text); }

@media (max-width: 900px) {
    .guide-hero, .guide-steps, .guide-grid { grid-template-columns: 1fr; }
    .guide-hero { padding: 22px; }
    .guide-step-no { font-size: 24px; }
    .guide-cta { flex-direction: column; align-items: flex-start; }
    .guide-list li { grid-template-columns: 78px 1fr; }
}

/* ============================================================
   READABILITY PASS · LARGER TYPE FOR DESKTOP & MOBILE
   ============================================================ */

body { font-size: 16px; }

.page-shell :is(p, li, label, small, span, b, i, em, td, th, button, input, select, a, textarea) {
    font-size: max(12px, 1em) !important;
}

.main-nav .nav-link { font-size: 13px !important; }
.main-nav .nav-code, .main-nav .nav-clock { font-size: 10px !important; }
.topbar .brand-sub, .topbar .status-cluster, .topbar .user-chip-meta { font-size: 10px !important; }
.topbar .user-chip-name { font-size: 13px !important; }
.site-footer .footer-line, .site-footer .footer-sub { font-size: 11px !important; }

.order-submit { min-height: 52px; }
.order-submit-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; line-height: 1.15; }
.order-submit-copy b { font-weight: 800; font-size: 15px !important; letter-spacing: 0.03em; }
.order-submit-copy small { color: rgba(2, 10, 17, 0.72); font-size: 10px !important; letter-spacing: 0.08em; }
.btn-short .order-submit-copy small { color: rgba(2, 10, 17, 0.72); }
.order-submit.is-mobile-focus { outline: 2px solid var(--cyan); outline-offset: 3px; animation: order-pulse 0.8s ease 2; }
@keyframes order-pulse { 50% { box-shadow: 0 0 38px rgba(88, 231, 255, 0.62); } }

.sizing-row { align-items: center; gap: 5px; margin-top: 6px; }
.preset-label { color: var(--dim); font-size: 10px !important; margin-right: 2px; }
.preset-percent { border-color: rgba(88, 231, 255, 0.24); }
.preset-percent:hover { background: rgba(88, 231, 255, 0.12); }
.positions-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-close-all { border-color: rgba(255, 66, 107, 0.3); color: var(--red) !important; }
.btn-close-all:hover { background: rgba(255, 66, 107, 0.1); }

.mobile-trade-dock { display: none; }

@media (max-width: 760px) {
    body { font-size: 17px; }
    .page-shell :is(p, li, label, small, span, b, i, em, td, th, button, input, select, a, textarea) {
        font-size: max(14px, 1em) !important;
    }
    .page-shell { padding-bottom: 86px; }
    .trade-layout { display: flex; flex-direction: column; }
    .chart-column { order: 1; width: 100%; }
    .markets-panel { order: 2; width: 100%; margin-bottom: 10px; }
    .order-column { order: 3; width: 100%; }
    #chart-panel, #order-panel, #positions-panel { scroll-margin-top: 10px; }
    .market-lists { max-height: 210px; }
    .markets-foot { display: none; }
    .kline-stage { height: 330px; min-height: 280px; }
    .chart-toolbar { gap: 8px; }
    .chart-actions { gap: 6px; }
    .quote-price { font-size: 42px !important; }
    .order-column { display: block; }
    .order-panel { margin-bottom: 10px; }
    .order-submit { min-height: 58px; }
    .order-submit-copy b { font-size: 17px !important; }
    .order-submit-copy small { font-size: 11px !important; }
    .mobile-trade-dock {
        position: fixed;
        z-index: 120;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1px;
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line-strong);
        background: rgba(3, 11, 18, 0.97);
        box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(8px);
    }
    .mobile-trade-dock button {
        min-height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--text-soft);
        cursor: pointer;
    }
    .mobile-trade-dock button span { font-size: 18px !important; line-height: 1; }
    .mobile-trade-dock button b { font-size: 11px !important; font-weight: 700; }
    .mobile-trade-dock .dock-buy { color: #06170f; background: var(--green); }
    .mobile-trade-dock .dock-sell { color: #1d050b; background: var(--red); }
    .mobile-trade-dock .dock-buy b, .mobile-trade-dock .dock-sell b { font-size: 13px !important; }
    .positions-head-actions { justify-content: space-between; width: 100%; }
    .table-wrap { overflow: visible; }
    .positions-table { min-width: 0; display: block; }
    .positions-table thead { display: none; }
    .positions-table tbody, .positions-table tr, .positions-table td { display: block; width: 100%; }
    .positions-table tr {
        margin: 0 10px 10px;
        padding: 8px 10px;
        border: 1px solid var(--line);
        background: rgba(4, 14, 22, 0.62);
    }
    .positions-table td {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 7px 0;
        border-bottom: 1px solid rgba(102, 220, 255, 0.06);
        text-align: left;
    }
    .positions-table td:last-child { border-bottom: 0; }
    .positions-table td::before {
        content: attr(data-label);
        color: var(--dim);
        font-size: 11px !important;
        letter-spacing: 0.04em;
    }
    .positions-table .row-actions { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
    .positions-table .table-action { min-height: 34px; padding: 5px 10px; }
}
