@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

/* ============================================================
   DIATASI COMMAND CENTER - Premium Government Dashboard CSS
   Lapas Kelas IIA Serang | PKA Aksi Perubahan 2024
   Version: 2.0 Command Center Edition
   ============================================================ */

/* ─── CSS CUSTOM PROPERTIES ──────────────────────────────── */
:root {
    --primary:        #0f766e;
    --primary-light:  #14b8a6;
    --primary-dark:   #0d5f58;
    --primary-glow:   rgba(20, 184, 166, 0.4);
    --primary-rgb:    15, 118, 110;

    --accent:         #06b6d4;
    --accent-glow:    rgba(6, 182, 212, 0.35);

    --danger:         #ef4444;
    --danger-glow:    rgba(239, 68, 68, 0.45);
    --warning:        #f59e0b;
    --warning-glow:   rgba(245, 158, 11, 0.4);
    --success:        #22c55e;
    --success-glow:   rgba(34, 197, 94, 0.4);
    --info:           #06b6d4;
    --purple:         #8b5cf6;

    /* ── LIGHT MODE ── */
    --bg-body:        #f0f4f8;
    --bg-card:        #ffffff;
    --bg-sidebar:     #0d5f58;
    --bg-nav:         rgba(255,255,255,0.92);
    --text-main:      #0f172a;
    --text-muted:     #64748b;
    --text-subtle:    #475569;
    --text-heading:   #0f172a;
    --border-color:   #cbd5e1;
    --border-glow:    rgba(15,118,110,0.2);
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:      0 4px 12px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg:      0 15px 35px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.07);
    --glass-bg:       rgba(255,255,255,0.88);
    --glass-border:   rgba(15,118,110,0.18);
    --scanner-color:  rgba(15,118,110,0.08);

    --font-heading:   'Outfit', sans-serif;
    --font-body:      'Inter', sans-serif;
    --font-mono:      'Share Tech Mono', monospace;
}

/* ── DARK MODE (DEFAULT - Command Center) ── */
[data-theme="dark"] {
    --bg-body:        #050a12;
    --bg-card:        rgba(10, 18, 32, 0.88);
    --bg-sidebar:     #061018;
    --bg-nav:         rgba(5, 10, 18, 0.96);
    --text-main:      #e2e8f0;
    --text-muted:     #94a3b8;
    --text-subtle:    #cbd5e1;
    --text-heading:   #f8fafc;
    --border-color:   rgba(20, 184, 166, 0.15);
    --border-glow:    rgba(20, 184, 166, 0.35);
    --shadow-sm:      0 0 8px rgba(20,184,166,0.08);
    --shadow-md:      0 0 20px rgba(20,184,166,0.15);
    --shadow-lg:      0 0 40px rgba(20,184,166,0.3);
    --glass-bg:       rgba(10, 18, 32, 0.88);
    --glass-border:   rgba(20, 184, 166, 0.2);
    --scanner-color:  rgba(20, 184, 166, 0.04);
}

/* ── DARK MODE BODY - TACTICAL GRID BACKGROUND ── */
[data-theme="dark"] body {
    background-color: #050a12;
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(15,118,110,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.05) 0%, transparent 50%),
        linear-gradient(rgba(20,184,166,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,184,166,0.035) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
}

/* Corner vignette overlay */
[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(5,10,18,0.7) 100%);
    pointer-events: none;
    z-index: 0;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-heading);
}

/* ─── LOADING SCREEN ─────────────────────────────────────── */
#loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #050a12;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(20,184,166,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,184,166,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.loader-logo {
    width: 90px;
    height: 90px;
    animation: loader-pulse 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(20,184,166,0.6));
    position: relative;
    z-index: 1;
}

@keyframes loader-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.85; filter: drop-shadow(0 0 15px rgba(20,184,166,0.5)); }
    50%       { transform: scale(1.05); opacity: 1;    filter: drop-shadow(0 0 30px rgba(20,184,166,0.9)); }
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(20,184,166,0.15);
    border-top: 3px solid #14b8a6;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    box-shadow: 0 0 20px rgba(20,184,166,0.3);
    position: relative;
    z-index: 1;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #14b8a6;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: text-flicker 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes text-flicker {
    0%, 95%, 100% { opacity: 1; }
    97%            { opacity: 0.3; }
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── SCROLL PROGRESS BAR ────────────────────────────────── */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9998;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 8px rgba(20,184,166,0.7);
    width: 0%;
    transition: width 0.1s linear;
}

/* ─── NAVBAR / TOP COMMAND BAR ───────────────────────────── */
.navbar-custom {
    background: var(--bg-nav);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    z-index: 1030;
    padding: 0;
    min-height: 64px;
}

[data-theme="dark"] .navbar-custom {
    border-bottom: 1px solid rgba(20,184,166,0.2);
    box-shadow: 0 2px 30px rgba(0,0,0,0.5), 0 0 0 0 transparent;
}

/* Top accent line on navbar */
[data-theme="dark"] .navbar-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
    background-size: 200% 100%;
    animation: nav-sweep 4s linear infinite;
}

@keyframes nav-sweep {
    0%   { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.navbar-brand {
    padding: 10px 0;
    text-decoration: none !important;
}

.navbar-brand img, .navbar-brand svg {
    height: 48px;
    width: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(20,184,166,0.3));
}

.brand-text { line-height: 1.15; }

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

[data-theme="dark"] .brand-title {
    color: #14b8a6;
    text-shadow: 0 0 10px rgba(20,184,166,0.5);
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Status indicators in navbar */
.nav-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.nav-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
    animation: blink 2s ease-in-out infinite;
}

.nav-live-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary-light);
    background: rgba(20,184,166,0.08);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main) !important;
    padding: 0.6rem 0.9rem !important;
    border-radius: 6px;
    transition: all 0.25s ease;
    position: relative;
    letter-spacing: 0.3px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--primary-light);
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-light) !important;
    background: rgba(20,184,166,0.07);
}

