.loaderModal {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999 !important;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 9999;
}

.loaderModalDiv {
    text-align: center;
    top: calc(50% - 40px) !important;
    left: calc(50% - 40px) !important;
    position: absolute;
}

.loaderModalDiv .ball-clip-rotate-multiple>div {
    border: 2px solid white;
    border-bottom-color: transparent;
    border-top-color: transparent;
}

.loaderModalDiv .ball-clip-rotate-multiple>div:last-child {
    border-color: white transparent white transparent;
}

#form .row {
    margin-bottom: 15px;
}

.info-span {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.71094rem;
    color: rgb(3, 169, 244);
}

/* DataTables controls bar — length left, search right */
.dt-controls-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.dt-controls-bar--footer {
    flex-wrap: wrap;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.dt-controls-bar__length {
    flex: 0 0 auto;
}

.dt-controls-bar__filter {
    flex: 0 0 auto;
    margin-left: auto;
}

.dt-controls-bar__info {
    flex: 1 1 auto;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #6c757d;
}

.dt-controls-bar__paging {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Remove floats & extra margins from DT internals */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Length — label above dropdown (matches Search layout) */
.dt-controls-bar:not(.dt-controls-bar--footer) .dataTables_length {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.dt-controls-bar:not(.dt-controls-bar--footer) .dataTables_length::before {
    content: 'Records per page';
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #212529;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_length label {
    display: block;
    margin: 0;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_length .form-select {
    display: inline-block !important;
    width: 4.75rem !important;
    min-width: 4.75rem !important;
    max-width: 4.75rem !important;
    flex: 0 0 4.75rem !important;
    height: 2.2rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Filter label + input */
.dataTables_wrapper .dataTables_filter {
    width: auto !important;
    text-align: right !important;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    margin: 0;
    width: auto !important;
    max-width: 100%;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    color: #212529;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_filter input {
    flex: 0 0 auto;
    width: 14rem !important;
    max-width: 100%;
    min-width: 10rem;
    height: 2.2rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

@media (max-width: 575.98px) {
    .dt-controls-bar:not(.dt-controls-bar--footer) {
        gap: 0.5rem;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 10rem !important;
        min-width: 8rem;
    }
}

/* Attendance list — page filters above table */
.attendance-filters {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.attendance-filters .form-label {
    margin-bottom: 0.35rem;
}

.attendance-table-section {
    margin-top: 0;
}

.dt-toolbar > div {
    width: 100% !important;
    max-width: none !important;
}

.dt-controls-bar .dt-toolbar > div {
    width: auto !important;
    max-width: none !important;
}

#datatable_wrapper input,
#datatable_wrapper .form-select {
    border-color: #eee !important;
    background-color: white !important;
}

#datatable_wrapper .form-check-input:checked {
    background-color: #1b84ff !important;
    border-color: #1b84ff !important;
}

/* Show only active — toggle switch */
.only-active-toggle.form-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0;
    min-height: auto;
    margin: 0;
}

.only-active-toggle .form-check-input {
    width: 2.75rem;
    height: 1.4rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    background-color: #dee2e6;
    border-color: #ced4da;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.only-active-toggle .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(27, 132, 255, 0.2);
    border-color: #1b84ff;
}

.only-active-toggle .form-check-input:checked {
    background-color: #1b84ff !important;
    border-color: #1b84ff !important;
}

.only-active-toggle .form-check-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    padding-top: 0.1rem;
}

table.table.dataTable.table-striped>tbody>tr.selected>* {
    box-shadow: inset 0 0 0 9999px rgb(0 32 79 / 95%) !important;
}


th {
    font-weight: bolder !important;
}

#kt_app_header {
    background-color: #004fa3 !important;
}

.btn-xs {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.25;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* DataTables action buttons — aligned on desktop & mobile */
.dt-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}

.dt-actions .btn {
    margin: 0 !important;
}

table.dataTable tbody td.dt-action-col {
    vertical-align: middle !important;
    white-space: normal !important;
}

@media (max-width: 991.98px) {
    table.dataTable tbody td.dt-action-col {
        min-width: 6.5rem;
    }

    .dt-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.35rem;
    }

    .dt-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.btn-primary {
    background-color: #004fa3 !important;
    border-color: #004fa3 !important;
}

.btn-outline-primary {
    color: #004fa3 !important;
    border: 1px solid #004fa3 !important;
    background-color: #fff !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    color: #fff !important;
    background-color: #004fa3 !important;
    border-color: #004fa3 !important;
}

.btn-outline-secondary {
    color: #5e6278 !important;
    border: 1px solid #c4cada !important;
    background-color: #fff !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: #252f4a !important;
    background-color: #f1f1f4 !important;
    border-color: #99a1b7 !important;
}

.page-item.active .page-link {
    background-color: #004fa3 !important;
    border-color: #004fa3 !important;
}

.app-sidebar .menu .menu-item .menu-link.active .menu-title {
    color: #004fa3 !important;
}

.image_background_fit {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.image_background {
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.user-avatar-img {
    object-fit: cover;
    object-position: center top;
    padding: 0 !important;
    background-color: #f1f5f9;
    image-rendering: auto;
    backface-visibility: hidden;
}

.header-user-trigger {
    min-height: 56px;
    overflow: visible;
}

#kt_header_user_menu_toggle {
    overflow: visible !important;
}

#kt_app_header,
#kt_app_header .app-container,
#kt_app_header .app-navbar,
#kt_app_header .app-navbar-item {
    overflow: visible !important;
}

.header-user-avatar {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center 30% !important;
    border: 3px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22) !important;
    background-color: #f1f5f9 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

@media (max-width: 991px) {
    .header-user-avatar {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-width: 2px !important;
    }

    .header-user-trigger {
        min-height: 44px;
    }
}

.header-menu-avatar {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
    min-height: 76px !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center 20% !important;
    border: 3px solid #fff !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.16);
    background-color: #f1f5f9;
    padding: 0 !important;
}

.fs-12 {
    font-size: 12px !important;
}

.disabled {
    color: var(--bs-gray-500) !important;
    background-color: var(--bs-gray-200) !important;
    border-color: var(--bs-gray-300) !important;
    opacity: 1 !important;
}

.tempus-dominus-widget.timepicker-sbs .td-row {
    display: block !important;
}

.tempus-dominus-widget.timepicker-sbs .td-row .td-half {
    width: 100% !important;
}

.time-container {
    padding-top: 10px !important;
    margin-top: 10px !important;
    border-top: 1px solid grey !important;
}

.sso-login {
    background-color: #7ea3cf !important;
}

.menu-item .menu-link .menu-title {
    font-weight: 600 !important;
}

.form-check-input {
    border: 2px solid #DBDFE9 !important;
}

.gradient-leave-requests {
    background: linear-gradient(135deg, #6ccf95, #6ea9d6);
    /* mint green to light blue, slightly darker */
    color: #fff !important;
}

.gradient-leave {
    background: linear-gradient(135deg, #7ea6fa, #a0bde8);
    /* soft blue, a bit deeper */
    color: #fff !important;
}

.gradient-overtime {
    background: linear-gradient(135deg, #b0db4c, #6d9778);
    /* light green toned down for contrast */
    color: #fff !important;
    border: none;
}

.btn.gradient-overtime i,
.btn.gradient-leave i,
.btn.gradient-training i,
.btn.gradient-expiry i,
.btn.gradient-leave-requests i,
.dt-actions .btn.gradient-overtime i,
.dt-actions .btn.gradient-leave i,
.dt-actions .btn.gradient-training i,
.dt-actions .btn.gradient-expiry i,
.dt-actions .btn.gradient-leave-requests i {
    color: #fff !important;
    opacity: 1 !important;
}

.gradient-training {
    background: linear-gradient(135deg, #d192bf, #7a89c4);
    /* pink to lavender, more muted */
    color: #fff !important;
}

.gradient-expiry {
    background: linear-gradient(135deg, #d2c273, #b99700);
    /* soft yellow/orange, richer */
    color: #fff !important;
}

/* Optional text override */
.card .text-white {
    color: #fff !important;
}

/* Dashboard summary tiles */
.dashboard-summary-card {
    border: 1px solid #e7edf3 !important;
    transition: all 0.18s ease;
}

.dashboard-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.6rem 1rem rgba(15, 23, 42, 0.1) !important;
}

.dashboard-summary-card__body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.75rem;
    min-height: 92px;
    padding: 0.9rem 1rem;
}

.dashboard-summary-card__text {
    min-width: 0;
}

.dashboard-summary-card__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    margin-bottom: 0;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dashboard-summary-card__icon i {
    color: #fff !important;
    opacity: 1 !important;
    line-height: 1;
}

.dashboard-summary-card__count {
    color: #0f172a !important;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-summary-card__label {
    color: #334155 !important;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}

.dashboard-page .card:hover {
    transform: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.dashboard-page .dashboard-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.1) !important;
}

.dashboard-page__top {
    align-items: stretch;
}

.dashboard-page__top > .col-md-9 {
    display: flex;
    flex-direction: column;
}

.dashboard-summary-grid {
    width: 100%;
}

/* Dashboard tiles — palette aligned with Leaves status cards */
.dashboard-summary-card.gradient-leave-requests {
    /* Pending — amber */
    background: linear-gradient(135deg, #ffefb3 0%, #ffffff 70%) !important;
    border-color: #ffe08a !important;
    color: #0f172a !important;
}

.dashboard-summary-card.gradient-leave-requests .dashboard-summary-card__icon {
    background: #f59e0b !important;
    color: #ffffff !important;
}

.dashboard-summary-card.gradient-overtime {
    /* Approved — green */
    background: linear-gradient(135deg, #d9fbe7 0%, #ffffff 70%) !important;
    border-color: #c2f1cd !important;
    color: #0f172a !important;
}

.dashboard-summary-card.gradient-overtime .dashboard-summary-card__icon {
    background: #22c55e !important;
    color: #ffffff !important;
}

.dashboard-summary-card.gradient-leave {
    /* My applications — blue */
    background: linear-gradient(135deg, #cfe5ff 0%, #ffffff 70%) !important;
    border-color: #bcd6ff !important;
    color: #0f172a !important;
}

.dashboard-summary-card.gradient-leave .dashboard-summary-card__icon {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.dashboard-summary-card.gradient-training {
    /* Training — teal (leaf accent, distinct from green) */
    background: linear-gradient(135deg, #ccfbf1 0%, #ffffff 70%) !important;
    border-color: #99f6e4 !important;
    color: #0f172a !important;
}

.dashboard-summary-card.gradient-training .dashboard-summary-card__icon {
    background: #14b8a6 !important;
    color: #ffffff !important;
}

.dashboard-summary-card.gradient-expiry {
    /* Documents expiring — rose (rejected / alert tone on Leaves) */
    background: linear-gradient(135deg, #fecdd3 0%, #ffffff 70%) !important;
    border-color: #fda4af !important;
    color: #0f172a !important;
}

.dashboard-summary-card.gradient-expiry .dashboard-summary-card__icon {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* ========================================
   HRMS View Pages - Custom Styles
   ======================================== */

/* Info Card Backgrounds */
.info-card-light {
    background-color: #f8f9fa;
}

.info-card-highlight {
    background-color: #e3f2fd;
}

/* Card Styling */
.info-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 0.75rem;
}

.info-item-icon {
    margin-right: 0.75rem;
    font-size: 1.5rem;
    color: #0d6efd;
}

.info-item-content {
    flex-grow: 1;
}

.info-item-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.info-item-value {
    font-weight: 700;
    font-size: 1.25rem;
    color: #212529;
}

.info-item-value-primary {
    font-weight: 700;
    font-size: 1.5rem;
    color: #0d6efd;
}

.info-item-value-small {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
}

/* Status Badge Styling */
.status-badge {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
}

/* Description/Reason Section */
.description-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background-color: #f8f9fa;
}

.description-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.description-text {
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1rem;
}

/* Timeline Icons */
.timeline-icon {
    width: 30px;
    height: 30px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-icon i {
    font-size: 1.25rem;
    color: white;
}

/* Leave view page */
.leave-view-page .leave-view-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.leave-view-page .leave-view-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 0.25rem;
}

.leave-view-page .leave-view-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border: 1px solid #e3ebf7;
    margin-bottom: 1.5rem;
}

.leave-view-page .leave-view-hero__avatar {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 79, 163, 0.15);
    flex-shrink: 0;
}

.leave-view-page .leave-view-hero__avatar--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #004fa3 0%, #3b82f6 100%);
    color: #fff;
    font-size: 2rem;
}

.leave-view-page .leave-view-hero__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.leave-view-page .leave-view-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.leave-view-page .leave-view-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.leave-view-page .leave-view-hero__status {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}

.leave-view-page .leave-view-hero__status .status-badge,
.employee-view-page .employee-view-hero__badges .badge {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    gap: 0.4rem;
}

.leave-view-page .leave-view-hero__status .status-badge i,
.employee-view-page .employee-view-hero__badges .badge i {
    color: inherit !important;
    opacity: 1 !important; /* override .card-body i */
    line-height: 1;
    flex-shrink: 0;
}

.leave-view-page .leave-view-hero__status .status-badge .bi-circle-fill,
.employee-view-page .employee-view-hero__badges .badge .bi-circle-fill {
    font-size: 0.55rem !important;
}

.leave-view-page .leave-view-hero__status .status-badge.bg-success,
.leave-view-page .leave-view-hero__status .status-badge.badge-success,
.employee-view-page .employee-view-hero__badges .badge.bg-success {
    background-color: #198754 !important;
    color: #fff !important;
}

.leave-view-page .leave-view-hero__status .status-badge.bg-primary,
.leave-view-page .leave-view-hero__status .status-badge.badge-primary,
.employee-view-page .employee-view-hero__badges .badge.bg-primary {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.leave-view-page .leave-view-hero__status .status-badge.bg-danger,
.leave-view-page .leave-view-hero__status .status-badge.badge-danger,
.employee-view-page .employee-view-hero__badges .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.leave-view-page .leave-view-hero__status .status-badge.bg-warning,
.leave-view-page .leave-view-hero__status .status-badge.badge-warning,
.employee-view-page .employee-view-hero__badges .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.leave-view-page .leave-view-hero__status .status-badge.bg-secondary,
.leave-view-page .leave-view-hero__status .status-badge.badge-secondary,
.employee-view-page .employee-view-hero__badges .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

.employee-view-page .employee-view-hero__badges .badge.bg-light {
    background-color: #f8f9fa !important;
    color: #0d6efd !important;
    border-color: #dee2e6 !important;
}

.employee-view-page .employee-view-hero__badges .badge.bg-light i {
    color: #0d6efd !important;
}

.leave-view-page .leave-view-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.leave-view-page .leave-view-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f7;
}

.leave-view-page .leave-view-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.leave-view-page .leave-view-stat {
    padding: 1rem 1.1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.leave-view-page .leave-view-stat--highlight {
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f7ff 100%);
    border-color: #cfe2ff;
}

.leave-view-page .leave-view-stat__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.leave-view-page .leave-view-stat__value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.leave-view-page .leave-view-stat--highlight .leave-view-stat__value {
    font-size: 1.35rem;
    color: #004fa3;
}

.leave-view-page .leave-view-reason {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.leave-view-page .leave-view-reason__label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.leave-view-page .leave-view-reason__text {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}

.leave-view-page .leave-view-balances {
    position: sticky;
    top: 1rem;
}

.leave-view-page .leave-balance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-radius: 0.75rem;
    background: #f4f7fb;
    border: 1px solid #dbe5f0;
    margin-bottom: 0.65rem;
}

.leave-view-page .leave-balance-item:last-child {
    margin-bottom: 0;
}

.leave-view-page .leave-balance-item__label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    color: #0f2747;
    font-size: 1.02rem;
    line-height: 1.2;
}

.leave-view-page .leave-balance-item__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    flex-shrink: 0;
}

.leave-view-page .leave-balance-item__icon i {
    color: #fff !important;
    opacity: 1 !important; /* override .card-body i muted opacity */
    font-size: 1.08rem;
    line-height: 1;
}

.leave-view-page .leave-balance-item .badge {
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.38rem 0.66rem;
    border-radius: 0.48rem;
    letter-spacing: 0.01em;
}

.leave-view-page .leave-balance-item .badge.bg-danger {
    background-color: #c81e4a !important;
    color: #fff !important;
}

.leave-view-page .leave-balance-item .badge.bg-success {
    background-color: #0f9f4a !important;
    color: #fff !important;
}

.leave-view-page .leave-balance-item .badge.bg-warning {
    background-color: #f3b200 !important;
    color: #1f2937 !important;
}

/* Neutral value chip used in summary-style widgets */
.leave-view-page .leave-balance-item__value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 11rem;
    padding: 0.38rem 0.66rem;
    border-radius: 0.48rem;
    background: #ffffff;
    border: 1px solid #d2dce9;
    color: #1f2937;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.leave-view-page .leave-balance-item__value--wrap {
    white-space: normal;
    text-align: left;
    justify-content: flex-start;
}

.leave-view-page .leave-balance-item__icon--sick {
    background: #dc3545;
    color: #fff;
}

.leave-view-page .leave-balance-item__icon--annual {
    background: #198754;
    color: #fff;
}

.leave-view-page .leave-balance-item__icon--comp {
    background: #f59e0b;
    color: #fff;
}

.leave-view-page .leave-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.leave-view-page .leave-timeline__item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.35rem;
    position: relative;
}

.leave-view-page .leave-timeline__item:last-child {
    padding-bottom: 0;
}

.leave-view-page .leave-timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 2rem;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.leave-view-page .leave-timeline__marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #004fa3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.leave-view-page .leave-timeline__marker i {
    color: #fff !important;
    opacity: 1 !important; /* override global icon opacity */
    font-size: 1.15rem;
    line-height: 1;
}

.leave-view-page .leave-timeline__meta i,
.leave-view-page .leave-timeline__remarks i {
    opacity: 1 !important; /* keep small timeline icons readable */
}

.leave-view-page .leave-timeline__marker--pending {
    background: #f59e0b;
}

.leave-view-page .leave-timeline__marker--rejected {
    background: #dc3545;
}

.leave-view-page .leave-timeline__marker--approved {
    background: #198754;
}

.leave-view-page .leave-timeline__marker--future {
    background: #fff;
    color: #94a3b8;
    border: 2px dashed #94a3b8;
}

.leave-view-page .leave-timeline__marker--future i {
    color: #94a3b8 !important;
}

.leave-view-page .leave-timeline__item--future .leave-timeline__status {
    color: #64748b;
    font-weight: 500;
}

.leave-view-page .leave-timeline__item--future .leave-timeline__meta {
    color: #94a3b8;
}

.leave-view-page .leave-timeline__content {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.leave-view-page .leave-timeline__status {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.leave-view-page .leave-timeline__meta {
    font-size: 0.875rem;
    color: #64748b;
}

.leave-view-page .leave-timeline__remarks {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.leave-view-page .leave-view-actions .form-label {
    font-weight: 600;
    color: #475569;
}

@media (max-width: 991.98px) {
    .leave-view-page .leave-view-hero {
        flex-wrap: wrap;
    }

    .leave-view-page .leave-view-hero__status {
        margin-left: 0;
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }

    .leave-view-page .leave-view-balances {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .leave-view-page .leave-view-stats {
        grid-template-columns: 1fr;
    }

    .leave-view-page .leave-view-hero__avatar {
        width: 72px;
        height: 72px;
    }
}

/* Header Spacing */
.header-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #0d6efd;
}

/* Gap Utilities */
.gap-4 {
    gap: 1.5rem;
}

/* Overtime Modal Styles */
.status-card-clickable {
    cursor: pointer;
}

.status-line {
    height: 4px;
    display: none;
}

/* Status tiles (Leave / Overtime / Training) — match dashboard summary cards */
.pass-status-card {
    border: 1px solid #e7edf3 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.pass-status-card:not(.is-active) {
    opacity: 0.92;
}

.pass-status-card__body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 0.75rem;
    padding: 1rem 0.9rem 1.05rem;
    min-height: auto;
}

.pass-status-card__text {
    flex: 1;
    min-width: 0;
}

.pass-status-card__icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 1.35rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pass-status-card__icon i {
    color: #fff !important;
    opacity: 1 !important;
    line-height: 1;
}

.pass-status-card__count {
    color: #0f172a !important;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pass-status-card__label {
    color: #475569 !important;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.pass-status-card[data-status="pending"] {
    background: linear-gradient(135deg, #ffefb3 0%, #ffffff 72%) !important;
    border-color: #ffe08a !important;
}

.pass-status-card[data-status="pending"] .pass-status-card__icon {
    background: #f59e0b !important;
}

.pass-status-card[data-status="approved"] {
    background: linear-gradient(135deg, #d9fbe7 0%, #ffffff 72%) !important;
    border-color: #c2f1cd !important;
}

.pass-status-card[data-status="approved"] .pass-status-card__icon {
    background: #22c55e !important;
}

.pass-status-card[data-status="rejected"] {
    background: linear-gradient(135deg, #fecdd3 0%, #ffffff 72%) !important;
    border-color: #fda4af !important;
}

.pass-status-card[data-status="rejected"] .pass-status-card__icon {
    background: #ef4444 !important;
}

.pass-status-card[data-status="my-application"] {
    background: linear-gradient(135deg, #cfe5ff 0%, #ffffff 72%) !important;
    border-color: #bcd6ff !important;
}

.pass-status-card[data-status="my-application"] .pass-status-card__icon {
    background: #3b82f6 !important;
}

/* Active — rounded bottom accent + subtle lift (same base look) */
.pass-status-card.is-active {
    position: relative;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

.pass-status-card.is-active::after {
    content: "";
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: 0.35rem;
    height: 3px;
    border-radius: 999px;
    background: #004fa3;
    pointer-events: none;
}

.pass-status-card.is-active[data-status="pending"]::after {
    background: #f59e0b;
}

.pass-status-card.is-active[data-status="pending"] {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15) !important;
}

.pass-status-card.is-active[data-status="approved"]::after {
    background: #22c55e;
}

.pass-status-card.is-active[data-status="approved"] {
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.15) !important;
}

.pass-status-card.is-active[data-status="rejected"]::after {
    background: #ef4444;
}

.pass-status-card.is-active[data-status="rejected"] {
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15) !important;
}

.pass-status-card.is-active[data-status="my-application"]::after {
    background: #3b82f6;
}

.pass-status-card.is-active[data-status="my-application"] {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15) !important;
}

.pass-status-card.is-active .pass-status-card__label {
    color: #0f172a !important;
}

.pass-status-card.is-active .pass-status-card__icon {
    transform: scale(1.04);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
}

.pass-status-card:focus-visible {
    outline: 2px solid #004fa3;
    outline-offset: 2px;
}

.status-tiles-row .pass-status-card:hover {
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 0.6rem 1rem rgba(15, 23, 42, 0.1) !important;
}

.status-tiles-row .pass-status-card.is-active:hover {
    transform: translateY(-2px);
}

.pass-status-card:hover {
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 0.6rem 1rem rgba(15, 23, 42, 0.1) !important;
}

/* Wide list DataTables — roomier cells, horizontal scroll, no crushed dates */
.status-page-table-row .table-responsive,
.list-datatable-spaced .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* scrollX manages its own scroll — outer overflow breaks header/body alignment */
.status-page-table-row .table-responsive:has(.dataTables_scroll),
.list-datatable-spaced .table-responsive:has(.dataTables_scroll) {
    overflow-x: visible;
}

.status-page-table-row table.dataTable,
.list-datatable-spaced table.dataTable {
    width: 100%;
    min-width: 58rem;
    margin-bottom: 0;
}

/* scrollX clones must not be forced to 100% — that desyncs header/body columns */
.dataTables_scrollHead table.dataTable,
.dataTables_scrollBody table.dataTable {
    width: auto !important;
    margin-bottom: 0 !important;
}

.dataTables_scrollHeadInner {
    width: auto !important;
    padding-right: 0 !important;
}

.dataTables_scrollBody {
    overflow-x: auto !important;
}

.status-page-table-row table.dataTable.status-list-table--wide,
.list-datatable-spaced table.dataTable.list-datatable--wide {
    min-width: 92rem;
}

.list-datatable-spaced table.dataTable.list-datatable--medium {
    min-width: 68rem;
}

.status-page-table-row table.dataTable thead th,
.status-page-table-row table.dataTable tbody td,
.list-datatable-spaced table.dataTable thead th,
.list-datatable-spaced table.dataTable tbody td {
    padding: 0.7rem 0.9rem;
    vertical-align: middle;
    font-size: 0.875rem;
    line-height: 1.45;
}

.status-page-table-row table.dataTable thead th,
.list-datatable-spaced table.dataTable thead th {
    white-space: nowrap;
}

/* scrollX: hidden header clone in body must not inherit cell padding (causes double header row) */
.list-datatable-spaced .dataTables_scrollBody thead,
.status-page-table-row .dataTables_scrollBody thead {
    display: none !important;
}

.dataTables_scrollHead .list-datatable-spaced table.dataTable thead th.dt-col-photo,
.list-datatable-spaced .dataTables_scrollHead table.dataTable thead th.dt-col-photo {
    width: 5.5rem !important;
    min-width: 5.5rem !important;
    max-width: 5.5rem !important;
    padding: 0.7rem 0.3rem !important;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
}

.list-datatable-spaced table.dataTable tbody td.dt-col-photo,
.dataTables_scrollBody .list-datatable-spaced table.dataTable tbody td.dt-col-photo {
    width: 5.5rem !important;
    min-width: 5.5rem !important;
    max-width: 5.5rem !important;
    padding: 0.45rem 0.3rem !important;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
}

.list-datatable-spaced table.dataTable tbody td.dt-col-photo .dt-user-photo {
    width: 48px;
    height: 48px;
    max-width: calc(100% - 2px);
    min-width: 0;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    object-position: center top;
}

.status-page-table-row table.dataTable tbody td.dt-col-date,
.status-page-table-row table.dataTable thead th.dt-col-date,
.status-page-table-row table.dataTable tbody td.dt-col-time,
.status-page-table-row table.dataTable thead th.dt-col-time,
.list-datatable-spaced table.dataTable tbody td.dt-col-date,
.list-datatable-spaced table.dataTable thead th.dt-col-date,
.list-datatable-spaced table.dataTable tbody td.dt-col-time,
.list-datatable-spaced table.dataTable thead th.dt-col-time {
    white-space: nowrap;
    min-width: 6.75rem;
}

.status-page-table-row table.dataTable tbody td.dt-col-status,
.status-page-table-row table.dataTable thead th.dt-col-status,
.list-datatable-spaced table.dataTable tbody td.dt-col-status,
.list-datatable-spaced table.dataTable thead th.dt-col-status {
    min-width: 9rem;
}

.status-page-table-row table.dataTable tbody td.dt-action-col,
.status-page-table-row table.dataTable thead th.dt-col-action,
.list-datatable-spaced table.dataTable tbody td.dt-action-col,
.list-datatable-spaced table.dataTable thead th.dt-col-action {
    min-width: 5.75rem;
    white-space: nowrap;
}

.status-page-table-row table.dataTable thead th.dt-col-text,
.status-page-table-row table.dataTable tbody td.dt-col-text,
.list-datatable-spaced table.dataTable thead th.dt-col-text,
.list-datatable-spaced table.dataTable tbody td.dt-col-text {
    min-width: 6.5rem;
    word-break: break-word;
}

.status-page-table-row table.dataTable tbody td.dt-col-hours,
.status-page-table-row table.dataTable thead th.dt-col-hours,
.list-datatable-spaced table.dataTable tbody td.dt-col-hours,
.list-datatable-spaced table.dataTable thead th.dt-col-hours {
    white-space: nowrap;
    min-width: 5.75rem;
    text-align: center;
}

/* scrollX: keep cloned header and body cells in sync */
.dataTables_scrollHead table.dataTable thead th,
.dataTables_scrollBody table.dataTable tbody td {
    box-sizing: border-box;
}

.status-page-table-row .dataTables_scroll table.dataTable thead th[class*="dt-col"],
.status-page-table-row .dataTables_scroll table.dataTable tbody td[class*="dt-col"],
.list-datatable-spaced .dataTables_scroll table.dataTable thead th[class*="dt-col"],
.list-datatable-spaced .dataTables_scroll table.dataTable tbody td[class*="dt-col"] {
    min-width: 0;
}

.status-page-table-row table.dataTable tbody td.dt-col-employee,
.status-page-table-row table.dataTable thead th.dt-col-employee,
.list-datatable-spaced table.dataTable tbody td.dt-col-employee,
.list-datatable-spaced table.dataTable thead th.dt-col-employee {
    min-width: 10rem;
    max-width: 16rem;
    word-break: break-word;
}

.status-page-table-row table.dataTable tbody td.dt-col-days,
.status-page-table-row table.dataTable thead th.dt-col-days,
.list-datatable-spaced table.dataTable tbody td.dt-col-days,
.list-datatable-spaced table.dataTable thead th.dt-col-days {
    white-space: nowrap;
    min-width: 5.75rem;
    text-align: center;
}

.dt-status-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.icon-circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Status tiles grid: 2x2 when more than one tile */
.status-tiles-row {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.status-tiles-row--single {
    grid-template-columns: 1fr;
    max-width: 100%;
}

.status-tiles-row--multi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-tiles-row__item {
    min-width: 0;
}

@media (min-width: 768px) {
    .status-tiles-row--multi.status-tiles-row--count-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .status-tiles-row--multi.status-tiles-row--count-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .status-tiles-row--multi.status-tiles-row--count-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-tiles-row {
        gap: 1rem;
        margin-bottom: 1rem;
    }
}

/* Status tiles — compact mobile */
@media (max-width: 767.98px) {
    .status-tiles-row {
        margin-bottom: 0.25rem;
    }

    .pass-status-card:hover,
    .pass-status-card.is-active {
        transform: none;
    }

    .pass-status-card.is-active::after {
        left: 12%;
        right: 12%;
        bottom: 0.3rem;
        height: 2px;
    }

    .pass-status-card__body {
        gap: 0.55rem;
        padding: 0.6rem 0.7rem;
    }

    .pass-status-card__icon {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1.05rem;
    }

    .pass-status-card__count {
        font-size: 1.35rem !important;
    }

    .pass-status-card__label {
        font-size: 0.72rem !important;
    }
}

input.form-control.flatpickr-time {
    min-height: 38px;
}

#overtimeModal .flatpickr-calendar {
    z-index: 1060;
}

/* Overtime modal — clock prepend icon visible beside flatpickr input */
#overtimeModal .input-group {
    flex-wrap: nowrap;
    align-items: stretch;
}

#overtimeModal .input-group > .input-group-text {
    flex-shrink: 0;
    z-index: 2;
    background-color: #004fa3 !important;
    border-color: #004fa3 !important;
    color: #fff !important;
}

#overtimeModal .input-group > .input-group-text i {
    color: #fff !important;
    opacity: 1 !important;
}

#overtimeModal .input-group > .flatpickr-wrapper,
#overtimeModal .input-group > .form-control.flatpickr-time {
    flex: 1 1 auto;
    min-width: 0;
    width: 1%;
}

label.error {
    color: red;
}

/* Profile Image */
.profile-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Attendance log modal */
.attendance-log-modal {
    padding: 0;
}

.attendance-log-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border: 1px solid #e3ebf7;
}

