/* Employees Tab Premium Styles */

.emp-card-header {
    background: linear-gradient(179deg, #e5f7f0 0%, #ffffff 80%);
    color: #15803d;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #16a34a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emp-header-title h2 {
    margin: 0;
    font-size: 24px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

.emp-header-title p {
    margin: 5px 0 0 0;
    opacity: 0.7;
    font-size: 14px;
}

.emp-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.emp-stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    /* Clickable now */
    position: relative;
    overflow: hidden;
}

.emp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.emp-stat-card.active-view {
    border-color: #3b82f6;
    background: #eff6ff;
}

.emp-stat-card.active-view::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #3b82f6;
}

.emp-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.emp-table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: visible;
    border: 1px solid #e2e8f0;
}

.emp-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.emp-table th {
    padding: 15px 10px;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
}

.emp-table td {
    text-align: center;
    vertical-align: middle;
}

/* Modal Stylings */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-modal-overlay.show {
    opacity: 1;
}

.custom-modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.custom-modal-overlay.show .custom-modal-content {
    transform: scale(1);
}

.modal-header-custom {
    padding: 20px 25px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-custom h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.modal-body-custom {
    padding: 25px;
    overflow-y: auto;
}

.modal-footer-custom {
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fff;
}

/* Upload Photo Box */
.photo-upload-box {
    width: 60px;
    /* Reduced size as per design usually matching input height or slightly larger, previously 100px might be too big for the row. But user didn't complain about size, just "frame". */
    /* Wait, the image showed a square box. Let's keep 100px or adjust if needed. */
    width: 50px;
    height: 50px;
    /* Matching the input row height roughly */
    /* actually, line 663 input is 45px height. A 100px box next to it breaks alignment if not flexed properly. */
    /* The HTML structure (lines 642-654) shows it's in a flex container. */
    /* Let's stick to the existing CSS but enforce overflow and Z-index */

    width: 50px;
    height: 50px;
    border-radius: 12px;
    /* Smoother rounding */
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    /* Critical for containing image */
    position: relative;
    flex-shrink: 0;
    /* Don't shrink */
    transition: all 0.2s;
    margin: 0;
    /* Reset margin as it is in a flex row now */
}

.photo-upload-box:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.photo-upload-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    /* Above icon */
    border-radius: 12px;
}

.photo-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 10;
    /* Topmost */
    cursor: pointer;
}

/* --- KANBAN BOARD --- */
.kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    align-items: flex-start;
}

.kanban-col {
    min-width: 300px;
    width: 300px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    flex-shrink: 0;
}

.kanban-header {
    padding: 15px;
    font-weight: 700;
    font-size: 14px;
    color: #334155;
    border-bottom: 2px solid;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 15px 15px 0 0;
}

.kanban-body {
    padding: 15px;
    overflow-y: auto;
    min-height: 100px;
    flex: 1;
}

.kanban-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border-right: 4px solid transparent;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.kanban-card:active {
    cursor: grabbing;
}

/* --- TABBED PROFILE MODAL --- */
.profile-modal-overlay .custom-modal-content {
    /* Override for larger size handled inline in JS, but ensure clean basics */
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.p-tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 15px 10px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.p-tab-btn:hover {
    color: #0f172a;
    background: #f8fafc;
}

.p-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.p-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-group {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-group label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 5px;
    display: block;
    font-weight: 700;
}

.info-group div {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* Table Hover */
.emp-row-clickable:hover td {
    background-color: #f1f5f9;
}

/* Attendance Card */
.att-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.att-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.att-card img,
.att-card .placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    object-fit: cover;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #64748b;
    font-size: 20px;
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}


.photo-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- KANBAN BOARD (PREMIUM REDESIGN) --- */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    align-items: flex-start;
}

.kanban-col {
    flex: 1;
    /* Flexible Width */
    min-width: 300px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s;
}

/* Card Status Colors */
.kanban-card.status-todo {
    background: #fff;
    border-left: 4px solid #94a3b8;
}

.kanban-card.status-doing {
    background: #fff;
    border-left: 4px solid #3b82f6;
}

.kanban-card.status-done {
    background: #f0fdf4;
    border-left: 44px solid #22c55e;
}

