/**
 * KBA Payroll System - Custom Styles
 * Modern Bootstrap 5 Design
 */

/* ========== Global Styles ========== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --light-bg: #f8f9fa;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    min-height: 100vh;
}

/* ========== Navigation ========== */
.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.navbar {
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0 0.2rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* ========== Cards ========== */
.card {
    border-radius: 12px;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px 12px 0 0 !important;
}

.card-footer {
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ========== Statistics Cards ========== */
.stat-card {
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* ========== Buttons ========== */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

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

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

/* ========== Tables ========== */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

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

/* ========== Badges ========== */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* ========== Forms ========== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0.6rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* ========== Modals ========== */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ========== Footer ========== */
.footer {
    background-color: white;
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
}

/* ========== DataTables Customization ========== */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0.4rem 0.8rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px;
    margin: 0 2px;
}

/* ========== Utilities ========== */
.shadow-sm {
    box-shadow: var(--card-shadow) !important;
}

.bg-primary {
    background-color: #667eea !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.text-primary {
    color: #667eea !important;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* ========== Loading Spinner ========== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