.attendance-log-hero__photo,
.attendance-log-hero__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 79, 163, 0.12);
}

.attendance-log-hero__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #004fa3 0%, #1b84ff 100%);
    color: #fff;
    font-size: 1.5rem;
}

.attendance-log-hero__info {
    flex: 1;
    min-width: 0;
}

.attendance-log-hero__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.attendance-log-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.attendance-log-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.attendance-log-hero__badge {
    flex-shrink: 0;
}

.attendance-log-section__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 0.85rem;
}

.attendance-log-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
}

.attendance-log-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.attendance-log-empty p {
    margin: 0;
    font-size: 0.95rem;
}

.attendance-log-table-wrap {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.65rem;
}

.attendance-log-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    border-bottom: 1px solid #e9ecef;
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
}

.attendance-log-table tbody td {
    padding: 0.75rem;
    font-size: 0.9rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.attendance-log-time {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #1e293b;
}

.attendance-log-manual {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.attendance-log-reason {
    max-width: 200px;
    color: #475569;
}

.attendance-log-map-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.attendance-log-footer {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #eef2f7;
}

@media (max-width: 575.98px) {
    .attendance-log-hero {
        flex-wrap: wrap;
    }

    .attendance-log-hero__badge {
        width: 100%;
    }

    .attendance-log-reason {
        max-width: 120px;
    }
}

/* Legacy class kept for compatibility */
.attendance-employee-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Employee view (read-only) page */
.employee-view-page .employee-view-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.employee-view-page .employee-view-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 0.25rem;
}

.employee-view-page .employee-view-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border: 1px solid #e3ebf7;
    margin-bottom: 1.5rem;
}