.nav-link:hover::after, .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active {
    color: #14b8a6 !important;
    background: rgba(20,184,166,0.1);
    text-shadow: 0 0 8px rgba(20,184,166,0.4);
}

/* Dropdown Menu */
.dropdown-menu {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
    padding: 8px !important;
    animation: dropdown-appear 0.2s ease;
}

@keyframes dropdown-appear {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--text-main) !important;
    font-size: 0.875rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(20,184,166,0.12) !important;
    color: var(--primary-light) !important;
    padding-left: 18px !important;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: rgba(20,184,166,0.08);
    border: 1px solid var(--glass-border);
    font-size: 1rem;
    color: var(--text-main);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    background: rgba(20,184,166,0.2);
    color: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Search Box */
.search-container {
    position: relative;
    width: 170px;
    max-width: 230px;
    flex-shrink: 0;
}

.search-input {
    border-radius: 8px;
    padding-left: 36px;
    height: 38px;
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--text-main);
    font-size: 0.85rem;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .search-input {
    background: rgba(20,184,166,0.05);
    border-color: var(--glass-border);
    color: var(--text-main);
}

.search-input::placeholder { color: var(--text-muted); font-size: 0.82rem; }

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
    background: var(--bg-card);
}

[data-theme="dark"] .search-input:focus {
    background: rgba(20,184,166,0.08);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15), 0 0 15px rgba(20,184,166,0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ─── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb-container {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
}

[data-theme="dark"] .breadcrumb-container {
    background: rgba(10,18,32,0.8);
    border-bottom: 1px solid rgba(20,184,166,0.1);
}

.breadcrumb { margin-bottom: 0; font-size: 0.8rem; }

.breadcrumb-item a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-item.active { color: var(--text-muted); }

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
}

