/* ==============================================================================
   IDX STOCK TERMINAL — HIGH-CRAFT ANTI-AI SLOP FINANCIAL DESIGN
   Precision Dark Terminal Architecture | Tabular Numerics | Tactile Surfaces
   ============================================================================== */

:root {
    --bg-main: #070a12;
    --bg-surface: #0e1424;
    --bg-surface-elevated: #141c30;
    --bg-surface-hover: #19233c;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-highlight: rgba(56, 189, 248, 0.35);
    --hairline-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-cyan: #38bdf8;
    --accent-blue: #0284c7;
    --accent-indigo: #6366f1;
    --accent-green: #10b981;
    --accent-red: #f43f5e;
    --accent-gold: #f59e0b;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 4px 16px -2px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 8px 24px -4px rgba(0, 0, 0, 0.5);
}

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

/* Custom Institutional Dark Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #070a12;
}
::-webkit-scrollbar-thumb {
    background: #27354a;
    border-radius: 4px;
    border: 2px solid #070a12;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b4d68;
}

/* Global Tabular Figures for Financial Numerical Precision */
.kpi-value, .ihsg-val, .plan-value, .res-value, .stat-val, 
.data-table td, .data-table th, .ticker-chip, .auto-sync-indicator,
.news-auto-sync-indicator, .ticker-news-auto-badge, .confluence-number,
.calc-input, .sector-metric-val, .breakdown-value {
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "zero" 1;
}

/* ==============================================================================
   PRECISION SVG ICON SYSTEM (ANTI-AI SLOP)
   ============================================================================== */
.ui-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: -2px;
    flex-shrink: 0;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

.icon-xs {
    width: 12px;
    height: 12px;
    vertical-align: -1px;
}

.icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

.icon-md {
    width: 16px;
    height: 16px;
    vertical-align: -2.5px;
}

.icon-lg {
    width: 20px;
    height: 20px;
    stroke-width: 1.6;
}

.icon-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Micro Status Pip */
.res-pip, .sentiment-pip {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 1px;
    flex-shrink: 0;
}

.res-pip.green, .sentiment-pip.bullish {
    background-color: var(--accent-green);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.res-pip.red, .sentiment-pip.bearish {
    background-color: var(--accent-red);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
}

.res-pip.gold, .sentiment-pip.neutral {
    background-color: var(--accent-gold);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

html {
    font-size: 15px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    scroll-behavior: auto; /* Managed by Lenis */
    overflow-x: hidden;
    max-width: 100vw;
}

body.dark-terminal {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.07), transparent 70%),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 28px 28px;
    background-repeat: no-repeat, repeat;
    background-attachment: fixed;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ambient-glow {
    display: none;
}

/* ==============================================================================
   NAVBAR
   ============================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(10, 13, 20, 0.85);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    width: 100%;
    max-width: 100vw;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.04);
    border-color: rgba(56, 189, 248, 0.5);
}

.brand-text-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-badge {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.brand-tag {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.nav-links {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: relative;
    user-select: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-link:active {
    transform: scale(0.98);
}

/* Precision Unified Terminal Active State (Anti-AI Slop) */
.nav-link.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    font-weight: 600;
}

.nav-link.active::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.7);
}


.live-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    padding: 5px 13px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: help;
    transition: var(--transition);
    white-space: nowrap;
}

.live-status.status-open {
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.25);
}

.live-status.status-closed {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.live-status.status-preopen {
    color: var(--accent-gold);
    background: rgba(255, 179, 0, 0.1);
    border: 1px solid rgba(255, 179, 0, 0.25);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    animation: pulse 1.8s ease-in-out infinite;
}

.blue-dot {
    width: 7px;
    height: 7px;
    background-color: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

.amber-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.gray-dot {
    width: 7px;
    height: 7px;
    background-color: #64748b;
    border-radius: 50%;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==============================================================================
   MAIN WRAPPER & SECTIONS
   ============================================================================== */
.main-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.2rem 1.5rem 4rem;
}

.section-container {
    margin-top: 2.2rem;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.section-tag {
    display: inline-block;
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.2rem;
}

/* ==============================================================================
   CARDS & CONTAINERS (Clean Elevation & Precision Hairlines)
   ============================================================================== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

/* ==============================================================================
   HERO SECTION
   ============================================================================== */
.hero-section {
    padding: 1.2rem 0 0.8rem;
}

.hero-content {
    max-width: 1000px;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
}

.pill-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
}

.hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.035em;
    margin-bottom: 0.7rem;
    color: #ffffff;
}

/* GSAP Word-by-word reveal helper */
.hero-word {
    display: inline-block;
    color: #ffffff;
    margin-right: 0.3em;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.4rem;
    max-width: 880px;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-card);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}