.employee-view-page .employee-view-hero__avatar {
    width: 128px;
    height: 128px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 3px solid #fff !important;
    box-shadow: 0 4px 12px rgba(0, 79, 163, 0.15);
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0;
    background-color: #f1f5f9 !important;
    max-width: none;
}

.employee-view-page .employee-view-hero__name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.employee-view-page .employee-view-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.employee-view-page .employee-view-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.employee-view-page .employee-view-hero__badges {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.employee-view-page .employee-view-tabs {
    gap: 0.35rem;
    padding: 0.35rem;
    background: #f1f5f9;
    border-radius: 0.65rem;
    display: inline-flex;
    flex-wrap: wrap;
}

.employee-view-page .employee-view-tabs .nav-link {
    border-radius: 0.5rem !important;
    color: #64748b;
    padding: 0.5rem 1rem;
    border: none !important;
}

.employee-view-page .employee-view-tabs .nav-link.active {
    background: #fff !important;
    color: #004fa3 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.employee-view-page .employee-view-tab-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.employee-view-page .employee-view-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.employee-view-page .employee-view-section--table {
    padding-bottom: 0.5rem;
}

.employee-view-page .employee-view-section--table .table {
    margin-bottom: 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.employee-view-page .employee-view-section--table .table thead th {
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    border-bottom: 1px solid #e9ecef;
}

.employee-view-page .employee-view-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f7;
}

.employee-view-page .employee-view-dl {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 2fr;
    gap: 0;
    margin: 0;
}

.employee-view-page .employee-view-dl dt,
.employee-view-page .employee-view-dl dd {
    padding: 0.7rem 0;
    margin: 0;
    border-bottom: 1px solid #f1f5f9;
    align-self: center;
}

.employee-view-page .employee-view-dl dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    padding-right: 1rem;
}

