:root {
    --bg: #05070A;
    --panel: #0C0F14;
    --panel-2: #11151D;
    --panel-3: #181E28;
    --border: #1C2330;
    --border-light: #283040;
    --text: #E0E4EB;
    --text-dim: #8B97A8;
    --muted: #5E6B7E;
    --gold: #C89B3C;
    --gold-bright: #E8C45A;
    --gold-dim: rgba(200, 155, 60, 0.08);
    --gold-glow: rgba(200, 155, 60, 0.2);
    --bull: #16C784;
    --bull-bright: #2EE59A;
    --bull-dim: rgba(22, 199, 132, 0.08);
    --bear: #EA3943;
    --bear-bright: #FF5A63;
    --bear-dim: rgba(234, 57, 67, 0.08);
    --amber: #E8A838;
    --amber-dim: rgba(232, 168, 56, 0.08);
    --blue: #4A8BFF;
    --blue-dim: rgba(74, 139, 255, 0.08);
    --purple: #A855F7;
    --purple-dim: rgba(168, 85, 247, 0.08);
    --cyan: #22D3EE;
    --cyan-dim: rgba(34, 211, 238, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.4);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========================================================================
   UTILITY
   ======================================================================== */

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.text-green { color: var(--bull); }
.text-red { color: var(--bear); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.no-underline { text-decoration: none; }

/* ========================================================================
   SCROLLBAR
   ======================================================================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ========================================================================
   HEADER (homepage)
   ======================================================================== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 60px;
    background: rgba(12, 15, 20, 0.94);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-left { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-logo-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), #B8860B);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 20px; color: #fff;
    box-shadow: 0 0 20px rgba(200,155,60,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
    flex-shrink: 0;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}
.header-logo-mark-text {
    font-size: 21px;
    background: linear-gradient(135deg, #F5C842, #B8860B);
    box-shadow: 0 0 24px rgba(200,155,60,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.header-logo:hover .header-logo-mark {
    box-shadow: 0 0 30px rgba(200,155,60,0.45);
    transform: scale(1.05);
}

.header-logo-text { display: flex; flex-direction: column; margin-left: 4px; }
.header-logo-name { font-weight: 900; font-size: 17px; letter-spacing: -0.03em; line-height: 1.15; background: linear-gradient(135deg, #F5C842 0%, var(--gold) 50%, #E8B830 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 40px rgba(200,155,60,0.1); }
.header-logo-sub { color: var(--muted); font-size: 10.5px; line-height: 1.2; letter-spacing: 0.3px; font-weight: 500; text-transform: uppercase; opacity: 0.75; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.header-nav-link.active { color: var(--gold); background: rgba(200,155,60,0.08); }
.header-nav-link.primary { color: var(--gold); }
.header-nav-link.primary:hover { background: var(--gold-dim); }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    background: var(--panel-2);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.header-user {
    position: relative;
}

.header-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 5px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.header-user-btn:hover { background: rgba(255,255,255,0.04); }
.header-user-btn.open { background: var(--panel-2); border-color: var(--border); }

.header-user-avatar {
    width: 26px; height: 26px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--panel-2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px; color: var(--muted);
}

.header-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-avatar-sm { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.user-avatar-placeholder { width: 32px; height: 32px; border-radius: 6px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: var(--muted); }

.header-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 200;
}

.header-user-dropdown.show { display: block; }

.header-user-dropdown .hd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font);
}

.header-user-dropdown .hd-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.header-user-dropdown .hd-item.hd-danger { color: var(--bear); }
.header-user-dropdown .hd-item.hd-danger:hover { background: rgba(234,57,67,0.08); }
.header-user-dropdown .hd-divider { height: 1px; background: var(--border); margin: 4px 8px; }

.header-user-group {
    padding: 8px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

/* Hamburger */
.header-hamburger {
    display: none;
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    flex-shrink: 0;
}

.header-hamburger:hover { color: var(--text); border-color: var(--border-light); }
.header-hamburger.open { color: var(--gold); border-color: var(--gold); background: var(--gold-dim); }

/* Mobile sidebar */
.header-mobile-nav {
    display: none;
    position: fixed;
    top: 0; left: -280px;
    width: 260px;
    height: 100vh;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 16px 14px;
    z-index: 200;
    flex-direction: column;
    gap: 4px;
    transition: left 0.28s cubic-bezier(.4,.0,.2,1);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.header-mobile-nav.show { left: 0; display: flex; }

.header-mobile-sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 190;
}

.header-mobile-sidebar-overlay.show { display: block; }

.header-mobile-nav .hd-divider { height: 1px; background: var(--border); margin: 6px 0; }

.header-mobile-link {
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.15s;
}

.header-mobile-link:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.header-mobile-link.active { color: var(--gold); background: rgba(200,155,60,0.08); }
.header-mobile-link.primary { color: var(--gold); }
.header-mobile-link.hm-danger { color: var(--bear); }

.dot-bullish, .dot-bearish, .dot-sideways {
    display: inline-block; width: 15px; height: 15px;
    border-radius: 50%; vertical-align: middle; margin-right: 4px;
}
.dot-bullish { background: #16C784; }
.dot-bearish { background: #EA3943; }
.dot-sideways { background: #FFD700; }

.pulse-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
}

.pulse-dot.active {
    background: #16C784;
    animation: pulse-green 2s infinite;
}

.pulse-dot.inactive {
    background: #EA3943;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(22,199,132,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(22,199,132,0); }
    100% { box-shadow: 0 0 0 0 rgba(22,199,132,0); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(234,57,67,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(234,57,67,0); }
    100% { box-shadow: 0 0 0 0 rgba(234,57,67,0); }
}



/* ========================================================================
   SESSION TIMELINE
   ======================================================================== */

.session-timeline {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 24px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    position: relative;
}

.box-toggle {
    position: absolute; top: 15px; right: 12px;
    background: none; border: none;
    color: var(--muted); cursor: pointer;
    font-size: 14px; padding: 2px 8px;
    border-radius: 4px; transition: 0.15s;
}

.box-toggle:hover { background: var(--panel-2); color: var(--text); }

.box-summary {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    min-height: 20px;
}
.box-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}
.box-summary svg {
    display: block;
    vertical-align: middle;
}

.stl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stl-clock { display: flex; align-items: baseline; gap: 6px; }

.stl-time {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stl-secs { font-size: 14px; -webkit-text-fill-color: var(--muted); }
.stl-tz { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.stl-active { display: flex; align-items: center; gap: 8px; }

.stl-dot {
    width: 10px; height: 10px;
    border-radius: 50%; flex-shrink: 0;
}

.stl-dot.on { background: var(--bull); box-shadow: 0 0 12px rgba(22,199,132,0.6); }
.stl-dot.quiet { background: var(--muted); }
.stl-dot.asia { background: var(--blue); box-shadow: 0 0 12px rgba(74,139,255,0.5); }
.stl-dot.london { background: var(--bull); box-shadow: 0 0 12px rgba(22,199,132,0.6); }
.stl-dot.ny { background: var(--purple); box-shadow: 0 0 12px rgba(168,85,247,0.5); }
.stl-dot.overlap { background: var(--amber); box-shadow: 0 0 12px rgba(232,168,56,0.6); }

.stl-active-label { font-weight: 600; font-size: 12.5px; }

.stl-bar {
    position: relative;
    height: 32px;
    background: var(--panel-2);
    border-radius: 8px;
    margin-bottom: 6px;
    overflow: visible;
}

.stl-block {
    position: absolute;
    top: 0; bottom: 0;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 9.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    overflow: hidden; white-space: nowrap;
}

.stl-block.ny { background: rgba(168,85,247,0.3); color: #C084FC; }
.stl-block.quiet { background: rgba(94,107,126,0.15); color: var(--muted); }
.stl-block.asia { background: rgba(74,139,255,0.25); color: #93C5FD; }
.stl-block.london { background: rgba(22,199,132,0.25); color: #6EE7B7; }
.stl-block.overlap {
    background: linear-gradient(90deg, rgba(232,168,56,0.25), rgba(200,155,60,0.35));
    color: var(--amber);
}

.stl-now {
    position: absolute;
    top: -4px; bottom: -4px;
    width: 2px;
    background: var(--gold-bright);
    box-shadow: 0 0 8px var(--gold), 0 0 16px rgba(200,155,60,0.4);
    z-index: 5;
    pointer-events: none;
    transition: left 0.5s linear;
}

.stl-now-dot {
    position: absolute; top: -5px;
    left: 50%; transform: translateX(-50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gold-bright);
    box-shadow: 0 0 10px var(--gold);
}

.stl-scale { position: relative; height: 18px; margin-bottom: 10px; }

.stl-scale .mk {
    position: absolute;
    font-size: 9.5px;
    color: var(--muted);
    font-family: var(--font-mono);
    transform: translateX(-50%);
    white-space: nowrap;
}

.stl-legend {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.5;
    padding: 10px 14px;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.stl-legend b { color: var(--amber); }

.stl-btc {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stl-btc .up { color: var(--bull); font-weight: 600; }
.stl-btc .down { color: var(--bear); font-weight: 600; }
.stl-btc .stl-div { width: 1px; height: 14px; background: var(--border); }
.stl-btc .stl-muted { color: var(--muted); font-size: 11.5px; }

/* ---- Countdown ---- */
.stl-countdown {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px; padding: 6px 10px;
    background: var(--panel-2); border-radius: var(--radius-sm);
    font-size: 11.5px;
}
.stl-cd-label { color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.stl-cd-time { font-family: var(--font-mono); font-weight: 700; color: var(--gold); min-width: 60px; }
.stl-cd-name { color: var(--text-dim); }
.stl-cd-bar-wrap { flex: 1; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; min-width: 40px; }
.stl-cd-bar { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); border-radius: 4px; transition: width 1s linear; }

/* ---- Info Bar ---- */
.stl-info-bar {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap; font-size: 12px;
    padding: 8px 0 2px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}
.stl-ib-item { white-space: nowrap; }
.stl-ib-btc { font-weight: 600; }
.stl-ib-btc .up { color: var(--bull); }
.stl-ib-btc .down { color: var(--bear); }
.stl-ib-div { width: 1px; height: 12px; background: var(--border); flex-shrink: 0; }
.stl-ib-range { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; }
.stl-ib-vol { color: var(--text-dim); font-size: 11px; }
.stl-ib-vol .stl-muted { color: var(--muted); font-size: 10.5px; }
.stl-ib-fng { font-size: 11.5px; }
.stl-ib-strength { flex: 1; min-width: 60px; height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.stl-sbar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--muted), var(--gold)); transition: width 0.5s; }

/* Collapsed */
.session-timeline.collapsed .stl-top,
.session-timeline.collapsed .stl-bar,
.session-timeline.collapsed .stl-scale,
.session-timeline.collapsed .stl-countdown,
.session-timeline.collapsed .stl-info-bar { display: none; }
.session-timeline.collapsed .box-summary { margin-bottom: 0; }

/* ========================================================================
   MAIN CONTENT WRAPPER — FULL SCREEN
   ======================================================================== */

.wrap {
    max-width: 100%;
    padding: 24px 28px 60px;
}

/* ========================================================================
   SECTION HEADERS
   ======================================================================== */

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title span {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 12.5px;
}

/* ========================================================================
   STATS GRID
   ======================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.15s;
}

.stat-card:hover { border-color: var(--border-light); }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; flex-shrink: 0;
}

.stat-icon-gold { background: var(--gold-dim); color: var(--gold); }
.stat-icon-green { background: var(--bull-dim); color: var(--bull); }
.stat-icon-amber { background: var(--amber-dim); color: var(--amber); }
.stat-icon-cyan { background: var(--cyan-dim); color: var(--cyan); }
.stat-icon-purple { background: var(--purple-dim); color: var(--purple); }
.stat-icon-blue { background: var(--blue-dim); color: var(--blue); }
.stat-icon-muted { background: var(--panel-2); color: var(--muted); }

.stat-body { min-width: 0; }

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ========================================================================
   SIGNAL CARDS
   ======================================================================== */

.signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}

.signal-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: 0.2s ease;
    position: relative;
    overflow: hidden;
}

.signal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.signal-card.long::before { background: linear-gradient(90deg, var(--bull), rgba(22,199,132,0.2)); }
.signal-card.short::before { background: linear-gradient(90deg, var(--bear), rgba(234,57,67,0.2)); }

.signal-card:hover {
    border-color: rgba(200,155,60,0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.signal-card.active {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), 0 8px 32px rgba(200,155,60,0.12);
}

.signal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.signal-symbol { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 6px; }
.signal-top-right { display: flex; align-items: center; gap: 8px; }

.dir-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.05em;
}

.dir-badge.long { background: var(--bull-dim); color: var(--bull); }
.dir-badge.short { background: var(--bear-dim); color: var(--bear); }

.score-chip {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    color: #fff;
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.5;
    vertical-align: middle;
}
.status-badge.status-pending { background: rgba(200,155,60,0.15); color: var(--gold); }
.status-badge.status-active { background: rgba(22,199,132,0.15); color: #16C784; }
.status-badge.status-hit_tp1 { background: rgba(0,142,212,0.15); color: #008ED4; }
.status-badge.status-hit_tp2 { background: rgba(160,80,255,0.15); color: #A050FF; }
.pending-pulse { animation: pending-pulse 1.6s ease-in-out infinite; }
@keyframes pending-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}



.signal-filter-bar .badge { font-size: 10px; padding: 3px 10px; border-radius: var(--radius-xs); font-weight: 600; }
.signal-filter-bar .badge.status-pending { background: rgba(200,155,60,0.15); color: var(--gold); }
.signal-filter-bar .badge.status-active { background: rgba(22,199,132,0.15); color: #16C784; }
.signal-filter-bar .badge.status-hit_tp1 { background: rgba(0,142,212,0.15); color: #008ED4; }
.signal-filter-bar .badge.status-hit_tp2 { background: rgba(160,80,255,0.15); color: #A050FF; }

.signal-levels-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }

.level-item {
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
    text-align: center;
    border: 1px solid transparent;
    transition: 0.15s;
}

.level-item:hover { border-color: var(--border); }

.lvl-label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.lvl-value { display: block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; word-break: break-all; }
.lvl-rr { display: block; font-size: 9px; margin-top: 3px; opacity: 0.7; }

.sl-level { border-left: 2px solid var(--bear); }
.sl-level .lvl-value { color: var(--bear); }
.sl-level .lvl-rr { color: var(--bear); }
.entry-level { border-left: 2px solid var(--text); }
.entry-level .lvl-value { color: var(--text); }
.tp-level { border-left: 2px solid var(--bull); }
.tp-level .lvl-value { color: var(--bull); }
.tp-level .lvl-rr { color: var(--bull); }

.signal-rr-bar { margin-bottom: 12px; }

.rr-track {
    height: 6px;
    background: var(--panel-3);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.rr-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold), var(--bull));
    transition: width 0.5s ease;
}

.rr-label {
    position: absolute;
    right: 0; top: -18px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gold);
    font-weight: 600;
}

.signal-card-footer { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }

.signal-card-footer .signal-reason {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.signal-time-wrap { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.signal-time { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

.signal-duration { font-family: var(--font-mono); font-size: 11px; color: var(--accent); white-space: nowrap; }

/* Signal filter bar */
.signal-filter-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ========================================================================
   SIGNAL DETAIL
   ======================================================================== */

.signal-detail {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 14px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.signal-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--panel-2), var(--panel));
    position: relative;
}

.signal-detail-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.signal-detail-symbol { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }

.signal-detail-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-score-badge {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    color: #fff;
    line-height: 1.4;
}

.detail-score-badge.high { background: #16C784; }
.detail-score-badge.mid { background: #A27200; }
.detail-score-badge.low { background: #7C8794; }

.detail-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    background: var(--panel-3);
    border: 1px solid var(--border);
}

.detail-info-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.detail-info-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.05em;
}

.detail-info-badge.long { background: var(--bull-dim); color: var(--bull); }
.detail-info-badge.short { background: var(--bear-dim); color: var(--bear); }

.signal-detail-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
    transition: 0.15s;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.signal-detail-close:hover { background: var(--bear-dim); color: var(--bear); border-color: rgba(234,57,67,0.2); }

.signal-detail-body { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; padding: 20px; }

.detail-left { display: flex; flex-direction: column; gap: 14px; }
.detail-right { display: flex; flex-direction: column; gap: 12px; }

/* Gauge */
.detail-gauge-wrap { background: var(--panel-2); border-radius: var(--radius-sm); padding: 12px 16px; border: 1px solid var(--border); }
.detail-gauge-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.detail-gauge { display: flex; flex-direction: column; gap: 4px; }
.gauge-bar { position: relative; height: 6px; background: var(--panel-3); border-radius: 3px; overflow: visible; }
.gauge-fill { height: 100%; background: linear-gradient(90deg, var(--bear), var(--gold-glow), var(--bull)); border-radius: 3px; position: relative; }
.gauge-ticks { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.gtick { position: absolute; top: -2px; width: 1.5px; height: 10px; background: var(--text); opacity: 0.5; transform: translateX(-50%); border-radius: 1px; }
.gauge-marker { position: absolute; top: -8px; font-size: 18px; color: var(--gold); transform: translateX(-50%); line-height: 1; filter: drop-shadow(0 0 6px rgba(233,185,50,0.5)); z-index: 2; }
.gauge-labels { position: relative; height: 16px; font-size: 9px; font-family: var(--font-mono); color: var(--muted); margin: 0; padding: 0; }
.glabel { position: absolute; font-size: 9px; font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }

/* Metrics grid */
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.detail-metric { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--panel-2); border-radius: var(--radius-xs); font-size: 12px; border: 1px solid var(--border); }
.detail-metric .dm-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-metric .dm-value { font-weight: 700; font-family: var(--font-mono); font-size: 12px; }

/* Status badge */
.detail-status-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; line-height: 1.4; }
.detail-status-badge.status-pending { background: var(--gold-dim); color: var(--gold); }
.detail-status-badge.status-active { background: var(--bull-dim); color: var(--bull); }
.detail-status-badge.status-hit_tp1 { background: rgba(22,199,132,0.15); color: #16C784; }
.detail-status-badge.status-hit_tp2 { background: rgba(22,199,132,0.2); color: #0f9e5a; }
.detail-status-badge.status-stopped { background: var(--bear-dim); color: var(--bear); }
.detail-status-badge.status-closed_tp { background: var(--bull-dim); color: var(--bull); }
.detail-status-badge.status-closed_sl { background: var(--bear-dim); color: var(--bear); }
.detail-status-badge.status-closed_be { background: var(--panel-3); color: var(--text-dim); }

/* AI decision */
.ai-decision { font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.ai-decision.approve { color: var(--bull); }
.ai-decision.reject { color: var(--bear); }
.ai-decision.skipped { color: var(--gold); }

.detail-engines { background: var(--panel-2); border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--border); }
.detail-engines-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.detail-engines-grid { display: flex; flex-wrap: wrap; gap: 3px; }
.detail-engines-grid .eg-item { padding: 2px 6px; font-size: 10px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; background: var(--panel-3); }
.detail-engines-grid .eg-abbr { color: var(--text-dim); font-size: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-engines-grid .eg-score { font-family: var(--font-mono); font-weight: 700; font-size: 10px; }
.detail-engines-grid .eg-hi { color: var(--bull); }
.detail-engines-grid .eg-md { color: var(--gold); }
.detail-engines-grid .eg-lo { color: var(--muted); }

/* ===== LEVELS WITH PRICE SCALE ===== */

.detail-levels { display: flex; flex-direction: column; gap: 6px; }

.detail-level {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: var(--panel-2);
    border: 1px solid transparent;
    transition: 0.15s;
    position: relative;
    gap: 12px;
}

.detail-level:hover { border-color: var(--border-light); }

.detail-level.entry-lvl {
    border-left: 3px solid var(--text);
    background: linear-gradient(90deg, rgba(255,255,255,0.03), var(--panel-2));
}

.detail-level.sl-lvl {
    border-left: 3px solid var(--bear);
    background: linear-gradient(90deg, var(--bear-dim), var(--panel-2));
}

.detail-level.tp-lvl {
    border-left: 3px solid var(--bull);
    background: linear-gradient(90deg, var(--bull-dim), var(--panel-2));
}

.dl-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.entry-lvl .dl-dot { background: var(--text); box-shadow: 0 0 6px rgba(255,255,255,0.2); }
.sl-lvl .dl-dot { background: var(--bear); box-shadow: 0 0 6px rgba(234,57,67,0.4); }
.tp-lvl .dl-dot { background: var(--bull); box-shadow: 0 0 6px rgba(22,199,132,0.4); }

.dl-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; min-width: 55px; }

.dl-value { font-weight: 700; font-size: 13px; margin-left: auto; }

.dl-pct {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 52px;
    text-align: center;
}

.dl-pct.pos { background: var(--bull-dim); color: var(--bull); }
.dl-pct.neg { background: var(--bear-dim); color: var(--bear); }
.dl-pct.zero { background: var(--panel-3); color: var(--muted); }

/* ===== INFO SECTION ===== */
.detail-info { display: flex; flex-direction: column; gap: 10px; }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    background: var(--panel-2);
}

.detail-row .dl-label { min-width: unset; text-transform: none; letter-spacing: normal; font-size: 12px; color: var(--text-dim); }

.detail-row .dr-value { font-weight: 600; font-family: var(--font-mono); font-size: 12.5px; }

.detail-deep-link {
    margin-top: 8px;
    text-align: right;
}

.detail-deep-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--gold-dim);
    transition: 0.15s;
}

.detail-deep-link a:hover {
    background: var(--gold-dim);
    border-color: var(--gold);
}

/* ===== SIGNAL DETAIL MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .signal-detail-header {
        padding: 12px 14px;
        gap: 8px;
    }

    .signal-detail-header-left { gap: 8px; }
    .signal-detail-symbol { font-size: 18px; }
    .detail-score-badge { font-size: 11px; padding: 2px 10px; }

    .signal-detail-body {
        padding: 14px;
        gap: 14px;
    }

    .detail-info-header { padding: 5px 12px; }
    .detail-info-title { font-size: 10px; }
    .detail-info-badge { font-size: 9px; padding: 2px 8px; }

    .detail-level {
        padding: 7px 10px;
        font-size: 11px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .dl-label { font-size: 9px; min-width: 40px; }
    .dl-value { font-size: 11.5px; }
    .dl-pct { font-size: 9px; padding: 1px 6px; min-width: 44px; }

    .detail-row { padding: 7px 12px; font-size: 12px; }
    .detail-row .dr-value { font-size: 11.5px; }

    .detail-deep-link a {
        font-size: 11px;
        padding: 6px 14px;
        width: 100%;
        justify-content: center;
    }

    .dl-dot { width: 6px; height: 6px; }
}

@media (max-width: 480px) {
    .signal-detail-header {
        padding: 10px 12px;
        gap: 6px;
    }

    .signal-detail-header-left { gap: 6px; }
    .signal-detail-symbol { font-size: 15px; }
    .detail-score-badge { font-size: 10px; padding: 2px 8px; }
    .signal-detail-close { width: 28px; height: 28px; font-size: 14px; }

    .signal-detail-body {
        padding: 10px;
        gap: 10px;
    }

    .detail-info-header { padding: 4px 10px; flex-direction: column; gap: 4px; }


    .detail-level {
        padding: 6px 8px;
        font-size: 10px;
        gap: 6px;
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-level .dl-label { min-width: auto; }
    .detail-level .dl-value { margin-left: 0; }
    .detail-level .dl-pct { min-width: auto; }

    .dl-dot { display: none; }

    .detail-row {
        padding: 6px 10px;
        font-size: 11px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .detail-row .dr-value { font-size: 11px; }

    .detail-metrics { grid-template-columns: 1fr; }
    .detail-metric { padding: 5px 10px; font-size: 11px; }
    .detail-metric .dm-label { font-size: 9px; }
    .detail-metric .dm-value { font-size: 11px; }
    .detail-gauge-wrap { padding: 8px 10px; }
    .detail-engines { padding: 8px 10px; }
}

/* ========================================================================
   TRADINGVIEW CHART
   ======================================================================== */

.tv-wrap { margin-bottom: 24px; }

.ws-dot { width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--amber);transition:background .3s; }
.ws-on { background:#22c55e;box-shadow:0 0 6px rgba(34,197,94,0.5); }
.ws-off { background:var(--bear); }

.tv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tv-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
}

.tv-icon { font-size: 16px; }
.tv-label { color: var(--text); }
.tv-symbol { color: var(--gold); font-size: 13px; }

.tv-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tf-dropdown {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 5px 12px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    min-width: 80px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235E6B7E' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.tf-dropdown:hover { border-color: var(--gold); }
.tf-dropdown:focus { border-color: var(--gold); }

.ma-buttons {
    display: flex;
    gap: 4px;
}

.ma-btn {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 4px 10px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    letter-spacing: 0.02em;
    line-height: 1;
}

.ma-btn:hover { border-color: var(--border-light); color: var(--text); }
.ma-btn.active { background: var(--panel-3); color: var(--text); border-color: var(--border-light); }

.tv-chart {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    height: 350px;
}


/* ========================================================================
   DAILY TABLE
   ======================================================================== */

.daily-table-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 24px;
}

.daily-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

.daily-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
    white-space: nowrap;
    font-weight: 600;
}

.daily-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.daily-table tr:last-child td { border-bottom: none; }
.daily-table tbody tr:hover { background: rgba(255,255,255,0.015); }

/* ========================================================================
   COIN GRID (карточки вместо таблицы)
   ======================================================================== */

.coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.coin-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    transition: 0.15s;
    cursor: pointer;
    overflow: hidden;
}

.coin-card:hover { border-color: var(--border-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

.coin-card.has-signal.long  { border-left: 3px solid var(--bull); }
.coin-card.has-signal.short { border-left: 3px solid var(--bear); }

.coin-card.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 4px 20px rgba(200,155,60,0.15); }

.coin-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.coin-card-symbol {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.ai-waiting-badge {
    display: inline-flex;
    align-items: center;
    font-size: 8px;
    font-weight: 700;
    color: #ffc00d;
    background: rgba(255,192,13,0.12);
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: super;
    line-height: 1.4;
    letter-spacing: 0.05em;
    animation: ai-pulse 1.6s ease-in-out infinite;
}
@keyframes ai-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.coin-card-top-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.coin-card-price {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.coin-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.coin-card-change {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

.coin-card-change.pos { background: var(--bull-dim); color: var(--bull); }
.coin-card-change.neg { background: var(--bear-dim); color: var(--bear); }

.coin-card-vol {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
}

/* Circular score gauge with SVG */
.coin-card-score {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.coin-card-score svg { width: 34px; height: 34px; display: block; }

.coin-card-score .score-bg { fill: none; stroke: var(--panel-3); stroke-width: 3; }
.coin-card-score .score-fill { fill: none; stroke-width: 3; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; animation: scoreFill 0.9s cubic-bezier(.4,.0,.2,1) forwards; }

.coin-card-score .score-text {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    fill: var(--text);
    dominant-baseline: central;
    text-anchor: middle;
    animation: scorePop 0.45s ease-out 0.65s forwards;
}

@keyframes scoreFill {
    from { stroke-dashoffset: 113.097; }
}

@keyframes scorePop {
    0%   { opacity: 0; transform: scale(0.3); }
    70%  { opacity: 1; transform: scale(1.12); }
    100% { opacity: 1; transform: scale(1); }
}

/* Deep Dive action button (top-right, registered users only) */
.coin-card-dive {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.coin-card-dive:hover {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 139, 255, 0.15);
}

.coin-card-dive svg { display: block; }

.coin-card-dive-locked {
    cursor: default;
    opacity: 0.35;
    background: transparent;
    border-color: transparent;
}

.coin-card-dive-locked:hover {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    transform: none;
    box-shadow: none;
}

.coin-card-tv {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.coin-card-tv:hover {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 155, 60, 0.15);
}

.coin-card-tv svg { display: block; }

.coin-card-signal {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-card-signal .dir-badge {
    font-size: 9px;
    padding: 2px 8px;
}

.coin-card-signal .signal-vol {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--muted);
}

/* ========================================================================
   PUMP GRID
   ======================================================================== */

.btc-mtf-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    position: relative;
}

.btc-mtf-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.btc-mtf-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.btc-mtf-verdict {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.btc-mtf-verdict.bullish { background: var(--bull-dim); color: var(--bull-bright); }
.btc-mtf-verdict.bearish { background: var(--bear-dim); color: var(--bear-bright); }
.btc-mtf-verdict.sideways { background: var(--amber-dim); color: var(--amber); }
.btc-mtf-verdict.loading { background: var(--panel-2); color: var(--muted); }

.btc-mtf-alignment {
    color: var(--text-dim);
    font-family: var(--font-mono);
	background: var(--panel-2);
    font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.btc-mtf-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.tf-cell {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.15s;
}

.tf-cell:hover { border-color: var(--border-light); transform: translateY(-1px); }
.tf-cell.loading { opacity: 0.5; }

.tf-cell.bullish { border-left: 3px solid var(--bull); }
.tf-cell.bearish { border-left: 3px solid var(--bear); }
.tf-cell.sideways { border-left: 3px solid var(--amber); }

.tf-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.tf-icon { font-size: 20px; margin-bottom: 4px; line-height: 1; }

.tf-pct {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

.tf-pct.pos { color: var(--bull); }
.tf-pct.neg { color: var(--bear); }

/* Details / breakdown table */
.btc-mtf-details {
    margin-top: 12px;
    font-size: 12px;
}

.btc-mtf-details summary {
    cursor: pointer;
    color: var(--muted);
    padding: 8px 12px;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    list-style: none;
    transition: 0.15s;
}

.btc-mtf-details summary:hover { color: var(--gold); background: var(--gold-dim); }
.btc-mtf-details summary::-webkit-details-marker { display: none; }

.btc-mtf-breakdown {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.btc-mtf-breakdown th {
    text-align: left;
    padding: 8px 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
    font-weight: 600;
}

.btc-mtf-breakdown td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11.5px;
}

.btc-mtf-breakdown tr:last-child td { border-bottom: none; }

.btc-mtf-breakdown .trend-cell { font-size: 11px; }
.btc-mtf-breakdown .pos { color: var(--bull); }
.btc-mtf-breakdown .neg { color: var(--bear); }

/* Collapsed state */
.btc-mtf-panel.collapsed .btc-mtf-grid,
.btc-mtf-panel.collapsed .btc-mtf-details { display: none; }
.btc-mtf-panel.collapsed .btc-mtf-header { margin-bottom: 0; }

/* Enhanced BTC MTF */
.tf-cell.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-dim); }
.tf-detail-panel { margin-top: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: none; }
.tf-detail-panel.active { display: block; }
.tf-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tf-detail-title { font-size: 13px; font-weight: 700; color: var(--gold); }
.tf-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 2fr)); gap: 8px; }
.tf-detail-item { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; }
.tf-detail-item .dd-label { font-size: 9px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; font-weight: 600; }
.tf-detail-item .dd-value { font-size: 15px; font-weight: 700; font-family: var(--font-mono); margin-top: 3px; }
.tf-detail-item .dd-value.pos { color: var(--bull); }
.tf-detail-item .dd-value.neg { color: var(--bear); }
.tf-detail-item .dd-value.neutral { color: var(--amber); }
.tf-detail-signal { margin-top: 12px; padding: 12px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; letter-spacing: 0.02em; }
.tf-detail-signal.bullish { background: var(--bull-dim); color: var(--bull-bright); }
.tf-detail-signal.bearish { background: var(--bear-dim); color: var(--bear-bright); }
.tf-detail-signal.sideways { background: var(--amber-dim); color: var(--amber); }
.tf-detail-close { cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 8px; border-radius: 4px; }
.tf-detail-close:hover { background: var(--panel-3); color: var(--text); }

/* ========================================================================
   FOOTER NOTE
   ======================================================================== */

.footer-note {
    margin-top: 0px;
    padding: 16px 20px;
    background: var(--amber-dim);
    border: 1px solid rgba(232, 168, 56, 0.15);
    border-radius: var(--radius);
    font-size: 13px;
    color: #C8B07A;
    line-height: 1.6;
}

/* ========================================================================
   BADGE SYSTEM
   ======================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-open { background: var(--bull-dim); color: var(--bull); }
.badge-muted { background: var(--panel-2); color: var(--muted); }

/* ========================================================================
   PANEL / CARD
   ======================================================================== */

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.panel-title { font-size: 14px; font-weight: 600;display: flex; align-items: center; gap: 5px; }
.panel-body { padding: 20px; }

/* ========================================================================
   DATA TABLE (admin)
   ======================================================================== */

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
    white-space: nowrap;
    font-weight: 600;
}

.data-table td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.015); }

.empty-row { text-align: center; color: var(--muted); padding: 40px !important; font-size: 13px; }

.coin-symbol { font-weight: 600; color: var(--gold); }

.score { font-family: var(--font-mono); font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.score-high { background: var(--bull-dim); color: var(--bull); }
.score-mid { background: var(--amber-dim); color: var(--amber); }
.score-low { background: var(--panel-2); color: var(--muted); }

td.stop { color: var(--bear); font-weight: 600; }
td.target { color: var(--bull); font-weight: 600; }

.stat-value-green { color: var(--bull); }
.stat-value-amber { color: var(--amber); }

.win-rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.win-rate-item { text-align: center; padding: 16px; background: var(--panel-2); border-radius: var(--radius-sm); }
.win-rate-value { font-size: 32px; font-weight: 700; font-family: var(--font-mono); }
.win-rate-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.win-rate-long { color: var(--bull); }
.win-rate-short { color: var(--bear); }

.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ========================================================================
   SETUP PAGE
   ======================================================================== */

.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-success { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; background: var(--bull-dim); color: var(--bull); border: 1px solid rgba(22, 199, 132, 0.2); }
.auth-error { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; background: var(--bear-dim); color: var(--bear); border: 1px solid rgba(234, 57, 67, 0.2); }

/* ========================================================================
   BUTTONS
   ======================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: 0.15s;
    white-space: nowrap;
}

.btn-primary { background: var(--gold); color: #0E1117; }
.btn-primary:hover { background: var(--gold-bright); }
.btn-secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--bear-dim); color: var(--bear); }
.btn-danger:hover { background: rgba(234,57,67,0.15); }
.btn-sm { padding: 7px 16px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }
.btn-block { width: 100%; display: flex; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ========================================================================
   FORMS
   ======================================================================== */

.input {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    transition: 0.15s;
    margin-bottom: 12px;
}

.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.input::placeholder { color: var(--muted); opacity: 0.5; }
select.input { cursor: pointer; }

.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.filter-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.filter-form .input { width: auto; min-width: 150px; margin-bottom: 0; }
.filter-form .btn { margin-bottom: 0; }

/* ========================================================================
   ALERTS
   ======================================================================== */

.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-success { background: var(--bull-dim); color: var(--bull); border: 1px solid rgba(22, 199, 132, 0.2); }
.alert-error { background: var(--bear-dim); color: var(--bear); border: 1px solid rgba(234, 57, 67, 0.2); }
.alert-warning { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(232, 168, 56, 0.2); }

.field-hint { font-size: 10px; color: var(--muted); margin-top: -8px; margin-bottom: 8px; font-family: var(--font-mono); line-height: 1.4; }

/* ========================================================================
   FOOTER
   ======================================================================== */

.footer {
    border-top: 1px solid var(--border);
    background: var(--panel);
    padding: 32px 24px 0;
    position: relative;
}
.footer-inner { margin: 0 auto; }

/* ── 4 Widget Grid ── */
.fw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding-bottom: 20px;
}

.fw-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    min-width: 0;
}

.fw-head {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.fw-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    gap: 5px;
	padding: 5px 6px;
    border-radius: 6px;
    background: var(--panel);
    border: 1px solid var(--border);
	text-decoration: none;
    font-weight: 500;
    transition: 0.15s;
}

.fw-label {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.fw-val {
    color: var(--text);
    font-weight: 600;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.fw-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 500;
    transition: 0.15s;
}
.fw-link:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-dim);
}

/* Live dot */
.fdot {
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--muted);
    vertical-align: middle;
    margin-right: 1px;
}
.fdot.live {
    background: #16C784;
    box-shadow: 0 0 5px rgba(22,199,132,0.5);
    animation: fpulse 2s ease-in-out infinite;
}
@keyframes fpulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* ── Bottom bar ── */
.fw-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 0 20px;
    font-size: 11px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.fw-sep { opacity: 0.25; }
.fw-ver {
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    font-size: 9px;
    padding: 1px 6px;
    background: linear-gradient(135deg, #C89B3C 0%, #F5D68A 50%, #C89B3C 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: 1px solid rgba(200, 155, 60, 0.3);
    border-radius: 4px;
    animation: verShimmer 3s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(200, 155, 60, 0.15);
    transition: box-shadow .3s;
}
.fw-ver:hover {
    box-shadow: 0 0 14px rgba(200, 155, 60, 0.4);
}
@keyframes verShimmer {
    0%   { background-position: 200% center; }
    50%  { background-position: 0% center; }
    100% { background-position: -200% center; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .fw-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .footer { padding: 24px 14px 0; }
    .fw-grid { grid-template-columns: 1fr; gap: 10px; }
    .fw-card { padding: 12px; }
    .fw-bar { font-size: 10px; }
}

/* ========================================================================
   GROUP BANNER
   ======================================================================== */

.group-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.group-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.group-banner-text { min-width: 0; }

.group-banner-label {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.group-banner-desc {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 3px;
    line-height: 1.5;
}

/* ========================================================================
   PAGINATION
   ======================================================================== */

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px; height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 13px;
    transition: 0.15s;
}

.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-active { background: var(--gold); color: #0E1117; border-color: var(--gold); font-weight: 700; }

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

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(ellipse at top, rgba(200,155,60,0.03), transparent 60%),
                radial-gradient(ellipse at bottom, rgba(22,199,132,0.02), transparent 60%),
                var(--bg);
}

.auth-container { width: 100%; max-width: 400px; }

.auth-brand { text-align: center; margin-bottom: 32px; }

.brand-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gold), #6B4C00);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px; font-weight: 700; color: #fff;
    box-shadow: 0 0 30px rgba(200,155,60,0.15);
}

.brand-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

.auth-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.auth-form .input { margin-bottom: 16px; }
.auth-form .btn { margin-top: 6px; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--text-dim); }
.auth-footer a { color: var(--gold); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

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

.auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 900;
    backdrop-filter: blur(4px);
}
.auth-overlay.show { display: block; }

