/* ==========================================================================
   DESIGN SYSTEM & GLOBAL VARIABLES (Pusat Layanan SPNF Buleleng)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Tokens - Ocean Breeze Palette */
    --primary: #0b2545;
    --primary-light: #134074;
    --secondary: #8da9c4;
    --accent: #0284c7;
    --accent-light: #e0f2fe;
    --accent-gold: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Light Theme Palette */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --border: #e2e8f0;
    --text-title: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    
    /* Layout Constants */
    --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
body.dark-theme {
    --bg-main: #090f1d;
    --bg-card: #121b2e;
    --bg-glass: rgba(18, 27, 46, 0.8);
    --border: #1e293b;
    --text-title: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --primary-light: #1e3a8a;
    --accent-light: #0c4a6e;
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-title);
    font-weight: 700;
    line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 1.5rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}

/* ==========================================================================
   PREMIUM BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 64, 116, 0.2);
}

.btn-accent {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-accent:hover {
    background-color: #0271a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.btn-secondary {
    background-color: var(--border);
    color: var(--text-title);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-main);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

body.dark-theme .btn-outline {
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-a { background-color: #d1fae5; color: #065f46; }
.badge-b { background-color: #dbeafe; color: #1e40af; }
.badge-c { background-color: #fef3c7; color: #92400e; }
.badge-status-pending { background-color: #ffedd5; color: #9a3412; }
.badge-status-verified { background-color: #d1fae5; color: #065f46; }
.badge-status-rejected { background-color: #fee2e2; color: #991b1b; }

/* ==========================================================================
   NAVIGATION HEADER (Sticky Glassmorphism)
   ========================================================================== */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.88) 100%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

body.dark-theme .header-wrapper {
    background: linear-gradient(180deg, rgba(9, 15, 29, 0.96) 0%, rgba(9, 15, 29, 0.9) 100%);
    border-bottom-color: rgba(30, 41, 59, 0.8);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 78px;
    padding: 0.9rem 1.15rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

body.dark-theme .header-container {
    background: rgba(18, 27, 46, 0.9);
    border-color: rgba(30, 41, 59, 0.9);
    box-shadow: 0 12px 32px rgba(2, 8, 23, 0.35);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.logo-icon {
    display: inline-flex;
    width: 2.8rem;
    height: 2.8rem;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    color: var(--primary);
}

body.dark-theme .logo-text {
    color: #f8fafc;
}

.logo-subtitle {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    position: relative;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-body);
    padding: 0.58rem 0.85rem;
    border-radius: 999px;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background-color: rgba(2, 132, 199, 0.09);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.35rem;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

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

body.dark-theme .nav-link:hover, body.dark-theme .nav-link.active {
    background-color: rgba(2, 132, 199, 0.16);
}

/* Header Utilities */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.theme-toggle-btn,
.mobile-menu-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text-title);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    transition: var(--transition);
}

.theme-toggle-btn:hover,
.mobile-menu-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
    display: none;
    font-size: 1.2rem;
}

@media (max-width: 1100px) {
    .header-container {
        padding: 0.8rem 1rem;
    }
    .nav-links {
        gap: 0.2rem;
    }
    .nav-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 640px) {
    .header-wrapper {
        padding: 0.5rem 0;
    }
    .header-container {
        min-height: 70px;
        border-radius: 24px;
        padding: 0.7rem 0.8rem;
    }
    .logo-subtitle {
        display: none;
    }
    .logo-text {
        font-size: 0.95rem;
    }
    .nav-actions .btn-sm {
        display: none;
    }
}

/* Mobile Navigation Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: min(320px, 100vw);
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 200;
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--border);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-drawer.open {
    right: 0;
}

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

.drawer-close-btn {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-title);
    cursor: pointer;
    border-radius: 50%;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.drawer-link {
    font-size: 1rem;
    font-weight: 600;
    display: block;
    padding: 0.8rem 0.85rem;
    border-radius: 999px;
}

.drawer-link:hover, .drawer-link.active {
    background-color: var(--accent-light);
    color: var(--accent);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* ==========================================================================
   CARDS & PREMIUM CONTAINERS
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   FORMS & INPUT GROUPS
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-title);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

/* Fix untuk Combobox/Select di Safari dan cross-browser */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

body.dark-theme select.form-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* ==========================================================================
   HERO / BANNER STYLES
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    padding: 6rem 0 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.05) 0%, transparent 80%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 650px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0 1.5rem 2rem;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    height: 505px;
}