.employee-view-page .employee-view-dl dd {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    word-break: break-word;
}

.employee-view-page .employee-view-dl dt.employee-view-dl__item--full,
.employee-view-page .employee-view-dl dd.employee-view-dl__item--full {
    grid-column: 1 / -1;
}

.employee-view-page .employee-view-dl dt.employee-view-dl__item--full {
    padding-bottom: 0.25rem;
    border-bottom: none;
}

.employee-view-page .employee-view-dl dd.employee-view-dl__item--full {
    padding-top: 0;
    padding-bottom: 0.85rem;
    line-height: 1.5;
}

.employee-view-page .employee-view-dl dt:last-of-type,
.employee-view-page .employee-view-dl dd:last-of-type {
    border-bottom: none;
}

@media (max-width: 767.98px) {
    .employee-view-page .employee-view-hero {
        flex-wrap: wrap;
    }

    .employee-view-page .employee-view-hero__badges {
        margin-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .employee-view-page .employee-view-dl {
        grid-template-columns: 1fr;
    }

    .employee-view-page .employee-view-dl dt {
        padding-bottom: 0.15rem;
        border-bottom: none;
    }

    .employee-view-page .employee-view-dl dd {
        padding-top: 0;
        padding-bottom: 0.65rem;
    }

    .employee-view-page .employee-view-tabs {
        width: 100%;
        justify-content: center;
    }

    .employee-view-page .employee-view-tabs .nav-link {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.45rem 0.5rem;
    }
}

/* Overtime details modal (attendance) */
.overtime-details-modal {
    padding: 0;
}

.overtime-details-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border: 1px solid #e3ebf7;
}

