/* ============================================================
   TELTRONICS — PREMIUM DESIGN SYSTEM v2.0
   Dark-first • Glassmorphism • Smooth Animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    /* Brand */
    --gold: #f2cc2f;
    --gold-dark: #c9a206;
    --gold-soft: rgba(242, 204, 47, 0.12);
    --gold-glow: rgba(242, 204, 47, 0.25);

    /* Dark theme (default) */
    --bg: #0a0c10;
    --bg-2: #0f1117;
    --surface: #141720;
    --surface-2: #1c2030;
    --surface-3: #232840;
    --border: rgba(255, 255, 255, 0.07);
    --border-gold: rgba(242, 204, 47, 0.3);
    --text: #e8eaf0;
    --text-2: #a0a8b8;
    --text-3: #626878;
    --accent: #f2cc2f;
    --accent-2: #4ca3e4;
    --success: #00d68f;
    --success-bg: rgba(0, 214, 143, 0.12);
    --danger: #ff4757;
    --danger-bg: rgba(255, 71, 87, 0.12);
    --info: #4ca3e4;
    --info-bg: rgba(76, 163, 228, 0.12);
    --warning: #ffa040;
    --warning-bg: rgba(255, 160, 64, 0.12);

    /* Sidebar */
    --sidebar-bg: #0d1018;
    --sidebar-width: 260px;
    --sidebar-text: #8892a4;
    --sidebar-active-bg: rgba(242, 204, 47, 0.1);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.04);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 8px 32px rgba(242, 204, 47, 0.15);

    /* Layout */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.2s;
}

/* Light mode overrides — Liquid Glassmorphism Theme */
[data-theme="light"] {
    --bg: #e4e9f2;
    --bg-2: rgba(255, 255, 255, 0.5);
    --surface: rgba(255, 255, 255, 0.65);
    --surface-2: rgba(255, 255, 255, 0.45);
    --surface-3: rgba(255, 255, 255, 0.85);
    --border: rgba(255, 255, 255, 0.7);
    --border-gold: rgba(212, 160, 0, 0.35);
    --text: #0f172a;
    --text-2: #334155;
    --text-3: #64748b;
    --sidebar-bg: rgba(255, 255, 255, 0.7);
    --sidebar-text: #475569;
    --sidebar-active-bg: rgba(242, 204, 47, 0.2);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.6);
    --success-bg: rgba(0, 180, 120, 0.12);
    --danger-bg: rgba(220, 50, 60, 0.12);
    --info-bg: rgba(50, 120, 200, 0.12);
    --warning-bg: rgba(220, 130, 0, 0.12);
    --shadow-sm: 0 4px 16px 0 rgba(31, 38, 135, 0.06);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --shadow-lg: 0 20px 60px 0 rgba(31, 38, 135, 0.15);
    --shadow-gold: 0 8px 32px rgba(212, 160, 0, 0.2);
}

[data-theme="light"] body {
    background-color: #e4e9f2;
    background-image:
        radial-gradient(at 10% 10%, rgba(242, 204, 47, 0.18) 0px, transparent 50%),
        radial-gradient(at 90% 15%, rgba(76, 163, 228, 0.20) 0px, transparent 50%),
        radial-gradient(at 50% 85%, rgba(154, 120, 240, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 90%, rgba(0, 214, 143, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
}

[data-theme="light"] .panel,
[data-theme="light"] .kpi-card,
[data-theme="light"] .report-card,
[data-theme="light"] .location-card,
[data-theme="light"] .grading-card,
[data-theme="light"] .sidebar,
[data-theme="light"] .topbar,
[data-theme="light"] .gsearch-modal,
[data-theme="light"] .filter-panel,
[data-theme="light"] .table-panel,
[data-theme="light"] .chart-box,
[data-theme="light"] .search-section,
[data-theme="light"] .filter-select,
[data-theme="light"] .topbar-search,
[data-theme="light"] .sidebar-theme-switch,
[data-theme="light"] .station-code-pill,
[data-theme="light"] .gsf-value {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .panel:hover,
[data-theme="light"] .kpi-card:hover,
[data-theme="light"] .report-card:hover,
[data-theme="light"] .location-card:hover,
[data-theme="light"] .grading-card:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12), inset 0 1px 0 0 rgba(255, 255, 255, 1) !important;
    border-color: rgba(242, 204, 47, 0.5) !important;
}

[data-theme="light"] thead th,
[data-theme="light"] tfoot td {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] tbody td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] tbody tr:hover td {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    transition: color-scheme var(--duration) var(--ease);
}

[data-theme="light"] {
    color-scheme: light;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 var(--gold-glow);
    }

    70% {
        box-shadow: 0 0 0 8px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── App Layout ────────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--duration) var(--ease), background var(--duration) var(--ease);
}

