/* 
   MOVER SNIPER - QUANT BREAKOUT EDITION
   Premium Dark UI with Glassmorphism 
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-dark: #07070a;
    --bg-sidebar: #0b0b10;
    --bg-card: rgba(15, 15, 22, 0.65);
    --border-light: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(0, 149, 255, 0.2);
    
    --color-green: #00e676;
    --color-amber: #ffab00;
    --color-red: #ff3d71;
    --color-blue: #0095ff;
    --color-purple: #b388ff;
    
    --text-primary: #ffffff;
    --text-secondary: #8f9bba;
    --text-muted: #5c6784;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    /* Ambient Glows */
    background-image: 
        radial-gradient(circle at 10% 30%, rgba(0, 149, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 90% 70%, rgba(179, 136, 255, 0.04) 0%, transparent 50%);
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.brand {
    padding: 0 32px;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    font-size: 24px;
    color: var(--color-blue);
    text-shadow: 0 0 15px var(--color-blue);
}

.brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    gap: 8px;
}

.nav-section {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-left: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-item .icon { font-size: 18px; width: 24px; text-align: center; }

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 149, 255, 0.1) 0%, transparent 100%);
    color: var(--color-blue);
    border-left: 3px solid var(--color-blue);
}

.nav-item.disabled { opacity: 0.4; cursor: not-allowed; }
.badge-beta { background: rgba(0, 149, 255, 0.2); color: var(--color-blue); font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: auto; }

.bottom-nav { margin-top: auto; }
.system-status { display: flex; align-items: center; gap: 8px; padding: 12px 24px; font-size: 12px; color: var(--text-muted); margin-top: 16px; }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--color-green); box-shadow: 0 0 10px var(--color-green); animation: pulse 2s infinite; }