.auth-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px 24px;
    z-index: 1000;
    box-shadow: 0 16px 64px rgba(0,0,0,0.6);
}
.auth-popup.show { display: block; }

.auth-popup.upgrade-mode {
    max-width: 640px;
    min-width: 550px;
    padding: 28px 20px 20px;
}
@media(max-width:680px){
    .auth-popup.upgrade-mode { min-width:0; max-width:96%; padding:24px 14px 16px; }
}

/* Floating toast notification */
.up-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: upToastIn 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}
.up-toast-success { background:rgba(22,199,132,0.95); color:#fff; }
.up-toast-error { background:rgba(234,57,67,0.95); color:#fff; }
@keyframes upToastIn { from { opacity:0; transform:translateX(-50%) translateY(-10px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

.auth-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.auth-popup-close:hover { color: var(--text); }

.auth-popup-brand {
    text-align: center;
    margin-bottom: 20px;
}

.auth-popup-icon {
    display: inline-flex;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), #6B4C00);
    align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #fff;
}

.auth-popup-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2px;
}

.auth-popup-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 20px;
}

.auth-popup-form .input {
    margin-bottom: 14px;
}

.auth-popup-form .btn {
    margin-top: 4px;
}

.auth-popup-alert {
    margin-bottom: 12px;
    font-size: 13px;
}
.auth-popup-alert .alert {
    padding: 8px 12px;
    border-radius: var(--radius-xs);
}

.auth-popup-links {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
}
.auth-popup-links a {
    color: var(--muted);
    text-decoration: none;
}
.auth-popup-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.auth-popup-switch {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-dim);
}
.auth-popup-switch a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}
.auth-popup-switch a:hover {
    text-decoration: underline;
}

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

