/* ==========================================================
   WIFI CAPTIVE PORTAL - PESANTREN PERSATUAN ISLAM 40 SARONGGE
   Modern Glassmorphism UI / UX Design System & Features
   ========================================================== */

:root {
    --bg-dark: #090d16;
    --card-bg: rgba(13, 22, 38, 0.84);
    --card-border: rgba(255, 255, 255, 0.09);
    --card-glow: rgba(16, 185, 129, 0.12);
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --blue-glow: rgba(37, 99, 235, 0.35);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --success-bg: rgba(16, 185, 129, 0.12);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* RTL Support for Arabic */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Amiri', system-ui, Tahoma, sans-serif;
}
[dir="rtl"] .top-nav-bar { flex-direction: row-reverse; }
[dir="rtl"] .user-name-row { flex-direction: row-reverse; }
[dir="rtl"] .speedtest-header { flex-direction: row-reverse; }
[dir="rtl"] .prayer-header { flex-direction: row-reverse; }
[dir="rtl"] .quote-header { flex-direction: row-reverse; }
[dir="rtl"] .bulletin-header { flex-direction: row-reverse; }
[dir="rtl"] .help-steps { padding-right: 1.25rem; padding-left: 0; }

/* Ambient Radial Glow Orbs */
.bg-mesh {
    background: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.09) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.09) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, #060911 0%, #020408 100%);
    background-attachment: fixed;
}

.ambient-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(95px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

.glow-top {
    top: -80px;
    left: -80px;
    background: radial-gradient(circle, #10b981, transparent 70%);
}

.glow-bottom {
    bottom: -80px;
    right: -80px;
    background: radial-gradient(circle, #2563eb, transparent 70%);
}

/* Portal Container Wrapper */
.portal-wrapper {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    position: relative;
    z-index: 10;
}

/* Top Toolbar */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 4px;
    gap: 8px;
}

.lang-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover { color: #ffffff; }

.lang-btn.active {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.top-action-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-pill-btn, .help-pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-pill-btn:hover, .help-pill-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

/* Glassmorphic Card Container */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 2rem 1.75rem;
    box-shadow: 
        0 24px 48px -12px rgba(0, 0, 0, 0.75),
        0 0 40px -10px var(--card-glow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.7), transparent);
    animation: borderGlow 7s linear infinite;
}

@keyframes borderGlow {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Portal Header */
.portal-header {
    text-align: center;
    margin-bottom: 1.35rem;
}

.logo-wrapper {
    display: inline-flex;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.portal-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.portal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.portal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Radar Pulse / Online Beacon */
.status-radar-box {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 0.65rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-core {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    position: relative;
    z-index: 2;
}

.radar-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.6);
    animation: radarPulse 2s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
    z-index: 1;
}

@keyframes radarPulse {
    0% { transform: scale(0.7); opacity: 1; }
    100% { transform: scale(1.45); opacity: 0; }
}

.badge-status-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.dot-online {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: blinkDot 2s ease-in-out infinite;
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Curfew Notice Banner */
.curfew-banner {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    padding: 0.75rem 0.95rem;
    margin-bottom: 1.15rem;
}

.curfew-icon { font-size: 1.35rem; flex-shrink: 0; }

.curfew-content strong {
    display: block;
    font-size: 0.8rem;
    color: #fbbf24;
    font-weight: 800;
}

.curfew-content p {
    font-size: 0.72rem;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.35;
}

/* Remote / Non-WiFi Network Notice Banner */
.remote-network-banner {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    padding: 0.75rem 0.95rem;
    margin-bottom: 1.15rem;
}

.remote-icon { font-size: 1.35rem; flex-shrink: 0; }

.remote-content strong {
    display: block;
    font-size: 0.8rem;
    color: #93c5fd;
    font-weight: 800;
}

.remote-content p {
    font-size: 0.72rem;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.35;
}

/* User Profile Box */
.user-profile-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.15rem;
}

.user-avatar-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.user-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.user-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.role-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.role-asatidz { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.role-santri { background: rgba(37, 99, 235, 0.18); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.3); }
.role-voucher { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.role-user { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.3); }

/* Countdown Timer Widget */
.timer-widget {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(0, 0, 0, 0.45));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 18px;
    padding: 1.15rem 1rem;
    text-align: center;
    margin-bottom: 1.15rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.timer-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    color: #94a3b8;
    text-transform: uppercase;
}

.timer-display {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1.75rem;
    font-weight: 900;
    color: #34d399;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    margin: 6px 0;
    text-shadow: 0 0 24px rgba(16, 185, 129, 0.4);
}

.timer-subtext {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.timer-subtext strong {
    color: #cbd5e1;
}

/* Speedtest Card Widget */
.speedtest-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.15rem;
}

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

.speedtest-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #e2e8f0;
}

.btn-run-speedtest {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-run-speedtest:hover {
    background: rgba(16, 185, 129, 0.3);
}

.speedtest-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.speed-box {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 4px;
}

.speed-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-dim);
    font-weight: 700;
}