.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 180px;
    height: auto;
    display: block;
}



/* Navigation */
.nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 20px 12px 8px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    color: var(--sidebar-text);
    font-weight: 600;
    font-size: 13.5px;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--gold);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.nav a .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 16px;
    transition: all var(--duration) var(--ease);
}

.nav a:hover {
    background: var(--sidebar-hover-bg);
    color: var(--text);
}

.nav a:hover .nav-icon {
    background: var(--gold-soft);
    color: var(--gold);
}

.nav a.active {
    background: var(--sidebar-active-bg);
    color: var(--text);
}

.nav a.active::before {
    opacity: 1;
}

.nav a.active .nav-icon {
    background: var(--gold-soft);
    color: var(--gold);
    box-shadow: 0 4px 12px rgba(242, 204, 47, 0.2);
}

/* Theme switch */
.sidebar-theme-switch {
    margin: 8px 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-theme-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-theme-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--gold-soft);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-theme-copy strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.sidebar-theme-copy small {
    display: block;
    font-size: 9px;
    color: var(--text-3);
    margin-top: 2px;
}

.sidebar-theme-button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-theme-track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--surface-3);
    display: block;
    position: relative;
    transition: background 0.3s var(--ease);
}

.sidebar-theme-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

[data-theme="dark"] .sidebar-theme-track {
    background: var(--gold-dark);
}

[data-theme="dark"] .sidebar-theme-thumb {
    transform: translateX(18px);
    background: #fff;
}

[data-theme="light"] .sidebar-theme-track {
    background: #d1d8e4;
}

/* Sidebar bottom */
.sidebar-bottom {
    padding: 12px 12px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(0, 214, 143, 0.6);
    animation: pulse-ring 2s infinite;
    display: inline-block;
}

.logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 600;
    font-size: 13px;
    transition: all var(--duration) var(--ease);
}

.logout:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.logout-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-size: 16px;
    transition: all var(--duration) var(--ease);
}

.logout:hover .logout-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
    height: 72px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px;
    font-size: 18px;
    line-height: 1;
    transition: all var(--duration) var(--ease);
}

.mobile-menu:hover {
    background: var(--surface-3);
}

.topbar-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.topbar-date {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gold-soft);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0c10;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(242, 204, 47, 0.3);
    flex-shrink: 0;
}

.user-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.user-info small {
    display: block;
    font-size: 10px;
    color: var(--text-3);
    font-weight: 500;
}

/* ── Topbar Search ───────────────────────────────────────── */
.topbar-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 14px;
    height: 40px;
    min-width: 260px;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    position: relative;
}

.topbar-search:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.topbar-search-icon {
    color: var(--text-3);
    display: flex;
    align-items: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.topbar-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 13px;
    font-family: var(--font);
    font-weight: 500;
    min-width: 0;
}

.topbar-search-input::placeholder {
    color: var(--text-3);
}

.topbar-search-kbd {
    font-size: 14px;
    color: var(--text-3);
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 8px;
    flex-shrink: 0;
    line-height: 1.6;
}

.topbar-search-spinner {
    display: flex;
    align-items: center;
    margin-left: 8px;
    color: var(--gold);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spin-icon {
    animation: spin 0.7s linear infinite;
}

/* ── Topbar Search — Light Mode Polish ─────────────────────── */
[data-theme="light"] .topbar-search {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1.5px solid rgba(148, 163, 184, 0.3) !important;
    box-shadow:
        0 1px 3px 0 rgba(15, 23, 42, 0.06),
        inset 0 1px 2px 0 rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

[data-theme="light"] .topbar-search:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(148, 163, 184, 0.45) !important;
    box-shadow:
        0 2px 8px 0 rgba(15, 23, 42, 0.08),
        inset 0 1px 2px 0 rgba(255, 255, 255, 1) !important;
}

[data-theme="light"] .topbar-search:focus-within {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(201, 162, 6, 0.5) !important;
    box-shadow:
        0 0 0 3px rgba(242, 204, 47, 0.15),
        0 4px 12px 0 rgba(15, 23, 42, 0.08),
        inset 0 1px 2px 0 rgba(255, 255, 255, 1) !important;
}

[data-theme="light"] .topbar-search-icon {
    color: #94a3b8;
}

[data-theme="light"] .topbar-search:focus-within .topbar-search-icon {
    color: var(--gold-dark);
}

[data-theme="light"] .topbar-search-input {
    color: #0f172a;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

[data-theme="light"] .topbar-search-input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .topbar-search-kbd {
    background: rgba(241, 245, 249, 0.8);
    border: none !important;
    color: #94a3b8;
}

/* ── Global Search History Modal ────────────────────────── */
.gsearch-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
    overflow-y: auto;
}

.gsearch-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.gsearch-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s var(--ease);
    flex-shrink: 0;
    margin: auto;
}

