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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --font-sans: 'Inter', sans-serif;
}

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

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 1000;
    background-color: var(--secondary);
    color: #f8fafc;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar .brand-logo {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin: 1.5rem 0.5rem 0.5rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    transition: all 0.2s ease;
}

.nav-link-custom i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-link-custom:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link-custom:hover i {
    transform: scale(1.15);
}

.nav-link-custom.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Top Navbar Styling */
.top-navbar {
    position: relative;
    z-index: 1020 !important;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Cards & Containers */
.card-custom {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.card-stat {
    border-left: 4px solid var(--primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

/* Tables */
.table-custom {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table-custom th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 1rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

/* Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #4338ca, var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
}

/* Auth Login Page */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #2e1042 100%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
}

.auth-card h4, .auth-card strong, .auth-card .text-dark {
    color: #f8fafc !important;
}

.auth-card .form-control-custom {
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.auth-card .form-control-custom:focus {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.auth-card .form-label-custom {
    color: #cbd5e1 !important;
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Form Styles */
.form-control-custom {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    outline: 0;
}

.form-label-custom {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    .sidebar.show {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 0.75rem 1rem;
        margin-bottom: 1.5rem;
    }
    .top-navbar h4 {
        font-size: 1.1rem;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .card-custom {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 0.75rem;
    }
    .top-navbar h4 {
        max-width: 130px;
    }
}
