:root {
    --primary-color: #dc2626;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dark-color: #1a1a1a;
    --light-color: #fef2f2;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
    background-color: #fef2f2;
    color: #334155;
    line-height: 1.6;
    font-size: 0.875rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a1a 0%, #2d0a0a 100%);
    color: white;
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.8125rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(220, 38, 38, 0.2);
    color: white;
}

.sidebar-menu svg {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    padding: 2rem;
}

/* Header */
.header {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-header {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #b91c1c;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.8125rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #f8fafc;
}

.table th {
    padding: 0.875rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
}

.table tbody tr:hover {
    background-color: #fef2f2;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #cffafe;
    color: #155e75;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* Notification Badge */
.notification-badge {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 18px;
    text-align: center;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Header with Logo */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    align-items: center;
    gap: 1rem;
}

.mobile-header-logo {
    height: 40px;
    width: auto;
}

.mobile-menu-toggle {
    display: none;
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.625rem;
    border-radius: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* Overlay for mobile menu */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.sidebar-overlay.active {
    display: block;
}

/* Desktop - hide cards, show table */
.employee-cards,
.request-cards {
    display: none;
}

/* Mobile Employee Cards */
.employee-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.employee-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.employee-card-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.employee-card-email {
    font-size: 0.8125rem;
    color: var(--secondary-color);
}

.employee-card-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.employee-card-field {
    display: flex;
    flex-direction: column;
}

.employee-card-label {
    font-size: 0.6875rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.employee-card-value {
    font-size: 0.875rem;
    color: var(--dark-color);
    font-weight: 500;
}

.employee-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Compact Request Cards */
.request-card {
    background: white;
    border-radius: 0.75rem;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0.5rem;
}

.request-card-header:hover {
    opacity: 0.8;
}

.request-card-title {
    flex: 1;
}

.request-card-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1f2937;
    margin-bottom: 0.125rem;
}

.request-card-department {
    font-size: 0.8125rem;
    color: #6b7280;
}

.request-card-toggle {
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.request-card-details {
    display: none;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
}

.request-card-details.open {
    display: block;
}

.request-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
}

.request-card-label {
    font-size: 0.6875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.request-card-value {
    font-size: 0.8125rem;
    color: #111827;
    font-weight: 500;
    text-align: right;
}

.request-card-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    padding-top: 0.625rem;
    margin-top: 0.625rem;
    border-top: 1px solid #f3f4f6;
}

.request-card-actions .btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
}

/* Dashboard Stats */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Dashboard Actions */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.dashboard-actions .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    min-height: 120px;
}

.dashboard-actions .btn svg {
    width: 32px;
    height: 32px;
}

.dashboard-actions .btn span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Auth Page Animations */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4.5rem;
    }
    
    .header {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 0.875rem;
    }

    /* Hide tables, show cards */
    .table-container table {
        display: none !important;
    }
    
    .employee-cards,
    .request-cards {
        display: block !important;
    }
    
    /* Compact stats */
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* 2x2 Grid for dashboard actions */
    .dashboard-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .dashboard-actions .btn {
        padding: 1rem 0.75rem;
        min-height: 100px;
        gap: 0.5rem;
    }
    
    .dashboard-actions .btn svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .dashboard-actions .btn span {
        font-size: 0.8125rem;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 1.75rem !important;
    }
    
    .dashboard-actions .btn {
        padding: 0.875rem 0.5rem;
        min-height: 90px;
    }
    
    .dashboard-actions .btn span {
        font-size: 0.75rem;
    }
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}