.gsearch-overlay.show .gsearch-modal {
    transform: translateY(0);
}

.gsearch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
}

.gsearch-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin: 0;
}

.gsearch-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-3);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--duration) var(--ease);
}

.gsearch-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

.gsearch-body {
    padding: 24px 28px;
}

.gsearch-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.gsf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gsf-label {
    font-size: 10px;
    font-weight: 800;
    color: #334155;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.gsf-value {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.gsearch-img-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gsearch-img-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.gsearch-images {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.gsearch-img-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gsearch-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
    cursor: pointer;
}

.gsearch-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s var(--ease);
}

.gsearch-img-wrap:hover img {
    transform: scale(1.06);
}

.gsearch-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 10px;
}

.gsearch-img-dl-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.2s ease;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.gsearch-img-wrap:hover .gsearch-img-dl-btn,
.gsearch-img-dl-btn:focus {
    opacity: 1;
    transform: scale(1);
}

.gsearch-img-dl-btn:hover {
    background: var(--warning, #eab308);
    color: #000000;
    border-color: transparent;
}

.media-only-grid .gsearch-img-dl-btn {
    opacity: 1;
    transform: scale(1);
    background: var(--warning, #eab308);
    color: #000000;
    border-color: transparent;
}

.media-only-grid .gsearch-img-dl-btn:hover {
    background: #d97706;
    color: #000000;
    transform: scale(1.08);
}

.gsearch-img-name {
    font-size: 10px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
    line-height: 1.3;
}

.gsearch-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ── Image Preview Modal ─────────────────────────────────────── */
.image-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.image-preview-overlay.show {
    display: flex;
    opacity: 1;
}

.image-preview-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s var(--ease);
}

.image-preview-overlay.show img {
    transform: scale(1);
}

.preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--surface-2);
    z-index: 10002;
}

/* Lightbox Navigation UI Buttons & Counter */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lightbox-nav-btn:hover {
    background: #f2cc2f;
    color: #1a1a2e;
    border-color: #f2cc2f;
    transform: translateY(-50%) scale(1.12);
}

.lightbox-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-counter {
    position: absolute;
    bottom: -36px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 12px;
    }
    .lightbox-next {
        right: 12px;
    }
    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }
}

.gsearch-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    color: var(--text-3);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 700px) {
    .gsearch-fields {
        grid-template-columns: 1fr;
    }

    .gsearch-images {
        grid-template-columns: repeat(3, 1fr);
    }

    .topbar-search {
        min-width: 160px;
    }
}

/* ── Page Intro ────────────────────────────────────────────── */
.page-intro {
    padding: 32px 32px 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    animation: fadeInUp 0.4s var(--ease) both;
}

.page-intro.compact {
    padding-bottom: 20px;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.page-intro h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.2;
}

.page-intro p {
    font-size: 13px;
    color: var(--text-2);
    margin: 0;
}

.intro-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    border: 0;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background var(--duration) var(--ease);
}

.btn:hover::after {
    background: rgba(255, 255, 255, 0.06);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #0a0c10;
    box-shadow: 0 6px 20px rgba(242, 204, 47, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(242, 204, 47, 0.45);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--border-gold);
    background: var(--gold-soft);
    color: var(--gold);
}

.btn-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: var(--danger);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
}

.btn-icon:hover {
    background: var(--gold-soft);
    border-color: var(--border-gold);
    color: var(--gold);
}

/* ── KPI Cards ─────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 32px 24px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease);
    animation: fadeInUp 0.4s var(--ease) both;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--kpi-color, var(--gold)), transparent);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-card:nth-child(1) {
    animation-delay: 0.05s;
}

.kpi-card:nth-child(2) {
    animation-delay: 0.1s;
}

.kpi-card:nth-child(3) {
    animation-delay: 0.15s;
}

.kpi-card:nth-child(4) {
    animation-delay: 0.2s;
}

.kpi-card:nth-child(5) {
    animation-delay: 0.25s;
}

.kpi-card:nth-child(6) {
    animation-delay: 0.3s;
}

.kpi-card:nth-child(7) {
    animation-delay: 0.35s;
}

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kpi-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    background: var(--gold-soft);
    color: var(--gold);
    transition: all var(--duration) var(--ease);
}

.kpi-icon.blue {
    --kpi-c: var(--info);
    background: var(--info-bg);
    color: var(--info);
}

.kpi-icon.teal {
    background: var(--gold-soft);
    color: var(--gold);
}

.kpi-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.kpi-icon.indigo {
    background: rgba(130, 100, 240, 0.12);
    color: #9a78f0;
}

.kpi-icon.orange {
    background: var(--warning-bg);
    color: var(--warning);
}

.kpi-icon.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.kpi-icon.purple {
    background: rgba(180, 80, 220, 0.12);
    color: #c060e0;
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.1) rotate(-4deg);
}

.kpi-trend {
    font-size: 9px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-bg);
    padding: 3px 6px;
    border-radius: 999px;
}

.kpi-value {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text);
    animation: countUp 0.6s var(--ease) both;
    line-height: 1;
}

.kpi-label {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
    font-weight: 500;
}

/* ── Panels / Cards ────────────────────────────────────────── */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 22px;
    transition: box-shadow var(--duration) var(--ease);
    animation: fadeInUp 0.4s var(--ease) both;
}

