/* ==========================================================================
   Multi-DISCO Pakistan Electricity Bill Portal - Design System & Styles
   (Theme variables live in themes.css — do NOT duplicate here)
   ========================================================================== */

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    padding-bottom: 70px; /* space for sticky mobile bar */
}

/* Background Glow Effects */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 15%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 230, 118, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(179, 136, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

/* Header & Navbar */
.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.brand-titles h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand-titles h1 span {
    color: var(--primary-cyan);
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-badges {
    display: flex;
    gap: 12px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-live { color: var(--primary-emerald); }
.badge-secure { color: var(--primary-cyan); }

/* DISCO Selector Grid */
.disco-grid-section {
    margin-bottom: 28px;
    padding: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i { color: var(--primary-cyan); }

.section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.disco-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.disco-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.disco-card img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.disco-card .disco-name {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
}

.disco-card:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
}

.disco-card.active {
    background: rgba(0, 230, 118, 0.12);
    border-color: var(--primary-emerald);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
}

.disco-card.active .disco-name {
    color: var(--primary-emerald);
}

/* Search Card */
.search-card {
    padding: 32px;
    margin-bottom: 28px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.input-group-container {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.custom-input {
    width: 100%;
    padding: 16px 45px 16px 50px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.clear-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: none;
}

.btn-primary {
    padding: 0 32px;
    background: linear-gradient(135deg, var(--primary-cyan) 0%, #0091ea 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

/* Quick Samples & History */
.quick-samples {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sample-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sample-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sample-chip:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 229, 255, 0.1);
}

.history-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-glass);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.text-btn {
    background: none;
    border: none;
    color: var(--accent-orange);
    cursor: pointer;
    font-size: 0.8rem;
}

.history-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Radar Loading Panel */
.status-panel {
    padding: 40px;
    margin-bottom: 28px;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.radar-spinner {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-spinner .circle {
    position: absolute;
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite ease-out;
}

.radar-spinner .c1 { width: 100%; height: 100%; animation-delay: 0s; }
.radar-spinner .c2 { width: 70%; height: 70%; animation-delay: 0.4s; }
.radar-spinner .c3 { width: 40%; height: 40%; animation-delay: 0.8s; }

.pulse-icon {
    font-size: 1.5rem;
    color: var(--primary-cyan);
}

@keyframes pulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.status-messages h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.status-messages p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.progress-bar-wrap {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-emerald));
    transition: width 0.4s ease;
}

/* Error Panel */
.error-banner {
    padding: 20px;
    margin-bottom: 28px;
    border-left: 4px solid var(--accent-orange);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.error-icon {
    font-size: 1.8rem;
    color: var(--accent-orange);
}

.close-error {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Bill Display Section & Action Bar */
.bill-display-section {
    margin-bottom: 36px;
}

.action-bar {
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.bill-info-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

.meta-tag {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-tag strong {
    color: var(--text-main);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.btn-pdf {
    background: var(--primary-emerald);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.5);
}

.btn-print {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glass);
    color: var(--text-main);
}

.btn-print:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

.btn-copy {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-glass);
    color: var(--text-muted);
}

.btn-link {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-glass);
    color: var(--text-muted);
}

/* Frame Viewer */
.bill-viewer-frame {
    overflow: hidden;
}

.frame-bar {
    padding: 12px 20px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.frame-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.frame-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.frame-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.iframe-container {
    width: 100%;
    height: 850px;
    background: #fff;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
}

/* Utilities Grid (Calculator & Peak Hours) */
.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.utility-card {
    padding: 24px;
}

.utility-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.utility-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-input {
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.calc-result {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-val {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-emerald);
}

/* Peak Hours Widget */
.peak-badge {
    padding: 8px 16px;
    background: rgba(255, 109, 0, 0.15);
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    border-radius: var(--radius-sm);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.peak-list {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.peak-list li {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

/* FAQ Section */
.faq-section {
    padding: 32px;
    margin-bottom: 40px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.faq-item h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--primary-cyan);
}

.faq-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Footer */
.app-footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

/* Responsive Rules */
@media (max-width: 768px) {
    .navbar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .input-group-container {
        flex-direction: column;
    }
    
    .btn-primary {
        padding: 16px;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .iframe-container {
        height: 600px;
    }
}

/* Debug Panel Console Styling */
.debug-panel {
    padding: 20px;
    margin-bottom: 28px;
    background: rgba(8, 12, 20, 0.95);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: var(--radius-md);
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-emerald);
}

.debug-console {
    background: #030712;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #00e676;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-line {
    margin-bottom: 4px;
    word-break: break-all;
}
.debug-line.warn { color: var(--accent-gold); }
.debug-line.err { color: #ff5252; }

/* ==========================================================================
   NEW: Tariff Rate Live Ticker
   ========================================================================== */
.tariff-ticker {
    background: var(--ticker-bg, rgba(15,23,42,0.95));
    border-bottom: 1px solid var(--border-glass);
    padding: 7px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 90;
}
.ticker-inner {
    display: inline-flex;
    animation: tickerScroll 38s linear infinite;
}
.tariff-ticker:hover .ticker-inner {
    animation-play-state: paused;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    font-size: 0.76rem;
    font-family: var(--font-heading);
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.ticker-label {
    color: var(--primary-cyan);
    font-weight: 700;
}
.ticker-dot { color: var(--border-glass); font-size: 0.55rem; }
@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   NEW: Share Button & Dropdown Panel
   ========================================================================== */
.share-wrapper { position: relative; display: inline-block; }
.share-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card-solid, #101928);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-card, 0 10px 30px rgba(0,0,0,0.35));
    z-index: 200;
    min-width: 190px;
    flex-direction: column;
    gap: 6px;
}
.share-panel.active { display: flex; }
.share-panel-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.84rem;
    font-family: var(--font-body);
    transition: background 0.2s;
    width: 100%;
    text-align: left;
}
.share-panel-btn:hover { background: var(--border-glass); }
.sicon { width: 20px; text-align: center; }
.sicon-wa  { color: #25D366; }
.sicon-cp  { color: var(--primary-cyan); }
.sicon-em  { color: var(--accent-gold); }

/* ==========================================================================
   NEW: Analytics Panel
   ========================================================================== */
#analyticsPanel {
    display: none;
    margin-top: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.4s ease;
}
#analyticsPanel.visible { display: block; }
.analytics-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.analytics-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-main);
}
.analytics-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: center;
}
@media (max-width: 600px) {
    .analytics-body { grid-template-columns: 1fr; }
    .donut-wrap { max-width: 160px; margin: 0 auto; }
}
.donut-wrap { max-width: 200px; margin: 0 auto; }
.ana-breakdown { display: flex; flex-direction: column; gap: 10px; }
.ana-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: var(--bg-input, rgba(15,23,42,0.85));
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}
.ana-label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ana-label .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.ana-value {
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-heading);
}

/* Countdown Timer */
.countdown-section {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--bg-input, rgba(15,23,42,0.85));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.countdown-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.countdown-wrap { display: flex; align-items: center; gap: 5px; }
.cd-unit {
    display: flex; flex-direction: column; align-items: center;
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: 6px; padding: 4px 8px;
    font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
    min-width: 40px; text-align: center; line-height: 1.2;
}
.cd-unit small { font-size: 0.58rem; color: var(--text-muted); font-weight: 400; text-transform: uppercase; }
.cd-sep { font-weight: 700; color: var(--primary-cyan); padding-bottom: 14px; }
.countdown-wrap.safe    .cd-unit { border-color: rgba(0,230,118,0.35); color: var(--primary-emerald); }
.countdown-wrap.warning .cd-unit { border-color: rgba(255,214,0,0.35); color: var(--accent-gold); }
.countdown-wrap.urgent  .cd-unit { border-color: rgba(255,109,0,0.35); color: var(--accent-orange); }
.overdue-badge {
    color: var(--accent-orange); font-weight: 700;
    font-family: var(--font-heading); font-size: 0.85rem;
    display: flex; align-items: center; gap: 6px;
}

/* ==========================================================================
   NEW: Sticky Mobile Bottom CTA Bar
   ========================================================================== */
.sticky-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    background: var(--sticky-bar-bg, rgba(11,15,25,0.97));
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-glass);
    padding: 10px 14px;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.sticky-mobile-bar.visible { display: flex; }
.smb-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    max-width: 120px;
}
.smb-btn:active { opacity: 0.8; }
.smb-download { background: var(--primary-cyan); color: #0b0f19; }
.smb-print    { background: var(--border-glass); color: var(--text-main); border: 1px solid var(--border-glass); }
.smb-share    { background: #25D366; color: #fff; }

/* ==========================================================================
   NEW: AdSense Placeholder Slots
   ========================================================================== */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-dim);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: var(--font-heading);
    overflow: hidden;
    position: relative;
}
.ad-slot::before {
    content: 'Advertisement';
    position: absolute; top: 6px; left: 12px;
    font-size: 0.6rem; color: var(--text-dim); opacity: 0.5;
}
.ad-slot-leaderboard { width: 100%; height: 90px; max-width: 728px; margin: 16px auto; }
.ad-slot-rect { width: 300px; height: 250px; }

/* ==========================================================================
   NEW: Urdu Language Mode
   ========================================================================== */
.lang-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    padding: 5px 12px;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; color: var(--text-muted);
    font-size: 0.76rem; font-weight: 600;
    transition: all 0.25s ease;
}
.lang-toggle-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
[data-lang="ur"] .lang-en { display: none; }
[data-lang="ur"] .lang-ur { display: inline !important; }
.lang-ur { display: none; }

/* ==========================================================================
   NEW: Light Mode Overrides
   ========================================================================== */
[data-theme="light"] .navbar-header {
    background: rgba(240,244,255,0.92);
    border-bottom-color: rgba(0,0,0,0.07);
}
[data-theme="light"] .glass-panel {
    background: rgba(255,255,255,0.78);
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .disco-card {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .debug-console {
    background: #1e2030;
    color: #a5f3fc;
}
[data-theme="light"] .btn-action {
    background: rgba(0,115,200,0.06);
    border-color: rgba(0,115,200,0.18);
}
[data-theme="light"] .btn-action:hover {
    background: rgba(0,115,200,0.12);
    border-color: rgba(0,115,200,0.45);
}
[data-theme="light"] .custom-input {
    background: rgba(240,244,255,0.95);
    border-color: rgba(0,0,0,0.12);
    color: #0f172a;
}
[data-theme="light"] .hero-title { color: #0f172a; }
[data-theme="light"] .hero-subtitle { color: #475569; }
[data-theme="light"] .section-label { color: #475569; }

@media (max-width: 768px) {
    .sticky-mobile-bar { display: flex; }
    .ad-slot-leaderboard { height: 60px; }
}

/* ==========================================================================
   COMPREHENSIVE LIGHT MODE OVERRIDES
   Fixes all remaining elements that still look dark in light mode
   ========================================================================== */

/* ── Select / Input elements (native browser dropdown) ── */
[data-theme="light"] .calc-input {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.14);
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

[data-theme="light"] .calc-input:focus {
    border-color: var(--primary-cyan);
    outline: none;
}

/* Force option elements to use light colors */
[data-theme="light"] .calc-input option {
    background: #ffffff;
    color: #0f172a;
}

/* ── Custom Input (reference number box) ── */
[data-theme="light"] .custom-input {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.14);
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

[data-theme="light"] .custom-input::placeholder {
    color: #94a3b8;
}

/* ── Search Card & Section ── */
[data-theme="light"] .search-card {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .card-header h2,
[data-theme="light"] .card-header p {
    color: #0f172a;
}

[data-theme="light"] .card-header p {
    color: #475569;
}

/* ── DISCO Section ── */
[data-theme="light"] .section-title {
    color: #0f172a;
}

[data-theme="light"] .section-desc {
    color: #475569;
}

/* ── Disco Cards ── */
[data-theme="light"] .disco-card-name {
    color: #0f172a;
}

[data-theme="light"] .disco-card-region {
    color: #64748b;
}

/* ── Frame Bar (bill viewer top bar) ── */
[data-theme="light"] .frame-bar {
    background: rgba(230, 237, 250, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .frame-title {
    color: #475569;
}

[data-theme="light"] .frame-btn {
    color: #475569;
    background: transparent;
}

/* ── History Chips ── */
[data-theme="light"] .history-section {
    background: rgba(240, 244, 255, 0.6);
    border-radius: var(--radius-sm);
    padding: 10px;
}

[data-theme="light"] .history-chip {
    background: rgba(0, 115, 200, 0.08);
    border-color: rgba(0, 115, 200, 0.2);
    color: #0f172a;
}

[data-theme="light"] .history-chip:hover {
    background: rgba(0, 115, 200, 0.15);
}

[data-theme="light"] .history-header {
    color: #475569;
}

/* ── Sample Chips ── */
[data-theme="light"] .sample-chip {
    background: rgba(0, 115, 200, 0.07);
    border-color: rgba(0, 115, 200, 0.2);
    color: #0f172a;
}

[data-theme="light"] .sample-chip:hover {
    background: rgba(0, 115, 200, 0.14);
}

[data-theme="light"] .sample-label {
    color: #64748b;
}

/* ── Utility Cards ── */
[data-theme="light"] .utility-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .utility-header h3 {
    color: #0f172a;
}

[data-theme="light"] .calc-result {
    background: rgba(0, 153, 79, 0.07);
    border-color: rgba(0, 153, 79, 0.25);
}

[data-theme="light"] .calc-val {
    color: var(--primary-emerald);
}

[data-theme="light"] .peak-list {
    color: #475569;
}

[data-theme="light"] .peak-list li strong {
    color: #0f172a;
}

/* ── FAQ Section ── */
[data-theme="light"] .faq-item {
    background: rgba(240, 244, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .faq-item h4 {
    color: #0f172a;
}

[data-theme="light"] .faq-item p {
    color: #475569;
}

/* ── Status Panel ── */
[data-theme="light"] .status-panel {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] #statusTitle {
    color: #0f172a;
}

[data-theme="light"] #statusDesc {
    color: #475569;
}

/* ── Error Banner ── */
[data-theme="light"] .error-banner {
    background: rgba(255, 240, 235, 0.95);
    border-left-color: var(--accent-orange);
}

/* ── Debug Panel ── */
[data-theme="light"] .debug-panel {
    background: rgba(240, 244, 255, 0.9);
}

[data-theme="light"] .debug-header {
    color: #0f172a;
}

/* ── Meta Tags ── */
[data-theme="light"] .meta-tag {
    color: #475569;
}

[data-theme="light"] .meta-tag strong {
    color: #0f172a;
}

/* ── Action Bar ── */
[data-theme="light"] .action-bar {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ── Navbar Badges ── */
[data-theme="light"] .badge-live,
[data-theme="light"] .badge-secure {
    background: rgba(0, 115, 200, 0.07);
    border-color: rgba(0, 115, 200, 0.15);
    color: #0f172a;
}

/* ── Footer ── */
[data-theme="light"] .app-footer {
    color: #64748b;
    border-top-color: rgba(0, 0, 0, 0.07);
}

/* ── Analytics Panel in Light Mode ── */
[data-theme="light"] #analyticsPanel {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .analytics-header h3 {
    color: #0f172a;
}

[data-theme="light"] .ana-row {
    background: rgba(240, 244, 255, 0.9);
}

[data-theme="light"] .countdown-section {
    background: rgba(240, 244, 255, 0.9);
}

/* ── Brand Titles ── */
[data-theme="light"] .brand-titles h1 {
    color: #0f172a;
}

[data-theme="light"] .brand-titles h1 span {
    color: var(--primary-cyan);
}

[data-theme="light"] .tagline {
    color: #64748b;
}

/* ── Quick Samples label ── */
[data-theme="light"] .quick-samples .sample-label {
    color: #64748b;
}

/* ── Select arrow color fix for light mode ── */
[data-theme="light"] select.calc-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23475569' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