.kanban-col:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Edit Mode Card Style */
.edit-mode-card {
    background: linear-gradient(179deg, #fff3d3 0%, #ffffff 80%) !important;
    border: 1px solid #f3ba2a !important;
}

.edit-mode-card h5 {
    color: #b45309 !important;
}

.edit-mode-card .icon-box {
    background: #f59e0b !important;
}

.kanban-header {
    padding: 18px 20px;
    font-weight: 800;
    font-size: 15px;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

/* Colored Top Borders for Columns */
.kanban-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: currentColor;
    /* Uses color set inline */
    opacity: 0.8;
}

.kanban-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

.kanban-card {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    cursor: grab;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.kanban-card:active {
    cursor: grabbing;
}

/* ID Badge Redesign */
.kanban-card .card-id-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 10px;
    font-weight: 900;
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 20px;
    transition: background 0.2s;
}

.kanban-card:hover .card-id-badge {
    background: #e2e8f0;
    color: #334155;
}

/* Title Styling */
.kanban-card .card-title {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
    padding-left: 50px;
    /* Space for ID */
    text-align: right;
    /* RTL */
}

/* Price Tag Redesign */
.kanban-img-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
    border: 1px solid #a7f3d0;
}

/* Footer Actions */
.kanban-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f8fafc;
    padding-top: 12px;
    margin-top: 5px;
}

.kanban-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 20px;
}

.kanban-actions i {
    font-size: 18px;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
    cursor: pointer;
}

.kanban-actions i:hover {
    background: #f1f5f9;
}

.k-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: inline-block;
    margin-top: 5px;
}

/* --- ATTENDANCE GRID --- */
.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.att-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.att-card.present {
    border-color: #22c55e;
    background: #f0fdf4;
}

.att-card.absent {
    border-color: #ef4444;
    background: #fef2f2;
}

.att-card img {
    width: 50px;
    height: 50px;
    border-radius: 15%;
    margin-bottom: 10px;
    object-fit: cover;
}

/* --- Nursing / Financial Table Style (Premium Logic) --- */
.nursing-table-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.nursing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Tajawal', sans-serif;
    margin-bottom: 0 !important;
}