.overtime-details-hero__photo,
.overtime-details-hero__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 79, 163, 0.12);
}

.overtime-details-hero__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #004fa3 0%, #1b84ff 100%);
    color: #fff;
    font-size: 1.5rem;
}

.overtime-details-hero__info {
    flex: 1;
    min-width: 0;
}

.overtime-details-hero__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.overtime-details-hero__meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.overtime-details-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.overtime-details-hero__badge {
    margin-left: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.overtime-details-section {
    margin-bottom: 1.25rem;
}

.overtime-details-section__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2f7;
}

.overtime-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.overtime-details-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.6rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    min-height: 100%;
}

.overtime-details-stat--highlight {
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f7ff 100%);
    border-color: #cfe2ff;
}

.overtime-details-stat--highlight .overtime-details-stat__value {
    color: #004fa3;
}

.overtime-details-stat__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #004fa3;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.overtime-details-stat__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.overtime-details-stat__value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

.overtime-details-reason {
    padding: 1rem 1.15rem;
    border-radius: 0.65rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.overtime-details-reason__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.overtime-details-reason__text {
    margin: 0;
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.5;
    word-break: break-word;
}

@media (max-width: 767.98px) {
    .overtime-details-hero {
        flex-wrap: wrap;
    }

    .overtime-details-hero__badge {
        margin-left: 0;
        width: 100%;
    }

    .overtime-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Salary details modal */
.salary-details-modal {
    padding: 0.15rem 0;
}

.salary-details-hero {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    margin-bottom: 0.85rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid #e7edf4;
}

.salary-details-hero__photo,
.salary-details-hero__avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #dce6f1;
}

.salary-details-hero__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8eef5;
    color: #6b7280;
    font-size: 1.35rem;
}

.salary-details-hero__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.15rem;
}

.salary-details-hero__meta {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.salary-details-hero__badge {
    margin-left: auto;
    flex-shrink: 0;
}

.salary-details-hero__badge .badge {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
}

.salary-details-accordion__item {
    border: 1px solid #e5ebf2 !important;
    border-radius: 0.65rem !important;
    overflow: hidden;
    margin-bottom: 0.55rem;
    box-shadow: none !important;
}

.salary-details-accordion__btn {
    background: #f8fafc !important;
    box-shadow: none !important;
    padding: 0.75rem 0.9rem;
    gap: 0.65rem;
}

.salary-details-accordion__btn:not(.collapsed) {
    background: #f1f6ff !important;
    color: #004fa3 !important;
}

.salary-details-accordion__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    flex: 1;
}

.salary-details-accordion__index {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.salary-details-accordion__body {
    padding: 0.85rem !important;
    background: #fff;
}

.salary-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.salary-details-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.62rem 0.72rem;
    border-radius: 0.5rem;
    background: #fbfcfe;
    border: 1px solid #edf1f6;
    min-height: 100%;
}

.salary-details-stat--highlight {
    background: #eef6ff;
    border-color: #d6e8ff;
}

.salary-details-stat__icon {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.4rem;
    background: #fff;
    border: 1px solid #e5ebf2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f7ea6;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.salary-details-stat__label {
    display: block;
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #7b8797;
    margin-bottom: 0.2rem;
}

.salary-details-stat__value {
    display: block;
    font-size: 0.94rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .salary-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .salary-details-hero {
        flex-wrap: wrap;
    }

    .salary-details-hero__badge {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .salary-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Salary update modal — clean, balanced */
#salaryUpdateModal .modal-body {
    background: #f4f6f9;
    padding: 0;
}

.salary-update__header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
}

.salary-update__photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.salary-update__photo--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9eef3;
    color: #6c757d;
    font-size: 1.2rem;
}

.salary-update__who {
    flex: 1;
    min-width: 0;
}

.salary-update__name {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    line-height: 1.3;
}

.salary-update__code {
    font-size: 0.8125rem;
    color: #6c757d;
}

.salary-update__since {
    margin-left: auto;
    text-align: right;
    padding: 0.4rem 0.65rem;
    background: #eef5fc;
    border-radius: 0.5rem;
    line-height: 1.35;
}

.salary-update__since-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.salary-update__since-date {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #004fa3;
}

.salary-update__form {
    padding: 1rem 1.5rem 1.25rem;
}

.salary-update__block {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 0.5rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
}

.salary-update__block--last {
    margin-bottom: 0;
}

.salary-update__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #004fa3;
    margin: 0 0 0.85rem;
    padding-left: 0.55rem;
    border-left: 3px solid #004fa3;
    line-height: 1.2;
}

.salary-update__note {
    font-size: 0.8125rem;
    color: #6c757d;
    margin: -0.35rem 0 0.65rem;
}

.salary-update__table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 0.65rem;
}

.salary-update__table thead th:first-child,
.salary-update__table tbody td:first-child {
    padding-left: 0.85rem;
}