/* ─── HERO SECTION ───────────────────────────────────────── */
.hero-section {
    position: relative;
    color: white;
    padding: 65px 0 60px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #0d9488 100%);
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(180deg, #040812 0%, #071018 60%, #04080f 100%);
    border-bottom: 1px solid rgba(20,184,166,0.2);
}

/* Hero Grid BG */
[data-theme="dark"] .hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(20,184,166,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,184,166,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Hero glowing orbs */
[data-theme="dark"] .hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(15,118,110,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 40%, rgba(6,182,212,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-scanline {
    position: absolute;
    top: -2%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, var(--primary-light) 50%, transparent 95%);
    box-shadow: 0 0 15px var(--primary-light);
    animation: scanline-move 10s infinite linear;
    z-index: 4;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes scanline-move {
    0%   { top: -2%; }
    100% { top: 102%; }
}

.hero-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    position: relative;
    z-index: 5;
    animation: hero-logo-float 4s ease-in-out infinite;
}

@keyframes hero-logo-float {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
    50%       { transform: translateY(-6px); filter: drop-shadow(0 12px 20px rgba(0,0,0,0.4)) drop-shadow(0 0 20px rgba(20,184,166,0.3)); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: rgba(20,184,166,0.15);
    border: 1px solid rgba(20,184,166,0.35);
    color: #5eead4;
    padding: 5px 14px;
    border-radius: 4px;
    letter-spacing: 2px;
    margin-bottom: 16px;
    position: relative;
    z-index: 5;
    text-transform: uppercase;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
    animation: blink 1.5s ease-in-out infinite;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    line-height: 1.1;
    position: relative;
    z-index: 5;
}

[data-theme="dark"] .hero-title {
    color: #f1f5f9;
    text-shadow: 0 0 30px rgba(20,184,166,0.4), 0 0 60px rgba(20,184,166,0.15);
}

.hero-acronym {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 50%, #14b8a6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite;
    letter-spacing: 4px;
    line-height: 1;
    margin: 6px 0;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50%       { background-position: 100% center; }
}

.hero-subtitle-text {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.85;
    margin-bottom: 16px;
    letter-spacing: 1px;
    position: relative;
    z-index: 5;
}

.hero-tagline {
    display: inline-block;
    font-style: italic;
    font-size: 1rem;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 24px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 5;
}

[data-theme="dark"] .hero-tagline {
    background: rgba(20,184,166,0.08);
    border-color: rgba(20,184,166,0.25);
    color: #a7f3d0;
    box-shadow: 0 0 20px rgba(20,184,166,0.1);
}

/* Tombol CTA di hero — background gelap, teks outline harus terang */
.hero-section .btn-outline-teal {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.hero-section .btn-outline-teal i {
    color: #ffffff !important;
}

.hero-section .btn-outline-teal:hover,
.hero-section .btn-outline-teal:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.22) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
}

.hero-section .btn-outline-teal:hover i,
.hero-section .btn-outline-teal:focus i {
    color: #ffffff !important;
}

.hero-section .btn-teal {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* Hero Stats Row */
.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    position: relative;
    z-index: 5;
    flex-wrap: wrap;
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: #14b8a6;
    line-height: 1;
    display: block;
}

[data-theme="dark"] .hero-stat-number {
    text-shadow: 0 0 15px rgba(20,184,166,0.6);
}

.hero-stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

.hero-stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.15);
    align-self: stretch;
}

/* ─── SYSTEM STATUS BAR ──────────────────────────────────── */
.system-status-bar {
    background: rgba(5,10,18,0.95);
    border-bottom: 1px solid rgba(20,184,166,0.15);
    padding: 6px 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: none;
}

[data-theme="dark"] .system-status-bar {
    display: block;
}

.status-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    border-right: 1px solid rgba(20,184,166,0.12);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.online   { background: var(--success); box-shadow: 0 0 6px var(--success-glow); animation: blink 2s ease-in-out infinite; }
.status-dot.warning  { background: var(--warning); box-shadow: 0 0 6px var(--warning-glow); animation: blink 1s ease-in-out infinite; }
.status-dot.ok       { background: #14b8a6;         box-shadow: 0 0 6px var(--primary-glow); }

/* ─── STATISTICS PANEL ───────────────────────────────────── */
.stats-section {
    padding: 40px 0;
    position: relative;
}

.stats-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .stats-card {
    background: rgba(10, 18, 32, 0.7);
    border-color: rgba(20,184,166,0.12);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.stats-card:hover::before { opacity: 1; }

.stats-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

[data-theme="dark"] .stats-card:hover {
    border-color: rgba(20,184,166,0.4);
    box-shadow: 0 0 30px rgba(20,184,166,0.2), 0 20px 40px rgba(0,0,0,0.3);
    background: rgba(10, 18, 32, 0.9);
}

.stats-icon {
    font-size: 1.8rem;
    color: var(--primary-light);
    margin-bottom: 12px;
    display: block;
}

[data-theme="dark"] .stats-icon {
    text-shadow: 0 0 12px var(--primary-glow);
}

.stats-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-heading);
    line-height: 1;
    margin-bottom: 6px;
}

[data-theme="dark"] .stats-number {
    color: #14b8a6;
    text-shadow: 0 0 10px rgba(20,184,166,0.4);
}

.stats-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

[data-theme="dark"] .stats-label {
    color: var(--text-subtle);
}

/* ─── SECTION HEADERS ────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    background: rgba(20,184,166,0.08);
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid rgba(20,184,166,0.2);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 12px;
    line-height: 1.2;
}

[data-theme="dark"] .section-title {
    text-shadow: 0 0 20px rgba(20,184,166,0.2);
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.section-divider-line {
    height: 2px;
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--primary-light));
    border-radius: 2px;
}

.section-divider-line.right {
    background: linear-gradient(90deg, var(--primary-light), transparent);
}

.section-divider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* ─── SOP MODULE CARDS ───────────────────────────────────── */
.sop-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .sop-card {
    background: rgba(10, 18, 32, 0.7);
    border-color: rgba(20,184,166,0.1);
}

.sop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sop-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20,184,166,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.sop-card:hover::before { opacity: 1; }
.sop-card:hover::after  { opacity: 1; }

.sop-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

[data-theme="dark"] .sop-card:hover {
    box-shadow: 0 0 30px rgba(20,184,166,0.25), 0 25px 50px rgba(0,0,0,0.4);
    border-color: rgba(20,184,166,0.4);
    background: rgba(10, 18, 32, 0.9);
}

.sop-card-body {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sop-card-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
    transition: all 0.3s ease;
    position: relative;
}

.sop-card-icon-wrap.danger   { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.sop-card-icon-wrap.primary  { background: rgba(59,130,246,0.1); color: #3b82f6;       border: 1px solid rgba(59,130,246,0.2); }
.sop-card-icon-wrap.success  { background: rgba(34,197,94,0.1);  color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.sop-card-icon-wrap.warning  { background: rgba(245,158,11,0.1); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.sop-card-icon-wrap.info     { background: rgba(6,182,212,0.1);  color: var(--info);    border: 1px solid rgba(6,182,212,0.2); }
.sop-card-icon-wrap.purple   { background: rgba(139,92,246,0.1); color: var(--purple);  border: 1px solid rgba(139,92,246,0.2); }
.sop-card-icon-wrap.teal     { background: rgba(20,184,166,0.1); color: var(--primary-light); border: 1px solid rgba(20,184,166,0.2); }
.sop-card-icon-wrap.muted    { background: rgba(100,116,139,0.1); color: var(--text-muted);  border: 1px solid rgba(100,116,139,0.2); }

.sop-card:hover .sop-card-icon-wrap { transform: scale(1.1) rotate(-3deg); }

[data-theme="dark"] .sop-card:hover .sop-card-icon-wrap.danger  { box-shadow: 0 0 15px var(--danger-glow); }
[data-theme="dark"] .sop-card:hover .sop-card-icon-wrap.success { box-shadow: 0 0 15px var(--success-glow); }
[data-theme="dark"] .sop-card:hover .sop-card-icon-wrap.info    { box-shadow: 0 0 15px var(--accent-glow); }

.sop-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-heading);
    line-height: 1.3;
}

.sop-card-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.sop-card-footer {
    padding: 14px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-light);
    background: rgba(20,184,166,0.03);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .sop-card-footer {
    border-top-color: rgba(20,184,166,0.1);
    background: rgba(20,184,166,0.04);
}

.sop-card-footer i { transition: transform 0.2s ease; }
.sop-card:hover .sop-card-footer i { transform: translateX(5px); }

/* ─── MODULE CONTENT CARD ────────────────────────────────── */
.card-module {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 30px;
    backdrop-filter: blur(12px);
    transition: box-shadow 0.3s, border-color 0.3s;
}

[data-theme="dark"] .card-module {
    background: rgba(10, 18, 32, 0.7);
    border-color: rgba(20,184,166,0.12);
}

[data-theme="dark"] .card-module:hover {
    box-shadow: 0 0 30px rgba(20,184,166,0.2);
    border-color: rgba(20,184,166,0.3);
}

.module-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

[data-theme="dark"] .module-header { border-bottom-color: rgba(20,184,166,0.15); }

.module-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .module-title { text-shadow: 0 0 10px rgba(20,184,166,0.3); }

.sop-meta-badge {
    background: rgba(20,184,166,0.1);
    color: var(--primary-light);
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    border: 1px solid rgba(20,184,166,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── TIMELINE ───────────────────────────────────────────── */
.timeline-vertical {
    position: relative;
    padding-left: 32px;
    border-left: 2px solid var(--border-color);
    margin-left: 10px;
}

[data-theme="dark"] .timeline-vertical { border-left-color: rgba(20,184,166,0.2); }

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--primary-light);
    z-index: 2;
    transition: all 0.3s;
}

.timeline-item:hover::before {
    background: var(--primary-light);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-time {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-heading);
}

.timeline-body {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── FLOWCHART MERMAID ──────────────────────────────────── */
.flowchart-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .flowchart-wrapper {
    background: rgba(10,18,32,0.7);
    border-color: rgba(20,184,166,0.12);
}

.mermaid { cursor: pointer; }
.mermaid .node rect, .mermaid .node circle, .mermaid .node polygon {
    fill: rgba(20,184,166,0.1) !important;
    stroke: var(--primary-light) !important;
    stroke-width: 1.5px !important;
    transition: all 0.3s;
}
.mermaid .node:hover rect { fill: var(--primary) !important; }
.mermaid .node:hover .nodeLabel { color: #fff !important; }

/* ─── MOCKUP CANVAS ──────────────────────────────────────── */
.mockup-canvas {
    background: #0a1220;
    border-radius: 16px;
    border: 1px solid rgba(20,184,166,0.2);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.5), 0 0 20px rgba(20,184,166,0.1);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── PANIC SIMULATOR ────────────────────────────────────── */
.panic-simulator {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0d1a2e 0%, #060c16 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    color: white;
}

.panic-sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(20,184,166,0.15);
    padding-bottom: 10px;
}

.panic-sim-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 16px;
}

.panic-sim-btn {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ef4444 0%, #b91c1c 60%, #991b1b 100%);
    border: 10px solid rgba(239,68,68,0.2);
    box-shadow: 0 0 40px rgba(239,68,68,0.5), inset 0 2px 4px rgba(255,255,255,0.1);
    color: white;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    animation: alarm-pulse 2s infinite;
}

.panic-sim-btn:active {
    transform: scale(0.93);
    box-shadow: 0 0 20px rgba(239,68,68,0.8);
}

.panic-sim-btn i { font-size: 2.5rem; margin-bottom: 6px; }

@keyframes alarm-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.7), 0 0 40px rgba(239,68,68,0.4); }
    70%  { box-shadow: 0 0 0 25px rgba(239,68,68,0), 0 0 40px rgba(239,68,68,0.4); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0), 0 0 40px rgba(239,68,68,0.4); }
}