.nursing-table thead {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.nursing-table th {
    padding: 16px 15px;
    text-align: center;
    font-weight: 800;
    color: #1e293b;
    border-right: 1px solid #e2e8f0;
    /* Vertical Border */
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.nursing-table th:last-child {
    border-right: none;
}

.nursing-table td {
    padding: 14px 15px;
    text-align: center;
    color: #475569;
    font-weight: 600;
    border-right: 1px solid #e2e8f0;
    /* Vertical Border */
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.nursing-table td:last-child {
    border-right: none;
}

.nursing-table tr:last-child td {
    border-bottom: none;
}

.nursing-table tr:hover {
    background-color: #f8fafc;
}

/* Specific Alignment for Name */
.nursing-table td:nth-child(3) {
    text-align: right;
    padding-right: 20px;
    color: #0f172a;
    font-weight: 700;
}

/* Footer Pagination */
.nursing-table-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 25px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    gap: 12px;
}

.nursing-btn-show-all {
    background-color: #1e3a8a;
    /* Dark Blue */
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.nursing-btn-show-all:hover {
    background-color: #1e40af;
}

.nursing-btn-pages {
    background-color: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.nursing-btn-pages:hover {
    background-color: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

/* --- PREMIUM PROFILE TABLE STYLES --- */
.profile-fin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.profile-fin-table thead {
    background: #f8fafc;
}

.profile-fin-table th {
    padding: 16px 20px;
    font-weight: 800;
    font-size: 13px;
    color: #334155;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.profile-fin-table td {
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.profile-fin-table tr:last-child td {
    border-bottom: none;
}

.profile-fin-table tr:hover {
    background: #fbfbfc;
}

.profile-fin-table .fin-month {
    font-weight: 800;
    color: #0f172a;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 14px;
    display: inline-block;
}

.profile-fin-table .fin-base {
    color: #64748b;
    font-weight: 600;
}

.profile-fin-table .fin-bonus {
    color: #166534;
    background: #dcfce7;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    display: inline-block;
}

.profile-fin-table .fin-deduct {
    color: #991b1b;
    background: #fee2e2;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    display: inline-block;
}

.profile-fin-table .fin-net {
    color: #2563eb;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: -0.5px;
}

/* --- Creative Status Pill & Popover --- */
.status-pill-wrapper {
    position: relative;
    display: inline-block;
}

.status-pill {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    user-select: none;
    white-space: nowrap;
}

.status-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Status Variants */
.status-active {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.status-inactive {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.status-leave {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.status-terminated {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.status-pill i.caret {
    font-size: 10px;
    opacity: 0.6;
    margin-right: 2px;
}

/* Popover Menu */
.status-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: white;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    width: 180px;
    z-index: 1000;
    display: none;
    animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top center;
}

.status-popover.show {
    display: block;
}

.status-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 50%;
    transform: translateX(50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid #f1f5f9;
    border-top: 1px solid #f1f5f9;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateX(50%) translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(50%) translateY(0) scale(1);
    }
}

.status-option {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.status-option:hover {
    background: #f8fafc;
    color: #0f172a;
    transform: translateX(-3px);
}

.status-option:last-child {
    margin-bottom: 0;
}

.status-option .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-label {
    flex: 1;
}

.status-desc {
    font-size: 10px;
    color: #94a3b8;
    font-weight: normal;
    display: block;
    margin-top: 2px;
}

/* --- ATTENDANCE TAB V2 (ANIMATED) --- */
.att-header-container {
    animation: fadeInDown 0.5s ease-out;
}

.current-date-badge {
    background: #eff6ff;
    color: #3b82f6;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    border: 1px solid #dbeafe;
}

.att-filters-toolbar {
    border: 1px solid #f1f5f9;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
}




.attendance-grid {
    display: grid;
    /* Fit ~4 cards on standard desktop (e.g. 1200px / 300 = 4) */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

/* ... existing styles ... */

/* --- CREATIVE HOLIDAY MODAL --- */
.holiday-selector-grid {
    display: flex;
    justify-content: space-between;
    /* Spread them out */
    gap: 10px;
    flex-wrap: nowrap;
    /* Single line forced */
    overflow-x: auto;
    /* Safety scroll */
    padding: 10px 0;
}

.holiday-card-item {
    flex: 1;
    /* Auto width */
    min-width: 70px;
    height: 90px;
    border-radius: 15px;
    /* Requested 15px */
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Specific Holiday Styles */
.specific-holiday-chip {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.specific-holiday-chip:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.specific-holiday-chip i {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
}

.specific-holiday-chip i:hover {
    opacity: 1;
}

.holiday-card-item:hover {
    transform: translateY(-5px);
    border-color: #cbd5e1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.holiday-card-item.selected {
    background: #fff0f0;
    /* Light Red bg for "Holiday/Off" */
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.holiday-card-item .day-name {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 5px;
}

.holiday-item-icon {
    font-size: 24px;
    opacity: 0.2;
    transition: 0.3s;
}

.holiday-card-item.selected .holiday-item-icon {
    opacity: 1;
    transform: scale(1.2);
}

/* Checkmark indicator */
.holiday-check-indicator {
    position: absolute;
    top: 10px;
    right: 50%;
    transform: translateX(50%) scale(0);
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.holiday-card-item.selected .holiday-check-indicator {
    top: -5px;
    /* Hidden checkmark, style choice: or just colored card */
    /* Let's remove checkmark, the color is enough. */
    display: none;
}


.att-card-item {
    background: #fff;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation-fill-mode: forwards;
    /* Reduced height by optimizing padding/content */
}

.att-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.att-card-inner {
    padding: 15px 18px;
    /* Reduced Padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    background: linear-gradient(to right, #ffffff, #fcfcfc);
    min-height: 100px;
    /* Reduced min-height */
}

.att-idx-photo {
    width: 60px;
    /* Slightly Reduced size */
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    /* Prevent shrinking */
}

.att-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* Critical for truncation in flex items */
    margin-right: 12px;
    /* Spacing */
    flex: 1;
}

.att-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 17px;
    margin-bottom: 2px;
    white-space: nowrap;
    /* Prevent wrapping */
    overflow: hidden;
    /* Hide overflow */
    text-overflow: ellipsis;
    /* Add dots ... */
    max-width: 100%;
}

.att-role-small {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.att-time-small {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
}

.att-role {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}



.att-status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.att-status-badge i {
    font-size: 18px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Creative Index Badge Style */
.att-card-index {
    position: absolute;
    left: 10px;
    bottom: -5px;
    font-size: 50px;
    font-weight: 900;
    color: #475569;
    /* Slate 600 - distinct grey */
    opacity: 0.15;
    z-index: 1;
    font-family: 'Segoe UI', sans-serif;
    pointer-events: none;
    transition: all 0.3s;
}

.att-card-item:hover .att-card-index {
    opacity: 0.25;
    transform: scale(1.1);
    color: #334155;
    /* Darker Slate on hover */
}

/* --- CUSTOM MODAL OVERLAY --- */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-modal-content {
    background: white;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUpFade 0.3s ease-out;
}

.modal-header-custom {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-custom h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.modal-body-custom {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer-custom {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 16px 16px;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ATTENDANCE STATS (COMPACT ROW) --- */
.att-stats-compact-grid {
    display: flex;
    /* Flex for single row */
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.att-stat-compact-item {
    flex: 1;
    /* Distribute space equally */
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
    min-width: 0;
    /* Prevent overflow */
}

.att-stat-compact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-info-compact {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* For truncation */
}

.stat-lbl {
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
}

.stat-val {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
}