.salary-update__table tbody td {
    vertical-align: middle;
    padding: 0.5rem 0.5rem;
}

.salary-update__allowance-name {
    font-weight: 500;
    color: #495057;
}

.salary-update .form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: #495057;
}

.salary-update .allowance-amount:disabled {
    background: #f8f9fa;
    color: #adb5bd;
}

@media (max-width: 575.98px) {
    .salary-update__header {
        flex-wrap: wrap;
    }

    .salary-update__since {
        margin-left: 0;
        width: 100%;
        text-align: left;
    }
}

/* Legacy salary update (unused) */
.salary-update-modal {
    padding: 1.25rem 1.5rem;
}

.salary-update-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #e3ebf7;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.salary-update-hero__photo,
.salary-update-hero__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #e3ebf7;
}

.salary-update-hero__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #004fa3 0%, #3b82f6 100%);
    color: #fff;
    font-size: 1.25rem;
}

.salary-update-hero__info {
    flex: 1;
    min-width: 0;
}

.salary-update-hero__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.15rem;
}

.salary-update-hero__meta {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.salary-update-hero__badge {
    margin-left: auto;
    flex-shrink: 0;
    max-width: 14rem;
    text-align: right;
}

.salary-update-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.salary-update-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2f7;
}

.salary-update-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #475569;
    background: #f0f6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.salary-update-core-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.salary-update-core-item {
    padding: 0.75rem 0.85rem;
    border-radius: 0.6rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.salary-update-core-item--highlight {
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
    border-color: #cfe2ff;
}

.salary-update-core-item__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.salary-update-allowance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 1rem;
    align-items: stretch;
}

.salary-update-allowance-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem;
    height: 100%;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.salary-update-allowance-card__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.salary-update-allowance-card__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #004fa3;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.salary-update-allowance-card__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

.salary-update-allowance-card__amount-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 0.15rem;
    margin-bottom: 0;
}

.salary-update-allowance-card__amount-slot {
    position: relative;
    height: 2.125rem;
    margin-top: auto;
    flex-shrink: 0;
}

.salary-update-allowance-card__amount-slot .allowance-amount {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.salary-update-allowance-card__amount-slot .allowance-amount.d-none {
    display: none !important;
}

.salary-update-allowance-card__na {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
}

.salary-update-allowance-card__na.d-none {
    display: none !important;
}

.salary-update-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

#salaryUpdateModal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
}

@media (max-width: 991.98px) {
    .salary-update-allowance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .salary-update-core-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .salary-update-hero {
        flex-wrap: wrap;
    }

    .salary-update-hero__badge {
        margin-left: 0;
        max-width: none;
        width: 100%;
        text-align: left;
    }

    .salary-update-allowance-grid {
        grid-template-columns: 1fr;
    }

    .salary-update-benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* Salary Employee Avatar */
.salary-employee-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Salary Employee Avatar Small */
.salary-employee-avatar-small {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3);
}

/* Small Info Cards */
.info-card-small {
    padding: 0.75rem !important;
    min-height: auto !important;
}

.info-item-icon-small {
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.info-item-label-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
    display: block;
}

.info-item-value-small {
    font-size: 0.85rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.2;
}

/* Create Missing Attendance Styles */
input.form-control.flatpickr-time {
    min-height: 38px;
}

/* ========================================
   Dashboard Page Styles
   ======================================== */

/* Shared create/edit form pages */
.form-page .form-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.form-page .form-page-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 0.25rem;
}

.form-page .form-page-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.form-page .form-page-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f7;
}

.form-page .form-page-section__hint {
    font-size: 0.875rem;
    color: #64748b;
    margin: -0.35rem 0 1rem;
}

.form-page .form-page-sidebar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    height: 100%;
}

.form-page .form-page-actions {
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f7;
}

.form-page .form-label {
    margin-bottom: 0.35rem;
}

.form-page .form-label .bi {
    color: #94a3b8;
}

.form-page .leave-balance-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 0.75rem;
    background: #f4f7fb;
    border: 1px solid #dbe5f0;
}

.form-page .leave-balance-card > .fw-semibold {
    font-size: 1.02rem;
    color: #0f2747;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.form-page .leave-balance-card > .fw-semibold .bi {
    font-size: 1.08rem;
}

.form-page .leave-balance-card .badge {
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.38rem 0.66rem;
    border-radius: 0.48rem;
    letter-spacing: 0.01em;
}

.form-page .leave-balance-card .badge.bg-danger {
    background-color: #c81e4a !important;
    color: #fff !important;
}

.form-page .leave-balance-card .badge.bg-success {
    background-color: #0f9f4a !important;
    color: #fff !important;
}

.form-page .leave-balance-card .badge.bg-warning {
    background-color: #f3b200 !important;
    color: #1f2937 !important;
}

.form-page .leave-summary-panel {
    text-align: center;
    padding: 1rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border: 1px solid #e3ebf7;
    margin-bottom: 1rem;
}

.form-page .leave-summary-panel__value {
    font-size: 2rem;
    font-weight: 700;
    color: #004fa3;
    line-height: 1.2;
}

.form-page .permissions-table thead th {
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.form-page .permissions-table tbody td {
    vertical-align: middle;
}

/* Simple form modals (department, designation) */
.form-modal .modal-header {
    padding: 1rem 1.25rem;
}

.form-modal .modal-body {
    padding: 1.25rem !important;
}

.form-modal .modal-footer {
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
}

/* Profile page */
.profile-page .profile-page-header {
    margin-bottom: 1.5rem;
}

.profile-page .profile-page-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 0.25rem;
}

.profile-page .profile-page-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border: 1px solid #e3ebf7;
}

.profile-page .profile-page-hero__photo {
    width: 128px;
    height: 128px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 79, 163, 0.15);
    flex-shrink: 0;
    padding: 0 !important;
    background-color: #f1f5f9;
    max-width: none;
}

.profile-page .profile-page-hero__name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.profile-page .profile-page-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.profile-page .profile-page-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-page .profile-page-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.profile-page .profile-page-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: #004fa3;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f7;
}

.profile-page .profile-page-section__hint {
    font-size: 0.875rem;
    color: #64748b;
    margin: -0.5rem 0 1rem;
}

.profile-page .profile-page-field--readonly {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
    cursor: not-allowed;
}

.profile-page .profile-page-photo-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.85rem;
    padding: 1.25rem 1.5rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.profile-page .profile-page-photo-card__upload {
    padding: 0.5rem 0;
}

.profile-page .profile-page-photo-card__hint {
    line-height: 1.45;
    text-align: center;
}

.profile-page .profile-page-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f7;
}

@media (max-width: 991.98px) {
    .profile-page .profile-page-photo-card {
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .profile-page .profile-page-hero {
        flex-wrap: wrap;
    }
}

/* Dashboard attendance profile card — centered stack (reference layout) */
.dashboard-profile-card__body {
    padding: 1.35rem 1.25rem 1.5rem;
    text-align: center;
}

.dashboard-profile-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.dashboard-profile-img {
    width: 128px;
    height: 128px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    margin: 0 auto 0.35rem;
    display: block;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 79, 163, 0.12);
    padding: 0;
    background-color: #f1f5f9;
    image-rendering: auto;
    transform: translateZ(0);
}

.dashboard-profile-card__name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #004fa3;
    margin: 0;
    line-height: 1.3;
}

.dashboard-profile-card__name-icon {
    font-size: 0.95rem;
    color: #94a3b8;
}

.dashboard-profile-card__designation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.3;
}

.dashboard-profile-card__designation .bi {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ── Live Clock ─────────────────────────────────────────────── */
.dashboard-live-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0.75rem;
    padding: 0.6rem 0 0.85rem;
    border-bottom: 1.5px solid #eef2f8;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.dlc-digits {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* HH:MM — gradient text */
.dlc-hm {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #0040a0 0%, #1b84ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Seconds + AM/PM stacked vertically */
.dlc-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding-bottom: 0.1rem;
}

.dlc-sec {
    font-size: 1rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.04em;
    line-height: 1;
}

/* "s" suffix after seconds */
.dlc-sec::after {
    content: 's';
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 1px;
    opacity: 0.7;
}

.dlc-ampm {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #0040a0, #1b84ff);
    border-radius: 4px;
    padding: 0.18em 0.5em;
    line-height: 1;
}

.dashboard-profile-card__hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.3;
}