.panel:hover {
    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.panel-head p {
    font-size: 12px;
    color: var(--text-3);
    margin: 0;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 10px;
    white-space: nowrap;
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(76, 163, 228, 0.2);
}

.badge-success {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-muted {
    background: var(--surface-2);
    color: var(--text-3);
    border: 1px solid var(--border);
}

/* ── Charts ────────────────────────────────────────────────── */
.chart-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    padding: 0 32px 16px;
}

.chart-panel {
    padding: 22px;
}

.chart-box {
    height: 280px;
    margin-top: 0;
    position: relative;
}

.chart-box.tall {
    height: 320px;
}

/* ── Table ─────────────────────────────────────────────────── */
.table-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeInUp 0.4s var(--ease) both;
    margin: 0 32px 32px;
}

.table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.table-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.table-head p {
    font-size: 12px;
    color: var(--text-3);
    margin: 0;
}

.table-scroll {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
}

thead th {
    background: var(--surface-2);
    color: var(--text-3);
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

thead th:first-child {
    padding-left: 24px;
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: var(--text-2);
    transition: background var(--duration) var(--ease);
}

tbody td:first-child {
    padding-left: 24px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover td {
    background: var(--surface-2);
}

tbody td strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

tbody td small {
    display: block;
    color: var(--text-3);
    font-size: 11px;
    margin-top: 3px;
}

tfoot td {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    font-weight: 700;
    font-size: 12px;
    color: var(--text);
    padding: 13px 16px;
}

tfoot td:first-child {
    padding-left: 24px;
}

/* ── Station Status Table ──────────────────────────────────── */
.station-summary-panel {
    margin: 0 32px 20px;
}

.station-status-table-wrap {
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    margin-top: 0;
}

.station-status-table {
    min-width: 700px;
}

.station-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--gold-soft);
    color: var(--gold);
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-gold);
}

.count-value {
    font-weight: 700;
    font-size: 13px;
}

.secured-count {
    color: var(--gold);
}

.normal-count {
    color: var(--info);
}

.share-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
}

.share-bar {
    height: 6px;
    flex: 1;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.share-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 999px;
    transition: width 0.8s var(--ease);
}

.share-cell strong {
    font-size: 11px;
    color: var(--text-3);
    width: 38px;
}

/* ── Status Details ────────────────────────────────────────── */
.detail-dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    padding: 0 32px 32px;
}

.status-detail-list {
    display: grid;
    gap: 0;
}

.status-detail {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.status-detail:last-child {
    border-bottom: 0;
}

.status-marker {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.status-marker.secured {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.status-marker.normal {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(76, 163, 228, 0.2);
}

.status-detail div {
    flex: 1;
}

.status-detail strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    display: block;
}

.status-detail p {
    font-size: 11px;
    color: var(--text-3);
    margin: 4px 0 0;
    line-height: 1.5;
}

.status-detail>b {
    font-size: 16px;
    text-align: right;
    color: var(--text);
    white-space: nowrap;
}

.status-detail>b small {
    display: block;
    color: var(--text-3);
    font-size: 10px;
    margin-top: 2px;
    font-weight: 500;
}

/* ── Quick Actions ─────────────────────────────────────────── */
.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: all var(--duration) var(--ease);
}

.quick-action:hover {
    border-color: var(--border-gold);
    background: var(--gold-soft);
    transform: translateX(4px);
}

.quick-action>span {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gold-soft);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1px solid var(--border-gold);
}

.quick-action div {
    flex: 1;
}

.quick-action strong {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
}

.quick-action small {
    display: block;
    color: var(--text-3);
    font-size: 11px;
    margin-top: 3px;
}

.quick-action b {
    color: var(--text-3);
    font-size: 16px;
}

.quick-action:hover b {
    color: var(--gold);
}

