:root {
    --bg-deep: #05070a;
    --bg-card: rgba(13, 17, 23, 0.75);
    --gold-primary: #f0b90b;
    --gold-glow: rgba(240, 185, 11, 0.3);
    --green: #0ecb81;
    --red: #f6465d;
    --text-dim: #848e9c;
    --text-bright: #eaecef;
    --border: rgba(255, 255, 255, 0.08);
    --accent-gradient: linear-gradient(135deg, #f0b90b 0%, #e8a30a 100%);
    --glass-blur: blur(15px);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-bright);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: url('header.png') no-repeat center center;
    background-size: cover;
}

/* Glass Overlay */
.page-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(5, 7, 10, 0.8) 0%, rgba(5, 7, 10, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: -1; 
    pointer-events: none; 
}

/* --- Header --- */
header {
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 7, 10, 0.5);
    backdrop-filter: var(--glass-blur);
    z-index: 100;
    position: relative; 
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-primary);
}

.live-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(14, 203, 129, 0.1);
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid rgba(14, 203, 129, 0.2);
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2s infinite;
}

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

/* --- Main Layout --- */
main {
    flex: 1;
    display: grid;
    grid-template-columns: 64px 1fr 360px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Side Nav */
.side-nav {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 32px;
    background: rgba(5, 7, 10, 0.3);
}

.nav-icon {
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.nav-icon:hover, .nav-icon.active {
    color: var(--gold-primary);
    filter: drop-shadow(0 0 8px var(--gold-glow));
}

/* Chart Area */
.chart-section {
    display: flex;
    flex-direction: column;
    position: relative;
}

#tv_chart_container {
    flex: 1;
    width: 100%;
}

/* Right Panel */
.monitoring-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.section-header {
    padding: 20px 24px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gold-primary);
}

/* Signal Widgets */
.signal-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.signal-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.signal-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.signal-tag {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 800;
    border-bottom-left-radius: 12px;
}

.buy-tag { background: var(--green); color: black; }
.sell-tag { background: var(--red); color: white; }

.signal-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    margin: 10px 0;
}

.signal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.meta-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
}

.meta-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; }
.meta-val { font-size: 12px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }

/* Technical Meters */
.tech-analysis {
    padding: 0 24px 24px;
}

.meter-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meter-label { font-size: 13px; color: var(--text-dim); }
.meter-val { font-size: 13px; font-weight: 600; }

.gauge-bg {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 8px;
    position: relative;
}

.gauge-fill {
    position: absolute;
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease-in-out;
}

/* TradingView Ticker Scroll */
.ticker-wrap {
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* AI Notification */
.ai-pulse {
    margin: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.1) 0%, transparent 100%);
    border-radius: 12px;
    border: 1px solid var(--gold-glow);
    font-size: 13px;
    line-height: 1.5;
}

/* --- Footer --- */
footer {
    height: 32px;
    padding: 0 24px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

/* ML Confidence Colors (Preserved) */
.ml-high { background: var(--green) !important; box-shadow: 0 0 10px rgba(14, 203, 129, 0.4); }
.ml-mid { background: #f1c40f !important; box-shadow: 0 0 10px rgba(241, 196, 15, 0.4); }
.ml-low { background: #95a5a6 !important; }

.status-valid {
    font-weight: 900 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 14px !important;
}