.dashboard-profile-card__hint .bi {
    color: #64748b;
}

.dashboard-profile-card__select {
    text-align: left;
    border-radius: 0.5rem;
    border-color: #e2e8f0;
    box-shadow: none;
    font-size: 0.875rem;
}

.dashboard-attendance-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
    padding: 0.65rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.65rem;
    box-shadow: 0 2px 6px rgba(0, 79, 163, 0.22);
}

.dashboard-attendance-btn .bi {
    font-size: 1.05rem;
}

/* Dashboard — compact mobile layout (less scrolling) */
@media (max-width: 767.98px) {
    .dashboard-page .dashboard-page__top {
        margin-bottom: 0.75rem !important;
    }

    .dashboard-page .card:hover {
        transform: none;
    }

    .dashboard-profile-card__body {
        padding: 1rem 0.9rem 1.1rem;
    }

    .dashboard-profile-img {
        width: 112px;
        height: 112px;
    }

    .dashboard-profile-card__name {
        font-size: 0.9rem;
    }

    .dashboard-profile-card__designation {
        font-size: 0.75rem;
    }

    .dashboard-profile-card__hint {
        font-size: 0.75rem;
        margin-bottom: 0.65rem !important;
    }

    .dashboard-attendance-btn {
        font-size: 0.875rem;
        padding: 0.55rem 0.85rem;
    }

    .dashboard-summary-card__body {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 0.65rem;
        min-height: auto;
        padding: 0.6rem 0.7rem;
    }

    .dashboard-summary-card__icon {
        width: 2.35rem;
        height: 2.35rem;
        margin-bottom: 0;
        font-size: 1.05rem;
    }

    .dashboard-summary-card__count {
        font-size: 1.35rem !important;
        line-height: 1.1;
    }

    .dashboard-summary-card__label {
        font-size: 0.72rem !important;
        line-height: 1.2;
        font-weight: 600;
    }

    .dashboard-page__calendar-title {
        font-size: 1rem;
    }

    .dashboard-calendar-legend {
        font-size: 0.6875rem;
        gap: 0.35rem 0.65rem;
    }

    #calendar .fc-toolbar-title {
        font-size: 1rem;
    }

    #calendar .fc-daygrid-day-number {
        font-size: 0.8rem;
        padding: 2px 4px;
    }

    #calendar .fc-col-header-cell-cushion {
        font-size: 0.7rem;
        padding: 0.25rem 0;
    }
}

/* Attendance Button */
.dashboard-attendance-btn {
    font-weight: 600;
    font-size: 1rem;
}

/* Calendar Container */
.dashboard-calendar {
    background: #fff;
}

/* FullCalendar Styles */
.fc-event-title {
    font-weight: 600;
}

.fc .fc-toolbar-title {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Button Hover Effects */
.btn.transition-hover {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn.transition-hover:hover {
    background-color: #0b5ed7;
    box-shadow: 0 4px 12px rgba(11, 94, 215, 0.4);
}

/* Card Styles */
.card.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, .075) !important;
}

.card {
    border-radius: 1rem !important;
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-page .dashboard-profile-card:hover,
.employee-view-page .card:hover {
    transform: none !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Status filter tiles — keep active/hover distinct from global card lift */
.status-tiles-row .card.pass-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.6rem 1rem rgba(15, 23, 42, 0.1) !important;
}

.status-tiles-row .card.pass-status-card.is-active,
.status-tiles-row .card.pass-status-card.is-active:hover {
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

.card-body img:not(.user-avatar-img) {
    border: 3px solid #e9ecef;
    padding: 3px;
    background-color: white;
}

.card-body i {
    opacity: 0.9;
}

/* Calendar Styling */
#calendar {
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Dashboard summary tiles grid — mobile: 2 cols; web (768px+): always 3 cols */
.dashboard-summary-grid {
    display: grid;
    gap: 0.5rem;
    width: 100%;
}

.dashboard-summary-grid--count-1 {
    grid-template-columns: 1fr;
}

.dashboard-summary-grid--count-2,
.dashboard-summary-grid--count-3,
.dashboard-summary-grid--count-4,
.dashboard-summary-grid--count-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-summary-grid__item {
    min-width: 0;
}

.dashboard-summary-grid__item > a {
    height: 100%;
}

@media (min-width: 768px) {
    .dashboard-page__top {
        align-items: flex-start;
    }

    .dashboard-summary-grid {
        flex: none;
        align-self: flex-start;
        gap: 0.85rem;
        width: 100%;
    }

    /* Web: 3 per row, equal columns — full tile area width (image 2 size) */
    .dashboard-summary-grid--count-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-summary-grid--count-3,
    .dashboard-summary-grid--count-4,
    .dashboard-summary-grid--count-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Web: vertical stack (icon → count → label) — colors unchanged */
    .dashboard-summary-card__body {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
        min-height: 7rem;
        padding: 1rem 0.75rem;
    }

    .dashboard-summary-card__text {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
    }

    .dashboard-summary-card__icon {
        margin-bottom: 0;
    }

    .dashboard-summary-card__count {
        font-size: 1.85rem !important;
    }
}

@media (min-width: 1200px) {
    .dashboard-summary-card__body {
        min-height: 7.5rem;
        padding: 1.1rem 0.85rem;
    }

    .dashboard-summary-card__count {
        font-size: 2rem !important;
    }

    .dashboard-summary-card__label {
        font-size: 0.875rem !important;
    }
}

.dashboard-calendar {
    padding: 0.25rem 0.5rem 0.5rem;
}

.dashboard-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #64748b;
}

.dashboard-calendar-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.dashboard-calendar-legend__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.dashboard-calendar-legend__dot--leave {
    background: #22c55e;
}

.dashboard-calendar-legend__dot--holiday {
    background: #3b82f6;
}

/* Today highlight */
#calendar .fc-day-today {
    background: #f0fdf4 !important;
}

#calendar .fc-day-today .fc-daygrid-day-number {
    background: #22c55e;
    color: #fff !important;
    border-radius: 50%;
    min-width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    padding: 0;
    margin: 0.15rem;
    font-weight: 600;
}

#calendar .fc-event {
    border-radius: 0.25rem;
    font-size: 0.75rem;
    padding: 1px 2px;
}

.fc-event-title {
    font-weight: 600;
    font-size: 0.85rem;
}

#calendar .fc-header-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem !important;
}

#calendar .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .col-md-3,
    .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .btn,
    .form-select {
        font-size: 0.9rem;
    }

    #calendar,
    .dashboard-calendar {
        overflow: visible;
        padding: 0.5rem 0.65rem 0.75rem;
    }

    /* Calendar toolbar — single row on mobile */
    #calendar .fc-header-toolbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.25rem !important;
        padding: 0 0.15rem;
        margin-bottom: 0.5rem !important;
    }

    #calendar .fc-toolbar-chunk {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        margin: 0 !important;
        gap: 0.2rem !important;
        flex: 0 1 auto;
    }

    #calendar .fc-toolbar-chunk:nth-child(2) {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0;
    }

    #calendar .fc-toolbar-title {
        font-size: 0.9rem !important;
        font-weight: 600;
        text-align: center;
        width: auto !important;
        margin: 0;
        padding: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #calendar .fc-button {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.4rem !important;
        line-height: 1.2;
    }

    #calendar .fc-button-group {
        display: inline-flex;
        flex-wrap: nowrap;
    }

    #calendar .fc-button-group .fc-button {
        padding: 0.25rem 0.35rem !important;
    }

    #calendar .fc-scrollgrid {
        border-radius: 0.5rem;
        overflow: hidden;
    }
}