/* ── Filter Panel ──────────────────────────────────────────── */
.filter-panel {
    margin: 0 32px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.35s var(--ease) both;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.filter-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.filter-grid label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-grid input,
.filter-grid select,
.search-input input {
    width: 100%;
    height: 44px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    color: var(--text);
    outline: none;
    transition: all var(--duration) var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.filter-grid select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892a4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.filter-grid input:focus,
.filter-grid select:focus,
.search-input input:focus {
    border-color: var(--border-gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
    background: var(--surface-3);
}

.filter-grid input::placeholder {
    color: var(--text-3);
}

/* ── Search Section (Redesigned) ───────────────────────────── */
.search-section {
    margin: 0 32px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeInUp 0.4s var(--ease) both;
}

.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.search-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-header-icon {
    color: var(--gold);
    flex-shrink: 0;
}

.search-header-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: 0.2px;
}

/* Tab group - pill switcher */
.search-tab-group {
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: 999px;
    padding: 3px;
    position: relative;
    border: 1px solid var(--border);
}

.search-tab {
    border: 0;
    background: transparent;
    padding: 7px 16px;
    color: var(--text-3);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    border-radius: 999px;
    transition: color 0.25s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.search-tab svg {
    flex-shrink: 0;
}

.search-tab:hover {
    color: var(--text-2);
}

.search-tab.active {
    color: #0a0c10;
    border-bottom-color: transparent;
}

.search-tab-indicator {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: var(--gold);
    border-radius: 999px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
    box-shadow: 0 2px 8px rgba(242, 204, 47, 0.3);
}

.search-tab-group .search-tab:nth-child(2).active~.search-tab-indicator {
    transform: translateX(100%);
}

/* Search mode toggle */
.search-mode {
    display: none !important;
}

.search-mode.active {
    display: flex !important;
}

/* Search body */
.search-body {
    gap: 12px;
    padding: 18px 20px;
    align-items: center;
}

/* Modern search input */
.search-input-modern {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 16px;
    color: var(--gold);
    pointer-events: none;
    transition: color 0.2s var(--ease);
}

.search-input-modern input {
    width: 100%;
    height: 48px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0 44px 0 46px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s var(--ease);
}

.search-input-modern input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft), 0 4px 16px rgba(242, 204, 47, 0.08);
    background: var(--surface-3);
}

.search-input-modern input::placeholder {
    color: var(--text-3);
    font-weight: 400;
}

/* Clear button inside input */
.search-clear-btn {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text-3);
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.search-clear-btn:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Search submit button */
.search-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    white-space: nowrap;
    font-weight: 700;
}

/* ── Bulk Search (Redesigned) ──────────────────────────────── */
.bulk-input-modern {
    flex: 1;
}

.bulk-input-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bulk-input-label-row label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-hint {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 400;
}

.bulk-input-modern textarea {
    width: 100%;
    min-height: 100px;
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text);
    outline: none;
    resize: vertical;
    font-size: 13px;
    line-height: 1.7;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s var(--ease);
}

.bulk-input-modern textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft), 0 4px 16px rgba(242, 204, 47, 0.08);
    background: var(--surface-3);
}

.bulk-input-modern textarea::placeholder {
    color: var(--text-3);
}

.bulk-actions-modern {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-self: flex-end;
    flex-direction: column;
}

/* ── Bulk Result Banner (Redesigned) ──────────────────────── */
.bulk-result-banner {
    margin: 0 32px 16px;
    background: var(--gold-soft);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: fadeInUp 0.35s var(--ease) both;
}

.bulk-result-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bulk-result-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bulk-result-badge.success {
    background: var(--success-bg);
    color: var(--success);
}

.bulk-result-badge.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.bulk-result-banner strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    font-weight: 700;
}

.bulk-result-banner span {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

.bulk-result-banner span b {
    color: var(--text);
    font-weight: 700;
}

/* ── QC / Status Pills ─────────────────────────────────────── */
.qc-pill,
.station-pill,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    white-space: nowrap;
}

.qc-pill.secured {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.qc-pill.normal {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(76, 163, 228, 0.2);
}

.station-pill {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
    font-family: 'Inter', monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.status-badge {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.hold,
.status-badge.pending-qc {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.approved {
    background: var(--gold-soft);
    color: var(--gold);
}

.status-badge.rejected {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ── Image Link ────────────────────────────────────────────── */
.image-link {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--gold);
    font-weight: 700;
    font-size: 12px;
    transition: all var(--duration) var(--ease);
}

.image-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ── Action Controls ───────────────────────────────────────── */
.actions {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
}

.action-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-width: 44px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text-2);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    transition: all var(--duration) var(--ease);
    cursor: pointer;
}

.action-control .action-icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
}

.action-control .action-label {
    font-size: 11px;
}

.action-control:hover {
    transform: translateY(-1px);
    border-color: var(--border-gold);
    background: var(--gold-soft);
    color: var(--gold);
    box-shadow: var(--shadow-gold);
}

.action-control.action-view .action-icon {
    background: var(--gold-soft);
    color: var(--gold);
}

.action-control.action-image .action-icon {
    background: var(--info-bg);
    color: var(--info);
}

.action-control.action-doc .action-icon {
    background: var(--surface-3);
    color: var(--text-3);
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-3);
    font-size: 13px;
}

