/* ==========================================================================
   tGroup Telecom - ISP Client Portal
   Design System: Lumina Network Suite (Photonic Cyber-Glassmorphism)
   Standard CSS Architecture — Zero External Framework Dependencies
   ========================================================================== */

:root {
    /* Foundations & Surfaces */
    --bg-canvas: #090D16;
    --bg-surface: #0f131d;
    --bg-surface-lowest: #0a0e17;
    --bg-surface-low: #171c25;
    --bg-surface-container: #1b2029;
    --bg-surface-high: #262a34;
    --bg-surface-highest: #31353f;
    --bg-surface-bright: #353944;

    /* Photonic Accents & Signal Core */
    --cyan-primary: #00f2fe;
    --cyan-light: #e0fdff;
    --cyan-secondary: #4cd7f6;
    --cyan-fiber: #06b6d4;
    --cyan-tertiary: #38bdf8;
    --cyan-dim: #00dce6;

    /* Telemetry Status Colors */
    --emerald-status: #10b981;
    --emerald-bg: rgba(16, 185, 129, 0.12);
    --emerald-border: rgba(16, 185, 129, 0.3);
    
    --amber-status: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.12);
    --amber-border: rgba(245, 158, 11, 0.3);

    --error-status: #ef4444;
    --error-light: #ffb4ab;
    --error-container: #93000a;
    --error-bg: rgba(239, 68, 68, 0.12);
    --error-border: rgba(239, 68, 68, 0.3);

    /* Text Tiers */
    --text-primary: #dfe2f0;
    --text-white: #ffffff;
    --text-muted: #b9cacb;
    --text-dim: #849495;

    /* Borders & Glass */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-cyan: rgba(56, 189, 248, 0.2);
    --glass-lumina-bg: radial-gradient(120% 120% at 50% 0%, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    --glass-subtle-bg: rgba(27, 32, 41, 0.85);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Container Max Width */
    --max-content-width: 1100px;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    background-color: #040711;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background-color: transparent !important;
    background-image: none !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Base Starfield and Atmospheric Radiance (from TakchGroup Website) */
#universe-bg-layer,
.universe-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background-color: #040711;
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(0, 229, 255, 0.12) 0%, rgba(14, 116, 144, 0.08) 28%, transparent 55%),
        radial-gradient(circle at 85% 25%, rgba(168, 85, 247, 0.15) 0%, rgba(147, 51, 234, 0.06) 35%, transparent 60%),
        radial-gradient(circle at 15% 70%, rgba(56, 189, 248, 0.09) 0%, transparent 48%),
        radial-gradient(circle at 80% 85%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
        radial-gradient(1.2px 1.2px at 15% 15%, rgba(255, 255, 255, 0.75) 1px, transparent 0),
        radial-gradient(1.5px 1.5px at 38% 70%, rgba(147, 197, 253, 0.65) 1px, transparent 0),
        radial-gradient(1.2px 1.2px at 68% 22%, rgba(233, 213, 255, 0.7) 1px, transparent 0),
        radial-gradient(1.8px 1.8px at 84% 80%, rgba(255, 255, 255, 0.6) 1px, transparent 0),
        radial-gradient(1.4px 1.4px at 92% 12%, rgba(56, 189, 248, 0.75) 1px, transparent 0);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 540px 540px, 540px 540px, 540px 540px, 540px 540px, 540px 540px;
    background-attachment: fixed;
}

/* Background Canvas Layer (from TakchGroup Website) */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.65;
    display: block !important;
}

.lumina-main {
    position: relative;
    z-index: 10;
}

.lumina-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Material Symbols Integration */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Utility Typography Classes */
.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-sans); }

