:root {
    --primary: #003537;
    --primary-light: #004d4f;
    --primary-dark: #002324;
    --accent: #d4af37; /* Gold */
    --accent-light: #f1e5ac;
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --inner-glow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 20px -4px rgba(0,0,0,0.08), 0 4px 8px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Containers */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Desktop */
.sidebar {
    width: 300px;
    background: var(--primary);
    color: white;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-brand {
    padding: 0.5rem 1.25rem 1.5rem 1.25rem;
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: white;
}

.nav-menu-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}

.nav-menu-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.nav-menu {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.nav-link i {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--accent);
}

.nav-link.active i {
    color: var(--accent);
}

/* Cards & Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(225, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.85);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    width: 100%;
    min-height: 100vh;
}

/* Mobile & Hamburger Utilities (Hidden on Desktop) */
/* Mobile Floating Glass Dock (Aurora UI) */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 440px;
    background: rgba(0, 53, 55, 0.85); /* Deep Teal Glass */
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 0.5rem;
    z-index: 5000;
    justify-content: space-around;
    align-items: center;
    border-radius: 2.25rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 700;
    gap: 0.35rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0.25rem 0;
    flex: 1;
}

.mobile-nav-item i {
    width: 22px;
    height: 22px;
    transition: all 0.4s ease;
}

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-nav-item.active i {
    transform: translateY(-8px) scale(1.3);
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

/* Aurora Glow Indicator */
.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    bottom: -15px;
    width: 32px;
    height: 12px;
    background: var(--accent);
    filter: blur(15px);
    opacity: 0.6;
    border-radius: 50%;
    z-index: -1;
}

.mobile-nav-item span {
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.mobile-nav-item.active span {
    transform: translateY(-2px);
    opacity: 1;
}

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

/* Stats Card Refinement */
.stats-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 120px;
}

.stats-icon {
    width: 64px;
    height: 64px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.stats-card:hover .stats-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stats-info h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.stats-info p {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

/* Premium Buttons */
.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.2);
}

.btn-primary-grad {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-success-grad {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-danger-grad {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Responsive Grid Utilities */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

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

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        z-index: 1100;
        padding-bottom: 80px;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        padding: 1.5rem;
        margin-bottom: 70px;
        width: 100%;
    }
    .mobile-nav {
        display: flex;
    }
    .grid-split {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

.hamburger-btn {
        display: flex !important;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .hide-mobile {
        display: none !important;
    }
    header h1 {
        font-size: 1.125rem !important;
    }
    header p {
        font-size: 0.7rem !important;
    }
}

/* Module Page Responsive Header */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.module-header .header-actions {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

@media (max-width: 992px) {
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .module-header .header-actions {
        width: 100%;
        display: flex;
        align-items: stretch;
        gap: 0.5rem;
    }
    .module-header .header-actions input {
        flex: 1;
        height: 44px; /* Standard mobile tap size */
    }
    .module-header .header-actions .btn-primary {
        height: 44px;
        display: flex;
        align-items: center;
        padding: 0 1rem;
        font-size: 0.8rem;
    }
}

.hamburger-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

/* Utility */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

/* Modern Form & Inputs */
.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glass-input {
    width: 100%;
    padding: 0.75rem 1rem !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(0, 53, 55, 0.1) !important;
    border-radius: 0.75rem !important;
    font-size: 0.875rem !important;
    color: var(--text-main) !important;
    transition: all 0.3s ease !important;
}

.glass-input:focus {
    outline: none !important;
    background: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 53, 55, 0.05) !important;
}

/* Responsive Table to Card Transformation */
@media (max-width: 768px) {
    .glass-card table, 
    .glass-card thead, 
    .glass-card tbody, 
    .glass-card th, 
    .glass-card td, 
    .glass-card tr { 
        display: block !important; 
    }

    .glass-card thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .glass-card tr { 
        border: 1px solid rgba(0, 53, 55, 0.1);
        margin-bottom: 1.25rem;
        border-radius: 1.25rem;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }

    .glass-card td { 
        border: none !important;
        position: relative;
        padding: 0.6rem 0.5rem 0.6rem 45% !important; 
        text-align: right;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        font-size: 0.825rem;
    }

    .glass-card td:before { 
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 40%; 
        padding-right: 10px; 
        white-space: nowrap;
        text-align: left;
        font-weight: 800;
        color: var(--text-muted);
        font-size: 0.6rem;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: scale(1.02);
}