/* Mobile layout — forms, cards, and action bars (project-wide) */
@media (max-width: 991.98px) {
    #kt_app_toolbar {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    #kt_app_toolbar .page-heading {
        font-size: 1.2rem !important;
        line-height: 1.3;
    }

    #kt_app_content_container.app-container,
    #kt_app_content_container.container-fluid {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    #kt_app_content_container > .row > [class*="col-"] > .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #kt_app_content .card > .card-body {
        padding: 1rem !important;
    }

    /* Avoid duplicate page title (toolbar already shows it) */
    #kt_app_content .card > .card-body > .page-card-toolbar > h1,
    #kt_app_content .card > .card-body > .page-card-toolbar > h2,
    #kt_app_content .card > .card-body > .d-flex.justify-content-between.align-items-center.mb-4 > h1,
    #kt_app_content .card > .card-body > .d-flex.justify-content-between.align-items-center.mb-4 > h2,
    #kt_app_content .card > .card-body > h2.card-title {
        display: none !important;
    }

    /* Card header: Back / Create — stack, full width */
    #kt_app_content .page-card-toolbar,
    #kt_app_content .card > .card-body > .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem;
        margin-bottom: 1rem !important;
    }

    #kt_app_content .page-card-toolbar .btn,
    #kt_app_content .page-card-toolbar a.btn,
    #kt_app_content .card > .card-body > .d-flex.justify-content-between.align-items-center.mb-4 .btn,
    #kt_app_content .card > .card-body > .d-flex.justify-content-between.align-items-center.mb-4 a.btn {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }

    /* User/form back row */
    .d-grid.gap-2.d-md-flex.justify-content-md-end,
    .d-md-flex.justify-content-md-end,
    .d-md-flex.justify-content-md-start {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .d-grid.gap-2.d-md-flex .btn,
    .d-md-flex.justify-content-md-end .btn,
    .d-md-flex.justify-content-md-start .btn {
        width: 100%;
        margin: 0 !important;
    }

    /* Form field spacing */
    #form .row,
    form .row {
        margin-bottom: 0.5rem !important;
        --bs-gutter-y: 0.75rem;
    }

    #form .row > [class*="col-"],
    form .row > [class*="col-"] {
        margin-bottom: 0.25rem;
    }

    #form .mb-3,
    form .mb-3,
    .card-body .mb-4 {
        margin-bottom: 1rem !important;
    }

    .card .card .card-body {
        padding: 0.85rem !important;
    }

    .card-body h5.border-bottom {
        margin-bottom: 0.85rem !important;
        padding-bottom: 0.5rem !important;
        font-size: 1rem;
    }

    /* Summary boxes with side-by-side cols */
    .card-body .row.text-center .col-6.border-end {
        border-right: 0 !important;
        border-bottom: 1px solid var(--bs-border-color, #dee2e6);
        margin-bottom: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .card-body .row.text-center .col-6:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
    }

    #total_days_span.display-6 {
        font-size: 2rem !important;
    }

    /* Primary form submit area */
    .form-actions-bar,
    #kt_app_content form .text-start:has(button[type="submit"]),
    #kt_app_content form .text-start:has(input[type="submit"]),
    #kt_app_content form .d-flex.justify-content-start:has(button[type="submit"]),
    #kt_app_content form .d-flex.justify-content-end:has(button[type="submit"]),
    #kt_app_content form .d-flex.gap-3:has(button[type="submit"]) {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 0.5rem;
        padding-bottom: 0.25rem;
        align-items: stretch !important;
        width: 100%;
    }

    .form-actions-bar .btn,
    .form-actions-bar button[type="submit"],
    #kt_app_content form .text-start:has(button[type="submit"]) .btn,
    #kt_app_content form .text-start:has(button[type="submit"]) button[type="submit"],
    #kt_app_content form .d-flex.justify-content-start:has(button[type="submit"]) .btn,
    #kt_app_content form .d-flex.justify-content-end:has(button[type="submit"]) .btn,
    #kt_app_content form .d-flex.gap-3:has(button[type="submit"]) .btn {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }

    #kt_app_content form .row.mt-4 > [class*="col-"]:has(button[type="submit"]),
    #kt_app_content form .row.mt-4 > [class*="col-"]:has(input[type="submit"]) {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #kt_app_content form .row.mt-4 > [class*="col-"]:has(button[type="submit"]) .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modals */
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem 1rem 1rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0 !important;
    }

    .modal-body {
        padding: 1rem;
    }

    /* DataTables toolbar */
    .dt-toolbar > div {
        max-width: 100% !important;
    }

    /* Select2 full width */
    .select2-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Index/list cards with card-header title + action button */
    #kt_app_content .card > .card-header.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem;
        padding: 1rem !important;
    }

    #kt_app_content .card > .card-header .card-title,
    #kt_app_content .card > .card-header h3.card-title {
        display: none !important;
    }

    #kt_app_content .card > .card-header .btn,
    #kt_app_content .card > .card-header a.btn {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }

    /* Flatpickr / date input groups */
    .input-group .form-control,
    .input-group .input-group-text {
        min-height: 2.75rem;
    }

    .input-group > .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* Auth pages — login, forgot password, reset password */
.auth-page {
    min-height: 100dvh;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-page__wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-height: 100vh;
    width: 100%;
}

.auth-page__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.auth-card {
    width: 100%;
    max-width: min(440px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 40, 80, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 79, 163, 0.08);
    overflow: hidden;
    box-sizing: border-box;
}

.auth-card__body {
    padding: 2.25rem 2rem 2rem;
}

.auth-card__logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 220px;
    height: auto;
    border: none;
    outline: none;
}

.auth-card__logo:hover {
    opacity: 0.9;
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2b3c;
    text-align: center;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-card__subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field__label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #2c3e50;
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .bi {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

.auth-input-wrap .form-control {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    min-height: 3rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.95rem;
    background-color: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input-wrap .form-control:hover {
    border-color: #cbd5e1;
}

.auth-input-wrap .form-control:focus {
    border-color: #004fa3;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 79, 163, 0.12);
}

.auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.auth-remember .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    cursor: pointer;
    border-radius: 4px;
}

.auth-remember .form-check-input:checked {
    background-color: #004fa3;
    border-color: #004fa3;
}

.auth-remember span {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.auth-forgot-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #004fa3;
    text-decoration: none;
    white-space: nowrap;
}

.auth-forgot-link:hover {
    color: #003366;
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 3rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #004fa3 0%, #0066cc 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(0, 79, 163, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-card__footer {
    text-align: center;
    padding-top: 1.25rem;
    margin-top: 0.25rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
    word-break: break-word;
}

@media (hover: hover) {
    .auth-submit:hover {
        background: linear-gradient(135deg, #003d80 0%, #0052a3 100%);
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(0, 79, 163, 0.4);
    }
}

/* Tablet */
@media (max-width: 991.98px) {
    .auth-page__main {
        padding: 1.25rem;
    }

    .auth-card {
        max-width: 420px;
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .auth-page__main {
        align-items: flex-start;
        padding-top: max(1.5rem, env(safe-area-inset-top));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .auth-card {
        max-width: 100%;
        border-radius: 14px;
        box-shadow: 0 4px 24px rgba(0, 40, 80, 0.12);
    }

    .auth-card__body {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-card__logo {
        max-width: 160px;
        margin-bottom: 1.25rem;
    }

    .auth-card__title {
        font-size: 1.35rem;
    }

    .auth-card__subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .auth-field {
        margin-bottom: 1rem;
    }

    .auth-input-wrap .form-control {
        min-height: 3rem;
        font-size: 16px; /* prevents iOS zoom on focus */
        padding-left: 2.65rem;
    }

    .auth-submit {
        min-height: 3rem;
        font-size: 1rem;
    }

    .auth-options {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .auth-remember {
        width: 100%;
        min-height: 2.75rem;
        padding: 0.15rem 0;
    }

    .auth-forgot-link {
        display: block;
        text-align: center;
        padding: 0.5rem 0;
        white-space: normal;
    }

    .auth-card__footer {
        font-size: 0.75rem;
        padding-top: 1rem;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .auth-page__main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .auth-card__body {
        padding: 1.25rem 1rem 1rem;
    }

    .auth-card__title {
        font-size: 1.25rem;
    }

    .auth-remember span {
        font-size: 0.85rem;
    }
}

/* Landscape phones — keep card vertically centered when space allows */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 500px) {
    .auth-page__main {
        align-items: center;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .auth-card__body {
        padding: 1rem 1.25rem;
    }

    .auth-card__logo {
        margin-bottom: 0.75rem;
    }

    .auth-card__subtitle {
        margin-bottom: 1rem;
    }

    .auth-field {
        margin-bottom: 0.75rem;
    }

    .auth-options {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 1rem;
    }

    .auth-remember {
        width: auto;
        min-height: auto;
    }

    .auth-forgot-link {
        display: inline;
        text-align: right;
        padding: 0;
    }
}

/* Desktop — subtle fixed background */
@media (min-width: 992px) {
    .auth-page__main {
        padding: 2rem;
        background-attachment: fixed;
    }

    .auth-card {
        max-width: 440px;
    }
}