.empty-state::before {
    content: '⊘';
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ── Report Page ───────────────────────────────────────────── */
.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 32px 16px;
}

.report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease);
    animation: fadeInUp 0.4s var(--ease) both;
    position: relative;
    overflow: hidden;
}

.report-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    transform: scaleX(0);
    transition: transform 0.3s var(--ease);
}

.report-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.report-card:hover::after {
    transform: scaleX(1);
}

.report-card span,
.report-card small {
    display: block;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
}

.report-card strong {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    display: block;
    margin: 12px 0 6px;
    color: var(--text);
}

.report-card small {
    font-size: 11px;
    margin-top: 0;
}

.notes {
    display: grid;
    gap: 14px;
}

.notes div {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.notes b {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--gold-soft);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    border: 1px solid var(--border-gold);
}

.notes p {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-2);
}

/* ── Location Grid ─────────────────────────────────────────── */
.location-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 32px 32px;
}

.location-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease);
    animation: fadeInUp 0.4s var(--ease) both;
    position: relative;
    overflow: hidden;
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow), var(--shadow-gold);
    border-color: var(--border-gold);
}

.location-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.location-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 20px;
    border: 1px solid var(--border-gold);
    transition: all var(--duration) var(--ease);
}

.location-card:hover .location-icon {
    transform: scale(1.1) rotate(-5deg);
}

.location-card h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 5px;
}

.location-card p {
    font-size: 12px;
    color: var(--text-3);
    margin: 0 0 18px;
}

.zone-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
}

.zone-badge.south {
    background: var(--success-bg);
    color: var(--success);
}

.zone-badge.north {
    background: var(--info-bg);
    color: var(--info);
}

.zone-badge.west {
    background: var(--warning-bg);
    color: var(--warning);
}

.zone-badge.east {
    background: rgba(130, 100, 240, 0.12);
    color: #9a78f0;
}

.zone-badge.central {
    background: rgba(230, 80, 120, 0.12);
    color: #e55577;
}

.location-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 14px;
}

.location-stat strong {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.8px;
}

.location-stat span {
    font-size: 11px;
    color: var(--text-3);
}

.progress {
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 999px;
    transition: width 1s var(--ease);
}

/* ── Detail Grid ───────────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 32px 16px;
}

.detail-list {
    display: grid;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list span:first-child {
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.detail-list strong {
    font-size: 13px;
    color: var(--text);
    text-align: right;
    font-weight: 600;
}

/* ── Media Panel ───────────────────────────────────────────── */
.media-panel {
    margin: 0 32px 32px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.media-placeholder {
    aspect-ratio: 1;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}

.media-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-soft) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.media-placeholder:hover {
    border-color: var(--border-gold);
    transform: scale(1.04);
}

.media-placeholder:hover::before {
    opacity: 1;
}

.media-placeholder span {
    font-size: 28px;
    position: relative;
    z-index: 1;
}

.media-placeholder small {
    font-size: 10px;
    margin-top: 6px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.document-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--surface-2);
    transition: all var(--duration) var(--ease);
}

.document-row:hover {
    border-color: var(--border-gold);
}

.document-row span {
    font-size: 20px;
    color: var(--gold);
}

.document-row strong {
    font-size: 13px;
    flex: 1;
    color: var(--text);
    font-weight: 600;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s var(--ease) both;
}

.modal.show {
    display: flex;
}

.modal-card {
    width: min(440px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s var(--ease) both;
}

.modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: all var(--duration) var(--ease);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(255, 71, 87, 0.2);
}

.modal-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    font-size: 26px;
    border: 2px solid var(--border-gold);
}

.modal-card h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.modal-card p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.login-center {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    position: relative;
    z-index: 10;
}

.login-brand-block {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s var(--ease) both;
}

.login-brand-block .brand-logo {
    width: 200px;
    filter: brightness(1.15);
}

.login-shell {
    width: 100%;
    max-width: 380px;
}

.login-card {
    animation: fadeInUp 0.5s var(--ease) both;
}

.login-card-head {
    margin-bottom: 28px;
}

.login-card-head .eyebrow {
    color: var(--gold);
    margin-bottom: 10px;
}