/* Common Glass & Card Surfaces */
.glass-lumina {
    background: var(--glass-lumina-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
}

.glass-card {
    background: rgba(27, 32, 41, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

.neon-glow-cyan {
    box-shadow: 0 0 35px -5px rgba(6, 182, 212, 0.25);
}

/* Pulse Animations */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.95); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.pulse-dot {
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   Header Navigation Bar
   ========================================================================== */
.lumina-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding-top: env(safe-area-inset-top, 0px);
}

.lumina-header-inner {
    max-width: var(--max-content-width);
    margin: 0 auto;
    height: 64px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo-squircle {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--cyan-primary) 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #070b14;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
}

.brand-text-col {
    display: flex;
    flex-direction: column;
}

.brand-super {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan-secondary);
    line-height: 1.1;
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-white);
    line-height: 1.2;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.session-beacon-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-full);
    color: var(--emerald-status);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.session-beacon-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--emerald-status);
}

.btn-icon-lumina {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-lumina:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
}

/* Standalone Floating Refresh Button */
.floating-refresh-btn {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 12px rgba(0, 242, 254, 0.15);
    color: var(--cyan-primary, #00f2fe);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-refresh-btn:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(0, 242, 254, 0.6);
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 242, 254, 0.35);
    transform: translateY(-2px);
}

.floating-refresh-btn:active {
    transform: translateY(0px) scale(0.95);
}

@media (max-width: 640px) {
    .floating-refresh-btn {
        top: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
}

/* ==========================================================================
   Main Application Layout
   ========================================================================== */
.lumina-main {
    flex: 1;
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ==========================================================================
   Subscriber Identity Hero Card
   ========================================================================== */
.subscriber-hero-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.subscriber-session-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cyan-secondary);
}

.subscriber-greeting {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
    margin-top: 0.125rem;
}

.subscriber-meta-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.account-username-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-highest);
    color: var(--text-muted);
}

.tenure-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.subscriber-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-active {
    background: var(--emerald-bg);
    border: 1px solid var(--emerald-border);
    color: var(--emerald-status);
}

.status-suspended {
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    color: var(--amber-status);
}

.status-expired {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-status);
}

.subscriber-mobile-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

/* Package Banner Inside Hero */
.hero-package-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    background: rgba(23, 28, 37, 0.9);
    border: 1px solid var(--border-glass);
}

.package-info-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.package-icon-bolt {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-container);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-primary);
}

.package-name-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-white);
}

.package-renewal-text {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.package-badge-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.days-left-pill {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface-highest);
    color: var(--cyan-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.days-left-pill.urgent {
    background: var(--error-bg);
    color: var(--error-status);
    border: 1px solid var(--error-border);
}

/* ==========================================================================
   Live Bandwidth Telemetry Card
   ========================================================================== */
.telemetry-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.telemetry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.telemetry-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-ring-wrap {
    position: relative;
    width: 8px;
    height: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--cyan-primary);
    opacity: 0.75;
    animation: pulse-subtle 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-ring-core {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan-primary);
}

.telemetry-title-text {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-white);
}

.telemetry-snmp-tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-lowest);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

/* Dual Metric Readouts */
.telemetry-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.metric-box {
    padding: 0.875rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-low);
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
}

.metric-box.dl-box {
    border-color: rgba(0, 242, 254, 0.2);
    background: linear-gradient(180deg, rgba(0, 242, 254, 0.05) 0%, rgba(15, 19, 29, 0.6) 100%);
}

.metric-box.ul-box {
    border-color: rgba(76, 215, 246, 0.2);
    background: linear-gradient(180deg, rgba(76, 215, 246, 0.05) 0%, rgba(15, 19, 29, 0.6) 100%);
}

.metric-top-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.metric-top-label.dl-label { color: var(--cyan-primary); }
.metric-top-label.ul-label { color: var(--cyan-secondary); }

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.metric-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.03em;
    line-height: 1;
}

.metric-unit {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cyan-secondary);
}

