/* Modern Hospital Management System - Custom styles */

/* ======== DISABLE ANIMATIONS & TRANSITIONS (keep transform for sticky/layout) ======== */
*, *::before, *::after {
    animation: none !important;
    transition: none !important;
    /* NOTE: transform is NOT disabled here — it breaks sticky positioning */
}

:root {
    --primary-gradient: linear-gradient(135deg, #0f52ba 0%, #00a8cc 100%);
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f4f7f6;
    font-family: 'Outfit', 'Inter', sans-serif;
    overflow-y: scroll; /* Always show scrollbar → prevents Bootstrap modal padding shift */
}

/* Prevent Bootstrap from adding padding-right when modal opens */
body.modal-open {
    padding-right: 0 !important;
    overflow-y: scroll !important;
}

[data-bs-theme="dark"] body {
    background-color: #121212;
}

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

.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.card:hover {
    box-shadow: var(--hover-shadow);
}

.modal-content {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.rounded-card {
    border-radius: 16px;
}

.sidebar {
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.nav-link {
    border-radius: 8px;
    margin: 2px 10px;
}

.nav-link.active {
    background: var(--primary-gradient);
    color: white !important;
}

/* Spinner overlay for AJAX */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

[data-bs-theme="dark"] #loading-spinner {
    background: rgba(0,0,0,0.7);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* ========================================================
   SALARY GRID — 12-Month Table
   ======================================================== */

/* Sticky header row */
.salary-grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #1e293b;   /* dark slate */
    color: #f1f5f9;
    font-size: 0.78rem;
    text-align: center;
    vertical-align: middle;
    border-color: #334155;
    white-space: nowrap;
}

/* Sticky first column (employee name) */
.salary-grid-table .emp-name-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    font-size: 0.83rem;
    border-right: 2px solid #e2e8f0;
    min-width: 150px;
}
.salary-grid-table thead .emp-name-col {
    z-index: 4;  /* above both sticky directions */
    background: #1e293b;
    color: #f1f5f9;
}

/* Month column min width */
.salary-grid-table .month-col {
    min-width: 82px;
}

/* All cells */
.salary-grid-table td {
    font-size: 0.8rem;
    vertical-align: middle;
    padding: 4px 3px;
}

/* ---- PAID CELL ---- */
.salary-cell-paid {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 8px;
    padding: 5px 6px;
    text-align: center;
    cursor: default;
    border: 1px solid #6ee7b7;
}
.salary-cell-paid .paid-amount {
    color: #065f46;
    font-weight: 700;
    font-size: 0.78rem;
    display: block;
}
.salary-cell-paid .paid-date {
    color: #047857;
    font-size: 0.65rem;
    display: block;
}
.salary-cell-paid .paid-badge {
    display: inline-block;
    background: #059669;
    color: #fff;
    font-size: 0.6rem;
    border-radius: 10px;
    padding: 1px 6px;
    margin-top: 2px;
}

/* ---- UNPAID CELL ---- */
.salary-cell-unpaid {
    text-align: center;
    padding: 3px 2px;
}
.salary-cell-unpaid .pay-btn-grid {
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 20px;
    border-width: 1.5px;
    white-space: nowrap;
}

/* ---- FUTURE CELL ---- */
.salary-cell-future {
    text-align: center;
    color: #d1d5db;
    font-size: 1rem;
    letter-spacing: 2px;
}

/* ---- TOTAL COLUMN ---- */
.salary-grid-table .total-col {
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.82rem;
    text-align: center;
    color: #0f766e;
    border-left: 2px solid #e2e8f0;
}
.salary-grid-table .total-col.text-muted {
    color: #9ca3af !important;
    font-weight: 400;
}

/* Current month highlight in header */
.salary-grid-table thead th.current-month-header {
    background: #f59e0b !important;
    color: #1c1917 !important;
}

/* Year nav button */
.year-nav-btn {
    font-size: 0.82rem;
    padding: 4px 12px;
}

/* Summary cards */
.salary-summary-card {
    border-radius: 14px;
    padding: 16px 20px;
    color: #fff;
}

/* Make table scroll container show shadow on right */
.salary-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.salary-table-wrap table {
    margin-bottom: 0;
}