.avatar-letter { font-size: 40px; font-weight: 700; color: var(--muted); }

.file-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.15s;
}

.file-label:hover { border-color: var(--gold); color: var(--gold); }
.file-input { position: absolute; opacity: 0; width: 0; height: 0; }

/* Hide columns on mobile */
@media (max-width: 768px) {
    .hide-mobile { display: none; }
}

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

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .signal-detail-body { grid-template-columns: 1fr; }
    .signal-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (max-width: 768px) {
    .header { padding: 0 14px; height: 54px; }
    .header-nav { display: none; }
    .header-hamburger { display: flex; }
    .header-logo-sub { display: none; }
    .header-status { font-size: 10px; padding: 4px 10px; }
    .header-user-btn { padding: 4px 8px 4px 4px; font-size: 12px; }
    .header-user-btn .header-user-avatar { width: 24px; height: 24px; font-size: 10px; }
    .header-user-name { display: none; }

    .wrap { padding: 16px 14px 40px; }

    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .signal-grid { grid-template-columns: 1fr; }
    .btc-mtf-grid { grid-template-columns: repeat(3, 1fr); }

    .stl-time { font-size: 20px; }
    .stl-block { font-size: 7px; }
    .session-timeline { padding: 14px 16px 12px; }

    .table-wrap { margin-left: 0px; margin-right: 0px; border-radius: 0; border-left: none; border-right: none; }
    .daily-table-wrap { margin-left: -14px; margin-right: -14px; border-radius: 0; border-left: none; border-right: none; }

    .signal-levels-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
    .level-item { padding: 6px 4px; }

    /* BTC MTF breakdown: scrollable table */
    .btc-mtf-breakdown { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

    /* Admin filter: stack more aggressively */
    .filter-form { gap: 8px; }
    .filter-form .input { min-width: 120px; font-size: 12px; padding: 8px 10px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-value { font-size: 20px; }
    .stat-icon { width: 36px; height: 36px; font-size: 15px; }

    .stl-top { flex-direction: column; align-items: start; gap: 6px; }
    .stl-time { font-size: 18px; }

    .filter-form { flex-direction: column; }
    .filter-form .input { width: 100%; }

    .signal-filter-bar { flex-wrap: wrap; }
    .filter-select { margin-left: 0; }

    .section-title { font-size: 13px; }
    .panel-header { align-items: start; gap: 8px; }

    /* BTC MTF breakdown: hide least essential columns on tiny screens */
    .btc-mtf-breakdown th:nth-child(6),
    .btc-mtf-breakdown td:nth-child(6),
    .btc-mtf-breakdown th:nth-child(7),
    .btc-mtf-breakdown td:nth-child(7) { display: none; }

    /* Smaller table cells */
    .data-table th,
    .data-table td { padding: 10px 10px; font-size: 12px; }
    .data-table .btn-sm { padding: 5px 10px; font-size: 10px; }

    .win-rate-item { padding: 12px 10px; }
    .win-rate-value { font-size: 26px; }

    .panel-actions .btn { width: 100%; justify-content: center; }
 
}

@media (max-width: 360px) {
    .stats-grid { grid-template-columns: 1fr; }

    .panel-header { padding: 12px 14px; }
    .panel-body { padding: 14px; }

    .data-table th,
    .data-table td { padding: 8px 8px; font-size: 11px; }
    .data-table .btn-sm { padding: 4px 8px; font-size: 9px; }

    .win-rate-value { font-size: 22px; }
}

/* ── Advanced Confidence Meter ── */
.cm-card { overflow: visible; }
.cm-hero { display:flex; align-items:center; gap:12px; margin-bottom:4px; }
.cm-hero-left { flex-shrink:0; }
.cm-hero-mid { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.cm-hero-right { flex-shrink:0; text-align:center; }
.cm-label-badge { display:inline-block; font-size:10px; font-weight:600; padding:2px 10px; border-radius:10px; width:fit-content; }
.cm-hist-box { padding:4px 8px; border:1px solid var(--border); border-radius:6px; background:var(--panel-2); }
.cm-hist-pct { font-size:20px; font-weight:700; font-family:monospace; line-height:1.1; }
.cm-hist-label { font-size:9px; color:var(--muted); }
.cm-hist-sub { font-size:8px; color:var(--text-dim); }
.cm-bar { height:6px; background:var(--border); border-radius:3px; overflow:hidden; }
.cm-bar-fill { height:100%; border-radius:3px; transition:width .5s ease; }
.cm-cats { display:flex; gap:6px; margin:6px 0 0; }
.cm-cat { flex:1; min-width:0; }
.cm-cat-head { display:flex; align-items:center; gap:4px; font-size:9px; margin-bottom:2px; }
.cm-cat-name { flex:1; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cm-cat-dir { font-size:8px; flex-shrink:0; }
.cm-cat-score { font-family:monospace; font-weight:600; font-size:10px; flex-shrink:0; }
.cm-cat-bar { height:4px; background:var(--border); border-radius:2px; overflow:hidden; }
.cm-cat-fill { height:100%; border-radius:2px; transition:width .4s ease; }
.cm-chips { display:flex; flex-wrap:wrap; gap:4px; margin-top:8px; }
.cm-chip { font-size:9px; padding:2px 8px; border-radius:10px; font-weight:500; white-space:nowrap; transition:all .2s; }
.cm-chip.bullish { background:rgba(22,199,132,0.12); color:#16C784; }
.cm-chip.bearish { background:rgba(234,57,67,0.12); color:#EA3943; }
.cm-chip.neutral { background:var(--panel-2); color:var(--muted); }
@media(max-width:640px){
    .cm-hero { flex-direction:column; text-align:center; }
    .cm-cats { flex-wrap:wrap; }
    .cm-cat { flex:1 1 45%; }
}