.metric-secondary-sub {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* 24-Segment LED Velocity Meter */
.velocity-meter-wrapper {
    padding: 0.5rem 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.velocity-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.velocity-header-title {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.velocity-peak-pill {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--cyan-primary);
}

.led-grid-24 {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 3px;
    height: 14px;
    padding: 2px 0;
}

.led-segment {
    height: 100%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.led-segment.lit {
    box-shadow: 0 0 6px currentColor;
}

.velocity-scale-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-dim);
}

/* Oscilloscope Streaming Waveform Container */
.oscilloscope-container {
    position: relative;
    width: 100%;
    height: 128px;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-lowest);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.oscilloscope-legend-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.oscilloscope-legend-items {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.oscilloscope-legend-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.oscilloscope-legend-tag.dl-tag { color: var(--cyan-primary); }
.oscilloscope-legend-tag.ul-tag { color: var(--cyan-secondary); }

.oscilloscope-legend-line {
    width: 8px;
    height: 2px;
    border-radius: 1px;
}

.oscilloscope-canvas-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.oscilloscope-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Floating Real-Time Oscilloscope (Borderless & Transparent Duplicate Chart) */
.floating-oscilloscope {
    position: relative;
    width: 100%;
    height: 140px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
}

.floating-oscilloscope .oscilloscope-legend-bar {
    transform: translateY(-18px);
    margin-bottom: -10px;
}

/* ==========================================================================
   Quota & Limits Section
   ========================================================================== */
.quota-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.quota-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quota-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-white);
}

.quota-badge-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cyan-primary);
}

.quota-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.quota-main-digits {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.quota-limit-caption {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.progress-track-lumina {
    width: 100%;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-highest);
    overflow: hidden;
    position: relative;
}

.progress-fill-lumina {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--cyan-primary) 0%, #2563eb 100%);
    transition: width 0.4s ease;
}

.progress-fill-lumina.warning {
    background: linear-gradient(90deg, var(--amber-status) 0%, #ea580c 100%);
}

.progress-fill-lumina.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Dual Stacked Bar for Free Night vs Charged */
.stacked-split-track {
    width: 100%;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-lowest);
    overflow: hidden;
    display: flex;
}

.stacked-segment-free {
    height: 100%;
    background: var(--cyan-primary);
    transition: width 0.4s ease;
}

.stacked-segment-charged {
    height: 100%;
    background: var(--bg-surface-highest);
    transition: width 0.4s ease;
}

.stacked-legend-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.legend-dot-free {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-primary);
    margin-right: 4px;
}

.legend-dot-charged {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg-surface-highest);
    margin-right: 4px;
}

/* Smart Advisory Guidance Box */
.smart-advisory-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-low);
    border: 1px solid var(--border-glass);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.smart-advisory-icon {
    color: var(--cyan-primary);
    font-size: 18px;
    margin-top: 1px;
}

.smart-advisory-title {
    font-weight: 700;
    color: var(--text-white);
    display: block;
    margin-bottom: 2px;
}