.panic-sim-footer {
    display: flex;
    justify-content: space-around;
    font-size: 0.72rem;
    color: #64748b;
    background: rgba(255,255,255,0.04);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* ─── QR SCANNER SIMULATOR ───────────────────────────────── */
.qr-scanner-sim {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.qr-scan-window {
    width: 200px;
    height: 200px;
    border: 3px solid var(--primary-light);
    border-radius: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2000px rgba(0,0,0,0.6), 0 0 20px rgba(20,184,166,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-scan-line {
    width: 100%;
    height: 2px;
    background: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-light);
    position: absolute;
    top: 0;
    left: 0;
    animation: scan-move 2.5s infinite linear;
}

.qr-scan-window::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px;
    width: 18px; height: 18px;
    border-top: 3px solid var(--primary-light);
    border-left: 3px solid var(--primary-light);
}

.qr-scan-window::after {
    content: '';
    position: absolute;
    top: -2px; right: -2px;
    width: 18px; height: 18px;
    border-top: 3px solid var(--primary-light);
    border-right: 3px solid var(--primary-light);
}

@keyframes scan-move {
    0%   { top: 0; }
    50%  { top: 100%; }
    100% { top: 0; }
}

.qr-mock-code {
    width: 130px; height: 130px;
    background: white;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 3.5rem;
}

/* ─── LIVE MAP ───────────────────────────────────────────── */
#map-container {
    height: 500px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

[data-theme="dark"] #map-container {
    border-color: rgba(20,184,166,0.2);
    box-shadow: 0 0 30px rgba(0,0,0,0.5), 0 0 15px rgba(20,184,166,0.1);
}

.panel-monitoring {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    height: 500px;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .panel-monitoring {
    background: rgba(10,18,32,0.8);
    border-color: rgba(20,184,166,0.15);
}

.panel-monitoring-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(20,184,166,0.05);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .panel-monitoring-header {
    border-bottom-color: rgba(20,184,166,0.15);
    background: rgba(20,184,166,0.05);
}

.panel-monitoring-list { flex-grow: 1; overflow-y: auto; padding: 12px 16px; }

.panel-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.panel-item:hover {
    background: rgba(20,184,166,0.06);
    border-color: rgba(20,184,166,0.15);
}

.panel-item-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(20,184,166,0.1);
    border: 1px solid rgba(20,184,166,0.2);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

.panel-item-info { flex-grow: 1; }
.panel-item-name { font-weight: 600; font-size: 0.875rem; color: var(--text-main); }
.panel-item-role { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }

.panel-status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.panel-status-dot.online  { background: var(--success);  box-shadow: 0 0 8px var(--success-glow);  animation: blink 2s ease-in-out infinite; }
.panel-status-dot.offline { background: var(--text-muted); }
.panel-status-dot.panic   { background: var(--danger);   box-shadow: 0 0 8px var(--danger-glow);   animation: blink 0.7s infinite; }

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

/* Leaflet Blink Marker */
.leaflet-blink-marker {
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 15px var(--danger);
    animation: blink 0.8s infinite;
}

/* ─── GALLERY ────────────────────────────────────────────── */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn-filter {
    border-radius: 50px;
    padding: 7px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    transition: all 0.25s;
    font-family: var(--font-heading);
}

.btn-filter.active, .btn-filter:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

[data-theme="dark"] .gallery-item { border-color: rgba(20,184,166,0.1); }

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .gallery-item:hover { box-shadow: 0 0 25px rgba(20,184,166,0.2); }

.gallery-img-wrapper { position: relative; overflow: hidden; aspect-ratio: 4/3; background: #0a1220; }

.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.06); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,118,110,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-view-icon {
    color: white;
    font-size: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-view-icon { transform: translateY(0); }

.gallery-desc { padding: 14px 16px; }
.gallery-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; color: var(--text-main); }
.gallery-cat { font-size: 0.72rem; color: var(--primary-light); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-mono); }

/* ─── LIGHTBOX ───────────────────────────────────────────── */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(5,10,18,0.97);
    justify-content: center;
    align-items: center;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.6);
    border: 2px solid rgba(20,184,166,0.3);
}