.login-card-head h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.8px;
}

.login-card-head p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.input-wrap {
    position: relative;
}

.input-wrap>span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 16px;
    pointer-events: none;
    transition: color var(--duration) var(--ease);
}

.input-wrap input {
    width: 100%;
    height: 50px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 50px 0 44px;
    color: var(--text);
    outline: none;
    font-size: 14px;
    transition: all var(--duration) var(--ease);
}

.input-wrap input:focus {
    border-color: var(--border-gold);
    box-shadow: 0 0 0 4px var(--gold-soft);
    background: var(--surface-2);
}

.input-wrap input:focus+span,
.input-wrap:focus-within>span {
    color: var(--gold);
}

.input-wrap input::placeholder {
    color: var(--text-3);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: var(--surface-2);
    color: var(--text-3);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    transition: all var(--duration) var(--ease);
}

.password-toggle:hover {
    background: var(--gold-soft);
    color: var(--gold);
}

.login-submit-btn {
    width: 100%;
    height: 50px;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #0a0c10;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 28px rgba(242, 204, 47, 0.35);
    letter-spacing: 0.3px;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(242, 204, 47, 0.5);
}

.login-submit-btn:active {
    transform: translateY(0);
}

.demo-login {
    margin-top: 24px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.demo-login strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
}

.demo-login span {
    font-size: 11px;
    color: var(--text-3);
    font-family: 'Inter', monospace;
    background: var(--surface-2);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.alert-danger::before {
    content: '⚠';
    font-size: 14px;
}

.login-footer {
    text-align: center;
    color: var(--text-3);
    font-size: 11px;
    margin-top: 28px;
}

/* ── Status Dashboard Grid ─────────────────────────────────── */
.status-dashboard-grid {
    grid-template-columns: 1.5fr 1fr;
}

/* ── User Table ────────────────────────────────────────────── */
.user-avatar-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0c10;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
}