.kpi-header {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin: 0.4rem 0 0.2rem;
}

.kpi-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==============================================================================
   IHSG REAL-TIME COMPOSITE INDEX TRACKER BAR
   ============================================================================== */
.ihsg-tracker-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.6rem;
    margin-top: 1.2rem;
    box-shadow: var(--shadow-card);
    flex-wrap: wrap;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
}

.ihsg-tracker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-cyan);
}

.ihsg-left {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ihsg-badge-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ihsg-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 210, 255, 0.12);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.ihsg-code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ihsg-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

.ihsg-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ihsg-val {
    font-size: 2.1rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #ffffff;
    letter-spacing: -0.5px;
}

.ihsg-unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-family: var(--font-mono);
}

.ihsg-change-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.ihsg-change-pill.positive {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.ihsg-change-pill.negative {
    background: rgba(255, 23, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.ihsg-meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.ihsg-meta-row strong {
    color: var(--text-primary);
}

.meta-sep {
    color: var(--text-muted);
}

.btn-ihsg-chart {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 9px 18px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: rgba(0, 210, 255, 0.08);
    cursor: pointer;
    transition: var(--transition);
}

.btn-ihsg-chart:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.45);
}

.auto-sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

.ticker-chip-ihsg {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(0, 114, 255, 0.25)) !important;
    border-color: rgba(0, 210, 255, 0.5) !important;
    color: #38bdf8 !important;
    font-weight: 700 !important;
}

.ticker-chip-ihsg.active {
    background: linear-gradient(135deg, #00d2ff, #0072ff) !important;
    color: #031c18 !important;
    border-color: #00d2ff !important;
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.6) !important;
}

/* ==============================================================================
   SECTOR PERFORMANCE CARDS
   ============================================================================== */
.sector-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
}

.sector-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    transition: var(--transition);
}

.sector-card:hover {
    border-color: rgba(0, 210, 255, 0.3);
}

.sector-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.sector-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sector-card-count {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

.sector-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 0.4rem;
    color: var(--text-secondary);
}

.sector-metric-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary);
}

/* ==============================================================================
   INSPECTOR & INTERACTIVE CHART PANEL
   ============================================================================== */
.inspector-controls {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.inspector-search-wrapper {
    position: relative;
    min-width: 220px;
}

.inspector-search-input {
    width: 100%;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.inspector-search-input::placeholder {
    text-transform: none;
    font-family: var(--font-sans);
    font-weight: 400;
    letter-spacing: 0;
}

.custom-select, .custom-input {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-select:focus, .custom-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    user-select: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: #0284c7;
    color: #ffffff;
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    background: #0369a1;
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: #075985;
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.inspector-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(330px, 1.15fr);
    gap: 1.3rem;
    align-items: start;
}

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

.chart-panel {
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.chart-title-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Inspector Control Card (Docked on Right Side) */
.inspector-control-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.25rem;
    background: var(--bg-surface);
}

.panel-header-compact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.2rem;
}

.panel-header-compact .section-tag {
    font-size: 0.72rem;
    margin-bottom: 0.1rem;
}

.panel-header-compact .panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.panel-desc-compact {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0.2rem 0 0;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
}

.quick-chips-wrapper-compact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border-color);
}

.quick-chips-wrapper-compact .chips-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.quick-chips-wrapper-compact .quick-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.quick-chips-wrapper-compact .ticker-chip {
    padding: 4px 9px;
    font-size: 0.78rem;
}