/* Infinite Allowance (Unlimited Plan Display) */
.unlimited-badge-core {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--cyan-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   Historical Traffic Analytics (Highcharts Integration)
   ========================================================================== */
.history-analytics-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-period-switch {
    display: flex;
    align-items: center;
    background: var(--bg-surface-lowest);
    padding: 2px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.period-btn {
    background: none;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn.active {
    background: var(--bg-surface-high);
    color: var(--cyan-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Historical Traffic Analytics Summary Badges */
.traffic-history-badges-row {
    display: flex;
    align-items: stretch;
    gap: 0.625rem;
    width: 100%;
    flex-wrap: wrap;
}

.traffic-stat-badge {
    flex: 1 1 0;
    min-width: 110px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    background: rgba(8, 14, 27, 0.72);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: var(--radius-md, 8px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.traffic-stat-badge:hover {
    background: rgba(13, 22, 42, 0.85);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.badge-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-icon-wrap .material-symbols-outlined {
    font-size: 1.5rem;
}

.badge-data-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.15;
}

.badge-data-wrap .badge-value {
    font-family: var(--font-mono, monospace);
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.badge-data-wrap .badge-label {
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.9;
    letter-spacing: 0.01em;
}

/* 1. Download: Cyan (Matching Screenshot) */
.badge-download {
    border-color: rgba(0, 242, 254, 0.28);
}
.badge-download:hover {
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}
.badge-download .badge-icon-wrap,
.badge-download .badge-value,
.badge-download .badge-label {
    color: #00f2fe;
}
.badge-download .badge-icon-wrap {
    filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.5));
}

/* 2. Upload: Violet/Purple (Matching Screenshot) */
.badge-upload {
    border-color: rgba(192, 132, 252, 0.28);
}
.badge-upload:hover {
    border-color: rgba(192, 132, 252, 0.6);
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.25);
}
.badge-upload .badge-icon-wrap,
.badge-upload .badge-value,
.badge-upload .badge-label {
    color: #c084fc;
}
.badge-upload .badge-icon-wrap {
    filter: drop-shadow(0 0 5px rgba(192, 132, 252, 0.5));
}

/* 3. Free Night: Amber/Gold (Matching Screenshot) */
.badge-free {
    border-color: rgba(251, 191, 36, 0.28);
}
.badge-free:hover {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}
.badge-free .badge-icon-wrap,
.badge-free .badge-value,
.badge-free .badge-label {
    color: #fbbf24;
}
.badge-free .badge-icon-wrap {
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
}

/* 4. Paid: Electric Blue / Cyan */
.badge-paid {
    border-color: rgba(0, 198, 255, 0.28);
}
.badge-paid:hover {
    border-color: rgba(0, 198, 255, 0.6);
    box-shadow: 0 0 12px rgba(0, 198, 255, 0.25);
}
.badge-paid .badge-icon-wrap,
.badge-paid .badge-value,
.badge-paid .badge-label {
    color: #00c6ff;
}
.badge-paid .badge-icon-wrap {
    filter: drop-shadow(0 0 5px rgba(0, 198, 255, 0.5));
}

/* 5. Total: Radiant Violet-Magenta */
.badge-total {
    border-color: rgba(232, 121, 249, 0.28);
}
.badge-total:hover {
    border-color: rgba(232, 121, 249, 0.6);
    box-shadow: 0 0 12px rgba(232, 121, 249, 0.25);
}
.badge-total .badge-icon-wrap,
.badge-total .badge-value,
.badge-total .badge-label {
    color: #e879f9;
}
.badge-total .badge-icon-wrap {
    filter: drop-shadow(0 0 5px rgba(232, 121, 249, 0.5));
}

/* Light Theme Adjustments */
[data-theme="light"] .traffic-stat-badge {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .badge-download .badge-value,
[data-theme="light"] .badge-download .badge-label {
    color: #0891b2;
}
[data-theme="light"] .badge-upload .badge-value,
[data-theme="light"] .badge-upload .badge-label {
    color: #7c3aed;
}
[data-theme="light"] .badge-free .badge-value,
[data-theme="light"] .badge-free .badge-label {
    color: #d97706;
}
[data-theme="light"] .badge-paid .badge-value,
[data-theme="light"] .badge-paid .badge-label {
    color: #0284c7;
}
[data-theme="light"] .badge-total .badge-value,
[data-theme="light"] .badge-total .badge-label {
    color: #9333ea;
}

@media (max-width: 640px) {
    .traffic-history-badges-row {
        gap: 0.5rem;
    }
    .traffic-stat-badge {
        min-width: calc(50% - 0.25rem);
        flex: 1 1 calc(50% - 0.25rem);
        padding: 0.45rem 0.65rem;
    }
    .badge-data-wrap .badge-value {
        font-size: 0.85rem;
    }
    .badge-data-wrap .badge-label {
        font-size: 0.65rem;
    }
}

.chart-viewport-wrap {
    width: 100%;
    height: 380px;
    min-height: 380px;
    position: relative;
    overflow: visible !important;
}

#trafficHistoryChartContainer,
#trafficHistoryChartContainer.highcharts-container,
#trafficHistoryChartContainer .highcharts-container,
#trafficHistoryChartContainer svg {
    overflow: visible !important;
}

/* Interactive History Legend Capsule (Screenshot Style) */
.history-legend-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}

.history-legend-capsule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.35rem 1.15rem;
    border-radius: 9999px;
    background: rgba(13, 19, 34, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 242, 254, 0.28);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 12px rgba(0, 242, 254, 0.12);
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 9999px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    opacity: 0.38;
    filter: grayscale(40%);
}

.legend-chip:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.legend-chip.active {
    opacity: 1;
    filter: none;
}

.legend-chip.active .legend-label {
    color: #ffffff;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.dot-total {
    background: linear-gradient(135deg, #00f2fe, #a855f7);
}
.legend-chip.active .dot-total {
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.9);
}

.dot-paid {
    background: #00c6ff;
}
.legend-chip.active .dot-paid {
    box-shadow: 0 0 10px rgba(0, 198, 255, 0.9);
}

.dot-free,
.dot-freenight {
    background: #fbbf24;
}
.legend-chip.active .dot-free,
.legend-chip.active .dot-freenight {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.9);
}

.dot-download {
    background: linear-gradient(135deg, #00f2fe, #a855f7);
}
.legend-chip.active .dot-download {
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.9);
}

.dot-upload {
    background: #a855f7;
}
.legend-chip.active .dot-upload {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.9);
}

.dot-paid-free {
    background: linear-gradient(135deg, #fbbf24 50%, #00c6ff 50%);
}
.legend-chip.active .dot-paid-free {
    box-shadow: 0 0 10px rgba(0, 198, 255, 0.9);
}

.dot-dl-ul {
    background: linear-gradient(135deg, #a855f7 50%, #00f2fe 50%);
}
.legend-chip.active .dot-dl-ul {
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.9);
}

@media (max-width: 640px) {
    .history-legend-capsule {
        gap: 0.5rem;
        padding: 0.35rem 0.75rem;
    }
    .legend-chip {
        font-size: 0.6875rem;
        gap: 4px;
        padding: 2px 4px;
    }
}

/* ==========================================================================
   Invoicing & Payments Section (Concept B: High-Density Ledger Strip)
   ========================================================================== */
.invoicing-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.invoicing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.invoicing-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.invoicing-header-icon {
    color: var(--cyan-secondary);
    font-size: 20px;
}

.invoicing-title-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

/* Unpaid Invoices Notification Bell */
.invoice-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin-left: 2px;
}

.invoice-bell-btn:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: #ef4444;
    transform: scale(1.05);
}

