:root {
    --primary: #0B1120;
    --sidebar-bg: #0B1120;
    --sidebar-border: #1E293B;
    --brand-blue: #2563EB;
    --brand-blue-hover: #1D4ED8;
    --brand-cyan: #06B6D4;
    --brand-green: #10B981;
    --brand-red: #EF4444;
    --brand-yellow: #F59E0B;

    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --border-color: #E2E8F0;
    --border-subtle: #F1F5F9;

    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-page);
    color: var(--text-body);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.58rem 1.15rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.25;
    white-space: nowrap;
    transition: all 0.2s ease;
    touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-hover) 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover { background: var(--brand-blue-hover); }
.btn-secondary { background: #FFFFFF; color: var(--text-heading); border-color: var(--border-color); }
.btn-secondary:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn-outline { background: transparent; color: var(--text-heading); border-color: var(--border-color); }
.btn-outline:hover { background: #FFFFFF; border-color: var(--brand-blue); color: var(--brand-blue); }
.btn-danger { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }
.btn-danger:hover { background: #DC2626; color: #FFFFFF; }
.btn-sm { padding: 0.38rem 0.75rem; font-size: 0.8rem; border-radius: 6px; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

/* Form Elements */
.form-group { margin-bottom: 0.95rem; width: 100%; }
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}
.form-group input, .form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background: #FFFFFF;
    color: var(--text-heading);
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
}
.badge-success { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.badge-danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.badge-warning { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.badge-light { background: #F1F5F9; color: var(--text-heading); border: 1px solid #E2E8F0; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-live { background: var(--brand-green); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25); }

/* Navigation Bar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.brand img { height: 36px; width: auto; border-radius: var(--radius-sm); }
.nav-links { display: flex; gap: 0.5rem; align-items: center; }

/* Hero Section */
.hero-wrapper {
    padding: 3rem 0 4rem;
    background: radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 15% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2.5rem; }
.hero-content { display: flex; flex-direction: column; align-items: flex-start; }
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #EFF6FF;
    color: var(--brand-blue);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #DBEAFE;
    margin-bottom: 1rem;
}
.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.gradient-text {
    background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtext {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 520px;
}
.hero-cta-group { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; }
.trust-bar { display: flex; gap: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border-color); width: 100%; }
.trust-item h4 { font-size: 1.35rem; font-weight: 800; color: var(--text-heading); }
.trust-item p { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.mascot-frame {
    width: 100%;
    max-width: 380px;
    background: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 10px 30px -4px rgba(37, 99, 235, 0.22);
}
.hero-illustration { width: 100%; height: auto; display: block; border-radius: var(--radius-md); }

/* Feature Cards */
.features-section { padding: 2.5rem 0 5rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.9rem; font-weight: 800; color: var(--text-heading); margin-bottom: 0.35rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); }
.f-icon-box {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    background: #EFF6FF; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 1rem;
}

/* Admin Dashboard Layout */
.layout-wrapper { display: flex; min-height: 100vh; position: relative; }
.mobile-header {
    display: none;
    background: var(--sidebar-bg);
    color: #FFFFFF;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sidebar-border);
}
.mobile-brand {
    display: flex; align-items: center; gap: 0.6rem;
    color: #FFFFFF; text-decoration: none; font-size: 1.1rem; font-weight: 800;
}
.mobile-brand img { height: 30px; width: auto; border-radius: 6px; }
.menu-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none; color: #FFFFFF;
    padding: 6px 12px; border-radius: 6px;
    font-size: 1.25rem; cursor: pointer;
}

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: #FFFFFF;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--sidebar-border);
    transition: transform 0.25s ease;
    z-index: 1001;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 0.65rem;
    margin-bottom: 1.75rem; text-decoration: none; color: #FFFFFF;
}
.sidebar-brand img { height: 32px; width: auto; border-radius: var(--radius-sm); }
.sidebar-brand strong { font-size: 1.15rem; font-weight: 800; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 0.65rem;
    color: var(--text-light); text-decoration: none;
    padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.86rem; transition: all 0.2s ease;
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.sidebar-nav a.active { background: var(--brand-blue); color: #FFFFFF; }
.nav-logout {
    color: #F87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-top: auto; text-decoration: none;
    padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
    font-weight: 700; display: block; text-align: center; font-size: 0.86rem;
}
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(2px); z-index: 1000;
}
.sidebar-overlay.active { display: block; }

.main-content {
    flex-grow: 1;
    padding: 1.5rem 1.75rem;
    background: var(--bg-page);
    width: 100%; min-width: 0;
}
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem; gap: 0.75rem; flex-wrap: wrap;
}
.topbar h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text-heading); }
.topbar p { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.15rem; }

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-surface); padding: 1rem 1.15rem;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px; background: #CBD5E1;
}
.stat-card.stat-accent::after { background: var(--brand-blue); }
.stat-card.stat-success::after { background: var(--brand-green); }
.stat-card.stat-danger::after { background: var(--brand-red); }
.stat-label {
    display: block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-heading); line-height: 1.1; }
.stat-accent .stat-value { color: var(--brand-blue); }
.stat-success .stat-value { color: var(--brand-green); }
.stat-danger .stat-value { color: var(--brand-red); }

/* Panels & Tables */
.panel-card {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1.25rem;
    box-shadow: var(--shadow-xs);
}
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; gap: 0.6rem; flex-wrap: wrap;
}
.panel-header h3 { font-size: 1rem; font-weight: 800; color: var(--text-heading); }
.dashboard-columns { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    width: 100%;
}
.data-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
    background: #FFFFFF; white-space: nowrap;
}
.data-table th {
    text-align: left; padding: 0.65rem 0.85rem; background: #F8FAFC;
    border-bottom: 1px solid var(--border-color); color: var(--text-muted);
    font-weight: 700; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.4px;
}
.data-table td { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background-color: #FAFAFA; }

/* Modals */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    z-index: 2000; padding: 1rem; overflow-y: auto;
}
.modal-content {
    background: #FFFFFF; max-width: 480px; margin: 4vh auto;
    padding: 1.5rem; border-radius: var(--radius-md);
    box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
}
.modal-content h3 { font-size: 1.2rem; font-weight: 800; color: var(--text-heading); margin-bottom: 0.35rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.25rem; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem;
    font-size: 0.85rem; font-weight: 600;
}
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #DBEAFE; }
.alert-danger { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

.main-footer {
    border-top: 1px solid var(--border-color); background: #FFFFFF;
    padding: 1.25rem 0; margin-top: 3rem;
}
.footer-content {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; gap: 0.5rem;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Tablets: 968px | Mobile: 640px)
   ========================================================================== */
@media (max-width: 968px) {
    .mobile-header { display: flex; }
    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; width: 250px;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { padding: 1.2rem 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .dashboard-columns { grid-template-columns: 1fr; gap: 1rem; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero-content { align-items: center; }
    .hero-title { font-size: 2.3rem; }
    .hero-cta-group { justify-content: center; }
    .trust-bar { justify-content: center; gap: 1.5rem; }
}

@media (max-width: 640px) {
    .main-content { padding: 1rem 0.75rem; }
    .topbar h2 { font-size: 1.25rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .stat-card { padding: 0.75rem 0.9rem; }
    .stat-value { font-size: 1.45rem; }
    .hero-title { font-size: 1.85rem; }
    .hero-cta-group { flex-direction: column; width: 100%; }
    .hero-cta-group .btn { width: 100%; }
    .trust-bar { flex-direction: column; gap: 0.85rem; }
    .filter-bar, .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form input, .inline-form select, .inline-form button { width: 100%; min-width: unset; }
}