.chart-ticker {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.chart-sector {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 0.8rem;
}

.chart-price {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    margin-right: 0.8rem;
}

.chart-legend-pills {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.legend-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-white { background: #e0e6ed; }
.dot-cyan { background: var(--accent-cyan); }
.dot-green { background: var(--accent-green); }
.dot-red { background: var(--accent-red); }

.chart-canvas-wrapper {
    position: relative;
    height: 420px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.milestones-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    min-width: 0;
}

.milestone-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.4rem;
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 0;
    overflow: hidden;
}

.ms-target {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-price {
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    white-space: nowrap;
}

.ms-delta {
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ==============================================================================
   CHART NEWS SENTIMENT SUPPORT BOX
   ============================================================================== */
.chart-sentiment-box {
    margin-top: 1.2rem;
    padding: 1.1rem 1.3rem;
    background: rgba(13, 19, 32, 0.7);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sentiment-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sentiment-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sentiment-header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ticker-news-auto-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.ticker-news-auto-badge .pulse-dot {
    width: 6px;
    height: 6px;
}

.sentiment-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--accent-cyan);
}

.sentiment-ticker-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.sentiment-consensus-pill {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sentiment-consensus-pill.bullish {
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.12);
    border-color: rgba(0, 230, 118, 0.3);
}

.sentiment-consensus-pill.bearish {
    color: var(--accent-red);
    background: rgba(255, 23, 68, 0.12);
    border-color: rgba(255, 23, 68, 0.3);
}

.sentiment-consensus-pill.neutral {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

.ticker-news-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ticker-news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.ticker-news-item:hover {
    background: rgba(0, 210, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateX(3px);
}

.news-item-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}

.news-item-sentiment {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.news-item-sentiment.bullish {
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.15);
}

.news-item-sentiment.bearish {
    color: var(--accent-red);
    background: rgba(255, 23, 68, 0.15);
}

.news-item-sentiment.neutral {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.15);
}

.news-item-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-loading-skeleton {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    padding: 0.5rem 0;
}

/* ==============================================================================
   REAL-TIME MARKET & MACROECONOMIC NEWS MODULE
   ============================================================================== */
.news-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.news-auto-sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.25);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.news-auto-sync-indicator .pulse-dot {
    width: 7px;
    height: 7px;
}

.news-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.4rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
}

.news-category-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.news-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.news-tab:hover {
    color: var(--text-primary);
    border-color: rgba(0, 210, 255, 0.3);
}

.news-tab.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #031c18;
    border-color: var(--accent-cyan);
    font-weight: 700;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.4);
}

.news-search-wrapper {
    flex: 1;
    max-width: 380px;
    min-width: 220px;
}

.news-search-wrapper input {
    width: 100%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.3rem;
}

.news-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.news-card:hover {
    border-color: rgba(0, 210, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.news-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.news-category-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.news-sentiment-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
}

.news-sentiment-badge::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-right: 5px;
    flex-shrink: 0;
}

.news-sentiment-badge.bullish::before {
    background-color: var(--accent-green);
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.6);
}

.news-sentiment-badge.bearish::before {
    background-color: var(--accent-red);
    box-shadow: 0 0 5px rgba(244, 63, 94, 0.6);
}

.news-sentiment-badge.neutral::before {
    background-color: #94a3b8;
}

.news-sentiment-badge.bullish {
    color: var(--accent-green);
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.25);
}

.news-sentiment-badge.bearish {
    color: var(--accent-red);
    background: rgba(255, 23, 68, 0.12);
    border: 1px solid rgba(255, 23, 68, 0.25);
}

.news-sentiment-badge.neutral {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.news-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: #38bdf8;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.news-card-source {
    font-weight: 600;
    color: var(--text-secondary);
}