.role-badge.admin {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.role-badge.manager {
    background: var(--info-bg);
    color: var(--info);
}

.role-badge.qc {
    background: var(--success-bg);
    color: var(--success);
}

.role-badge.exec {
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-grid,
    .filter-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .location-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .report-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 960px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu {
        display: grid;
    }

    .topbar {
        padding: 0 20px;
    }

    .page-intro,
    .kpi-grid,
    .chart-grid,
    .detail-grid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .filter-panel,
    .search-section,
    .table-panel,
    .media-panel,
    .station-summary-panel,
    .detail-dashboard-grid,
    .report-grid,
    .location-grid,
    .bulk-result-banner {
        margin-left: 20px;
        margin-right: 20px;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-grid,
    .filter-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-dashboard-grid {
        grid-template-columns: 1fr;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 650px) {
    .login-center {
        padding: 40px 24px;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .kpi-value {
        font-size: 22px;
    }

    .chart-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid,
    .filter-grid-4 {
        grid-template-columns: 1fr;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar .btn {
        width: 100%;
    }

    .media-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .location-grid {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr 1fr;
    }

    .topbar-title {
        font-size: 16px;
    }

    .page-intro h1 {
        font-size: 22px;
    }

    .page-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-intro .btn,
    .intro-actions .btn {
        width: 100%;
    }

    .bulk-search {
        flex-direction: column;
    }

    .bulk-actions {
        flex-direction: column;
    }

    .bulk-actions .btn {
        width: 100%;
    }

    .bulk-result-banner {
        flex-direction: column;
    }

    .bulk-result-banner .btn {
        width: 100%;
    }

    .user-info {
        display: none;
    }

    .topbar-badge {
        display: none;
    }

    .actions {
        gap: 4px;
        min-width: 0;
    }

    .action-control {
        height: 30px;
        min-width: 36px;
        padding: 0 7px;
    }

    .action-control .action-label {
        display: none;
    }
}

/* ── Overlay for mobile sidebar ────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

@media (max-width: 960px) {
    .sidebar-overlay.show {
        display: block;
    }
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-3);
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }

    .user-info.mobile-visible {
        display: block !important;
        position: absolute;
        top: 60px;
        right: 20px;
        background: var(--surface-2);
        padding: 12px 16px;
        border-radius: var(--radius-md);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        border: 1px solid var(--border);
        z-index: 100;
    }
}

/* Light mode input/select styles */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .filter-select {
    background-color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: var(--text, #000) !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] .filter-select:focus {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
}

/* Make eyebrow text black in light mode project-wide */
[data-theme="light"] .eyebrow,
[data-theme="light"] .login-card-head .eyebrow {
    color: #000 !important;
}

/* Increase Topbar Search Box Size */
.topbar-search {
    width: 450px !important;
    max-width: 100%;
}

.topbar-search-input {
    font-size: 14px;
}

/* Make KPI trend text lite black in light mode */
[data-theme="light"] .kpi-trend {
    color: #333 !important;
}

/* Mobile responsiveness for status dashboard table section */
@media (max-width: 768px) {
    .status-dashboard-grid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Media Files Modal */
.media-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    padding: 20px;
}
.media-modal-overlay.show {
    display: flex;
}
.media-modal {
    background: #aeb2b5;
    width: 100%;
    max-width: 950px;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
}
.media-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.media-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}
.media-modal-close {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    transition: background 0.2s;
}
.media-modal-close:hover {
    background: rgba(255, 255, 255, 0.8);
}
.media-modal-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 12px;
}
.media-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.media-card-img-wrap {
    position: relative;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.media-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.media-card-img:hover {
    opacity: 1;
}
.media-download-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #eab308;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}
.media-download-btn:hover {
    transform: scale(1.05);
}
.media-download-btn svg {
    width: 16px;
    height: 16px;
}
.media-filename {
    font-size: 11px;
    color: #334155;
    line-height: 1.3;
    word-break: break-all;
    font-weight: 500;
}
.media-modal-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 8px;
}
.media-modal-footer .btn-primary {
    background: #eab308;
    color: #000;
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(234, 179, 8, 0.2);
}
.media-modal-footer .btn-primary:hover {
    background: #facc15;
}

/* ==========================================
   Centralized Global Loader (Teltronics Brand)
   ========================================== */
.global-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.global-loader-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.global-loader-overlay.hidden {
    display: none;
}

/* No backdrop — fully transparent overlay */
.global-loader-backdrop {
    display: none;
}

/* Floating content — no card, no border, no shadow */
.global-loader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateY(0px);
    animation: loaderFloat 2.4s ease-in-out infinite alternate;
}

@keyframes loaderFloat {
    0%   { transform: translateY(0px); }
    100% { transform: translateY(-8px); }
}

/* Logo & Spinner Container */
.loader-logo-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

/* Outer rotating arc ring */
.loader-spinner-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.loader-spinner-svg .spinner-bg {
    fill: none;
    stroke: rgba(242, 204, 47, 0.12);
    stroke-width: 3;
}

.loader-spinner-svg .spinner-stroke {
    fill: none;
    stroke: url(#teltronicsGradient);
    stroke-width: 3;
    stroke-dasharray: 310;
    stroke-dashoffset: 80;
    stroke-linecap: round;
    transform-origin: 50% 50%;
    animation: teltronicsSpin 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes teltronicsSpin {
    0% {
        transform: rotate(0deg);
        stroke-dashoffset: 280;
        opacity: 0.6;
    }
    50% {
        stroke-dashoffset: 60;
        opacity: 1;
    }
    100% {
        transform: rotate(360deg);
        stroke-dashoffset: 280;
        opacity: 0.6;
    }
}

/* Logo circle — transparent with subtle glow ring */
.loader-logo-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 50%;
    padding: 14px;
    animation: logoPulse 2s ease-in-out infinite alternate;
}

[data-theme="light"] .loader-logo-wrapper {
    background: transparent;
}

@keyframes logoPulse {
    0% {
        filter: drop-shadow(0 0 6px rgba(242, 204, 47, 0.3));
        transform: scale(0.97);
    }
    100% {
        filter: drop-shadow(0 0 18px rgba(242, 204, 47, 0.7));
        transform: scale(1.03);
    }
}

.loader-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Speed Lines */
.loader-speed-lines {
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 3;
}

.speed-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #f2cc2f80, transparent);
    border-radius: 2px;
    animation: speedLinePulse 1.2s ease-in-out infinite;
}

.speed-line.line-1 { width: 22px; animation-delay: 0s; }
.speed-line.line-2 { width: 32px; animation-delay: 0.2s; }
.speed-line.line-3 { width: 18px; animation-delay: 0.4s; }

@keyframes speedLinePulse {
    0%, 100% { opacity: 0.15; transform: translateX(-4px); }
    50%       { opacity: 0.8;  transform: translateX(4px); }
}

/* Text & Shimmer bar */
.loader-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loader-text {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-2, #94a3b8);
    text-transform: uppercase;
}

[data-theme="light"] .loader-text {
    color: #64748b;
}

.loader-shimmer-bar {
    width: 80px;
    height: 2px;
    background: rgba(242, 204, 47, 0.15);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-shimmer-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #f2cc2f, transparent);
    animation: shimmerSlide 1.4s ease-in-out infinite;
}

@keyframes shimmerSlide {
    0%   { left: -60%; }
    100% { left: 110%; }
}