/* Stunning Modern Glassmorphism Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #f6f8fb;
    --surface-color: rgba(255, 255, 255, 0.7);
    --surface-hover: rgba(255, 255, 255, 0.9);
    
    --primary-color: #0f172a;
    --primary-dark: #000000;
    
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    
    --text-main: #1e293b;
    --text-muted: #64748b; 
    --text-inverse: #ffffff;
    
    --border-color: rgba(255, 255, 255, 0.5);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    --danger-color: #f43f5e;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar - Glassmorphism */
.sidebar {
    width: 220px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-main);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.02);
}

.sidebar::-webkit-scrollbar { width: 0px; }

.brand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand i {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
    padding-left: 0.75rem;
}

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

.nav-links li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-links li a i {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.nav-links li a:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transform: translateX(4px);
}

.nav-links li a.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.nav-links li a.active i {
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 220px;
    flex: 1;
    padding: 1.5rem 2rem;
    width: calc(100% - 220px);
    min-height: 100vh;
}

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

header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.04em;
    position: relative;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--accent-gradient);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.3rem 1rem 0.3rem 0.3rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    cursor: pointer;
}

.user-profile:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Alert Cards (KPIs) */
.alert-card {
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.alert-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.alert-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.95);
}

.alert-icon-bg {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--accent-color);
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.menu-btn:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 1);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: var(--btn-bg);
    color: var(--btn-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

.menu-text h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

/* Buttons */
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Tables */
.table-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow-x: auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.002);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Responsiveness (Mobile & Tablets) */
#mobile-menu-btn {
    display: none;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1.5rem 1rem !important;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }
    
    .user-profile {
        align-self: flex-start;
    }
    
    #mobile-menu-btn {
        display: inline-flex;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .alert-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