.news-card-link-icon {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* Action Panel (Right side) */
.action-panel {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.confluence-meter-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.confluence-meter-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(var(--accent-cyan) 75%, rgba(255, 255, 255, 0.1) 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

.confluence-meter-circle::before {
    content: '';
    position: absolute;
    width: 74px;
    height: 74px;
    background: var(--bg-surface);
    border-radius: 50%;
}

.confluence-number {
    position: relative;
    font-size: 1.7rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    line-height: 1;
}

.confluence-unit {
    position: relative;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.confluence-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.breakdown-label {
    color: var(--text-secondary);
}

.breakdown-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Trading Plan Grid */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.plan-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-cyan);
}

.plan-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.plan-value {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-top: 0.2rem;
}

.live-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
}

.hidden { display: none !important; }

/* ==============================================================================
   LOT & MONEY MANAGEMENT CALCULATOR (REALISTIC IDX BEI SPEC)
   ============================================================================== */
.calc-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.calc-risk-preset-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.preset-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-preset {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-preset:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
}

.btn-preset.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-cyan);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.calc-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.calc-input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.calc-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    outline: none;
    transition: var(--transition);
}

.calc-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.input-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-family: var(--font-mono);
}

.calc-fee-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.fee-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.fee-checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-cyan);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.idx-lot-rule-badge {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-gold);
    background: rgba(255, 179, 0, 0.1);
    border: 1px solid rgba(255, 179, 0, 0.25);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.calc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.calc-res-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.highlight-box {
    border-color: rgba(0, 210, 255, 0.4);
    background: rgba(0, 210, 255, 0.04);
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.1);
}

.scenario-profit {
    border-left: 3px solid var(--accent-green);
    background: rgba(0, 230, 118, 0.03);
}

.scenario-loss {
    border-left: 3px solid var(--accent-red);
    background: rgba(255, 23, 68, 0.03);
}

.res-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.res-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    font-family: var(--font-mono);
    margin: 0.35rem 0 0.2rem;
}

.res-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.res-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-top: 0.4rem;
    color: var(--text-primary);
}

.res-status {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

.scenario-details {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--text-secondary);
}

.scenario-details strong {
    color: var(--text-primary);
}

.calc-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 20, 32, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.4rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-stat {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.stat-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-val {
    font-size: 1.15rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

.stat-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stat-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* ==============================================================================
   TABLE TOOLBAR, PAGINATION & SCROLLING CONTROLS
   ============================================================================== */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(17, 22, 34, 0.85);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
    flex-wrap: wrap;
    gap: 0.8rem;
}

.table-counts-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.table-counts-info strong {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}

.table-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.page-size-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 0.2rem;
}

.custom-select-sm {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    outline: none;
    cursor: pointer;
    margin-right: 0.5rem;
}

.btn-page {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-page:hover:not(:disabled) {
    background: rgba(0, 210, 255, 0.2);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.btn-page:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-weight: 700;
    padding: 0 0.5rem;
    min-width: 50px;
    text-align: center;
}

.table-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    font-style: italic;
}

/* ==============================================================================
   TABLES (Multi-Hari & Scalping)
   ============================================================================== */
.table-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    padding: 0;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 540px;
    overscroll-behavior: contain;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transform: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-container:hover {
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transform: none !important;
}

/* Prominent Custom Scrollbar for High-Speed Table Scrolling */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.table-container::-webkit-scrollbar-track {
    background: rgba(10, 15, 24, 0.9);
}
.table-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0f1628;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    white-space: nowrap;
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

/* Signal Badges */
.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.4px;
    font-family: var(--font-mono);
}