.lightbox-caption {
    color: white;
    margin-top: 14px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-heading);
}

.lightbox-close {
    position: absolute;
    top: -42px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}

.lightbox-close:hover { color: var(--primary-light); }

/* ─── DOWNLOAD CENTER ────────────────────────────────────── */
.download-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

[data-theme="dark"] .download-item { border-color: rgba(20,184,166,0.1); background: rgba(10,18,32,0.6); }

.download-item:hover {
    border-color: var(--primary-light);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .download-item:hover { box-shadow: 0 0 20px rgba(20,184,166,0.15); }

.download-item-info { display: flex; align-items: center; gap: 15px; }
.download-icon { font-size: 1.7rem; color: var(--danger); }
.download-title { font-weight: 700; margin-bottom: 2px; color: var(--text-main); font-size: 0.9rem; }
.download-size { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ─── QR CODE ────────────────────────────────────────────── */
.sop-qr-code {
    background: white;
    padding: 10px;
    border-radius: 10px;
    display: inline-block;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer-custom {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    margin-top: auto;
    text-align: center;
    position: relative;
}

[data-theme="dark"] .footer-custom {
    background: rgba(5,10,18,0.95);
    border-top: 1px solid rgba(20,184,166,0.15);
}

[data-theme="dark"] .footer-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(20,184,166,0.5), transparent);
}

.footer-logo { height: 38px; margin-bottom: 10px; opacity: 0.7; }

/* ─── TELEMETRY BARS ─────────────────────────────────────── */
.telemetry-progress {
    height: 8px !important;
    background: rgba(255,255,255,0.05) !important;
    border-radius: 4px;
    overflow: visible !important;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.telemetry-progress .progress-bar {
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

[data-theme="dark"] .telemetry-progress .progress-bar::after {
    content: '';
    position: absolute;
    top: 50%; right: 0;
    transform: translate(50%, -50%);
    width: 12px; height: 12px;
    border-radius: 50%;
    background-color: inherit;
    box-shadow: 0 0 10px currentColor;
    border: 2px solid #fff;
}

/* ─── GLASS TABLE ────────────────────────────────────────── */
.table-glass { border-collapse: separate !important; border-spacing: 0 5px !important; }
.table-glass tr { background: transparent !important; }
.table-glass td, .table-glass th { border: none !important; padding: 12px 16px !important; }

[data-theme="dark"] .table-glass tbody tr {
    background: rgba(10,18,32,0.5) !important;
    transition: all 0.25s;
}

[data-theme="dark"] .table-glass tbody tr:hover {
    background: rgba(10,18,32,0.85) !important;
    box-shadow: inset 0 0 15px rgba(20,184,166,0.1);
}

[data-theme="dark"] .table-glass thead th {
    background: rgba(5,10,18,0.8) !important;
    color: var(--primary-light) !important;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(20,184,166,0.2) !important;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-teal {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-teal:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline-teal {
    color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
    background: transparent !important;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-teal:hover {
    background: var(--primary) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.border-teal { border-color: var(--primary-light) !important; }

.bg-light-section { background: rgba(15,118,110,0.03) !important; }

[data-theme="dark"] .bg-light-section { background: rgba(20,184,166,0.025) !important; }

/* ─── CUSTOM SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: rgba(20,184,166,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(20,184,166,0.6); }

/* ─── LEAFLET DARK OVERRIDES ─────────────────────────────── */
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
    background: rgba(10,18,32,0.97) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(20,184,166,0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

[data-theme="dark"] .leaflet-container { background: #050a12 !important; }
[data-theme="dark"] .leaflet-popup-content h6 { color: #14b8a6 !important; font-weight: 700; }
[data-theme="dark"] .leaflet-bar a {
    background: #0a1220 !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(20,184,166,0.2) !important;
}

[data-theme="dark"] .leaflet-bar a:hover { background: var(--primary) !important; }

/* ─── PRINT STYLES ───────────────────────────────────────── */
@media print {
    body { background: white !important; color: black !important; }
    .navbar-custom, .breadcrumb-container, .hero-section, .stats-card,
    .no-print, .btn, .dark-mode-toggle, .search-container, #loader-wrapper,
    .footer-custom, .flowchart-wrapper, .mockup-canvas, #map-container,
    .scroll-progress-container, .system-status-bar { display: none !important; }
    .card-module { border: none !important; box-shadow: none !important; padding: 0 !important; }
    .print-only-flowchart { display: block !important; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section { padding: 50px 0 45px; }
    .hero-title   { font-size: 1.4rem; }
    .hero-acronym { font-size: 2.5rem; }
    .hero-stats-row { gap: 15px; }
    .hero-stat-divider { display: none; }
    .card-module { padding: 20px; }
    .system-status-bar { display: none !important; }
    .nav-status-bar, .nav-live-time { display: none !important; }
}

/* ─── UTILITY ANIMATIONS ─────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 10px var(--primary-glow); }
    50%       { box-shadow: 0 0 25px var(--primary-glow), 0 0 50px rgba(20,184,166,0.1); }
}

.animate-glow { animation: glow-pulse 3s ease-in-out infinite; }

/* Glassmorphism helper */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Neon text helper */
[data-theme="dark"] .neon-text {
    color: #14b8a6;
    text-shadow: 0 0 10px rgba(20,184,166,0.6), 0 0 20px rgba(20,184,166,0.3);
}

/* Separator - Command Center style */
.cc-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 24px 0;
}

[data-theme="dark"] .cc-divider {
    background: linear-gradient(90deg, transparent, rgba(20,184,166,0.2), transparent);
}

/* ─── DIATASI SMART PORTAL ───────────────────────────────── */
.portal-navbar .nav-link { font-size: 0.82rem; white-space: nowrap; }

.dropdown-menu-portal {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    min-width: 220px;
}

[data-theme="dark"] .dropdown-menu-portal {
    background: rgba(10, 18, 32, 0.97) !important;
    border-color: rgba(20,184,166,0.15) !important;
    backdrop-filter: blur(16px);
}

.dropdown-menu-portal .dropdown-item {
    color: var(--text-main) !important;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.dropdown-menu-portal .dropdown-item:hover,
.dropdown-menu-portal .dropdown-item.active {
    background: rgba(20,184,166,0.12) !important;
    color: var(--primary-light) !important;
}

.portal-page-header {
    background: linear-gradient(135deg, rgba(15,118,110,0.12) 0%, rgba(5,10,18,0.4) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0 35px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .portal-page-header {
    background: linear-gradient(135deg, rgba(20,184,166,0.08) 0%, rgba(5,10,18,0.6) 100%);
    border-bottom-color: rgba(20,184,166,0.12);
}

.portal-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(20,184,166,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20,184,166,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.portal-page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.portal-page-subtitle {
    color: var(--text-subtle);
    font-size: 1rem;
    max-width: 700px;
}

.portal-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-main);
}

.portal-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

[data-theme="dark"] .portal-subnav {
    background: rgba(10, 18, 32, 0.6);
    border-color: rgba(20,184,166,0.1);
}

.portal-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-subtle);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.portal-subnav-link:hover {
    color: var(--primary-light);
    background: rgba(20,184,166,0.08);
    border-color: rgba(20,184,166,0.15);
}

.portal-subnav-link.active,
.portal-subnav-link.active:hover,
.portal-subnav-link.active:focus {
    color: #ffffff !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 10px rgba(15, 118, 110, 0.35);
}

.portal-subnav-link.active i,
.portal-subnav-link.active span {
    color: #ffffff !important;
}

[data-theme="dark"] .portal-subnav-link.active,
[data-theme="dark"] .portal-subnav-link.active:hover {
    background: #0f766e !important;
    border-color: #14b8a6 !important;
    box-shadow: 0 2px 12px rgba(20, 184, 166, 0.3);
}

/* Sidebar navigasi PKA di halaman Pengaturan */
.portal-settings-nav {
    color: var(--text-subtle);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.portal-settings-nav:hover {
    background: rgba(20, 184, 166, 0.08);
    color: var(--primary-light);
}

.portal-settings-nav.active,
.portal-settings-nav.active:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.portal-settings-nav.active i {
    color: #ffffff !important;
}

.portal-highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
    height: 100%;
    transition: all 0.3s;
}

[data-theme="dark"] .portal-highlight-card {
    background: rgba(10, 18, 32, 0.6);
    border-color: rgba(20,184,166,0.1);
}

.portal-highlight-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.portal-highlight-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-light);
    margin-bottom: 6px;
}

.portal-highlight-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
}

.portal-purpose-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px;
    transition: all 0.3s;
}

[data-theme="dark"] .portal-purpose-card {
    background: rgba(10, 18, 32, 0.65);
    border-color: rgba(20,184,166,0.1);
}

.portal-purpose-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.portal-purpose-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-light);
    background: rgba(20,184,166,0.1);
    border: 1px solid rgba(20,184,166,0.2);
    margin-bottom: 12px;
}

.portal-problem-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--danger);
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    transition: all 0.3s;
}

.portal-problem-card h4,
.portal-solution-card h4,
.portal-purpose-card h3 {
    color: var(--text-heading);
}

[data-theme="dark"] .portal-problem-card {
    background: rgba(10, 18, 32, 0.6);
    border-color: rgba(20,184,166,0.1);
    border-left-color: var(--danger);
}

.portal-problem-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239,68,68,0.1);
    color: var(--danger);
    font-size: 1.1rem;
}

.portal-solution-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px;
    transition: all 0.3s;
}

