@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #2c9aff;
    /* Bright Blue */
    --primary-dark: #1a7ede;
    /* Darker Blue */
    --secondary-color: #64748b;
    /* Slate Gray */
    --success-color: #10b981;
    /* Emerald */
    --danger-color: #ef4444;
    /* Red */
    --warning-color: #f59e0b;
    /* Amber */
    --light-bg: #f8fafc;
    /* Slate 50 */
    --sidebar-bg: #1e293b;
    /* Slate 800 */
    --dark-text: #0f172a;
    /* Slate 900 */
    --white: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Layout */
.d-flex {
    display: flex;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: var(--transition);
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
    width: calc(100% - 260px);
    transition: var(--transition);
}

/* Sidebar Components */
.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 1rem 2rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border-left-color: var(--primary-color);
}

/* Auth Cards */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
}

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 420px;
}

/* Components */
.btn {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-sizing: border-box;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 154, 255, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    font-weight: 600;
    color: var(--secondary-color);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-approved {
    background-color: #d1fae5;
    color: #047857;
}

.badge-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        width: 260px;
        /* Ensure width is fixed when active */
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 4rem 1rem 1rem 1rem;
        /* Add top padding for toggle button */
    }

    .mobile-toggle {
        display: block;
    }

    .card-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
    }

    /* Responsive Tables */
    .card {
        padding: 1rem;
        overflow-x: auto;
        /* Enable horizontal scroll for cards with tables */
    }

    table {
        min-width: 600px;
        /* Force minimum width to trigger scroll */
    }

    .auth-card {
        padding: 1.5rem;
    }
}