.badge-strong-buy {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-buy {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-hold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-sell {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.btn-sm-view {
    padding: 3px 9px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm-view:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    border-color: rgba(56, 189, 248, 0.4);
}

/* Quick Ticker Shortcuts Bar */
.quick-chips-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}

.chips-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.quick-chips-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ticker-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.ticker-chip:hover {
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
}

.ticker-chip.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-cyan);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ==============================================================================
   TRADING PLAYBOOK & STRATEGY RULES (FORMERLY WHAT WAS MISSING)
   ============================================================================== */
.improvements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.improvement-card {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.improvement-card:hover {
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.imp-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-cyan);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.improvement-card:hover .imp-icon-box {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.35);
    transform: scale(1.05);
}

.imp-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.imp-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.imp-body strong {
    color: var(--text-primary);
}

.imp-body em {
    color: var(--accent-cyan);
    font-style: normal;
}

.imp-badge-rule {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    width: fit-content;
}



/* ==============================================================================
   FOOTER
   ============================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.footer-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(0, 210, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Utility Colors */
.text-green { color: var(--accent-green) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-red { color: var(--accent-red) !important; }
.text-gold { color: var(--accent-gold) !important; }

/* ==============================================================================
   RESPONSIVE DESIGN (DESKTOP, TABLET, MOBILE COMPREHENSIVE SPEC)
   ============================================================================== */

/* Tablet, Small Laptops & Resized Windows (Up to 1200px)
   Eliminates all horizontal overflow and clipping on screens 769px - 1200px */
@media (max-width: 1200px) {
    .navbar {
        padding: 0.6rem 1.2rem;
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(20px);
        background: rgba(7, 10, 18, 0.94);
    }

    .nav-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem 0.6rem;
    }

    .brand {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        gap: 0.6rem;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .nav-actions {
        order: 2;
        display: flex !important;
        flex: 0 0 auto;
    }

    .live-status {
        font-size: 0.78rem;
        padding: 4px 10px;
        white-space: nowrap;
    }

    /* Horizontal swipeable pill navigation bar */
    .nav-links {
        order: 3;
        width: 100%;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.35rem;
        padding: 4px 1px 2px 1px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        font-size: 0.82rem;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .main-wrapper {
        padding: 1.2rem 1.2rem 4rem;
        min-width: 0;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }

    .ihsg-tracker-card {
        padding: 1.1rem;
        gap: 0.9rem;
        flex-direction: column;
        align-items: stretch;
    }

    .ihsg-left {
        width: 100%;
    }

    .ihsg-right {
        width: 100%;
    }

    .btn-ihsg-chart {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }

    .inspector-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .chart-panel {
        padding: 1.1rem;
        min-width: 0;
        max-width: 100%;
    }

    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .chart-title-group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem 0.6rem;
    }

    .chart-legend-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .chart-canvas-wrapper {
        height: 320px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .milestones-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .chart-sentiment-box {
        padding: 1rem;
        min-width: 0;
        max-width: 100%;
    }

    .sentiment-box-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .sentiment-header-left {
        width: 100%;
        min-width: 0;
    }

    .sentiment-header-right {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .ticker-news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.7rem 0.85rem;
    }

    .news-item-left {
        width: 100%;
        min-width: 0;
    }

    .news-item-title {
        white-space: normal;
        line-height: 1.4;
    }

    .news-item-meta {
        width: 100%;
        justify-content: space-between;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.1rem;
    }
}

/* Standard Mobile & Phablet (Up to 768px) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* Prevent iOS Safari 16px auto-zoom glitch on focus */
    input, select, textarea {
        font-size: 16px !important;
    }

    .navbar {
        padding: 0.5rem 0.8rem;
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(20px);
        background: rgba(7, 10, 18, 0.94);
    }

    .nav-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem 0.4rem;
    }

    .brand {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        gap: 0.5rem;
    }

    .brand-logo {
        width: 30px;
        height: 30px;
        border-radius: 6px;
    }

    .brand-title {
        font-size: 1.05rem;
        letter-spacing: -0.2px;
    }

    .brand-tag {
        font-size: 0.7rem;
        padding: 1px 5px;
    }

    .nav-actions {
        order: 2;
        display: flex !important;
        flex: 0 0 auto;
    }

    .live-status {
        font-size: 0.72rem;
        padding: 3px 8px;
        white-space: nowrap;
    }

    /* Horizontal swipeable pill navigation bar for mobile */
    .nav-links {
        order: 3;
        width: 100%;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.35rem;
        padding: 3px 1px 4px 1px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        font-size: 0.78rem;
        padding: 5px 11px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .main-wrapper {
        padding: 0.8rem 0.8rem 4rem;
        padding-bottom: max(3.5rem, env(safe-area-inset-bottom, 20px));
    }

    .hero-section {
        padding: 0.8rem 0 0.5rem;
    }

    .pill-badge {
        font-size: 0.68rem;
        padding: 3px 9px;
        margin-bottom: 0.6rem;
    }

    .hero-title {
        font-size: 1.85rem;
        line-height: 1.25;
        letter-spacing: -0.03em;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.1rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .kpi-card {
        padding: 0.9rem;
    }

    .kpi-header {
        font-size: 0.72rem;
    }

    .kpi-value {
        font-size: 1.35rem;
        margin: 0.2rem 0;
    }

    .kpi-sub {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    /* IHSG Tracker Bar Mobile */
    .ihsg-tracker-card {
        padding: 1rem;
        gap: 0.9rem;
        flex-direction: column;
        align-items: stretch;
        margin-top: 0.9rem;
    }

    .ihsg-left {
        width: 100%;
        gap: 0.45rem;
    }

    .ihsg-badge-row {
        gap: 0.4rem;
    }

    .ihsg-price-row {
        gap: 0.4rem;
    }

    .ihsg-val {
        font-size: 1.75rem;
    }

    .ihsg-unit {
        font-size: 0.9rem;
    }

    .ihsg-change-pill {
        font-size: 0.8rem;
        padding: 2px 8px;
    }

    .ihsg-meta-row {
        font-size: 0.73rem;
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }

    .ihsg-right {
        width: 100%;
    }

    .btn-ihsg-chart {
        width: 100%;
        justify-content: center;
        min-height: 42px;
        font-size: 0.88rem;
    }

    /* Section Containers & Headers */
    .section-container {
        margin-top: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        margin-bottom: 0.9rem;
    }

    .section-title {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .section-desc {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    /* Sector Cards Grid Mobile */
    .sector-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .sector-card {
        padding: 1rem;
    }

    /* Inspector Grid & Chart Mobile */
    .inspector-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chart-panel {
        padding: 0.9rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        margin-bottom: 0.8rem;
    }

    .chart-title-group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.55rem;
    }

    .chart-ticker {
        font-size: 1.35rem;
    }

    .chart-sector {
        font-size: 0.78rem;
    }

    .chart-price {
        font-size: 1.2rem;
    }

    .chart-legend-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .legend-pill {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .chart-canvas-wrapper {
        height: 260px;
        width: 100%;
        position: relative;
    }

    .milestones-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
        margin-top: 0.75rem;
        min-width: 0;
        width: 100%;
    }

    .milestone-item {
        padding: 0.5rem 0.25rem;
        min-width: 0;
        overflow: hidden;
    }

    .ms-target {
        font-size: 0.68rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ms-price {
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .ms-delta {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Supporting News on Chart */
    .chart-sentiment-box {
        padding: 0.85rem;
        margin-top: 0.9rem;
    }

    .sentiment-box-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .sentiment-header-left {
        width: 100%;
    }

    .sentiment-ticker-title {
        font-size: 0.92rem;
    }

    .sentiment-header-right {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .ticker-news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.65rem 0.75rem;
    }

    .news-item-left {
        width: 100%;
        gap: 0.4rem;
    }

    .news-item-title {
        font-size: 0.84rem;
        white-space: normal;
        line-height: 1.4;
    }

    .news-item-meta {
        width: 100%;
        justify-content: space-between;
        font-size: 0.72rem;
    }

    /* Action Panel Controls */
    .action-panel {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
    }

    .inspector-control-card {
        padding: 0.9rem;
        gap: 0.7rem;
    }

    .inspector-search-input {
        min-height: 42px;
    }

    .custom-select {
        min-height: 42px;
        width: 100%;
    }

    #btnLiveForecast {
        min-height: 44px;
        font-size: 0.9rem;
        justify-content: center;
        width: 100%;
    }

    .quick-chips-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        width: 100%;
        gap: 0.35rem;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .quick-chips-list::-webkit-scrollbar {
        display: none;
    }

    .ticker-chip {
        flex-shrink: 0;
        min-height: 34px;
        padding: 4px 10px;
        font-size: 0.78rem;
    }

    /* Confluence Card Mobile */
    .confluence-card {
        padding: 0.9rem;
    }

    .confluence-meter-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
    }

    .confluence-meter-circle {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .confluence-number {
        font-size: 1.5rem;
    }

    .confluence-breakdown {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem 0.6rem;
        flex: 1;
    }

    .breakdown-label {
        font-size: 0.72rem;
    }

    .breakdown-value {
        font-size: 0.85rem;
    }

    /* Plan Card Mobile */
    .plan-card {
        padding: 0.9rem;
    }

    .plan-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .plan-item {
        padding: 0.65rem;
    }

    .plan-label {
        font-size: 0.72rem;
    }

    .plan-value {
        font-size: 1rem;
    }

    /* News Module Mobile */
    .news-header-actions {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .news-auto-sync-indicator {
        font-size: 0.74rem;
        padding: 4px 9px;
    }

    #btnRefreshNews {
        min-height: 38px;
        font-size: 0.82rem;
        padding: 6px 12px;
    }

    .news-controls-bar {
        padding: 0.75rem;
        margin-bottom: 1rem;
        gap: 0.7rem;
    }

    .news-category-tabs {
        width: 100%;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        gap: 0.35rem;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .news-category-tabs::-webkit-scrollbar {
        display: none;
    }

    .news-tab {
        flex-shrink: 0;
        font-size: 0.78rem;
        padding: 6px 11px;
    }

    .news-search-wrapper {
        width: 100%;
    }

    .news-search-wrapper input {
        width: 100%;
        min-height: 40px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .news-card {
        padding: 1.1rem;
    }

    .news-card-title {
        font-size: 0.96rem;
        line-height: 1.45;
    }

    /* Calculator Mobile */
    .calc-card {
        padding: 0.95rem;
    }

    .calc-risk-preset-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }

    .preset-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
        width: 100%;
    }

    .btn-preset {
        font-size: 0.72rem;
        padding: 7px 4px;
        text-align: center;
        justify-content: center;
        min-height: 38px;
        border-radius: var(--radius-sm);
    }

    .calc-inputs-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .calc-input {
        min-height: 42px;
        padding: 8px 12px;
    }

    .calc-fee-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .fee-checkbox-label {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .idx-lot-rule-badge {
        font-size: 0.74rem;
        padding: 3px 8px;
    }

    .calc-results-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .calc-res-box {
        padding: 0.9rem;
    }

    .res-label {
        font-size: 0.75rem;
    }

    .res-value {
        font-size: 1.45rem;
    }

    .calc-footer-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding: 0.85rem;
    }

    .footer-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    /* Tables Toolbar Mobile */
    .table-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .table-actions input,
    .table-actions select,
    .table-actions button {
        width: 100% !important;
        min-height: 42px;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.7rem 0.8rem;
    }

    .table-counts-info {
        font-size: 0.8rem;
    }

    .table-pagination-controls {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.25rem;
    }

    .btn-page {
        min-width: 38px;
        min-height: 38px;
        padding: 4px 8px;
        font-size: 0.82rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .page-indicator {
        font-size: 0.78rem;
        min-width: 44px;
    }

    .table-container {
        max-height: 440px;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th, .data-table td {
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    /* Playbook Cards Mobile */
    .improvements-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .improvement-card {
        padding: 1.15rem;
    }

    .imp-title {
        font-size: 1.05rem;
    }

    .imp-body {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    /* Footer Mobile */
    .footer {
        padding: 1.8rem 1rem;
    }

    .footer-content {
        gap: 0.8rem;
    }

    .footer-brand-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.4rem;
    }

    .footer-note {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}

/* Compact Mobile (iPhone SE, Small Android, 320px - 440px) */
@media (max-width: 440px) {
    html {
        font-size: 13.5px;
    }

    .navbar {
        padding: 0.4rem 0.6rem;
    }

    .brand-title {
        font-size: 0.95rem;
    }

    .brand-tag {
        display: none;
    }

    .live-status {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.45rem;
    }

    .kpi-card {
        padding: 0.75rem;
    }

    .kpi-value {
        font-size: 1.2rem;
    }

    .milestones-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .confluence-meter-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .confluence-breakdown {
        width: 100%;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .btn-preset {
        min-height: 36px;
    }
}