.speed-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 2px;
}

.text-emerald { color: #34d399; }
.badge-great { color: #34d399; font-size: 0.72rem; font-weight: 800; }
.badge-good { color: #fbbf24; font-size: 0.72rem; font-weight: 800; }
.badge-fair { color: #f87171; font-size: 0.72rem; font-weight: 800; }

/* Technical Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.info-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.info-col-2 {
    grid-column: span 2;
}

.info-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

.info-icon svg {
    width: 16px;
    height: 16px;
}

.info-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.info-key {
    display: block;
    font-size: 0.66rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-val {
    display: block;
    font-size: 0.78rem;
    color: #e2e8f0;
    font-weight: 700;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ip-val {
    word-break: break-all;
    white-space: normal;
    line-height: 1.25;
}

/* Tabs Navigation */
.tabs-header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1.25rem;
    gap: 4px;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.08));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.65rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Action Buttons */
.btn-primary {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px -6px var(--primary-glow);
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-primary svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px var(--primary-glow);
}

.btn-google {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    border: none;
    border-radius: 14px;
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-google svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-google:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    width: 100%;
    padding: 0.8rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.btn-pwa-install {
    width: 100%;
    padding: 0.65rem 1rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.btn-pwa-install:hover {
    background: rgba(37, 99, 235, 0.25);
    color: #ffffff;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.15rem;
}

/* JADWAL SHOLAT CARD */
.prayer-widget {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(0, 0, 0, 0.35));
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    margin-top: 1.15rem;
}

.prayer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.prayer-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #34d399;
}

.prayer-location {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    text-align: center;
}

.prayer-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 6px 2px;
    position: relative;
    transition: all 0.2s;
}

.prayer-item.next-prayer {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.prayer-name {
    display: block;
    font-size: 0.66rem;
    color: var(--text-muted);
    font-weight: 700;
}

.prayer-item.next-prayer .prayer-name {
    color: #6ee7b7;
}

.prayer-time {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 2px;
}

.prayer-dot-glow {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

/* MUTIARA HIKMAH / HADITS CARD */
.islamic-quote-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    margin-top: 0.85rem;
    text-align: center;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.quote-tag {
    font-size: 0.68rem;
    font-weight: 800;
    color: #93c5fd;
}

.quote-source {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.quote-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.6;
    margin: 4px 0;
}

.quote-indo {
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.35;
}

/* Bulletin / Announcements from Google Calendar */
.bulletin-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.9rem 1.05rem;
    margin-top: 0.85rem;
    text-align: left;
    transition: all 0.2s ease;
}

.bulletin-card:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(0, 0, 0, 0.4));
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.bulletin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bulletin-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 7px;
    border-radius: 6px;
}