[data-theme="dark"] .portal-solution-card {
    background: rgba(10, 18, 32, 0.6);
    border-color: rgba(20,184,166,0.1);
}

.portal-solution-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.portal-solution-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-light);
    background: rgba(20,184,166,0.1);
    border: 1px solid rgba(20,184,166,0.2);
    margin-bottom: 14px;
}

.portal-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
}

.portal-badge.severity-tinggi  { background: rgba(239,68,68,0.15); color: var(--danger); }
.portal-badge.severity-sedang  { background: rgba(245,158,11,0.15); color: var(--warning); }
.portal-badge.duration         { background: rgba(20,184,166,0.12); color: var(--primary-light); }
.portal-badge.status-completed { background: rgba(34,197,94,0.15); color: var(--success); }
.portal-badge.status-active    { background: rgba(20,184,166,0.15); color: var(--primary-light); }
.portal-badge.status-planned   { background: rgba(100,116,139,0.15); color: var(--text-muted); }

.portal-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-checklist li {
    position: relative;
    padding: 8px 0 8px 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.portal-checklist li:last-child { border-bottom: none; }

.portal-checklist li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-size: 0.75rem;
}

.portal-timeline { position: relative; padding-left: 40px; }

.portal-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-light), transparent);
}

.portal-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.portal-timeline-marker {
    position: absolute;
    left: -40px;
    top: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    box-shadow: 0 0 15px var(--primary-glow);
    z-index: 1;
}

