/* ============================================
   LEAVE MANAGEMENT PAGE - DARK THEME
   Pixel-perfect Figma implementation
   ============================================ */

/* ===== PAGE CONTAINER ===== */
[data-theme="dark"] .leave-management-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 32px;
}

[data-theme="dark"] .leave-management-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== PAGE HEADER ===== */
[data-theme="dark"] .leave-page-header {
    background: rgba(30, 35, 58, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .leave-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

[data-theme="dark"] .leave-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
}

[data-theme="dark"] .leave-header-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

[data-theme="dark"] .leave-header-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

[data-theme="dark"] .leave-header-actions {
    display: flex;
    gap: 12px;
}

[data-theme="dark"] .btn-export {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

[data-theme="dark"] .btn-export:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .btn-add-leave {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

[data-theme="dark"] .btn-add-leave:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

/* ===== STATS CARDS GRID ===== */
[data-theme="dark"] .leave-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

[data-theme="dark"] .leave-stat-card {
    background: rgba(30, 35, 58, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

[data-theme="dark"] .leave-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .leave-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
}

[data-theme="dark"] .leave-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

[data-theme="dark"] .leave-stat-icon.orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

[data-theme="dark"] .leave-stat-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

[data-theme="dark"] .leave-stat-icon.purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

[data-theme="dark"] .leave-stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

[data-theme="dark"] .leave-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

[data-theme="dark"] .leave-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

/* ===== FILTERS SECTION ===== */
[data-theme="dark"] .leave-filters-section {
    background: rgba(30, 35, 58, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

[data-theme="dark"] .leave-filters-grid {
    display: grid;
    grid-template-columns: 200px 1fr 250px;
    gap: 16px;
    align-items: center;
}

[data-theme="dark"] .leave-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[data-theme="dark"] .leave-filter-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .leave-filter-input,
[data-theme="dark"] .leave-filter-select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

[data-theme="dark"] .leave-filter-input:focus,
[data-theme="dark"] .leave-filter-select:focus {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] .leave-filter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .leave-search-wrapper {
    position: relative;
}

[data-theme="dark"] .leave-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

[data-theme="dark"] .leave-filter-input.with-icon {
    padding-left: 40px;
}

/* ===== TABLE SECTION ===== */
[data-theme="dark"] .leave-table-section {
    background: rgba(30, 35, 58, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

[data-theme="dark"] .leave-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

[data-theme="dark"] .leave-table-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .leave-records-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

[data-theme="dark"] .leave-records-table thead th {
    background: rgba(15, 23, 42, 0.5);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .leave-records-table thead th:first-child {
    border-top-left-radius: 8px;
}

[data-theme="dark"] .leave-records-table thead th:last-child {
    border-top-right-radius: 8px;
}

[data-theme="dark"] .leave-records-table tbody tr {
    transition: all 0.2s;
}

[data-theme="dark"] .leave-records-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .leave-records-table tbody td {
    padding: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .leave-records-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge Numbers */
[data-theme="dark"] .leave-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

[data-theme="dark"] .leave-badge.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .leave-badge.green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

[data-theme="dark"] .leave-badge.orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

[data-theme="dark"] .leave-badge.red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

[data-theme="dark"] .leave-badge.purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

/* ===== PAGINATION ===== */
[data-theme="dark"] .leave-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

[data-theme="dark"] .leave-pagination button {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .leave-pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .leave-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

[data-theme="dark"] .leave-pagination button.active {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    border-color: transparent;
    color: #ffffff;
}

/* ===== STATUS GUIDE ===== */
[data-theme="dark"] .leave-status-guide {
    background: rgba(30, 35, 58, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 24px;
}

[data-theme="dark"] .leave-status-guide h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

[data-theme="dark"] .leave-status-items {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

[data-theme="dark"] .leave-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-theme="dark"] .leave-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

[data-theme="dark"] .leave-status-badge.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .leave-status-badge.green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

[data-theme="dark"] .leave-status-badge.orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}

[data-theme="dark"] .leave-status-badge.purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

[data-theme="dark"] .leave-status-badge.gray {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

[data-theme="dark"] .leave-status-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    [data-theme="dark"] .leave-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    [data-theme="dark"] .leave-management-page {
        padding: 16px;
    }

    [data-theme="dark"] .leave-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    [data-theme="dark"] .leave-header-left {
        flex-direction: column;
        align-items: flex-start;
    }

    [data-theme="dark"] .leave-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    [data-theme="dark"] .leave-header-actions button {
        flex: 1;
        justify-content: center;
    }

    [data-theme="dark"] .leave-stats-grid {
        grid-template-columns: 1fr;
    }

    [data-theme="dark"] .leave-filters-grid {
        grid-template-columns: 1fr;
    }

    [data-theme="dark"] .leave-table-section {
        overflow-x: auto;
    }

    [data-theme="dark"] .leave-records-table {
        min-width: 900px;
    }

    [data-theme="dark"] .leave-status-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}