.invoice-bell-icon {
    font-size: 16px;
    animation: bellRing 3s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes bellRing {
    0%, 80%, 100% { transform: rotate(0deg); }
    84% { transform: rotate(14deg); }
    88% { transform: rotate(-12deg); }
    92% { transform: rotate(8deg); }
    96% { transform: rotate(-6deg); }
}

.invoice-bell-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    animation: bellDotPulse 2s infinite;
}

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

.invoice-bell-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    border: 1.5px solid var(--bg-surface-high, #121826);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* Controls Bar: Filters & Date Range */
.invoice-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    flex-wrap: wrap;
    padding: 0.35rem 0.5rem;
    background: rgba(15, 19, 29, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.invoice-filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.invoice-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.invoice-filter-pill:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
}

.invoice-filter-pill.active {
    color: var(--cyan-primary);
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.3);
    font-weight: 700;
}

.invoice-filter-pill.filter-unpaid.has-unpaid {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.invoice-filter-pill.filter-unpaid.active {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
}

.invoice-filter-count {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.invoice-date-range-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(22, 27, 40, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.15rem 0.5rem;
}

.invoice-range-icon {
    font-size: 14px;
    color: var(--cyan-secondary);
}

.invoice-date-range-select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
}

.invoice-date-range-select option {
    background: #0f131d;
    color: var(--text-white);
}

/* Invoice Ledger Container */
.invoice-ledger-container {
    display: flex;
    flex-direction: column;
    gap: var(--inv-row-margin-bottom, 6px);
    width: 100%;
}

/* Concept B Strip Card */
.payment-card {
    background: rgba(22, 27, 40, 0.7);
    border-width: var(--inv-row-border-width, 1px);
    border-style: var(--inv-row-border-style, solid);
    border-color: var(--inv-row-border-color, var(--border-glass));
    border-radius: var(--inv-row-border-radius, var(--radius-md));
    margin: 0;
    box-shadow: var(--inv-row-box-shadow, none);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}

.payment-card:hover {
    border-color: var(--inv-row-hover-border-color, rgba(0, 242, 254, 0.35));
    background: rgba(27, 33, 49, 0.85);
    box-shadow: var(--inv-row-hover-box-shadow, inset 0 0 10px rgba(0, 242, 254, 0.25));
}

.payment-card.is-expanded {
    background: rgba(27, 33, 49, 0.95);
    border-color: var(--inv-row-hover-border-color, rgba(0, 242, 254, 0.45));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Main Single-Row Strip */
.payment-card-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 38px;
    width: 100%;
}

.payment-card.can-collapse .payment-card-main-row {
    cursor: pointer;
}

.payment-strip-left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1 1 auto;
}