.portal-timeline-content { margin-bottom: 0 !important; }

.portal-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-filter-btn:hover,
.portal-filter-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

.portal-filter-btn.active i {
    color: #ffffff !important;
}

.portal-doc-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.portal-repo-cat-card {
    text-align: center;
    padding: 20px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: all 0.3s;
}

[data-theme="dark"] .portal-repo-cat-card {
    background: rgba(10, 18, 32, 0.6);
    border-color: rgba(20,184,166,0.1);
}

.portal-repo-cat-card:hover { transform: translateY(-3px); border-color: var(--primary-light); }

.portal-repo-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 10px;
    border: 1px solid;
}

.portal-repo-cat-label { font-weight: 700; font-size: 0.82rem; margin-bottom: 4px; }
.portal-repo-cat-count { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }

.portal-slide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    height: 100%;
}

[data-theme="dark"] .portal-slide-card {
    background: rgba(10, 18, 32, 0.65);
    border-color: rgba(20,184,166,0.1);
}

.portal-slide-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.portal-slide-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary-light);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.portal-slide-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-light);
    background: rgba(20,184,166,0.1);
    border: 1px solid rgba(20,184,166,0.2);
    margin: 0 auto 14px;
}

.portal-team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 20px;
    transition: all 0.3s;
}

[data-theme="dark"] .portal-team-card {
    background: rgba(10, 18, 32, 0.65);
    border-color: rgba(20,184,166,0.1);
}

.portal-team-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.portal-team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-light);
    background: rgba(20,184,166,0.1);
    border: 2px solid rgba(20,184,166,0.25);
    margin: 0 auto 16px;
}

.portal-team-role {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.portal-team-unit {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.portal-roadmap { max-width: 800px; margin: 0 auto; }

.portal-roadmap-item {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    position: relative;
}

.portal-roadmap-marker {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 1;
}

.portal-roadmap-item.status-completed .portal-roadmap-marker {
    background: rgba(34,197,94,0.15);
    color: var(--success);
    border: 2px solid var(--success);
}

.portal-roadmap-item.status-active .portal-roadmap-marker {
    background: rgba(20,184,166,0.15);
    color: var(--primary-light);
    border: 2px solid var(--primary-light);
    animation: glow-pulse 2s ease-in-out infinite;
}

.portal-roadmap-item.status-planned .portal-roadmap-marker {
    background: rgba(100,116,139,0.1);
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.portal-roadmap-content { flex-grow: 1; margin-bottom: 0 !important; }

.portal-roadmap-quarter {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.portal-contact-list { display: flex; flex-direction: column; gap: 18px; }

.portal-contact-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.portal-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,184,166,0.1);
    color: var(--primary-light);
    flex-shrink: 0;
}

.portal-contact-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 2px;
}

.portal-map-placeholder {
    padding: 40px 20px;
    border-radius: 12px;
    background: rgba(20,184,166,0.03);
    border: 1px dashed var(--border-color);
}

.portal-cta-banner {
    border: 1px solid rgba(20,184,166,0.2) !important;
    background: linear-gradient(135deg, rgba(20,184,166,0.05) 0%, transparent 100%) !important;
}

@media (max-width: 1199px) {
    .portal-navbar .nav-link { font-size: 0.9rem; }
    .portal-subnav-link span { display: none; }
    .portal-subnav-link { padding: 8px 10px; }
}

/* ─── THEME READABILITY — Bootstrap & global overrides ───── */
[data-theme="dark"] {
    --bs-body-color:        #e2e8f0;
    --bs-body-bg:           #050a12;
    --bs-emphasis-color:    #f8fafc;
    --bs-secondary-color:   #94a3b8;
    --bs-tertiary-color:    #94a3b8;
    --bs-border-color:      rgba(20, 184, 166, 0.15);
    --bs-link-color:        #5eead4;
    --bs-link-hover-color:  #99f6e4;
}

[data-theme="light"] {
    --bs-body-color:        #0f172a;
    --bs-body-bg:           #f0f4f8;
    --bs-emphasis-color:    #0f172a;
    --bs-secondary-color:   #64748b;
    --bs-tertiary-color:    #64748b;
}

body,
p,
li,
label,
.form-label {
    color: var(--text-main);
}

.text-muted,
.text-body-secondary,
.text-secondary {
    color: var(--text-muted) !important;
}

.text-dark {
    color: var(--text-heading) !important;
}

.text-body {
    color: var(--text-main) !important;
}

small,
.small,
.form-text {
    color: var(--text-muted);
}

/* Paragraf di dalam kartu — kontras lebih tinggi */
.card-module .text-muted,
.card-module p.text-muted,
.portal-solution-card .text-muted,
.portal-problem-card .text-muted,
.portal-purpose-card .text-muted,
.portal-slide-card .text-muted,
.portal-team-unit,
.sop-card-text,
.portal-page-subtitle,
.portal-checklist li,
.portal-body-text {
    color: var(--text-subtle) !important;
}

[data-theme="light"] .card-module .text-muted,
[data-theme="light"] .sop-card-text {
    color: var(--text-muted) !important;
}

.display-6,
.display-5,
.display-4 {
    color: var(--text-heading);
}

/* Judul halaman yang memakai --primary-color inline tetap terbaca */
.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 12px;
    position: relative;
    z-index: 5;
}