.hero-slider-wrapper {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    image-rendering: auto;
    opacity: 0;
    /* remove fade transition so slides switch instantly */
    transition: none;
    min-height: 505px;
    display: grid;
    align-items: center;
    will-change: opacity;
    backface-visibility: hidden;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    position: relative;
    z-index: 2;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    /* much lighter gradient so background stays bright */
    background: linear-gradient(180deg, rgba(10, 19, 45, 0.02) 0%, rgba(10, 19, 45, 0.06) 60%, rgba(10,19,45,0.08) 100%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.hero-slide.active .hero-slide-overlay {
    /* show a gentle overlay only on the active slide */
    opacity: 0.25;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
}

.hero-slide .hero-title,
.hero-slide .hero-subtitle {
    color: #ffffff;
}

.hero-slide-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.slide-dot {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.slide-dot.active {
    background: rgba(255,255,255,0.95);
    transform: scale(1.1);
}

.hero-slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    transform: translateY(-50%);
    z-index: 3;
}

.hero-slide-prev,
.hero-slide-next {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.35);
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.hero-slide-prev:hover,
.hero-slide-next:hover {
    background: rgba(0,0,0,0.55);
}

.hero-illustration {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-image-wrapper {
        display: none;
    }
    .hero-section {
        padding: 4rem 0;
    }
}

/* ==========================================================================
   STATISTICS & APS SECTION
   ========================================================================== */
.stats-bar {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.stats-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stats-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stats-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

@media (max-width: 992px) {
    .stats-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .stats-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MAP COMPONENT (PETA SPNF)
   ========================================================================== */
.map-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    height: calc(100vh - 75px);
    overflow: hidden;
}

.map-sidebar {
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.map-search {
    position: relative;
}

.map-search input {
    padding-left: 2.5rem;
}

.map-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.map-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-item-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    background-color: var(--bg-main);
    transition: var(--transition);
}

.map-item-card:hover, .map-item-card.active {
    border-color: var(--accent);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.map-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-title);
}

.map-item-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

#map-container {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .map-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 250px 1fr;
        height: auto;
    }
    #map-container {
        height: 450px;
    }
    .map-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: 350px;
    }
}

/* Custom Popup Style Leaflet */
.leaflet-popup-content-wrapper {
    background-color: var(--bg-card) !important;
    color: var(--text-body) !important;
    font-family: var(--font-sans) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.5rem;
}
.leaflet-popup-tip {
    background-color: var(--bg-card) !important;
}
.popup-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-title);
    margin-bottom: 0.5rem;
}
.popup-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   HELP DESK & ACCORDION (FAQ)
   ========================================================================== */
.faq-section {
    max-width: 800px;
    margin: 3rem auto;
}

.faq-group {
    margin-bottom: 2rem;
}

.faq-group-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    display: inline-block;
    color: var(--primary);
}

body.dark-theme .faq-group-title {
    color: #f8fafc;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: var(--text-title);
}

.faq-header:hover {
    background-color: var(--bg-main);
}

.faq-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent);
}

.faq-body {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.faq-item.active .faq-body {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    max-height: 1000px; /* arbitrary high number */
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float-wa 4s ease-in-out infinite;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.08);
}

/* ==========================================================================
   ADMIN LAYOUT & DASHBOARD
   ========================================================================== */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--primary);
    color: #ffffff;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: #ffffff;
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-menu-item a, .admin-menu-item button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--secondary);
    font-weight: 500;
    border-radius: var(--radius-md);
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.admin-menu-item a:hover, .admin-menu-item.active a {
    color: #ffffff;
    background-color: rgba(255,255,255,0.08);
}

.admin-menu-item.active a {
    color: #ffffff;
    background-color: var(--accent);
}

.admin-content {
    background-color: var(--bg-main);
    padding: 2.5rem;
    overflow-y: auto;
}

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

.admin-title-group h2 {
    font-size: 1.75rem;
}

.admin-title-group p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background-color: var(--bg-main);
    color: var(--text-title);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-body);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: rgba(0,0,0,0.01);
}

@media (max-width: 992px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none; /* simple sidebar drawer needed for mobile admin */
    }
}

/* ==========================================================================
   MODAL PANEL DIALOG
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}

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

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-title);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

@keyframes float-wa {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.02); }
    100% { transform: translateY(0px) scale(1); }
}

/* ==========================================================================
   PRINT LAYOUT
   ========================================================================== */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    .header-wrapper, footer, .whatsapp-float, .btn, .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .receipt-box {
        border: 2px solid #000 !important;
        box-shadow: none !important;
        padding: 2rem !important;
    }
}