.payment-strip-icon-box {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: rgba(0, 242, 254, 0.1);
    color: var(--cyan-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-strip-icon-box .material-symbols-outlined {
    font-size: 15px;
}

.payment-card-plan {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Timeline Interval */
.payment-card-timeline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    flex-shrink: 0;
}

.payment-card-timeline .timeline-sep {
    color: var(--cyan-secondary);
    font-size: 0.6875rem;
    opacity: 0.75;
}

.payment-card-timeline .timeline-exp {
    color: var(--cyan-secondary);
    font-weight: 600;
}

.payment-strip-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

/* Expand Chevron */
.invoice-expand-chevron {
    color: var(--text-dim);
    font-size: 18px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    flex-shrink: 0;
}

.payment-card:hover .invoice-expand-chevron {
    color: var(--cyan-primary);
}

.payment-card.is-expanded .invoice-expand-chevron {
    transform: rotate(180deg);
    color: var(--cyan-primary);
}

/* Status Badges */
.pr-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.65625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.pr-badge-status.status-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.pr-badge-status.status-unpaid {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.pr-badge-status.status-free {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.pr-badge-cycle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.18rem 0.45rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.65625rem;
    font-weight: 600;
    color: var(--cyan-secondary);
    background: rgba(76, 215, 246, 0.1);
    border: 1px solid rgba(76, 215, 246, 0.25);
    flex-shrink: 0;
}

.pr-badge-cycle.cycle-48h {
    color: #facc15;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.35);
}

.pr-badge-method {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.18rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.65625rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    flex-shrink: 0;
}

.pr-badge-method.method-whish {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

.pr-badge-method.method-office {
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.3);
}

.pr-badge-method.method-collector {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.3);
}

/* Collapsible Detailed Drawer */
.payment-card-drawer {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    animation: drawerFadeIn 0.25s ease-out;
}

.payment-card.is-expanded .payment-card-drawer {
    display: flex;
}

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

.payment-drawer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.625rem;
    background: rgba(15, 19, 29, 0.6);
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.payment-drawer-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-drawer-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-drawer-label .material-symbols-outlined {
    font-size: 13px;
    color: var(--cyan-secondary);
}

.payment-drawer-val {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-white);
}

.payment-drawer-val.highlight {
    color: var(--cyan-primary);
}

.payment-drawer-val.days-highlight {
    color: #38bdf8;
    font-weight: 700;
}

/* Drawer Action Bar */
.payment-drawer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-print-invoice {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-white);
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-print-invoice:hover {
    background: rgba(0, 242, 254, 0.25);
    border-color: var(--cyan-primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
    transform: translateY(-1px);
}

.btn-print-invoice .material-symbols-outlined {
    font-size: 15px;
    color: var(--cyan-primary);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .payment-card-main-row {
        flex-wrap: wrap;
        gap: 0.45rem;
        min-height: auto;
        padding: 0.15rem 0;
    }

    .payment-strip-left {
        width: 100%;
        justify-content: space-between;
    }

    .payment-card-timeline {
        order: 2;
        font-size: 0.71875rem;
    }

    .payment-strip-right {
        order: 3;
        margin-left: auto;
    }
}

/* Light theme overrides for Concept B */
[data-theme="light"] .payment-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .payment-card:hover {
    border-color: #0284c7;
    background: #f8fafc;
}

[data-theme="light"] .payment-card.is-expanded {
    background: #f8fafc;
    border-color: #0284c7;
}

[data-theme="light"] .payment-card-plan {
    color: #0f172a;
}

[data-theme="light"] .payment-drawer-grid {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .payment-drawer-val {
    color: #0f172a;
}

[data-theme="light"] .invoice-controls-bar {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .invoice-date-range-wrap {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .invoice-date-range-select option {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .btn-print-invoice {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

[data-theme="light"] .btn-print-invoice .material-symbols-outlined {
    color: #ffffff;
}

/* ==========================================================================
   Subscriber-Facing Connection Health Diagnostics Card
   ========================================================================== */
.diagnostics-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.diagnostics-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.diagnostics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-low);
    font-size: 0.8125rem;
}

.diagnostics-label {
    color: var(--text-muted);
}

.diagnostics-val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-white);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.diagnostics-val.optimal {
    color: var(--cyan-primary);
}

/* ==========================================================================
   Continuous Single-Page Portal Sections
   ========================================================================== */
.portal-section,
.spa-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

/* ==========================================================================
   Application States: Loading Skeleton, Off-Network, System Error
   ========================================================================== */
.state-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.state-container.hidden {
    display: none !important;
}

/* Loading Skeleton */
.skeleton-pulse {
    background: var(--bg-surface-highest);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.skeleton-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    animation: pulse-subtle 1.8s infinite;
}

/* Off-Network View */
.off-network-card {
    padding: 2rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.radar-sweep-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

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

.radar-beam {
    transform-origin: 80px 80px;
    animation: spin-beam 4s linear infinite;
}

.off-network-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.off-network-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.6;
}

.detected-ip-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 380px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-lowest);
    border: 1px solid var(--border-glass);
}

.detected-ip-val {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cyan-primary);
}

/* System Error View */
.error-card-lumina {
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--error-container);
    border: 1px solid var(--error-border);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-primary-lumina {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--cyan-primary) 0%, #0284c7 100%);
    color: #070b14;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
    transition: all 0.2s ease;
}