.bulletin-date { font-size: 0.68rem; color: var(--text-dim); font-weight: 600; }
.bulletin-title { font-size: 0.86rem; font-weight: 800; color: #ffffff; margin-top: 4px; }
.bulletin-desc { font-size: 0.74rem; color: #94a3b8; margin-top: 3px; line-height: 1.4; }

.bulletin-footer-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.7rem;
    font-weight: 700;
    color: #34d399;
    margin-top: 6px;
}

.cursor-pointer { cursor: pointer; }

/* Quick Services */
.quick-services {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.85rem;
    text-align: center;
}

.quick-title {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.quick-links-grid {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.quick-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-chip:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Google Tab Info */
.google-tab-content {
    text-align: center;
    padding: 0.35rem 0;
}

.google-info-card {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 16px;
    padding: 1.15rem 1rem;
    margin-bottom: 1.25rem;
}

.google-domain-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 0.65rem;
}

.domain-tag {
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(37, 99, 235, 0.4);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #93c5fd;
}

/* QR Code Scanner */
.qr-tab-content {
    text-align: center;
}

.qr-scanner-box {
    width: 100%;
    height: 200px;
    background: #000000;
    border: 2px dashed rgba(16, 185, 129, 0.4);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    box-shadow: 0 0 12px #10b981;
    animation: scanLaser 2s linear infinite;
}

@keyframes scanLaser {
    0% { top: 0%; }
    50% { top: 96%; }
    100% { top: 0%; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #0c1424;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    max-width: 450px;
    width: 100%;
    padding: 1.35rem;
    box-shadow: 0 24px 48px rgba(0,0,0,0.85);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-card.modal-lg {
    max-width: 720px;
}

.calendar-iframe-wrapper {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
}

.mac-platform-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.3);
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 0.85rem;
}

.mac-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}

.mac-tab-btn.active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.mac-platform-panel {
    display: none;
}

.mac-platform-panel.active {
    display: block;
}

.help-steps {
    padding-left: 1.25rem;
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.help-steps li { margin-bottom: 0.35rem; }
.help-steps strong { color: #ffffff; }

.modal-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    width: auto;
    display: inline-flex;
}

/* Alerts */
.alert-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* Footer */
.portal-footer {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 1.15rem;
    line-height: 1.4;
}

.portal-footer .copyright {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
}

body.theme-light .portal-footer .copyright {
    color: rgba(0, 0, 0, 0.45);
}

.dev-by-link {
    color: #34d399;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.dev-by-link:hover {
    color: #6ee7b7;
    text-decoration: underline;
}

body.theme-light .dev-by-link {
    color: #059669;
}

body.theme-light .dev-by-link:hover {
    color: #047857;
}

/* General Utilities */
.w-3-5 { width: 14px; }
.h-3-5 { height: 14px; }
.w-4 { width: 16px; }
.h-4 { height: 16px; }
.w-5 { width: 20px; }
.h-5 { height: 20px; }
.w-6 { width: 24px; }
.h-6 { height: 24px; }
.p-0 { padding: 0 !important; }
.flex-shrink-0 { flex-shrink: 0; }
.inline-block { display: inline-block; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.text-center { text-align: center; }

/* Responsive Adjustments for Mobile */
@media (max-width: 879px) {
    .portal-wrapper {
        max-width: 480px;
        padding: 1.25rem 0.85rem;
    }

    .portal-desktop-grid {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .portal-col-sidebar {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 1.25rem;
    }

    body.theme-light .portal-col-sidebar {
        border-top-color: rgba(0, 0, 0, 0.08);
    }
}

@media (max-width: 480px) {
    .portal-wrapper {
        padding: 0.85rem 0.65rem;
    }

    .glass-card {
        padding: 1.5rem 1.15rem;
        border-radius: 22px;
    }

    .portal-title {
        font-size: 1.3rem;
    }

    .timer-display {
        font-size: 1.45rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-col-2 {
        grid-column: span 1;
    }

    .speedtest-results {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ==========================================================
   DESKTOP WIDESCREEN 2-COLUMN LAYOUT (PC & LAPTOP)
   ========================================================== */
@media (min-width: 880px) {
    .portal-wrapper {
        max-width: 1040px;
        padding: 2.25rem 1.5rem;
    }

    .glass-card {
        max-width: 1000px;
        padding: 2.5rem 2.75rem;
        border-radius: 32px;
    }

    .portal-desktop-grid {
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        gap: 2.5rem;
        align-items: start;
    }

    .portal-col-main {
        display: flex;
        flex-direction: column;
    }

    .portal-col-sidebar {
        display: flex;
        flex-direction: column;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 2.25rem;
    }

    body.theme-light .portal-col-sidebar {
        border-left-color: rgba(0, 0, 0, 0.08);
    }

    [dir="rtl"] .portal-col-sidebar {
        border-left: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 0;
        padding-right: 2.25rem;
    }

    .portal-col-sidebar .prayer-widget {
        margin-top: 0;
    }

    .status-card .portal-desktop-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* ==========================================================
   LIGHT THEME OVERRIDES (TEMA TERANG)
   ========================================================== */
body.theme-light {
    --bg-dark: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.94);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-glow: rgba(16, 185, 129, 0.15);
    --text-main: #0f172a;
    --text-muted: #334155;
    --text-dim: #64748b;
}

body.theme-light.bg-mesh {
    background: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%);
    background-attachment: fixed;
}

body.theme-light .glass-card {
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.theme-light .portal-title { color: #0f172a; }
body.theme-light .portal-subtitle { color: #64748b; }

body.theme-light .lang-switcher {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .lang-btn { color: #64748b; }
body.theme-light .lang-btn:hover { color: #0f172a; }

body.theme-light .nav-pill-btn, 
body.theme-light .help-pill-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.12);
    color: #475569;
}
body.theme-light .nav-pill-btn:hover, 
body.theme-light .help-pill-btn:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

body.theme-light .tabs-header {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
body.theme-light .tab-btn { 
    color: #475569; 
    font-weight: 700;
}
body.theme-light .tab-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.04);
}
body.theme-light .tab-btn.active {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* High Contrast Banners for Light Mode */
body.theme-light .remote-network-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
body.theme-light .remote-content strong {
    color: #1e40af;
}
body.theme-light .remote-content p {
    color: #334155;
    font-weight: 500;
}

body.theme-light .curfew-banner {
    background: #fef3c7;
    border: 1px solid #fde68a;
}
body.theme-light .curfew-content strong {
    color: #92400e;
}
body.theme-light .curfew-content p {
    color: #78350f;
    font-weight: 500;
}

body.theme-light .form-label { 
    color: #1e293b; 
    font-weight: 700;
}
body.theme-light .form-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
body.theme-light .form-input::placeholder {
    color: #94a3b8;
}
body.theme-light .form-input:focus {
    background: #ffffff;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

body.theme-light .google-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.theme-light .google-info-card p { 
    color: #0f172a; 
    font-weight: 700;
}
body.theme-light .domain-tag {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    font-weight: 700;
}
body.theme-light .btn-google {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
body.theme-light .btn-google:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

body.theme-light .prayer-widget {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.theme-light .prayer-title { 
    color: #0f172a; 
    font-weight: 800;
}
body.theme-light .prayer-location { 
    color: #475569; 
    font-weight: 600;
}
body.theme-light .prayer-name {
    color: #64748b;
    font-weight: 700;
}
body.theme-light .prayer-item {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
body.theme-light .prayer-item.next-prayer {
    background: #ecfdf5;
    border: 1.5px solid #10b981;
}
body.theme-light .prayer-item.next-prayer .prayer-name {
    color: #059669;
}
body.theme-light .prayer-item.next-prayer .prayer-time {
    color: #047857;
    font-weight: 800;
}
body.theme-light .prayer-time { 
    color: #0f172a; 
    font-weight: 700;
}

body.theme-light .islamic-quote-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.theme-light .quote-tag { 
    color: #2563eb; 
    font-weight: 800;
}
body.theme-light .quote-source { 
    color: #64748b; 
    font-weight: 700;
}
body.theme-light .quote-arabic { 
    color: #0f172a; 
}
body.theme-light .quote-indo { 
    color: #334155; 
    font-weight: 500;
}

body.theme-light .bulletin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
body.theme-light .bulletin-tag {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}
body.theme-light .bulletin-date {
    color: #475569;
    font-weight: 700;
}
body.theme-light .bulletin-title { 
    color: #0f172a; 
    font-weight: 800;
}
body.theme-light .bulletin-desc { 
    color: #334155; 
    font-weight: 500;
}

body.theme-light .btn-pwa-install {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-weight: 700;
}
body.theme-light .btn-pwa-install:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

body.theme-light .user-profile-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.theme-light .user-name { 
    color: #0f172a; 
}
body.theme-light .user-email {
    color: #475569;
}
body.theme-light .timer-widget {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(255, 255, 255, 0.8));
    border: 1.5px solid #10b981;
}
body.theme-light .timer-badge {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
body.theme-light .timer-display { 
    color: #047857; 
    text-shadow: none; 
}
body.theme-light .timer-subtext {
    color: #475569;
}
body.theme-light .timer-subtext strong {
    color: #0f172a;
}
body.theme-light .info-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
body.theme-light .info-key {
    color: #64748b;
    font-weight: 700;
}
body.theme-light .info-val { 
    color: #0f172a; 
}
body.theme-light .speedtest-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.theme-light .speedtest-title strong {
    color: #0f172a;
}
body.theme-light .speed-box { 
    background: #ffffff; 
    border: 1px solid #e2e8f0;
}
body.theme-light .speed-val { 
    color: #0f172a; 
}

body.theme-light .quick-services {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
body.theme-light .quick-title {
    color: #475569;
}
body.theme-light .quick-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 700;
}
body.theme-light .quick-chip:hover {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

body.theme-light .portal-footer p {
    color: #475569;
    font-weight: 600;
}
body.theme-light .portal-footer .font-mono {
    color: #0f172a !important;
    font-weight: 700;
}

body.theme-light .modal-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}
body.theme-light .modal-header { border-bottom: 1px solid #f1f5f9; }
body.theme-light .modal-header h3 { color: #0f172a; }
body.theme-light .modal-close-btn { color: #64748b; }
body.theme-light .modal-footer { border-top: 1px solid #f1f5f9; }
body.theme-light .help-steps li { color: #334155; }
body.theme-light .help-steps li strong { color: #0f172a; }
body.theme-light .mac-platform-tabs {
    background: #f1f5f9;
}
body.theme-light .mac-tab-btn {
    background: transparent;
    border: none;
    color: #64748b;
}
body.theme-light .mac-tab-btn.active {
    background: #10b981;
    color: #ffffff;
}
