/* Quant Vanguard Financial Terminal Theme */
:root {
    --bg-main: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #162032;
    --bg-panel: #0d131f;
    --border-color: #1f293d;
    --border-gold: rgba(245, 158, 11, 0.35);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --gold-primary: #f59e0b;
    --gold-light: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.15);
    --up-red: #ef4444;
    --up-red-bg: rgba(239, 68, 68, 0.12);
    --down-green: #10b981;
    --down-green-bg: rgba(16, 185, 129, 0.12);
    --blue-accent: #3b82f6;
}

.admin-tab-btn[aria-selected="true"] { background:#4b3510!important; color:#fbbf24!important; border-color:#8a5d12!important; }
.admin-tab-btn[aria-selected="false"] { background:transparent!important; color:#9ca3af!important; border-color:transparent!important; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0b0f19;
}
::-webkit-scrollbar-thumb {
    background: #253347;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Header & Navbar */
.header-nav {
    background: rgba(13, 19, 31, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

/* Gold Gradients & Glow */
.text-gold-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-border-glow {
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #111827;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-gold:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* Stock Cards */
.stock-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.stock-card:hover {
    background-color: var(--bg-card-hover);
    border-color: #2b3952;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Masked stock blur effect */
.masked-blur {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

/* Probability Ring / Badges */
.prob-pill {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.prob-high {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Price Tags */
.price-up {
    color: var(--up-red);
}
.price-down {
    color: var(--down-green);
}

/* Modal Backdrop */
.modal-backdrop {
    background-color: rgba(5, 8, 15, 0.82);
    backdrop-filter: blur(8px);
}

/* Tab buttons */
.tab-btn.active {
    background: #162032;
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Chart container */
#main-chart {
    width: 100%;
    height: 330px;
}
@media (min-width: 640px) {
    #main-chart {
        height: 460px;
    }
}

#nav-chart {
    width: 100%;
    height: 250px;
}
@media (min-width: 640px) {
    #nav-chart {
        height: 320px;
    }
}

#radar-chart {
    width: 100%;
    height: 210px;
}
@media (min-width: 640px) {
    #radar-chart {
        height: 270px;
    }
}

/* Toast Notification */
.toast-msg {
    animation: toastSlideIn 0.25s ease forwards;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Tab Labels (Independent of .hidden utility) */
.tab-label-short {
    display: inline;
}
.tab-label-full {
    display: none;
}
@media (min-width: 640px) {
    .tab-label-short {
        display: none !important;
    }
    .tab-label-full {
        display: inline !important;
    }
}

/* Resilient Gate & Display Failsafe Utilities */
.hidden {
    display: none !important;
}

#admin-auth-gate {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #080c14;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.admin-login-box {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    flex-shrink: 1;
    background-color: #0f1624;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    color: #f3f4f6;
    box-sizing: border-box;
}

.admin-field-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background-color: #090d16;
    border: 1px solid #374151;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.875rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.admin-field-input:focus {
    border-color: #f59e0b;
}

.admin-submit-button {
    width: 100%;
    padding: 0.7rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000;
    font-weight: 800;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

#admin-auth-gate.hidden {
    display: none !important;
}

#admin-dashboard-container.hidden {
    display: none !important;
}

#vip-auth-gate.hidden {
    display: none !important;
}

#vip-app-dashboard.hidden {
    display: none !important;
}
