:root {
    --primary: #6C3BAA;
    --primary-dark: #4A1F7A;
    --primary-light: #8B5CF6;
    --secondary: #F59E0B;
    --accent: #EC4899;
    --success: #10B981;
    --info: #3B82F6;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #1F2937;
    --gray: #6B7280;
    --light: #F3F4F6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F9FAFB;
    color: var(--dark);
    min-height: 100vh;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

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

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.sidebar-nav .nav-section {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    font-weight: 600;
}

.sidebar-nav .nav-item {
    padding: 0.25rem 0.75rem;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.sidebar-nav .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: white;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    width: 300px;
}

.topbar-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    width: 100%;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-right .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.content-area {
    padding: 1.5rem 2rem;
    flex: 1;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.page-header p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.card-body {
    padding: 1.5rem;
}

.stat-card {
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-card.purple { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.stat-card.green { background: linear-gradient(135deg, #059669 0%, #34D399 100%); }
.stat-card.blue { background: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%); }
.stat-card.orange { background: linear-gradient(135deg, #D97706 0%, #FBBF24 100%); }

.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 59, 170, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    border-top: none;
    padding: 0.75rem 1rem;
}

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

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

.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 6px;
}

.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-completed { background: #DBEAFE; color: #1E40AF; }

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.alert {
    border-radius: 10px;
    border: none;
}

footer {
    background: white;
    border-top: 1px solid #E5E7EB;
    padding: 1rem 2rem;
    color: var(--gray);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .content-area {
        padding: 1rem;
    }
    .topbar {
        padding: 0.5rem 1rem;
    }
}

.navbar-toggler {
    border: none;
    padding: 0.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

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

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

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

.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}