/* Workspace */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    overflow-y: auto;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.greeting h1 { font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.greeting h1 span { color: var(--text-secondary); font-weight: 400; }
.greeting p { font-size: 13px; color: var(--text-muted); font-family: var(--font-mono); }

.regime-bar {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    padding: 10px 24px;
}

.regime-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.regime-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); }
.regime-dot.safe { background: var(--color-green); box-shadow: 0 0 10px var(--color-green); }
.regime-dot.unsafe { background: var(--color-red); box-shadow: 0 0 10px var(--color-red); }
.regime-label { font-family: var(--font-mono); text-transform: uppercase; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.col-left { display: flex; flex-direction: column; gap: 24px; }
.col-right { display: flex; flex-direction: column; gap: 24px; }

/* Glass Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    overflow: hidden;
}

.card-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.border-bottom { border-bottom: 1px solid var(--border-light); }

/* Hero Section */
.hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.hero-card { padding: 0 0 24px 0; position: relative; }
.primary-hero { background: linear-gradient(135deg, rgba(15, 15, 25, 0.8) 0%, rgba(0, 149, 255, 0.05) 100%); }

.slot-badge { background: rgba(0, 149, 255, 0.1); color: var(--color-blue); font-size: 11px; padding: 4px 10px; border-radius: 100px; font-weight: 700; }

.hero-value { font-size: 48px; font-weight: 700; padding: 0 24px; letter-spacing: -1px; font-family: var(--font-mono); }
.hero-change { padding: 12px 24px; display: flex; align-items: center; gap: 10px; }
.change-pill { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 100px; font-family: var(--font-mono); }
.change-pill.positive { background: rgba(0, 230, 118, 0.1); color: var(--color-green); }
.change-pill.negative { background: rgba(255, 61, 113, 0.1); color: var(--color-red); }
.change-text { font-size: 12px; color: var(--text-muted); }

.dist-row { display: flex; gap: 32px; padding: 0 24px 16px; }
.dist-item { display: flex; flex-direction: column; gap: 4px; }
.dist-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.dist-value { font-size: 20px; font-family: var(--font-mono); font-weight: 600; }

/* Tables */
.table-card { flex: 1; }
.dot-indicator { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-indicator.green { background: var(--color-green); box-shadow: 0 0 8px var(--color-green); }
.dot-indicator.amber { background: var(--color-amber); box-shadow: 0 0 8px var(--color-amber); }
.dot-indicator.blue { background: var(--color-blue); box-shadow: 0 0 8px var(--color-blue); }
.count-badge { background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 12px; font-size: 11px; color: var(--text-secondary); }
.table-actions { font-size: 11px; color: var(--color-blue); font-weight: 600; }

.table-container { overflow-x: auto; max-height: 300px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 16px 24px; font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; border-bottom: 1px solid var(--border-light); font-weight: 600; position: sticky; top: 0; background: rgba(15, 15, 22, 0.95); z-index: 10; }
td { padding: 16px 24px; font-size: 13px; font-family: var(--font-mono); border-bottom: 1px solid rgba(255,255,255,0.02); }
tr:hover td { background: rgba(255,255,255,0.02); }

.side-buy { color: var(--color-green); }
.side-sell { color: var(--color-red); }
.pnl-pos { color: var(--color-green); }
.pnl-neg { color: var(--color-red); }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px; font-family: var(--font-sans); }

/* KPI Grid */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpi-card { padding: 24px; display: flex; flex-direction: column; justify-content: center; position: relative; border-radius: var(--radius-md) !important; background: rgba(15, 15, 25, 0.3) !important; }
.kpi-title { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.kpi-val { font-size: 28px; font-family: var(--font-mono); font-weight: 700; margin-bottom: 4px; }
.kpi-sub { font-size: 11px; color: var(--text-secondary); font-family: var(--font-mono); }

.highlight-green { color: var(--color-green); }
.highlight-amber { color: var(--color-amber); }
.highlight-blue { color: var(--color-blue); }
.highlight-purple { color: var(--color-purple); }

/* Projections */
.proj-body { padding: 24px; }
.proj-item { display: flex; flex-direction: column; gap: 8px; }
.mt-3 { margin-top: 24px; }
.proj-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.proj-value { font-size: 24px; font-family: var(--font-mono); font-weight: 700; }
.progress-track { height: 4px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--color-green); border-radius: 4px; box-shadow: 0 0 10px var(--color-green); transition: width 1s ease-in-out; }
.fill-purple { background: var(--color-purple); box-shadow: 0 0 10px var(--color-purple); }
.proj-disclaimer { font-size: 10px; color: var(--text-muted); margin-top: 16px; text-align: center; }

/* Alerts */
.alerts-card { flex: 1; display: flex; flex-direction: column; }
.alerts-list { padding: 12px; overflow-y: auto; max-height: 250px; }
.alert-item { display: flex; justify-content: space-between; padding: 12px; border-radius: 8px; margin-bottom: 8px; font-size: 12px; background: rgba(255,255,255,0.02); }
.alert-item.loss { border-left: 3px solid var(--color-red); }
.alert-item.regime { border-left: 3px solid var(--color-amber); }
.alert-item.orphan { border-left: 3px solid var(--color-blue); }
.alert-reason { font-weight: 600; color: var(--text-primary); }
.alert-pnl { font-family: var(--font-mono); font-weight: 700; color: var(--color-red); }
.alert-time { color: var(--text-muted); font-size: 10px; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .col-right { order: -1; }
    .hero-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; padding: 16px; flex-direction: row; align-items: center; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--border-light); }
    .brand { margin-bottom: 0; padding: 0; }
    .side-nav { display: none; }
    .workspace { padding: 16px; }
    .topbar { flex-direction: column; gap: 16px; align-items: flex-start; }
    .regime-bar { width: 100%; justify-content: space-between; padding: 12px; overflow-x: auto; }
}

.text-green { color: var(--color-green) !important; text-shadow: 0 0 10px rgba(0,230,118,0.2); }
.text-red { color: var(--color-red) !important; text-shadow: 0 0 10px rgba(255,61,113,0.2); }
.vibrant { opacity: 1 !important; font-weight: 700; text-shadow: 0 0 15px rgba(255,255,255,0.3); }
.dimmed { opacity: 0.4 !important; font-weight: 400; }

.full-width {
    grid-column: 1 / -1;
}
