:root {
    --primary: #0F172A;
    --accent: #0EA5E9;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --radius: 12px;
    --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 10px 15px -3px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Layout (White Background & Clean Elevation) */
.sidebar {
    width: 260px;
    background: #FFFFFF;
    color: #1E293B;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 9999;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.08);
}

.sidebar.mobile-open {
    transform: translateX(0);
}

.sidebar-brand {
    padding: 1.75rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid #E2E8F0;
}

.sidebar-brand img {
    max-width: 155px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    overflow-y: auto;
    flex: 1;
}

/* Neon Glow Links & Vibrant Gradient Design */
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 0.3rem 0.85rem;
}

.sidebar-menu li a:hover, 
.sidebar-menu li a.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.55), 0 0 6px rgba(37, 99, 235, 0.35);
    transform: translateX(4px);
}

.sidebar-menu li a i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

/* Main Content Wrapper */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 800;
}

.content-body {
    padding: 1.25rem;
    flex: 1;
}

/* Cards & Tables */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th, td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    background: #F8FAFC;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #FFFFFF;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #0284C7;
}

/* Mobile App-Like Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 9997;
    justify-content: space-around;
    align-items: center;
    padding: 0.4rem 0;
    height: 65px;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748B;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
    flex: 1;
    height: 100%;
}

.mobile-bottom-nav a i {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: var(--accent);
}

/* Strict 2-Column Mobile App Grid */
.dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
    margin-bottom: 1.5rem !important;
    width: 100% !important;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    width: 100% !important;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1200px) {
    .sidebar {
        transform: translateX(0) !important;
    }
    .main-content {
        margin-left: 260px !important;
    }
    .sidebar-backdrop {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding-bottom: 85px !important;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .header {
        padding: 0.85rem 1rem;
    }
    .content-body {
        padding: 0.85rem;
    }
}