[data-theme="dark"] .hero-subtitle {
    color: #ccfbf1;
    text-shadow: 0 0 20px rgba(20, 184, 166, 0.25);
}

.portal-hero-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

[data-theme="light"] .portal-hero-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--text-heading) !important;
    border-color: var(--primary) !important;
}

/* Bootstrap components */
.form-control,
.form-select,
textarea.form-control {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea.form-control {
    background-color: rgba(10, 18, 32, 0.85) !important;
    border-color: rgba(20, 184, 166, 0.2) !important;
    color: var(--text-main) !important;
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2) !important;
    color: var(--text-main) !important;
}

.alert {
    border-radius: 12px;
}

[data-theme="dark"] .alert-info {
    background: rgba(6, 182, 212, 0.12) !important;
    border-color: rgba(6, 182, 212, 0.35) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .alert-success {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .badge.bg-light,
[data-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--text-muted) !important;
}

.breadcrumb-item.active {
    color: var(--text-subtle) !important;
}

.breadcrumb-item a:hover {
    color: var(--primary-light) !important;
}

[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(1.8);
}

.download-item .text-muted,
.doc-row .text-muted,
.doc-meta {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .download-item .text-muted,
[data-theme="dark"] .download-item .small {
    color: var(--text-subtle) !important;
}

.portal-timeline-content span.text-muted {
    color: var(--text-muted) !important;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.portal-subnav-link):not(.portal-settings-nav) {
    color: var(--primary-light);
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.portal-subnav-link):not(.portal-settings-nav):hover {
    color: #5eead4;
}

[data-theme="light"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.portal-subnav-link):not(.portal-settings-nav) {
    color: var(--primary);
}

hr {
    border-color: var(--border-color) !important;
    opacity: 1;
}

/* Konten utama di atas overlay background body (jangan turunkan z-index navbar) */
.breadcrumb-container,
.container,
.hero-section,
.footer-custom {
    position: relative;
    z-index: 1;
}

/* Navbar container should span full content width */
.navbar-custom .container {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Navbar & dropdown harus di atas konten halaman */
.navbar-custom {
    position: relative;
    z-index: 1030 !important;
    overflow: visible !important;
}

.navbar-custom .navbar-collapse,
.navbar-custom .navbar-nav,
.navbar-custom .nav-item,
.navbar-custom .dropdown {
    overflow: visible !important;
}

.navbar-custom .dropdown-menu {
    z-index: 1050 !important;
}

/* Loader tidak menghalangi klik setelah disembunyikan */
#loader-wrapper.is-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Prevent navbar overflow on small desktop screens */
@media (min-width: 1200px) and (max-width: 1440px) {
    .portal-navbar .nav-link {
        font-size: 0.76rem !important;
        padding: 0.5rem 0.5rem !important;
    }
    .brand-title {
        font-size: 1.05rem !important;
    }
    .brand-subtitle {
        font-size: 0.55rem !important;
    }
    .navbar-brand img, .navbar-brand svg {
        height: 36px !important;
        width: 36px !important;
    }
    .search-container {
        width: 130px !important;
    }
    .btn-teal.no-print {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

/* Collapsed navbar — mobile/tablet (below xl) */
@media (max-width: 1199px) {
    .navbar-custom {
        padding: 0.5rem 0 !important;
    }
    .navbar-collapse {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 12px;
        margin-top: 12px;
    }
    .navbar-collapse .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .search-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    .search-container .search-input {
        width: 100% !important;
    }
    .portal-navbar {
        gap: 4px !important;
    }
    .portal-navbar .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
    }
}

/* Responsive adjustments for presentation overlay in paparan-seminar-pka.php */
@media (max-width: 768px) {
    .presentation-overlay {
        overflow-x: hidden;
    }
    .presentation-header {
        padding: 10px 15px !important;
    }
    .presentation-body {
        padding: 10px 10px !important;
    }
    .presentation-footer {
        padding: 10px 15px 15px !important;
    }
    .presentation-title-text {
        font-size: 0.85rem !important;
    }
    .btn-pres-close, .btn-pres-theme-toggle {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
    }
    .active-slide-card {
        padding: 20px 15px !important;
        border-radius: 16px !important;
    }
    .btn-pres-nav {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }
    .pres-slide-title {
        font-size: 1.6rem !important;
    }
    .pres-slide-desc {
        font-size: 0.95rem !important;
    }
    .pres-slide-icon-large {
        font-size: 2.5rem !important;
        margin-bottom: 12px !important;
    }
}