.btn-primary-lumina:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (min-width: 768px) {
    .lumina-main {
        padding: 2rem 1.5rem 6rem;
        gap: 1.5rem;
    }

    .telemetry-metrics-grid {
        gap: 1.25rem;
    }

    .metric-number {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .lumina-main {
        padding: 2.5rem 2rem 6rem;
    }
}

/* ==========================================================================
   Temporary Multi-Theme Preview Switcher Widget
   (Cleanly removable after design review phase)
   ========================================================================== */
#theme-review-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (max-width: 768px) {
    #theme-review-widget {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
        right: 16px;
    }
}

.theme-switcher-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #0f172a;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

.theme-switcher-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme-switcher-trigger .theme-icon {
    display: inline-flex;
    font-size: 16px;
}

.theme-switcher-modal {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 290px;
    background: #0f172a;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(16px);
}

.theme-switcher-modal.open {
    display: flex;
    animation: theme-panel-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes theme-panel-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

.theme-modal-title {
    font-size: 12px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.theme-modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    line-height: 1;
}
.theme-modal-close:hover {
    color: #ffffff;
}

.theme-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    color: #e2e8f0;
    transition: all 0.15s ease;
}

.theme-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(2px);
}

.theme-option-btn.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    color: #ffffff;
}

.theme-swatch {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.swatch-cyber { background: linear-gradient(135deg, #080e1d 0%, #ffc174 50%, #00f1fd 100%); }
.swatch-universe { background: radial-gradient(circle at 35% 30%, #00f2fe 0%, #a855f7 50%, #060913 100%); }

.theme-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.theme-label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.theme-sublabel {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.2;
    margin-top: 2px;
}

.theme-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    margin-left: auto;
    display: none;
    box-shadow: 0 0 8px #38bdf8;
}

.theme-option-btn.active .theme-active-dot {
    display: block;
}

/* Connection Universe Hero Component visibility (only visible when theme is connection-universe) */
.connection-universe-core {
    display: none;
}
html[data-theme-style="connection-universe"] .connection-universe-core {
    display: flex;
}


