/* Vacation History Section Styles */
.vacation-history-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #7fb069 0%, #8db596 100%);
    color: white;
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fiscal-year-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.fiscal-year-selector label {
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.fiscal-year-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.fiscal-year-dropdown:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fiscal-year-dropdown:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.fiscal-year-info {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.btn.btn-outline {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn.btn-outline:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.vacation-summary-container {
    padding: 24px;
}

.vacation-summary-table {
    min-height: 200px;
}

/* Loading Placeholder Enhanced */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    font-size: 2rem;
    color: #7fb069;
    margin-bottom: 16px;
}

.loading-placeholder p {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: #333;
}

.loading-placeholder small {
    color: #888;
    font-size: 0.9rem;
}

/* Vacation Summary Stats */
.vacation-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    padding: 0 24px 20px 24px;
    margin-top: 16px;
}

.stat-card {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    border-left: 4px solid #7fb069;
    transition: all 0.3s ease;
    position: relative;
    min-height: 100px;
}

.stat-card.clickable {
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left-color: #10b981;
    border-color: #cbd5e0;
    background: linear-gradient(135deg, #edf2f7 0%, #f7fafc 100%);
}

.stat-card.clickable:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.stat-card.clickable:hover .stat-icon {
    transform: scale(1.1);
}

/* Vacation Type Icons */
.stat-icon.sick-leave {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-icon.personal-leave {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.vacation-leave {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stat-icon.maternity-leave {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.stat-icon.ordination-leave {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.stat-icon.helping-leave {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.training-leave {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Legacy status icons */
.stat-icon.approved {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.stat-icon.pending {
    background: linear-gradient(135deg, #FF9800, #f57c00);
}

.stat-icon.rejected {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.stat-icon.total {
    background: linear-gradient(135deg, #2196F3, #1976d2);
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-info h4 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
}

.stat-info span {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    display: block;
    line-height: 1;
}

.stat-info small {
    color: #888;
    font-size: 0.7rem;
}

.stat-detail {
    font-size: 0.7rem;
    color: #7fb069;
    margin-top: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    background: rgba(127, 176, 105, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.stat-card.clickable:hover .stat-detail {
    opacity: 1;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.2);
    transform: scale(1.02);
}

.stat-card.active {
    border-left-color: #059669 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #f7fef8 100%) !important;
}

.stat-card.active .stat-detail {
    opacity: 1;
    color: #059669;
}

/* 🌿 Beautiful Green Table Styles for Vacation Summary */
.vacation-summary table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid rgba(127, 176, 105, 0.1);
}

.vacation-summary thead {
    background: linear-gradient(135deg, #7fb069 0%, #8db596 100%);
    position: relative;
}

.vacation-summary thead::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { transform: translateX(-100%); opacity: 0; }
    50% { transform: translateX(100%); opacity: 1; }
}

.vacation-summary th {
    padding: 18px 16px;
    text-align: center;
    font-weight: 700;
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.vacation-summary th:first-child {
    text-align: left;
    padding-left: 24px;
    border-top-left-radius: 10px;
}

.vacation-summary th:last-child {
    border-right: none;
    border-top-right-radius: 10px;
}

.vacation-summary td {
    padding: 16px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    border-right: 1px solid rgba(226, 232, 240, 0.4);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.vacation-summary td:first-child {
    text-align: left;
    padding-left: 24px;
    font-weight: 600;
    color: #1e293b;
    border-left: 3px solid transparent;
}

.vacation-summary td:last-child {
    border-right: none;
}

.vacation-summary tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.vacation-summary tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.vacation-summary tbody tr:hover {
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.05) 0%, rgba(141, 181, 150, 0.03) 100%);
    transform: translateX(4px);
    box-shadow: 
        4px 0 0 #7fb069,
        0 2px 12px rgba(127, 176, 105, 0.15);
}

.vacation-summary tbody tr:hover td:first-child {
    border-left-color: #7fb069;
}

.vacation-summary tbody tr:last-child td {
    border-bottom: none;
}

.vacation-summary tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.vacation-summary tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

/* 🎨 Enhanced Status Colors with Badges */
.text-green-600, .font-medium.text-green-600 { 
    color: white !important; 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.text-yellow-600, .font-medium.text-yellow-600 { 
    color: white !important; 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

.text-red-600, .font-medium.text-red-600 { 
    color: white !important; 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

.text-blue-600, .font-medium.text-blue-600, .text-blue-700, .font-bold.text-blue-600 { 
    color: white !important; 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    font-size: 1em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 60px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
    border: 2px solid rgba(59, 130, 246, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.text-green-700 { 
    color: white !important; 
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3) !important;
    border: 1px solid rgba(5, 150, 105, 0.2) !important;
}

.text-yellow-700 { 
    color: white !important; 
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3) !important;
    border: 1px solid rgba(217, 119, 6, 0.2) !important;
}

.text-red-700 { 
    color: white !important; 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 50px !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
}

.text-blue-700 { 
    color: white !important; 
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    font-size: 1.1em !important;
    text-align: center !important;
    display: inline-block !important;
    min-width: 70px !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
    border: 2px solid rgba(37, 99, 235, 0.2) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* 🎯 Enhanced Table Cell Content */
.vacation-summary td i {
    margin-right: 8px;
    color: #7fb069;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(127, 176, 105, 0.3);
}

.vacation-summary td:first-child {
    position: relative;
}

/* Enhanced Number Display */
.vacation-summary td:not(:first-child) {
    font-weight: 600;
    font-size: 1rem;
}

/* Total Row Enhancement */
.vacation-summary tbody tr:last-child {
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.1) 0%, rgba(141, 181, 150, 0.05) 100%);
    border-top: 2px solid rgba(127, 176, 105, 0.3);
    font-weight: 700;
}

.vacation-summary tbody tr:last-child td {
    color: #5a7c52;
    font-weight: 700;
    font-size: 1.05em;
    padding: 18px 16px;
}

.vacation-summary tbody tr:last-child td:first-child {
    color: #4a6642;
    position: relative;
}

.vacation-summary tbody tr:last-child td:first-child::before {
    content: '🏆';
    margin-right: 8px;
    font-size: 1.2em;
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

.no-data i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 16px;
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .vacation-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .section-controls {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .fiscal-year-selector {
        justify-content: center;
    }
    
    .fiscal-year-dropdown {
        min-width: 180px;
    }
    
    .fiscal-year-info {
        font-size: 0.8rem;
        justify-content: center;
    }
    
    .vacation-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 16px 16px 16px;
    }
    
    .stat-card {
        min-height: 80px;
        padding: 10px;
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .stat-info span {
        font-size: 1.2rem;
    }
    
    .stat-info h4 {
        font-size: 0.7rem;
    }
    
    .vacation-summary-container {
        padding: 16px;
    }
    
    .vacation-summary {
        overflow-x: auto;
    }
    
    .vacation-summary table {
        min-width: 600px;
    }
}

/* Animation for refresh button */
.btn-outline .fa-sync-alt {
    transition: transform 0.3s ease;
}

.btn-outline:hover .fa-sync-alt {
    transform: rotate(180deg);
}

.refreshing .fa-sync-alt {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 🎯 Vacation Detail Container Styles */
.vacation-detail-container {
    margin-top: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vacation-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    background: linear-gradient(135deg, #7fb069 0%, #8db596 100%);
    color: white;
}

.vacation-detail-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vacation-detail-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vacation-detail-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.vacation-detail-content {
    padding: 24px;
}

/* 💎 Vacation Detail Table Styles */
.vacation-detail-content .vacation-summary table {
    border: 2px solid rgba(16, 185, 129, 0.1);
}

.vacation-detail-content .vacation-summary thead {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.vacation-detail-content .vacation-summary tbody tr:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.03) 100%);
    box-shadow: 
        4px 0 0 #10b981,
        0 2px 12px rgba(16, 185, 129, 0.15);
}

.vacation-detail-content .vacation-summary tbody tr:hover td:first-child {
    border-left-color: #10b981;
}

.vacation-detail-content .vacation-summary td i {
    color: #10b981;
    text-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}

.vacation-detail-content .vacation-summary tbody tr:last-child {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-top: 2px solid rgba(16, 185, 129, 0.3);
}

.vacation-detail-content .vacation-summary tbody tr:last-child td {
    color: #047857;
}

.vacation-detail-content .vacation-summary tbody tr:last-child td:first-child {
    color: #065f46;
}

/* Stats Section in Detail View */
.vacation-detail-content > div:first-child {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
}

.vacation-detail-content > div:first-child h3 {
    color: #10b981;
    margin: 0 0 15px 0;
}

.vacation-detail-content > div:first-child > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.vacation-detail-content > div:first-child strong {
    color: #047857;
    font-weight: 700;
}

/* Responsive for detail view */
@media (max-width: 768px) {
    .vacation-detail-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .vacation-detail-content {
        padding: 16px;
    }
}