/* Custom Pro Glassmorphism & UI Tweaks */
body {
    background:
        radial-gradient(circle at 12% -10%, rgba(16, 185, 129, .12), transparent 28rem),
        radial-gradient(circle at 88% 8%, rgba(14, 165, 233, .08), transparent 26rem),
        #070b12;
    color: #e2e8f0;
}

.card {
    border-radius: 1.15rem;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease-in-out;
}

/* NH CODEX — safety-first operating surface */
.bro-command {
    background: linear-gradient(135deg, rgba(12, 22, 31, .98), rgba(9, 18, 28, .96));
    border: 1px solid rgba(94, 234, 212, .2);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .025);
}
.bro-glow {
    position: absolute;
    width: 26rem;
    height: 26rem;
    top: -19rem;
    right: -5rem;
    border-radius: 999px;
    background: rgba(45, 212, 191, .17);
    filter: blur(45px);
    pointer-events: none;
}
.bro-eyebrow {
    color: #5eead4;
    font: 700 .68rem/1.2 "JetBrains Mono", monospace;
    letter-spacing: .16em;
}
.bro-title {
    margin-top: .55rem;
    color: #f8fafc;
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: -.045em;
}
.bro-title em { color: #5eead4; font-style: normal; }
.bro-lead {
    max-width: 35rem;
    margin-top: .8rem;
    color: #94a3b8;
    font-size: .78rem;
    line-height: 1.65;
}
.bro-status, .bro-account {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .38rem .68rem;
    font-size: .67rem;
    font-weight: 800;
}
.bro-status { border: 1px solid rgba(52, 211, 153, .35); color: #6ee7b7; background: rgba(6, 78, 59, .38); }
.bro-status span { width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.bro-status-live { border-color: rgba(251, 113, 133, .45); color: #fda4af; background: rgba(76, 5, 25, .55); }
.bro-account { border: 1px solid #253247; color: #cbd5e1; background: rgba(15, 23, 42, .82); font-family: "JetBrains Mono", monospace; }
.bro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: .5rem .8rem;
    border: 1px solid #2a394c;
    border-radius: .72rem;
    background: rgba(15, 23, 42, .72);
    color: #cbd5e1;
    font-size: .7rem;
    font-weight: 800;
    transition: .18s ease;
}
.bro-btn:hover { border-color: #5eead4; color: #f8fafc; transform: translateY(-1px); }
.bro-btn-primary { border-color: #0f766e; background: #0f766e; color: white; }
.bro-metric {
    min-height: 7.25rem;
    padding: .9rem;
    border: 1px solid rgba(51, 65, 85, .72);
    border-radius: .9rem;
    background: rgba(7, 12, 20, .6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.bro-metric-wide { grid-column: span 2; border-color: rgba(52, 211, 153, .25); background: linear-gradient(135deg, rgba(6, 78, 59, .22), rgba(7, 12, 20, .62)); }
.bro-metric-label { color: #64748b; font-size: .66rem; font-weight: 700; }
.bro-metric strong { color: #f8fafc; font: 800 .87rem/1.3 "JetBrains Mono", monospace; }
.bro-metric small { color: #64748b; font-size: .6rem; line-height: 1.35; }

@media (max-width: 640px) {
    .bro-metric { min-height: 6.5rem; padding: .75rem; }
    .bro-metric strong { font-size: .75rem; overflow-wrap: anywhere; }
    #gemini-ai-master-btn, #codex-management-badge { display: none !important; }
}

/* Login */
.login-body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    font-family: Pretendard, sans-serif;
    background:
        radial-gradient(circle at 50% 0, rgba(45, 212, 191, .16), transparent 32rem),
        linear-gradient(145deg, #05080d, #0a111b 55%, #07131a);
}
.login-card {
    width: min(100%, 27rem);
    padding: 2rem;
    border: 1px solid rgba(94, 234, 212, .2);
    border-radius: 1.4rem;
    background: rgba(9, 16, 25, .92);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .48);
    backdrop-filter: blur(18px);
}
.login-header { text-align: left; margin-bottom: 1.6rem; }
.login-mark {
    width: 2.7rem; height: 2.7rem; display: grid; place-items: center;
    border-radius: .8rem; color: #04100e; background: #5eead4;
    font: 900 .82rem/1 "JetBrains Mono", monospace; margin-bottom: 1.25rem;
}
.brand-logo { color: #5eead4; font: 800 .72rem/1 "JetBrains Mono", monospace; letter-spacing: .18em; }
.login-header h2 { margin: .55rem 0 .35rem; color: #f8fafc; font-size: 1.55rem; line-height: 1.25; letter-spacing: -.035em; }
.login-header p, .login-header small { color: #64748b; font-size: .78rem; line-height: 1.6; }
.login-header small { display: block; margin-top: .6rem; font-family: "JetBrains Mono", monospace; font-size: .65rem; }
.login-lock { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; padding: .4rem .65rem; border: 1px solid rgba(52, 211, 153, .25); border-radius: 999px; background: rgba(6, 78, 59, .25); color: #6ee7b7; font-size: .68rem; font-weight: 800; }
.login-lock span { width: .42rem; height: .42rem; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }
.input-group label { display: block; margin-bottom: .45rem; color: #94a3b8; font-size: .72rem; font-weight: 700; }
.input-group input { box-sizing: border-box; width: 100%; padding: .85rem .9rem; border: 1px solid #273449; border-radius: .75rem; outline: none; background: #080e17; color: #f8fafc; font: 600 .9rem/1 Pretendard, sans-serif; transition: .18s ease; }
.input-group input:focus { border-color: #2dd4bf; box-shadow: 0 0 0 3px rgba(45, 212, 191, .1); }
.error-text { min-height: 1.4rem; margin: .55rem 0; color: #fda4af; font-size: .72rem; line-height: 1.45; }
.btn-block { width: 100%; }
.btn { min-height: 2.8rem; border: 0; border-radius: .78rem; cursor: pointer; font-weight: 800; transition: .18s ease; }
.btn-primary { background: #0f766e; color: white; }
.btn-primary:hover { background: #0d9488; transform: translateY(-1px); }
.btn-secondary { background: #1e293b; color: #94a3b8; }

.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Switch Toggle Slider */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}
.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1e293b;
    transition: .3s;
    border-radius: 20px;
    border: 1px solid #334155;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #94a3b8;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #059669;
    border-color: #10b981;
}
input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #ffffff;
}

/* Orderbook Depth Volume Bar */
.orderbook-row {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.orderbook-row:hover {
    filter: brightness(1.2);
}
.depth-bar-ask {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(59, 130, 246, 0.15);
    z-index: 1;
    pointer-events: none;
    border-radius: 4px;
}
.depth-bar-bid {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(239, 68, 68, 0.15);
    z-index: 1;
    pointer-events: none;
    border-radius: 4px;
}

/* Chat Messages */
.chat-msg {
    animation: fadeIn 0.2s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Active Stock Filter Pills */
.chart-stock-pill.active {
    background-color: #064e3b !important;
    color: #6ee7b7 !important;
    border-color: #059669 !important;
}

/* Timeline Filter Buttons */
.timeline-filter-btn.active {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
}
