/* Hamada brand theme — green primary accents */
:root {
    --hamada-burgundy: #5C1E20;
    --hamada-magenta: #BC305E;
    --hamada-yellow: #E9D84D;
    --hamada-green: #69A23E;
    --hamada-green-soft: #8fbf66;

    --side-color: radial-gradient(circle, #1a1a1f 0%, #101014 100%);
    --nav-color: radial-gradient(circle, #1c1c22 0%, #121216 100%);
    --body-color: radial-gradient(circle, #18181b 0%, #0f0f12 100%);

    --hr-surface: #18181b;
    --hr-surface-2: #27272a;
    --hr-border: hsl(240 3.7% 18%);
    --hr-text: #f4f4f5;
    --hr-muted: #a1a1aa;

    --hr-primary: var(--hamada-green);
    --hr-primary-soft: rgba(105, 162, 62, 0.16);
    --hr-success: var(--hamada-green);
    --hr-success-soft: rgba(105, 162, 62, 0.16);
    --hr-warn: var(--hamada-yellow);
    --hr-warn-soft: rgba(233, 216, 77, 0.14);
}

body.dark-only .page-wrapper.horizontal-wrapper .page-body-wrapper .page-body,
body.dark-only .compact-wrapper .page-body-wrapper .page-body {
    background: var(--body-color) !important;
}

body.dark-only .page-wrapper.compact-wrapper .page-body-wrapper header.main-nav,
body.dark-only .compact-wrapper .page-body-wrapper header.main-nav {
    background: var(--side-color) !important;
    border-inline-end: 1px solid rgba(105, 162, 62, 0.18);
}

body.dark-only .compact-wrapper .page-main-header .main-header-right,
body.dark-only .page-main-header {
    background: var(--nav-color) !important;
    border-bottom: 1px solid rgba(105, 162, 62, 0.12);
}

.card-stat,
.hr-panel,
.hr-summary,
.hr-emp-modal,
.hr-emp-form__section,
.hr-fullcalendar,
.table-responsive {
    background-color: var(--hr-surface) !important;
    border-color: var(--hr-border) !important;
}

.card-stat {
    border: 2px solid var(--hr-border);
    box-shadow: 0 0 15px rgba(0, 0, 0, .08), 0 2px 30px rgba(0, 0, 0, .22);
}

.card-stat h2 { color: var(--hr-muted) !important; }
.card-stat label { color: var(--hr-text) !important; }

.card-stat i,
.card-stat .icon-card {
    background: var(--hr-primary-soft) !important;
}

.card-stat .icon-card.color-danger {
    background: var(--hr-primary-soft) !important;
}

.card-stat .icon-card.color-warning {
    background: var(--hr-warn-soft) !important;
}

.btn-primary,
.hr-chip-btn--primary {
    background: var(--hr-primary-soft) !important;
    border: 1px solid rgba(105, 162, 62, 0.4) !important;
    color: var(--hamada-green-soft) !important;
}

.btn-primary:hover,
.hr-chip-btn--primary:hover {
    background: rgba(105, 162, 62, 0.28) !important;
    color: #d9f0c2 !important;
}

.hr-chip-btn {
    background: var(--hr-surface-2) !important;
    border: 1px solid var(--hr-border) !important;
    color: #d4d4d8 !important;
}

.hr-chip-btn:hover {
    background: #303036 !important;
    color: #fff !important;
}

.hr-chip-btn--employees i,
.hr-chip-btn--attendance i,
.hr-chip-btn--primary i {
    background: var(--hr-primary-soft) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-chip-btn--advances i {
    background: var(--hr-warn-soft) !important;
    color: var(--hamada-yellow) !important;
}

/* Home / page header actions — mobile friendly */
@media (max-width: 767.98px) {
    .page-header .row.align-items-center > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .hr-header-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        justify-content: stretch !important;
        margin-top: 12px;
        width: 100%;
    }

    .hr-header-actions .hr-chip-btn {
        width: 100%;
        min-height: 42px;
        justify-content: center;
        padding-inline: 10px;
        font-size: 13px;
    }

    .hr-header-actions .hr-chip-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.hr-summary__badge--today,
.hr-summary__badge--week,
.hr-pill--success,
.hr-permissions__count,
.hr-perm-pill--all,
.hr-choice.is-active span,
.hr-perm-item.is-checked {
    background: var(--hr-success-soft) !important;
    border-color: rgba(105, 162, 62, 0.35) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-summary__hero-item {
    background: var(--hr-surface-2) !important;
    border-color: var(--hr-border) !important;
}

.hr-summary__hero-item strong {
    color: var(--hamada-green-soft) !important;
}

.hr-summary__hero-item--warn {
    background: var(--hr-warn-soft) !important;
    border-color: rgba(233, 216, 77, 0.28) !important;
}

.hr-summary__hero-item--warn strong,
.hr-summary__hero-item--warn strong small {
    color: var(--hamada-yellow) !important;
}

.hr-pill--warn {
    background: var(--hr-warn-soft) !important;
    border-color: rgba(233, 216, 77, 0.3) !important;
    color: var(--hamada-yellow) !important;
}

.hr-pill--danger,
.hr-cal-advance,
.hr-fullcalendar .fc-hr-advance {
    background: rgba(220, 53, 69, 0.16) !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
    color: #e35d6a !important;
}

.hr-cal-left,
.hr-fullcalendar .fc-hr-attendance-left {
    background: rgba(220, 53, 69, 0.22) !important;
    border-color: rgba(220, 53, 69, 0.55) !important;
    color: #ff6b7a !important;
}

.hr-pill--success,
.hr-cal-check,
.hr-cal-payment,
.hr-fullcalendar .fc-hr-attendance,
.hr-fullcalendar .fc-hr-payment {
    background: var(--hr-success-soft) !important;
    border-color: rgba(105, 162, 62, 0.3) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-cal-half,
.hr-fullcalendar .fc-hr-attendance-half {
    background: rgba(233, 216, 77, 0.16) !important;
    border-color: rgba(233, 216, 77, 0.35) !important;
    color: var(--hamada-yellow) !important;
}

/* Prevent Viho .card-stat i (50×50) from blowing up legend/check icons */
.card-stat .hr-cal-check,
.card-stat .hr-cal-check i {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    line-height: 1 !important;
    flex-shrink: 0;
}

.hr-summary__dot--cash {
    background: var(--hamada-yellow) !important;
    box-shadow: 0 0 0 4px rgba(233, 216, 77, 0.12) !important;
}

.hr-summary__dot--app {
    background: var(--hamada-green) !important;
    box-shadow: 0 0 0 4px rgba(105, 162, 62, 0.14) !important;
}

.hr-link {
    color: var(--hamada-green-soft) !important;
}

.hr-week-chip {
    background: var(--hr-surface) !important;
    border-color: var(--hr-border) !important;
    color: var(--hr-muted) !important;
}

.sidebar-user {
    border-bottom: 1px solid rgba(105, 162, 62, 0.2);
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .sidebar-user.hr-sidebar-brand {
    padding: 12px 14px 14px !important;
    margin-bottom: 10px !important;
    text-align: start !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .sidebar-user.hr-sidebar-brand img {
    border: 0 !important;
}

.hr-sidebar-brand__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hr-sidebar-brand__logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(105, 162, 62, 0.12);
    flex-shrink: 0;
}

.hr-sidebar-brand__meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1 1 auto;
}

.hr-sidebar-brand__app {
    color: #f4f4f5;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-sidebar-brand__user {
    color: #d4d4d8;
    font-size: 0.78rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-sidebar-brand__role {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(105, 162, 62, 0.16);
    color: #9dcb72;
    font-size: 0.68rem;
    line-height: 1.4;
}

.hr-sidebar-net {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 44px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(105, 162, 62, 0.28);
    background: rgba(105, 162, 62, 0.12);
    color: #9dcb72;
    line-height: 1.1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hr-sidebar-net i {
    font-size: 0.92rem;
    position: relative;
}

.hr-sidebar-net span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.hr-sidebar-net[data-net-state="online"] {
    border-color: rgba(105, 162, 62, 0.28);
    background: rgba(105, 162, 62, 0.12);
    color: #9dcb72;
}

.hr-sidebar-net[data-net-state="weak"] {
    border-color: rgba(233, 216, 77, 0.4);
    background: rgba(233, 216, 77, 0.12);
    color: var(--hamada-yellow);
}

.hr-sidebar-net[data-net-state="offline"] {
    border-color: rgba(188, 48, 94, 0.45);
    background: rgba(188, 48, 94, 0.14);
    color: #ffb3c5;
}

.hr-sidebar-net[data-net-state="offline"] i::after {
    content: '';
    position: absolute;
    inset: 45% -3px auto -3px;
    height: 2px;
    background: currentColor;
    transform: rotate(-40deg);
    border-radius: 2px;
}

.hr-sidebar-now {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(105, 162, 62, 0.1);
    border: 1px solid rgba(105, 162, 62, 0.22);
}

.hr-sidebar-now__date,
.hr-sidebar-now__time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.hr-sidebar-now__date {
    color: #d4d4d8;
    font-size: 0.78rem;
    line-height: 1.35;
}

.hr-sidebar-now__date i {
    color: #9dcb72;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.hr-sidebar-now__time {
    color: #9dcb72;
    font-size: 0.92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    white-space: nowrap;
    direction: ltr;
}

.hr-sidebar-now__time i {
    font-size: 0.82rem;
    flex-shrink: 0;
}

/* Sidebar menu scroll — fill remaining height, no fixed calc */
.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 83px) !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav > nav,
.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar,
.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar #mainnav {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .sidebar-user.hr-sidebar-brand {
    flex-shrink: 0;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar .nav-menu.custom-scrollbar {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    color: rgba(105, 162, 62, 0.35);
}

.page-wrapper.compact-wrapper .page-body-wrapper.sidebar-icon header.main-nav .main-navbar .nav-menu.custom-scrollbar {
    height: auto !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper.sidebar-icon header.main-nav.close_icon .main-navbar .nav-menu.custom-scrollbar {
    height: auto !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar .nav-menu.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar .nav-menu.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar .nav-menu.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(105, 162, 62, 0.45) !important;
    border-radius: 999px;
    box-shadow: none !important;
}

.page-wrapper.compact-wrapper .page-body-wrapper header.main-nav .main-navbar .nav-menu.custom-scrollbar:hover {
    color: rgba(105, 162, 62, 0.55);
}

.main-nav .nav-link.active {
    background: var(--hr-primary-soft) !important;
    color: #f4f4f5 !important;
    box-shadow: inset 3px 0 0 var(--hamada-green);
}

.badge-primary,
.badge.bg-primary {
    background: var(--hamada-green) !important;
}

.hr-emp-modal__badge,
.hr-emp-modal__badge--edit,
.hr-emp-form__icon,
.hr-emp-form__icon--money {
    background: var(--hr-primary-soft) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-emp-form__icon--warn {
    background: var(--hr-warn-soft) !important;
    color: var(--hamada-yellow) !important;
}

.hr-emp-input,
.hr-choice span,
.hr-summary__split-item,
.hr-perm-item,
.hr-perm-card,
.hr-perm-card__head {
    background: var(--hr-surface-2) !important;
    border-color: var(--hr-border) !important;
    color: var(--hr-text) !important;
}

.hr-emp-input:focus,
.hr-choice:hover span {
    border-color: rgba(105, 162, 62, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(105, 162, 62, 0.12) !important;
}

.hr-progress span {
    background: linear-gradient(90deg, var(--hamada-green), #9ec96f) !important;
}

.hr-dot {
    background: var(--hamada-green) !important;
    box-shadow: 0 0 0 4px rgba(105, 162, 62, 0.12) !important;
}

.hr-fullcalendar .fc-button-primary:not(:disabled).fc-button-active,
.hr-fullcalendar .fc-button-primary:not(:disabled):active {
    background: var(--hr-primary-soft) !important;
    border-color: rgba(105, 162, 62, 0.4) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-fullcalendar .fc-daygrid-day.fc-day-today {
    background: rgba(105, 162, 62, 0.08) !important;
}

.hr-fullcalendar .fc-daygrid-day.fc-day-other,
.hr-fullcalendar td.fc-day-other {
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 6px,
            rgba(161, 161, 170, 0.06) 6px,
            rgba(161, 161, 170, 0.06) 7px
        ),
        var(--hr-surface) !important;
}

.hr-fullcalendar .fc-day-other .fc-daygrid-day-frame {
    background: transparent;
}

.hr-fullcalendar .fc-day-other .fc-daygrid-day-number {
    color: var(--hr-muted) !important;
    opacity: 0.7 !important;
}

.hr-fullcalendar .fc-day-other .fc-daygrid-event {
    opacity: 0.55;
}

.hr-cal-prev-month {
    display: inline-block;
    width: 18px;
    height: 14px;
    border-radius: 4px;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 3px,
            rgba(161, 161, 170, 0.28) 3px,
            rgba(161, 161, 170, 0.28) 4px
        ),
        var(--hr-surface);
    border: 1px solid var(--hr-border);
    vertical-align: middle;
}

.hr-fullcalendar .hr-cal-event-title {
    white-space: normal;
    line-height: 1.25;
    font-size: 0.72rem;
}

.hr-fullcalendar .fc-hr-attendance-time {
    background: rgba(161, 161, 170, 0.14) !important;
    border-color: rgba(161, 161, 170, 0.28) !important;
    color: var(--hr-muted) !important;
}

@media (max-width: 767.98px) {
    .hr-fullcalendar .fc-daygrid-event {
        margin-top: 1px;
    }

    .hr-fullcalendar .hr-cal-event-title {
        font-size: 0.68rem;
        font-weight: 600;
    }

    .hr-fullcalendar .fc-daygrid-day-events {
        margin-bottom: 2px;
    }
}

.action_btn .btn-edit {
    background: rgba(105, 162, 62, 0.22) !important;
}

.action_btn .btn-edit svg {
    fill: var(--hamada-green-soft) !important;
}

.action_btn .delete-btn {
    background: rgba(188, 48, 94, 0.18) !important;
}

.action_btn .delete-btn svg {
    fill: #e887a8 !important;
}

.action_btn .btn-view {
    background: rgba(233, 216, 77, 0.16) !important;
}

.action_btn .btn-view svg {
    fill: var(--hamada-yellow) !important;
}

.swal2-confirm {
    background-color: var(--hamada-green) !important;
}

/* ========== Unified HR modals ========== */
body.dark-only .modal-backdrop.show {
    background: rgba(8, 10, 8, 0.72);
    opacity: 1;
}

body.dark-only .modal-content,
.hr-modal,
.hr-emp-modal {
    background: var(--hr-surface) !important;
    border: 1px solid rgba(105, 162, 62, 0.22) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: var(--hr-text);
    overflow: hidden;
}

body.dark-only .modal-header,
.hr-modal__header,
.hr-emp-modal__header {
    border-bottom: 1px solid var(--hr-border) !important;
    padding: 18px 20px !important;
    align-items: flex-start !important;
    background: linear-gradient(180deg, rgba(105, 162, 62, 0.08), transparent);
}

body.dark-only .modal-footer {
    border-top: 1px solid var(--hr-border) !important;
    background: rgba(0, 0, 0, 0.15);
    padding: 14px 20px !important;
}

body.dark-only .modal-title,
.hr-modal__title h5,
.hr-emp-modal__title h5 {
    color: var(--hr-text) !important;
    font-weight: 700;
}

.hr-modal__title,
.hr-emp-modal__title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hr-modal__title small,
.hr-emp-modal__title small {
    display: block;
    margin-top: 2px;
    color: var(--hr-muted);
    font-size: 12px;
}

.hr-modal__badge,
.hr-emp-modal__badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--hr-primary-soft);
    color: var(--hamada-green-soft);
    font-size: 16px;
}

.hr-modal__badge--warn,
.hr-emp-modal__badge--edit {
    background: var(--hr-warn-soft);
    color: var(--hamada-yellow);
}

.hr-modal__badge--danger {
    background: rgba(188, 48, 94, 0.16);
    color: #e887a8;
}

body.dark-only .modal .btn-close {
    filter: invert(1) grayscale(1) brightness(1.6);
    opacity: .7;
}

.hr-modal__footer,
.hr-emp-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--hr-border);
}

.hr-modal__actions,
.hr-emp-modal__actions {
    display: flex;
    gap: 8px;
    margin-inline-start: auto;
    flex-wrap: wrap;
}

.hr-emp-loading,
.hr-modal__loading {
    color: var(--hr-muted);
    font-size: 13px;
}

.hr-form,
.hr-emp-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hr-form__section,
.hr-emp-form__section {
    background: rgba(39, 39, 42, 0.55) !important;
    border: 1px solid var(--hr-border);
    border-radius: 14px;
    padding: 16px;
}

.hr-form__section-head,
.hr-emp-form__section-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.hr-form__section-head strong,
.hr-emp-form__section-head strong {
    display: block;
    color: var(--hr-text);
    font-size: 14px;
}

.hr-form__section-head small,
.hr-emp-form__section-head small {
    color: var(--hr-muted);
    font-size: 12px;
}

.hr-form__icon,
.hr-emp-form__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--hr-primary-soft);
    color: var(--hamada-green-soft);
}

.hr-form__icon--warn,
.hr-emp-form__icon--warn {
    background: var(--hr-warn-soft);
    color: var(--hamada-yellow);
}

.hr-form__icon--money,
.hr-emp-form__icon--money {
    background: var(--hr-primary-soft);
    color: var(--hamada-green-soft);
}

.hr-label,
.hr-emp-label {
    display: block;
    margin-bottom: 6px;
    color: #d4d4d8;
    font-size: 13px;
    font-weight: 600;
}

.hr-label span,
.hr-emp-label span {
    color: var(--hamada-green-soft);
}

body.dark-only .modal .form-control,
body.dark-only .modal .form-select,
.hr-input,
.hr-emp-input {
    background: #1f1f23 !important;
    border: 1px solid var(--hr-border) !important;
    border-radius: 10px !important;
    color: var(--hr-text) !important;
    min-height: 42px;
    box-shadow: none !important;
}

body.dark-only .modal .form-control:focus,
body.dark-only .modal .form-select:focus,
.hr-input:focus,
.hr-emp-input:focus {
    border-color: rgba(105, 162, 62, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(105, 162, 62, 0.14) !important;
}

body.dark-only .modal .form-control:disabled,
body.dark-only .modal .form-control[readonly] {
    background: #16161a !important;
    color: var(--hr-muted) !important;
    opacity: 1;
}

body.dark-only .modal label.control-label {
    color: #d4d4d8 !important;
    font-weight: 600;
    margin-bottom: 6px;
}

.hr-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hr-choice-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-choice {
    margin: 0;
    cursor: pointer;
}

.hr-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hr-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--hr-border);
    background: #1f1f23;
    color: #d4d4d8;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: .15s ease;
}

.hr-choice:hover span {
    border-color: rgba(105, 162, 62, 0.4);
}

.hr-choice.is-active span {
    background: var(--hr-primary-soft) !important;
    border-color: rgba(105, 162, 62, 0.45) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-emp-rate {
    position: relative;
}

.hr-emp-rate input {
    padding-inline-end: 42px;
}

.hr-emp-rate span {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hamada-green-soft);
    font-weight: 700;
}

.hr-modal--danger .modal-header,
.hr-modal--danger .hr-modal__header {
    background: linear-gradient(180deg, rgba(188, 48, 94, 0.12), transparent);
}

.hr-modal--danger .hr-modal__actions .hr-chip-btn--danger,
.hr-chip-btn--danger {
    background: rgba(188, 48, 94, 0.18) !important;
    border: 1px solid rgba(188, 48, 94, 0.35) !important;
    color: #f0a8c0 !important;
}

.hr-chip-btn--danger:hover {
    background: rgba(188, 48, 94, 0.28) !important;
    color: #ffd0de !important;
}

.hr-permissions__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--hr-border);
}

.hr-permissions__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hr-permissions__header h5 {
    color: var(--hr-text);
}

.hr-permissions__header small {
    color: var(--hr-muted);
}

@media (max-width: 767.98px) {
    .hr-choice-grid,
    .hr-choice-grid--3 {
        grid-template-columns: 1fr;
    }

    .hr-modal__footer,
    .hr-emp-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-modal__actions,
    .hr-emp-modal__actions {
        margin-inline-start: 0;
        width: 100%;
    }

    .hr-modal__actions .hr-chip-btn,
    .hr-emp-modal__actions .hr-chip-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Select2 inside HR modals */
.hr-modal .select2-container,
.hr-emp-modal .select2-container {
    width: 100% !important;
}

.hr-modal .select2-container--default .select2-selection--single,
.hr-emp-modal .select2-container--default .select2-selection--single {
    min-height: 42px;
    background: #1f1f23 !important;
    border: 1px solid rgba(105, 162, 62, 0.35) !important;
    border-radius: 10px !important;
    padding: 6px 10px;
}

.hr-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
.hr-emp-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--hr-text) !important;
    line-height: 28px;
    padding-inline-start: 0;
    padding-inline-end: 28px;
}

.hr-modal .select2-container--default .select2-selection--single .select2-selection__placeholder,
.hr-emp-modal .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--hr-muted) !important;
}

.hr-modal .select2-container--default .select2-selection--single .select2-selection__arrow,
.hr-emp-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    width: 28px;
    inset-inline-end: 4px;
    top: 1px;
}

.hr-modal .select2-container--default .select2-selection--single .select2-selection__arrow b,
.hr-emp-modal .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--hamada-green-soft) transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
    margin-top: -3px !important;
}

.hr-modal .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b,
.hr-emp-modal .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--hamada-green-soft) transparent !important;
    border-width: 0 5px 6px 5px !important;
}

.hr-modal .select2-container--default.select2-container--focus .select2-selection--single,
.hr-modal .select2-container--default.select2-container--open .select2-selection--single,
.hr-emp-modal .select2-container--default.select2-container--focus .select2-selection--single,
.hr-emp-modal .select2-container--default.select2-container--open .select2-selection--single {
    border-color: rgba(105, 162, 62, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(105, 162, 62, 0.18);
}

.select2-container--open .select2-dropdown,
.hr-modal .select2-dropdown {
    background: #1a1a1e !important;
    border: 1px solid rgba(105, 162, 62, 0.45) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    z-index: 2100;
}

.select2-container--open .select2-search--dropdown {
    padding: 10px;
    border-bottom: 1px solid rgba(105, 162, 62, 0.2);
}

.select2-container--open .select2-search--dropdown .select2-search__field,
.hr-modal .select2-search--dropdown .select2-search__field {
    background: #121215 !important;
    border: 1px solid rgba(105, 162, 62, 0.35) !important;
    border-radius: 8px !important;
    color: var(--hr-text) !important;
    outline: none;
    padding: 8px 10px;
}

.select2-container--open .select2-results__options {
    max-height: 240px;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #69A23E #2a2a30;
}

.select2-container--open .select2-results__options::-webkit-scrollbar {
    width: 8px;
}

.select2-container--open .select2-results__options::-webkit-scrollbar-track {
    background: #2a2a30;
    border-radius: 8px;
}

.select2-container--open .select2-results__options::-webkit-scrollbar-thumb {
    background: #69A23E;
    border-radius: 8px;
    border: 2px solid #2a2a30;
}

.select2-container--open .select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #8fbf66;
}

.select2-container--open .select2-results__option,
.hr-modal .select2-results__option {
    color: #d4d4d8;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background-color .12s ease, color .12s ease;
    cursor: pointer;
}

.select2-container--open .select2-results__option:last-child {
    border-bottom: 0;
}

/* Hover / keyboard highlight — must be clearly visible */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-results__option--highlighted,
.hr-modal .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(105, 162, 62, 0.38) !important;
    color: #f0ffe3 !important;
    box-shadow: inset 3px 0 0 #69A23E;
}

.select2-container--default .select2-results__option--selected,
.hr-modal .select2-container--default .select2-results__option--selected {
    background: rgba(105, 162, 62, 0.22) !important;
    color: #d9f0c2 !important;
}

.select2-container--default .select2-results__option--selected.select2-results__option--highlighted,
.hr-modal .select2-container--default .select2-results__option--selected.select2-results__option--highlighted {
    background: rgba(105, 162, 62, 0.5) !important;
    color: #fff !important;
}

.hr-modal .select2-container--default .select2-selection--single .select2-selection__clear {
    color: var(--hr-muted);
    margin-inline-end: 22px;
    font-size: 16px;
}

/* Force visible hover on dark theme (overrides theme defaults) */
body.dark-only .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
body.dark-only .select2-results__option--highlighted {
    background-color: #69A23E !important;
    color: #ffffff !important;
}

body.dark-only .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(105, 162, 62, 0.28) !important;
    color: #e8f7d8 !important;
}

body.dark-only .select2-container--default .select2-results__option[aria-selected="true"].select2-results__option--highlighted {
    background-color: #7db34f !important;
    color: #ffffff !important;
}

/* Page loader — ice cream / brand mark */
.loade {
    background: radial-gradient(circle, #1a1a1f 0%, #0f0f12 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease, visibility .2s ease;
}
.loade.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loade .loader-p,
.loade .loader-p:before,
.loade .loader-p:after {
    display: none !important;
}
.hr-bouza-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.hr-bouza-loader .hr-bouza-svg {
    width: 88px;
    height: 88px;
    display: block;
    animation: hr-bouza-bounce 0.85s ease-in-out infinite;
    filter: drop-shadow(0 8px 18px rgba(105, 162, 62, 0.35));
}
.hr-bouza-loader span {
    color: #8fbf66;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
@keyframes hr-bouza-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.04); }
}

/* Inline loading ice cream */
.hr-bouza-spin,
i.fa-ice-cream.hr-bouza-spin {
    display: inline-block !important;
    color: var(--hamada-green-soft, #8fbf66) !important;
    animation: hr-bouza-wiggle 0.75s ease-in-out infinite;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    line-height: 1 !important;
    font-size: 14px !important;
    vertical-align: middle;
}
.card-stat .hr-bouza-spin,
.card-stat i.fa-ice-cream.hr-bouza-spin,
.hr-pill .hr-bouza-spin,
.hr-pill i.fa-ice-cream.hr-bouza-spin,
.hr-today-mark-hint .fas,
.hr-chip-btn .hr-bouza-spin,
.hr-quick-chip .hr-bouza-spin,
.hr-quick-row .hr-bouza-spin {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: inline-block !important;
    font-size: 14px !important;
    line-height: 1 !important;
    color: var(--hamada-green-soft, #8fbf66) !important;
}
.hr-pill:has(.hr-bouza-spin) {
    min-width: 72px;
    justify-content: center;
}
.hr-bouza-spin.hr-bouza-svg {
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    color: inherit;
    filter: none;
}
@keyframes hr-bouza-wiggle {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50% { transform: rotate(8deg) translateY(-3px); }
}

/* Force primary theme away from old blue/pink */
body.dark-only .btn-primary,
.btn-primary {
    background: rgba(105, 162, 62, 0.22) !important;
    border-color: rgba(105, 162, 62, 0.45) !important;
    color: #d9f0c2 !important;
}
body.dark-only .text-primary,
.text-primary {
    color: #8fbf66 !important;
}
body.dark-only .bg-primary,
.badge-primary,
.bg-primary {
    background-color: #69A23E !important;
}

/* ========== Login page ========== */
body.hr-login-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 20% 20%, #1f2a1a 0%, #121416 42%, #0b0c0e 100%) !important;
    font-family: "Tajawal", sans-serif;
    overflow-x: hidden;
}

.hr-login {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.hr-login__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.hr-login__glow--one {
    width: 280px;
    height: 280px;
    background: rgba(105, 162, 62, 0.22);
    top: 8%;
    inset-inline-start: 10%;
    animation: hr-login-float 7s ease-in-out infinite;
}
.hr-login__glow--two {
    width: 320px;
    height: 320px;
    background: rgba(233, 216, 77, 0.12);
    bottom: 6%;
    inset-inline-end: 8%;
    animation: hr-login-float 9s ease-in-out infinite reverse;
}
@keyframes hr-login-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.hr-login__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(24, 24, 27, 0.92);
    border: 1px solid rgba(105, 162, 62, 0.28);
    border-radius: 22px;
    padding: 34px 28px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    animation: hr-login-in .45s ease both;
}
@keyframes hr-login-in {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.hr-login__brand {
    text-align: center;
    margin-bottom: 26px;
}
.hr-login__logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 14px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(145deg, rgba(105, 162, 62, 0.55), rgba(233, 216, 77, 0.35));
    box-shadow: 0 0 0 6px rgba(105, 162, 62, 0.12), 0 12px 28px rgba(0, 0, 0, 0.35);
}
.hr-login__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #141416;
    display: block;
}
.hr-login__brand h1 {
    margin: 0;
    color: #f4f4f5;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.hr-login__brand p {
    margin: 6px 0 0;
    color: #8fbf66;
    font-size: 14px;
    font-weight: 600;
}

.hr-login__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.hr-login__field label {
    display: block;
    margin-bottom: 7px;
    color: #d4d4d8;
    font-size: 13px;
    font-weight: 700;
}
.hr-login__input {
    position: relative;
}
.hr-login__input i {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8fbf66;
    font-size: 14px;
    pointer-events: none;
}
.hr-login__input input {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid hsl(240 3.7% 22%);
    background: #1f1f23;
    color: #f4f4f5;
    padding: 10px 14px;
    padding-inline-start: 42px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.hr-login__input input::placeholder {
    color: #71717a;
}
.hr-login__input input:focus {
    border-color: rgba(105, 162, 62, 0.55);
    box-shadow: 0 0 0 3px rgba(105, 162, 62, 0.16);
}
.hr-login__input input.is-invalid {
    border-color: rgba(188, 48, 94, 0.55);
}
.hr-login__error {
    display: block;
    margin-top: 6px;
    color: #f0a8c0;
    font-size: 12px;
    font-weight: 600;
}

.hr-login__remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 4px;
    color: #a1a1aa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.hr-login__remember input {
    width: 16px;
    height: 16px;
    accent-color: #69A23E;
    cursor: pointer;
}
.hr-login__remember:hover {
    color: #d4d4d8;
}

.hr-login__submit {
    margin-top: 6px;
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #69A23E, #557f34);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
    box-shadow: 0 10px 24px rgba(105, 162, 62, 0.28);
}
.hr-login__submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.hr-login__submit:disabled {
    opacity: .75;
    cursor: wait;
    transform: none;
}
.hr-login__loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hr-login__install {
    margin-top: 14px;
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(105, 162, 62, 0.4);
    background: rgba(105, 162, 62, 0.12);
    color: #8fbf66;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s ease, border-color .15s ease;
}
.hr-login__install:hover {
    background: rgba(105, 162, 62, 0.2);
    border-color: rgba(105, 162, 62, 0.55);
}

.hr-pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hr-login__footer {
    margin-top: 22px;
    text-align: center;
}
.hr-login__footer small {
    color: #71717a;
    font-size: 12px;
}

@media (max-width: 480px) {
    .hr-login__card { padding: 28px 18px 20px; border-radius: 18px; }
    .hr-login__logo { width: 92px; height: 92px; }
    .hr-login__brand h1 { font-size: 24px; }
}
/* ===== Flatpickr Arabic datepicker ===== */
.flatpickr-calendar.hr-flatpickr {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
    border: 1px solid rgba(123, 31, 58, 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(20, 12, 18, 0.16);
    overflow: hidden;
    z-index: 20050 !important;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-months {
    background: #7B1F3A;
    border-radius: 0;
    padding: 4px 0;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-months .flatpickr-month {
    color: #fff;
    fill: #fff;
    height: 42px;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-current-month {
    font-size: 15px;
    font-weight: 700;
    padding-top: 8px;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-calendar.hr-flatpickr .numInputWrapper input {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    color: #fff;
    background: transparent;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-prev-month,
.flatpickr-calendar.hr-flatpickr .flatpickr-next-month {
    fill: #fff;
    padding: 8px 12px;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-prev-month:hover svg,
.flatpickr-calendar.hr-flatpickr .flatpickr-next-month:hover svg {
    fill: #D4A520;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-weekdays {
    background: #fff8f2;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-weekday {
    color: #7B1F3A;
    font-weight: 700;
    font-size: 12px;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day {
    border-radius: 10px;
    font-weight: 600;
    color: #2a1a20;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day:hover,
.flatpickr-calendar.hr-flatpickr .flatpickr-day:focus {
    background: rgba(123, 31, 58, 0.1);
    border-color: transparent;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day.today {
    border-color: #D4A520;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day.selected,
.flatpickr-calendar.hr-flatpickr .flatpickr-day.startRange,
.flatpickr-calendar.hr-flatpickr .flatpickr-day.endRange {
    background: #7B1F3A;
    border-color: #7B1F3A;
    color: #fff;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day.selected:hover {
    background: #5f1730;
    border-color: #5f1730;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day.hr-day-has-sheet {
    position: relative;
    font-weight: 800;
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day.hr-day-has-sheet::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hamada-green-soft, #69A23E);
}
.flatpickr-calendar.hr-flatpickr .flatpickr-day.hr-day-has-sheet.selected::after {
    background: #fff;
}
.flatpickr-calendar.open {
    z-index: 20050 !important;
}
input.hr-datepicker,
input.hr-datepicker-display,
.flatpickr-input.hr-datepicker-display {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237B1F3A' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 36px !important;
}
.modal .flatpickr-calendar {
    z-index: 20060 !important;
}

/* ===== Admin footer ===== */
body.dark-only .page-wrapper.horizontal-wrapper .page-body-wrapper footer.footer,
body.dark-only .compact-wrapper .page-body-wrapper footer.footer,
.page-wrapper.horizontal-wrapper .page-body-wrapper footer.footer,
.page-body-wrapper .footer,
footer.footer {
    background: var(--hr-surface) !important;
    border-top: 1px solid rgba(105, 162, 62, 0.18) !important;
    box-shadow: none !important;
    padding: 14px 0 !important;
}
body.dark-only .page-wrapper.horizontal-wrapper .page-body-wrapper footer.footer p,
body.dark-only .compact-wrapper .page-body-wrapper footer.footer p,
.page-wrapper.horizontal-wrapper .page-body-wrapper footer.footer p,
footer.footer .footer-copyright p,
.page-body-wrapper .footer p {
    color: var(--hr-muted) !important;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
}
footer.footer .footer-copyright .hr-footer-brand {
    color: var(--hamada-green-soft) !important;
    font-weight: 700;
}

.hr-feed__name {
    color: inherit;
    text-decoration: none;
}
.hr-feed__name:hover strong {
    color: var(--hamada-green-soft);
    text-decoration: underline;
}

/* Employee name links in tables/lists — keep original text color */
.table td > a:not(.btn-view):not(.hr-chip-btn):not(.delete-btn):not(.btn),
.hr-pay-table__employee > a,
.hr-today-present .hr-feed__main > strong > a,
.hr-missing-departure .hr-feed__main > strong > a,
.hr-panel__body h5 > a {
    color: inherit !important;
    text-decoration: none;
}

.table td > a:not(.btn-view):not(.hr-chip-btn):not(.delete-btn):not(.btn):hover,
.hr-pay-table__employee > a:hover,
.hr-today-present .hr-feed__main > strong > a:hover,
.hr-missing-departure .hr-feed__main > strong > a:hover,
.hr-panel__body h5 > a:hover {
    color: var(--hamada-green-soft) !important;
    text-decoration: underline;
}

.hr-pill--time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.hr-pill--time .fa-clock {
    font-size: 0.75rem;
    line-height: 1;
}

/* ===== Employee show: compact meta + record shortcuts ===== */
.hr-employee-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.hr-employee-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    color: var(--hr-text, #e8eee4);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}
.hr-employee-strip__item i {
    font-size: 11px;
    color: var(--hamada-green-soft);
    opacity: 0.9;
}
.hr-employee-strip__item.is-active {
    background: var(--hr-success-soft);
    border-color: rgba(105, 162, 62, 0.35);
    color: var(--hamada-green-soft);
}
.hr-employee-strip__item.is-active i {
    font-size: 8px;
}
.hr-employee-strip__item.is-inactive {
    opacity: 0.7;
}
.hr-employee-strip__week {
    background: var(--hr-surface-2);
    border-color: rgba(105, 162, 62, 0.28);
}
.hr-employee-strip__notes {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-records-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.hr-record-slot {
    min-width: 0;
}
.hr-record-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--hr-border);
    background: var(--hr-surface);
    color: inherit;
    text-align: start;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.hr-record-card::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.hr-record-card:hover {
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}
.hr-record-card--attendance {
    background: linear-gradient(135deg, rgba(105, 162, 62, 0.12), var(--hr-surface) 55%);
    border-color: rgba(105, 162, 62, 0.35);
}
.hr-record-card--attendance::before {
    background: var(--hamada-green-soft);
}
.hr-record-card--attendance:hover {
    border-color: rgba(105, 162, 62, 0.6);
    box-shadow: 0 8px 20px rgba(105, 162, 62, 0.12);
}
.hr-record-card--advances {
    background: linear-gradient(135deg, rgba(233, 216, 77, 0.14), var(--hr-surface) 55%);
    border-color: rgba(233, 216, 77, 0.4);
}
.hr-record-card--advances::before {
    background: var(--hamada-yellow);
}
.hr-record-card--advances:hover {
    border-color: rgba(233, 216, 77, 0.7);
    box-shadow: 0 8px 20px rgba(233, 216, 77, 0.12);
}
.hr-record-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}
.hr-record-card--attendance .hr-record-card__icon {
    background: var(--hr-success-soft);
    color: var(--hamada-green-soft);
    box-shadow: 0 0 0 4px rgba(105, 162, 62, 0.08);
}
.hr-record-card--advances .hr-record-card__icon {
    background: var(--hr-warn-soft);
    color: var(--hamada-yellow);
    box-shadow: 0 0 0 4px rgba(233, 216, 77, 0.1);
}
.hr-record-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.hr-record-card__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}
.hr-record-card--attendance .hr-record-card__badge {
    background: var(--hr-success-soft);
    color: var(--hamada-green-soft);
}
.hr-record-card--advances .hr-record-card__badge {
    background: var(--hr-warn-soft);
    color: var(--hamada-yellow);
}
.hr-record-card__text strong {
    font-size: 16px;
    font-weight: 700;
}
.hr-record-card--attendance .hr-record-card__text strong {
    color: var(--hamada-green-soft);
}
.hr-record-card--advances .hr-record-card__text strong {
    color: var(--hamada-yellow);
}
.hr-record-card__text small {
    color: var(--hr-muted);
    font-size: 12px;
}
.hr-record-card__arrow {
    color: var(--hr-muted);
    font-size: 12px;
}
.hr-record-card--attendance .hr-record-card__arrow {
    color: var(--hamada-green-soft);
}
.hr-record-card--advances .hr-record-card__arrow {
    color: var(--hamada-yellow);
}

.hr-summary__hero-item--net strong {
    color: var(--hamada-green) !important;
}
.hr-summary__hero-item--net.is-negative {
    background: rgba(220, 53, 69, 0.12) !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
}
.hr-summary__hero-item--net.is-negative strong,
.hr-summary__hero-item--net.is-negative strong small {
    color: #e35d6a !important;
}
.hr-summary__hero-item--net.is-settled {
    background: var(--hr-success-soft) !important;
    border-color: rgba(105, 162, 62, 0.35) !important;
}
.hr-summary__hero-item--net.is-settled strong,
.hr-summary__hero-item--net.is-settled strong small {
    color: var(--hamada-green-soft) !important;
}

/* Employee balance / dues panel */
.hr-balance .hr-panel__head { display: none; }
.hr-balance__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 0;
}
.hr-balance__title h5 {
    margin: 0;
    font-weight: 800;
    font-size: 15px;
}
.hr-balance__title small {
    color: var(--hr-muted);
    font-size: 12px;
}
.hr-balance__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.hr-balance__body {
    padding: 10px 14px 14px;
}
.hr-balance-stat {
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    padding: 12px 14px;
    height: 100%;
}
.hr-balance-stat__row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hr-balance-stat__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hr-success-soft);
    color: var(--hamada-green-soft);
    line-height: 1;
}
.hr-balance-stat__icon .fas {
    font-size: 16px;
    width: auto;
    height: auto;
    line-height: 1;
}
/* Prevent Viho .card-stat i (50×50) from blowing up balance icons */
.card-stat .hr-balance-stat__icon,
.card-stat .hr-balance-stat__icon i {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: inherit !important;
}
.card-stat .hr-balance-stat__icon i {
    width: auto !important;
    height: auto !important;
    font-size: 16px !important;
    background: transparent !important;
}
.hr-balance-stat__icon.is-warn {
    background: var(--hr-warn-soft);
    color: var(--hamada-yellow);
}
.hr-balance-stat__icon.is-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #e35d6a;
}
.hr-balance-stat h2 {
    margin: 0 0 4px;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--hr-muted) !important;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.2;
}
.hr-balance-stat label {
    margin: 0 !important;
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    color: inherit !important;
    line-height: 1.15;
}
.hr-balance-stat label small {
    font-size: 1.15rem;
    font-weight: 700;
}
.hr-balance-stat.is-settled {
    background: var(--hr-success-soft);
    border-color: rgba(105, 162, 62, 0.35);
}
.hr-balance-stat.is-settled label {
    color: var(--hamada-green-soft) !important;
}
.hr-balance-stat.is-due {
    background: var(--hr-warn-soft);
    border-color: rgba(233, 216, 77, 0.35);
}
.hr-balance-stat.is-due label {
    color: var(--hamada-yellow) !important;
}
.hr-balance-stat.is-negative {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.35);
}
.hr-balance-stat.is-negative label {
    color: #e35d6a !important;
}
.hr-balance-stat.is-warn label {
    color: var(--hamada-yellow) !important;
}
.hr-balance-stat .text-muted {
    font-size: 10px !important;
    margin-top: 2px;
}
.hr-balance-stat h2 small {
    font-size: 10px !important;
    font-weight: 500 !important;
    color: var(--hr-muted) !important;
    margin-inline-start: 4px;
}
.hr-shift-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.hr-shift-pair__item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
}
.hr-shift-pair__item span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--hr-muted);
    margin-bottom: 4px;
    line-height: 1.2;
}
.hr-shift-pair__item strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--hr-text);
}
.hr-report-kpis .hr-balance-stat {
    min-height: 92px;
}
.hr-report-kpis .hr-shift-pair__item strong {
    font-size: 1.35rem;
}

.hr-period-switch {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: var(--hr-surface-2, rgba(255,255,255,0.04));
    border: 1px solid var(--hr-border);
}
.hr-period-switch__btn {
    border: 0;
    background: transparent;
    color: var(--hr-muted);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}
.hr-period-switch__btn.is-active {
    background: var(--hr-success-soft);
    color: var(--hamada-green-soft);
}

.hr-pay-table tbody td a,
.hr-payroll-table tbody td a {
    color: #fff !important;
    text-decoration: none;
}
.hr-pay-table tbody td a:hover,
.hr-payroll-table tbody td a:hover {
    color: var(--hamada-green-soft) !important;
    text-decoration: underline;
}
.hr-pay-remaining.is-due {
    color: var(--hamada-yellow) !important;
}
.hr-pay-remaining.is-zero {
    color: var(--hamada-green-soft) !important;
}
.hr-pay-remaining.is-negative {
    color: #e35d6a !important;
}

.hr-settings-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(105, 162, 62, 0.22);
    background: rgba(105, 162, 62, 0.08);
    color: var(--hr-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.hr-settings-note strong {
    color: var(--hamada-green-soft);
    font-weight: 700;
}

.hr-settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-settings-block {
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--hr-border);
}

.hr-settings-block:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.hr-settings-block__title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hr-muted);
    letter-spacing: 0.02em;
}

.hr-settings-grid {
    display: grid;
    gap: 12px 16px;
}

.hr-settings-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-settings-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hr-settings-field .form-label {
    margin-bottom: 4px;
    font-size: 0.82rem;
    font-weight: 600;
}

.hr-settings-field .form-control-sm {
    max-width: 132px;
    height: 34px;
    padding: 0.28rem 0.55rem;
    font-size: 0.875rem;
}

.hr-settings-field small {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.35;
}

.hr-settings-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hr-settings-inline .form-control-sm {
    max-width: 100px;
}

.hr-settings-inline .hr-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
}

@media (max-width: 767.98px) {
    .hr-settings-grid--3,
    .hr-settings-grid--2 {
        grid-template-columns: 1fr;
    }

    .hr-settings-field .form-control-sm,
    .hr-settings-inline .form-control-sm {
        max-width: 160px;
    }
}

.hr-scan-mode-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hr-scan-mode-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--hr-border);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.hr-scan-mode-option strong {
    color: var(--hr-text);
    font-size: 0.92rem;
}

.hr-scan-mode-option span {
    color: var(--hr-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.hr-scan-mode-option.is-active {
    border-color: rgba(105, 162, 62, 0.45);
    background: rgba(105, 162, 62, 0.1);
}

.hr-scan-mode-option.is-active strong {
    color: var(--hamada-green-soft);
}

@media (max-width: 767.98px) {
    .hr-scan-mode-options {
        grid-template-columns: 1fr;
    }
}

.hr-usb-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--hr-border);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.hr-usb-toggle.is-on {
    border-color: rgba(105, 162, 62, 0.45);
    background: rgba(105, 162, 62, 0.1);
}

.hr-usb-toggle__switch {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 24px;
    margin-top: 2px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    transition: background .15s ease;
}

.hr-usb-toggle__switch::after {
    content: '';
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: inset-inline-start .15s ease, inset-inline-end .15s ease;
}

.hr-usb-toggle.is-on .hr-usb-toggle__switch {
    background: rgba(105, 162, 62, 0.9);
}

.hr-usb-toggle.is-on .hr-usb-toggle__switch::after {
    inset-inline-start: auto;
    inset-inline-end: 3px;
}

.hr-usb-toggle__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hr-usb-toggle__text strong {
    color: var(--hr-text);
    font-size: 0.92rem;
}

.hr-usb-toggle__text small {
    color: var(--hr-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.hr-pay-table-wrap {
    max-height: calc(100vh - 280px);
    overflow: auto;
    overscroll-behavior: contain;
}

.hr-pay-meta {
    margin-top: 12px;
}

.hr-pay-meta > small {
    display: block;
    line-height: 1.45;
}

.hr-pay-awaiting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(233, 216, 77, 0.3);
    background: rgba(233, 216, 77, 0.1);
    color: var(--hamada-yellow);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.hr-pay-awaiting i {
    font-size: 0.68rem;
    opacity: 0.85;
}

.hr-pay-awaiting strong {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--hamada-yellow);
}

@media (max-width: 575.98px) {
    .page-header .d-flex.align-items-center h3 {
        font-size: 1.15rem;
    }

    .hr-pay-awaiting {
        padding: 4px 8px;
        font-size: 0.68rem;
    }

    .hr-pay-awaiting strong {
        font-size: 0.75rem;
    }
}

.hr-pay-table--detail {
    border-collapse: separate;
    border-spacing: 0;
}

.hr-pay-table--detail thead th {
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.78rem;
    background: #1f2a1c;
    border-color: var(--hr-border);
    position: sticky;
    z-index: 3;
    box-shadow: 0 1px 0 var(--hr-border);
}

.hr-pay-table--detail thead tr:first-child th {
    top: 0;
}

.hr-pay-table--detail thead tr:nth-child(2) th {
    top: 2.15rem;
    z-index: 2;
    background: #243022;
}

.hr-pay-table--detail tbody td,
.hr-pay-table--detail tfoot th {
    white-space: nowrap;
    font-size: 0.82rem;
}

.hr-pay-table__group {
    border-bottom: 1px solid rgba(105, 162, 62, 0.25) !important;
}

.hr-pay-table__group--add {
    background: #243a1f !important;
}

.hr-pay-table__group--deduct {
    background: #3a2226 !important;
}

.hr-pay-table__employee {
    min-width: 140px;
    white-space: normal !important;
}

.hr-advance-amount-input {
    width: 110px !important;
    max-width: 110px;
    padding-inline: 10px !important;
    text-align: center;
}

.hr-advance-amount-input.is-unsaved:not(:focus) {
    border: 2px solid #dc3545 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.hr-advances-table {
    width: auto !important;
    max-width: 100%;
    table-layout: auto;
}

.hr-advances-table th,
.hr-advances-table td {
    width: 1%;
    white-space: nowrap;
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    padding-inline: 0.65rem !important;
}

.hr-advances-table .hr-pay-table__employee {
    min-width: 0 !important;
    max-width: 180px;
    white-space: nowrap !important;
}

.hr-advances-table .hr-pay-table__employee a {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.hr-advance-day-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    font-size: 0.75rem;
    padding-inline: 8px;
}

.hr-advance-day-pill__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(227, 93, 106, 0.18);
    color: #e35d6a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.hr-advance-day-pill__remove:hover {
    background: #e35d6a;
    color: #fff;
}

.hr-advance-day-total {
    font-size: 0.95rem;
    font-weight: 800;
    color: inherit;
}

.hr-pay-table__add {
    color: var(--hamada-green-soft);
    font-weight: 600;
}

.hr-pay-table__deduct {
    color: #e35d6a;
    font-weight: 600;
}

.hr-pay-table--detail tfoot th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 700;
}

.hr-pay-table--single tbody td,
.hr-pay-table--single thead th {
    text-align: center;
}

.hr-pay-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.hr-pay-summary-card {
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
}

.hr-pay-summary-card span {
    display: block;
    color: var(--hr-muted);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.hr-pay-summary-card strong {
    font-size: 1.15rem;
    color: var(--hr-text);
}

.hr-pay-summary-card small {
    display: block;
    margin-top: 4px;
    color: var(--hr-muted);
    font-size: 0.72rem;
}

.hr-pay-summary-card.is-due {
    border-color: rgba(233, 216, 77, 0.35);
    background: rgba(233, 216, 77, 0.08);
}

.hr-pay-summary-card.is-due strong {
    color: var(--hamada-yellow);
}

.hr-pay-summary-card.is-settled {
    border-color: rgba(105, 162, 62, 0.35);
    background: rgba(105, 162, 62, 0.1);
}

.hr-pay-summary-card.is-settled strong {
    color: var(--hamada-green-soft);
}

.hr-pay-summary-card.is-negative {
    border-color: rgba(227, 93, 106, 0.35);
    background: rgba(227, 93, 106, 0.08);
}

.hr-pay-summary-card.is-negative strong {
    color: #e35d6a;
}

.hr-pay-summary-card.is-warn strong {
    color: var(--hamada-yellow);
}

.hr-pay-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px dashed var(--hr-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.hr-pay-flow__step {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.hr-pay-flow__step span {
    font-size: 0.72rem;
    color: var(--hr-muted);
}

.hr-pay-flow__step strong {
    font-size: 0.92rem;
    color: var(--hr-text);
}

.hr-pay-flow__step.is-highlight {
    background: rgba(105, 162, 62, 0.12);
}

.hr-pay-flow__step.is-result.is-due strong {
    color: var(--hamada-yellow);
}

.hr-pay-flow__step.is-result.is-settled strong {
    color: var(--hamada-green-soft);
}

.hr-pay-flow__step.is-result.is-negative strong {
    color: #e35d6a;
}

.hr-pay-flow__op {
    color: var(--hr-muted);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.hr-pay-flow__op--add {
    color: var(--hamada-green-soft);
}

.hr-pay-flow__op--deduct {
    color: #e35d6a;
}

@media (max-width: 991.98px) {
    .hr-pay-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .hr-pay-summary-cards {
        grid-template-columns: 1fr;
    }

    .hr-pay-table-wrap {
        max-height: min(70vh, 520px);
    }

    .hr-pay-table--detail thead tr:nth-child(2) th {
        top: 2.4rem;
    }
}

/* Attendance today — Viho card + feed */
.hr-today-feed {
    max-height: 560px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(105, 162, 62, 0.55) rgba(39, 39, 42, 0.9);
}
.hr-today-feed::-webkit-scrollbar {
    width: 6px;
}
.hr-today-feed::-webkit-scrollbar-track {
    background: rgba(39, 39, 42, 0.9);
    border-radius: 999px;
    margin: 6px 0;
}
.hr-today-feed::-webkit-scrollbar-thumb {
    background: rgba(105, 162, 62, 0.45);
    border-radius: 999px;
}
.hr-today-feed::-webkit-scrollbar-thumb:hover {
    background: rgba(105, 162, 62, 0.75);
}
.hr-today-feed__item.is-clickable {
    cursor: pointer;
    transition: background .15s ease;
}
.hr-today-feed__item.is-clickable:hover {
    background: rgba(105, 162, 62, 0.08);
}
.hr-today-feed__item.is-loading {
    opacity: 0.65;
    pointer-events: none;
}
.hr-today-mark-hint {
    gap: 6px;
}
.hr-today-mark-hint.is-loading {
    min-width: 72px;
    justify-content: center;
}
.hr-today-mark-hint .fas.fa-user-check {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    display: inline-block !important;
    font-size: 12px !important;
}
.hr-today-undo {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    justify-content: center;
    background: rgba(220, 53, 69, 0.12) !important;
    border-color: rgba(220, 53, 69, 0.25) !important;
    color: #e35d6a !important;
}
.hr-today-undo:hover {
    background: rgba(220, 53, 69, 0.22) !important;
    color: #ff7b88 !important;
}

.hr-today-present {
    align-items: center;
}

.hr-today-present__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hr-today-present__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    line-height: 1.45;
}

.hr-today-present__meta > span:not(:last-child)::after {
    content: '·';
    margin-inline-start: 10px;
    color: rgba(113, 113, 122, 0.9);
}

@media (max-width: 767.98px) {
    .hr-today-feed {
        max-height: min(62vh, 420px);
    }

    .hr-today-present {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "avatar main"
            "actions actions";
        gap: 10px 12px;
        align-items: start;
        padding: 12px 14px !important;
    }

    .hr-today-present > .hr-avatar {
        grid-area: avatar;
        margin-top: 2px;
    }

    .hr-today-present > .hr-feed__main {
        grid-area: main;
    }

    .hr-today-present > .hr-today-present__actions {
        grid-area: actions;
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 10px;
    }

    .hr-today-present .hr-feed__main strong {
        white-space: normal;
        font-size: 15px;
        line-height: 1.3;
    }

    .hr-today-present__meta {
        font-size: 12px;
        gap: 6px 0;
        flex-direction: column;
    }

    .hr-today-present__meta > span:not(:last-child)::after {
        content: none;
        margin: 0;
    }

    .hr-today-present .hr-chip-btn--attendance {
        flex: 1 1 auto;
        min-height: 40px;
        justify-content: center;
    }

    .hr-today-present .hr-today-shift {
        flex: 1 1 auto;
        justify-content: center;
    }

    .hr-today-present .hr-period-switch__btn {
        flex: 1;
        min-height: 36px;
        padding: 6px 10px;
    }

    .hr-today-feed__item {
        align-items: flex-start;
    }

    .hr-today-feed__item .hr-feed__main strong {
        white-space: normal;
    }

    .hr-today-feed__item .hr-today-mark-hint {
        align-self: center;
    }
}

.hr-missing-departure {
    border-color: rgba(227, 93, 106, 0.35) !important;
}

.hr-missing-departure .hr-panel__head {
    border-bottom-color: rgba(227, 93, 106, 0.2);
}

.hr-missing-departure .hr-panel__head h5 {
    color: #e35d6a;
}

.hr-missing-departure-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(227, 93, 106, 0.35);
    background: rgba(227, 93, 106, 0.08);
    color: inherit;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease;
}

.hr-missing-departure-banner:hover {
    background: rgba(227, 93, 106, 0.14);
    border-color: rgba(227, 93, 106, 0.5);
    color: inherit;
}

.hr-missing-departure-banner__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(227, 93, 106, 0.18);
    color: #e35d6a;
}

.hr-missing-departure-banner__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hr-missing-departure-banner__body strong {
    color: #e35d6a;
    font-size: 0.95rem;
    font-weight: 800;
}

.hr-missing-departure-banner__body small {
    color: var(--hr-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.hr-missing-departure-banner__count {
    flex: 0 0 auto;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e35d6a;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
}

.hr-missing-departure-banner__go {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e35d6a;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .hr-missing-departure-banner {
        flex-wrap: wrap;
    }

    .hr-missing-departure-banner__go {
        width: 100%;
        justify-content: flex-end;
    }
}

.hr-avatar--warn {
    background: rgba(227, 93, 106, 0.18) !important;
    color: #e35d6a !important;
}

.hr-today-present.is-missing-out {
    background: rgba(227, 93, 106, 0.06);
}

.hr-avatar--ok {
    background: var(--hr-success-soft) !important;
    color: var(--hamada-green-soft) !important;
}
/* Keep Viho .card-stat i from breaking feed avatars */
.card-stat .hr-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}
.card-stat .hr-avatar i,
.card-stat .hr-avatar .fas,
.card-stat .hr-avatar .fa {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: inherit !important;
    display: block !important;
    line-height: 1 !important;
    font-size: 12px !important;
}
.card-stat .hr-avatar--ok {
    background: var(--hr-success-soft) !important;
    color: var(--hamada-green-soft) !important;
}
.card-stat .hr-today-undo,
.card-stat .hr-today-undo i {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    background: rgba(220, 53, 69, 0.12) !important;
    color: #e35d6a !important;
    font-size: 12px !important;
}
.card-stat .hr-today-undo i {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
}
.card-stat .hr-today-mark-hint i {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    display: inline !important;
    font-size: inherit !important;
}

/* Home quick attendance */
.hr-quick-label {
    color: var(--hr-muted);
    font-size: 12px;
    font-weight: 600;
}

.hr-quick-panel .hr-panel__head {
    gap: 10px;
}

.hr-quick-head-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hr-quick-progress {
    margin-bottom: 14px;
}

.hr-quick-progress__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--hr-muted);
    font-size: 12px;
}

.hr-quick-progress__meta strong {
    color: var(--hr-text);
    font-size: 13px;
}

.hr-quick-progress__track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.hr-quick-progress__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--hamada-green), #9ec96f);
    transition: width .2s ease;
}

.hr-quick-tools {
    position: sticky;
    top: 0;
    z-index: 2;
    margin-bottom: 12px;
    padding-bottom: 4px;
    background: var(--hr-surface);
}

.hr-quick-search {
    position: relative;
    display: flex;
    align-items: center;
}

.hr-quick-search > i.fa-search {
    position: absolute;
    inset-inline-start: 12px;
    color: var(--hr-muted);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
}

.hr-quick-search .form-control {
    width: 100%;
    min-height: 44px;
    padding-inline-start: 36px;
    padding-inline-end: 40px;
    border-radius: 12px;
    background: var(--hr-surface-2) !important;
    border: 1px solid var(--hr-border) !important;
    color: var(--hr-text) !important;
    font-size: 14px;
}

.hr-quick-search .form-control:focus {
    border-color: rgba(105, 162, 62, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(105, 162, 62, 0.12) !important;
}

.hr-quick-search__clear {
    position: absolute;
    inset-inline-end: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hr-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hr-quick-search__clear:hover {
    color: var(--hr-text);
    background: rgba(255, 255, 255, 0.06);
}

.hr-quick-letters {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.hr-quick-letters::-webkit-scrollbar {
    display: none;
}

.hr-quick-letter {
    flex: 0 0 auto;
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--hr-border);
    background: var(--hr-surface-2);
    color: var(--hr-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.hr-quick-letter.is-active {
    background: var(--hr-primary-soft) !important;
    border-color: rgba(105, 162, 62, 0.4) !important;
    color: var(--hamada-green-soft) !important;
}

.hr-quick-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: min(58vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 6px 6px 8px;
    margin-inline: 0;
    border: 1px solid var(--hr-border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(105, 162, 62, 0.55) rgba(39, 39, 42, 0.9);
    scroll-padding-block: 8px;
}

.hr-quick-slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hr-quick-slider__nav {
    flex: 0 0 44px !important;
    align-self: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    border: 1px solid rgba(105, 162, 62, 0.4) !important;
    border-radius: 999px !important;
    background: var(--hr-surface-2) !important;
    color: var(--hamada-green-soft) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    line-height: 1 !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, opacity .15s ease;
}

.hr-quick-slider__chev {
    display: block !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: inherit !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Kill Viho .card-stat i (50×50 green square) on slider arrows */
.card-stat .hr-quick-slider__nav i,
.hr-quick-slider__nav i {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: inline-block !important;
    font-size: 16px !important;
    line-height: 1 !important;
    color: inherit !important;
    box-shadow: none !important;
}

.hr-quick-slider__nav:hover:not(:disabled) {
    background: var(--hr-primary-soft) !important;
    border-color: rgba(105, 162, 62, 0.7) !important;
    color: #fff !important;
    transform: scale(1.06);
}

.hr-quick-slider__nav:active:not(:disabled) {
    transform: scale(0.96);
}

.hr-quick-slider__nav:disabled {
    opacity: 0.3 !important;
    cursor: default !important;
    box-shadow: none !important;
    border-color: var(--hr-border) !important;
    color: var(--hr-muted) !important;
    background: var(--hr-surface-2) !important;
    transform: none !important;
}

.hr-quick-list--slider {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    max-height: none;
    overflow: visible;
    padding: 8px;
    scrollbar-width: none;
}

.hr-quick-list--slider::-webkit-scrollbar {
    display: none;
}

.hr-quick-list--slider .hr-quick-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 10px;
    text-align: center;
}

.hr-quick-list--slider .hr-quick-row__body {
    align-items: center;
    width: 100%;
}

.hr-quick-list--slider .hr-quick-row__name,
.hr-quick-list--slider .hr-quick-row__meta {
    max-width: 100%;
}

.hr-quick-list--slider .hr-quick-row__action {
    width: 100%;
    justify-content: center;
}

.hr-quick-slider__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--hr-muted);
    font-size: 12px;
}

.hr-quick-slider__dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hr-quick-slider__dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.hr-quick-slider__dots span.is-active {
    width: 16px;
    background: var(--hamada-green);
}

.hr-quick-list::-webkit-scrollbar {
    width: 6px;
}

.hr-quick-list::-webkit-scrollbar-track {
    background: rgba(39, 39, 42, 0.9);
    border-radius: 999px;
    margin: 8px 0;
}

.hr-quick-list::-webkit-scrollbar-thumb {
    background: rgba(105, 162, 62, 0.45);
    border-radius: 999px;
}

.hr-quick-list::-webkit-scrollbar-thumb:hover {
    background: rgba(105, 162, 62, 0.75);
}

.hr-quick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 10px 12px 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(105, 162, 62, 0.28);
    background: rgba(105, 162, 62, 0.08);
    color: var(--hr-text);
    cursor: pointer;
    text-align: start;
    transition: background .15s ease, border-color .15s ease;
}

.hr-quick-row--out {
    border-color: rgba(233, 216, 77, 0.35);
    background: rgba(233, 216, 77, 0.08);
}

.hr-quick-row--out:hover:not(:disabled) {
    background: rgba(233, 216, 77, 0.14);
    border-color: rgba(233, 216, 77, 0.5);
}

.hr-quick-row--out .hr-quick-row__action {
    background: rgba(233, 216, 77, 0.16);
    border-color: rgba(233, 216, 77, 0.35);
    color: var(--hamada-yellow);
}

.hr-quick-list--depart {
    max-height: min(28vh, 240px);
}

.hr-quick-row:disabled {
    opacity: 0.65;
    cursor: wait;
}

.hr-quick-row__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hr-quick-row__name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-quick-row__meta {
    font-size: 11px;
    color: var(--hr-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-quick-row__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--hr-primary-soft);
    border: 1px solid rgba(105, 162, 62, 0.35);
    color: var(--hamada-green-soft);
    font-size: 12px;
    font-weight: 700;
}

.hr-quick-row__loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    color: var(--hamada-green-soft);
}

.hr-quick-empty {
    padding: 18px 8px;
    text-align: center;
}

.hr-quick-more {
    margin-top: 10px;
}

.card-stat .hr-quick-row .hr-avatar,
.card-stat .hr-quick-row .hr-avatar i {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
}

.card-stat .hr-quick-row i,
.card-stat .hr-quick-search i,
.card-stat .hr-quick-search__clear i {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    display: inline !important;
    font-size: inherit !important;
}

.card-stat .hr-quick-row__action i {
    font-size: 11px !important;
}

/* Legacy chip styles (kept for any leftover usage) */
.hr-quick-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
}
.hr-quick-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 8px 10px 8px 8px;
    border-radius: 10px;
    border: 1px solid rgba(105, 162, 62, 0.28);
    background: rgba(105, 162, 62, 0.08);
    color: var(--hr-text);
    cursor: pointer;
    text-align: start;
}
.hr-quick-chip__name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hr-quick-chip__go {
    color: var(--hamada-green-soft);
    font-size: 11px;
    flex-shrink: 0;
    margin-inline-start: auto;
}

.hr-quick-present {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    background: var(--hr-surface-2, rgba(255,255,255,.03));
}
.hr-quick-present li {
    padding-left: 12px !important;
    padding-right: 12px !important;
}
.hr-today-empty {
    color: var(--hr-muted);
    font-size: 13px;
}

@media (min-width: 768px) {
    .hr-quick-list:not(.hr-quick-list--slider) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: min(56vh, 520px);
        padding: 8px;
        gap: 8px;
    }
}

@media (max-width: 1199.98px) {
    .hr-quick-list--slider {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .hr-quick-panel .hr-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-quick-tools {
        top: -4px;
        margin-inline: -2px;
        padding: 4px 2px 8px;
    }

    .hr-quick-row__action span {
        display: none;
    }

    .hr-quick-row__action {
        width: 36px;
        height: 36px;
        min-height: 36px;
        padding: 0;
        justify-content: center;
        border-radius: 10px;
    }

    .hr-quick-list:not(.hr-quick-list--slider) {
        max-height: min(55vh, 420px);
        padding: 6px;
    }

    .hr-quick-slider {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "list list"
            "prev next";
        gap: 10px;
        align-items: stretch;
    }

    .hr-quick-list--slider {
        grid-area: list;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hr-quick-list--slider .hr-quick-row__action {
        width: 100%;
        height: 32px;
        min-height: 32px;
    }

    .hr-quick-list--slider .hr-quick-row__action span {
        display: inline !important;
    }

    .hr-quick-slider__nav {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        flex: none !important;
        border-radius: 12px !important;
        box-shadow: none;
    }

    .hr-quick-slider__nav--prev {
        grid-area: prev;
    }

    .hr-quick-slider__nav--next {
        grid-area: next;
    }

    .hr-quick-slider__chev {
        font-size: 30px !important;
    }

    .hr-quick-slider__meta {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .hr-quick-chips {
        grid-template-columns: 1fr;
    }

    .hr-quick-list--slider {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 6px;
    }

    .hr-quick-list--slider .hr-quick-row {
        padding: 8px 6px;
        gap: 6px;
    }

    .hr-quick-list--slider .hr-quick-row__name {
        font-size: 13px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hr-quick-list--slider .hr-quick-row__meta {
        font-size: 10px;
    }
}

.card-stat .hr-quick-chip .hr-avatar,
.card-stat .hr-quick-chip .hr-avatar i {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.card-stat .hr-quick-chip i {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    display: inline !important;
    font-size: 11px !important;
}

/* Home month calendar */
.hr-home-cal {
    table-layout: fixed;
    width: 100%;
}
.hr-home-cal th,
.hr-home-cal td {
    width: 14.28%;
}
.hr-home-cal td {
    height: 72px !important;
    min-width: 0 !important;
    padding: 6px !important;
    vertical-align: top;
}
.hr-home-cal .hr-cal-cell {
    min-height: 0;
    height: 100%;
    gap: 4px;
}
.hr-home-cal td.has-sheet {
    box-shadow: inset 0 -2px 0 rgba(105, 162, 62, 0.55);
}
.hr-home-cal td.is-selected {
    box-shadow: inset 0 0 0 2px rgba(105, 162, 62, 0.65);
    background: rgba(105, 162, 62, 0.14) !important;
}
.hr-home-cal td.is-selected.is-today {
    box-shadow: inset 0 0 0 2px rgba(105, 162, 62, 0.75);
}
.hr-day-stat {
    background: var(--hr-surface-2, rgba(255,255,255,.03));
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    padding: 10px 12px;
    height: 100%;
}
.hr-day-stat small {
    display: block;
    color: var(--hr-muted);
    font-size: 11px;
    margin-bottom: 2px;
}
.hr-day-stat strong {
    color: var(--hr-text);
    font-size: 1.15rem;
    font-weight: 800;
}
.hr-day-stat.is-warn strong {
    color: var(--hamada-yellow);
}
.hr-day-stat.is-half strong {
    color: var(--hamada-yellow);
}
.hr-day-stat.is-ok strong {
    color: var(--hamada-green-soft);
}
.hr-avatar--half {
    background: rgba(233, 216, 77, 0.22) !important;
    color: var(--hamada-yellow) !important;
}
.hr-day-feed {
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--hr-border);
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(105, 162, 62, 0.55) rgba(39, 39, 42, 0.9);
}
.hr-day-feed::-webkit-scrollbar {
    width: 5px;
}
.hr-day-feed::-webkit-scrollbar-thumb {
    background: rgba(105, 162, 62, 0.45);
    border-radius: 999px;
}
.hr-day-feed li {
    padding-left: 10px !important;
    padding-right: 10px !important;
}
.hr-cal-cell__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 2px;
}
.hr-home-cal .hr-cal-day {
    font-size: 12px;
}
.hr-cal-sheet {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(105, 162, 62, 0.22);
    color: var(--hamada-green-soft);
    font-size: 8px;
    flex-shrink: 0;
}
.hr-cal-sheet.is-legend {
    width: 22px;
    height: 22px;
    font-size: 10px;
}
.card-stat .hr-cal-sheet,
.card-stat .hr-cal-sheet i {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: rgba(105, 162, 62, 0.22) !important;
    color: var(--hamada-green-soft) !important;
    font-size: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.card-stat .hr-cal-sheet.is-legend,
.card-stat .hr-cal-sheet.is-legend i {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: 10px !important;
}
.card-stat .hr-cal-sheet i {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
}
.hr-cal-avatars {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-top: auto;
}
.hr-cal-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(105, 162, 62, 0.22);
    color: var(--hamada-green-soft);
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(24, 24, 27, 0.9);
    margin-inline-start: -4px;
}
.hr-cal-avatars .hr-cal-avatar:first-child {
    margin-inline-start: 0;
}
.hr-cal-avatar--more {
    background: rgba(255, 255, 255, 0.1);
    color: var(--hr-muted);
    border-color: rgba(24, 24, 27, 0.9);
    font-size: 9px;
}
.hr-cal-avatar--half {
    background: rgba(233, 216, 77, 0.22);
    color: var(--hamada-yellow);
}
.hr-cal-shift-dots {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.hr-cal-shift-dots span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 14px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}
.hr-cal-shift-dots .is-full {
    background: rgba(105, 162, 62, 0.22);
    color: var(--hamada-green-soft);
}
.hr-cal-shift-dots .is-half {
    background: rgba(233, 216, 77, 0.22);
    color: var(--hamada-yellow);
}
.card-stat .hr-cal-avatar {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    background: rgba(105, 162, 62, 0.22) !important;
    color: var(--hamada-green-soft) !important;
}
.card-stat .hr-cal-avatar--half {
    background: rgba(233, 216, 77, 0.22) !important;
    color: var(--hamada-yellow) !important;
}
.card-stat .hr-cal-avatar--more {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--hr-muted) !important;
}
.card-stat .hr-panel__head .hr-chip-btn i {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    display: inline !important;
    font-size: 12px !important;
}
@media (max-width: 991.98px) {
    .hr-home-cal td {
        height: 64px !important;
    }
    .hr-cal-avatar,
    .card-stat .hr-cal-avatar {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        font-size: 9px !important;
    }
}

@media (max-width: 767.98px) {
    .hr-records-bar {
        grid-template-columns: 1fr;
    }
    .hr-employee-strip__notes {
        max-width: 100%;
    }
}

/* ===== Mobile bottom navigation (5 shortcuts) ===== */
.hr-bottom-nav {
    display: none;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    /* Below Bootstrap modal (1050) + backdrop (1040) so footer buttons stay reachable */
    z-index: 1020;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    background: rgba(18, 18, 22, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(105, 162, 62, 0.28);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.hr-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    text-decoration: none !important;
    color: #a1a1aa !important;
    font-family: 'Tajawal', sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    border-radius: 12px;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}

.hr-bottom-nav__item i {
    font-size: 18px;
    line-height: 1;
}

.hr-bottom-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-bottom-nav__item:hover,
.hr-bottom-nav__item:focus {
    color: #d4d4d8 !important;
    background: rgba(105, 162, 62, 0.08);
}

.hr-bottom-nav__item.is-active {
    color: #8fbf66 !important;
    background: rgba(105, 162, 62, 0.14);
}

.hr-bottom-nav__item.is-active i {
    transform: translateY(-1px);
}

.hr-bottom-nav__item--scan {
    position: relative;
    color: #d4d4d8 !important;
    flex: 1.15 1 0;
}

.hr-bottom-nav__scan-orb {
    width: 48px;
    height: 48px;
    margin-top: -18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #7bb84f, #69A23E 55%, #557f32);
    border: 3px solid rgba(18, 18, 22, 0.95);
    box-shadow: 0 8px 18px rgba(105, 162, 62, 0.45);
    color: #fff;
}

.hr-bottom-nav__scan-orb i {
    font-size: 1.15rem;
    line-height: 1;
    transform: none !important;
}

.hr-bottom-nav__item--scan span:last-child {
    margin-top: 2px;
    color: #9dcb72;
    font-weight: 700;
}

.hr-bottom-nav__item--scan.is-active .hr-bottom-nav__scan-orb,
.hr-bottom-nav__item--scan:hover .hr-bottom-nav__scan-orb {
    box-shadow: 0 10px 22px rgba(105, 162, 62, 0.55);
    background: linear-gradient(145deg, #8fbf66, #69A23E 50%, #4f782e);
}

.hr-bottom-nav__item--scan.is-active,
.hr-bottom-nav__item--scan:hover,
.hr-bottom-nav__item--scan:focus {
    background: transparent;
}

/* ===== Home daily journal ===== */
.hr-journal {
    list-style: none;
    margin: 0;
    padding: 0 4px 0 0;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(105, 162, 62, 0.45) rgba(255, 255, 255, 0.04);
}

.hr-journal::-webkit-scrollbar {
    width: 6px;
}

.hr-journal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    margin: 6px 0;
}

.hr-journal::-webkit-scrollbar-thumb {
    background: rgba(105, 162, 62, 0.42);
    border-radius: 999px;
}

.hr-journal::-webkit-scrollbar-thumb:hover {
    background: rgba(105, 162, 62, 0.7);
}

.hr-journal__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hr-journal__item:last-child {
    border-bottom: 0;
}

.hr-journal__icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(105, 162, 62, 0.16);
    border: 1px solid rgba(105, 162, 62, 0.28);
    color: #9dcb72;
    line-height: 1;
}

.hr-journal__icon i {
    font-size: 0.72rem;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

.hr-journal__item.is-attendance .hr-journal__icon {
    background: rgba(105, 162, 62, 0.16);
    border-color: rgba(105, 162, 62, 0.28);
    color: #9dcb72;
}

.hr-journal__item.is-payment .hr-journal__icon {
    background: rgba(56, 189, 148, 0.14);
    border-color: rgba(56, 189, 148, 0.3);
    color: #5ee0b5;
}

.hr-journal__item.is-advance .hr-journal__icon {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.28);
    color: #fbbf24;
}

.hr-journal__item.is-employee .hr-journal__icon {
    background: rgba(96, 165, 250, 0.14);
    border-color: rgba(96, 165, 250, 0.28);
    color: #93c5fd;
}

.hr-journal__item.is-update .hr-journal__icon {
    background: rgba(90, 155, 212, 0.14);
    border-color: rgba(90, 155, 212, 0.3);
    color: #7eb6e0;
}

.hr-journal__item.is-delete .hr-journal__icon {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #f87171;
}

.hr-journal__main {
    flex: 1;
    min-width: 0;
}

.hr-journal__msg {
    color: #d4d4d8;
    font-size: 0.82rem;
    line-height: 1.4;
}

.hr-journal__time {
    flex-shrink: 0;
    color: #71717a;
    font-size: 0.72rem;
    white-space: nowrap;
}

.hr-journal-panel .hr-panel__head {
    padding: 10px 14px;
}

.hr-journal-panel .hr-panel__head h5 {
    font-size: 0.95rem;
}

.hr-journal-panel .hr-panel__head small {
    font-size: 0.72rem;
}

.hr-lock-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #a1a1aa;
    opacity: 0.85;
}

.hr-lock-hint i {
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .hr-bottom-nav {
        display: flex;
    }

    /* Hide bottom nav while any modal/SweetAlert is open */
    body.modal-open .hr-bottom-nav,
    body.swal2-shown .hr-bottom-nav {
        transform: translateY(110%);
        opacity: 0;
        pointer-events: none;
    }

    body.dark-only .page-body,
    .page-body {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    }

    footer.footer {
        display: none !important;
    }

    /* Keep modal actions fully visible on small screens */
    .modal-dialog {
        margin: 0.75rem auto calc(0.75rem + env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 1.5rem - env(safe-area-inset-bottom, 0px));
    }

    .modal-dialog .modal-content {
        max-height: inherit;
        display: flex;
        flex-direction: column;
    }

    .modal-dialog .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== QR attendance scan ===== */
.hr-qr-reader {
    width: 100%;
    min-height: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: #0c0c0f;
    border: 1px solid rgba(105, 162, 62, 0.25);
}

.hr-qr-reader--modal {
    min-height: 260px;
    max-height: 360px;
}

.hr-qr-reader video {
    border-radius: 14px !important;
}

.hr-qr-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hr-qr-hint {
    margin-top: 10px;
    color: var(--hr-muted);
    font-size: 12px;
}

.hr-qr-hint.is-error {
    color: #e887a8;
    font-weight: 600;
}

.hr-qr-secure-warn {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(233, 216, 77, 0.35);
    background: rgba(233, 216, 77, 0.1);
    color: #f5e7a1;
    font-size: 13px;
    line-height: 1.7;
}

.hr-qr-secure-warn strong {
    display: block;
    margin-bottom: 6px;
    color: #E9D84D;
}

.hr-qr-secure-warn code {
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px 6px;
    border-radius: 6px;
}

.hr-qr-help {
    margin-top: 10px;
    color: var(--hr-muted);
    font-size: 12px;
    line-height: 1.7;
}

.hr-qr-help summary {
    cursor: pointer;
    color: #8fbf66;
    font-weight: 700;
    margin-bottom: 6px;
}

.hr-qr-help ol {
    padding-inline-start: 1.2rem;
    margin: 6px 0;
}

.hr-qr-help code {
    color: #d4d4d8;
}

.hr-qr-result {
    display: flex;
    align-items: stretch;
    gap: 18px;
    padding: 20px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--hr-border);
    min-height: 132px;
}

.hr-qr-result--fast {
    min-height: 140px;
    padding: 22px 24px;
    transition: background .12s ease, border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}

.hr-qr-result__badge {
    flex: 0 0 auto;
    min-width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--hr-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hr-qr-result__badge.is-idle {
    background: rgba(255, 255, 255, 0.04);
    color: var(--hr-muted);
}

.hr-qr-result__badge.is-check-in {
    background: rgba(105, 162, 62, 0.28);
    border-color: rgba(105, 162, 62, 0.55);
    color: #d9f0c2;
}

.hr-qr-result__badge.is-check-out {
    background: rgba(233, 216, 77, 0.22);
    border-color: rgba(233, 216, 77, 0.55);
    color: #f7ef9a;
}

.hr-qr-result__badge.is-warn,
.hr-qr-result__badge.is-error {
    background: rgba(188, 48, 94, 0.22);
    border-color: rgba(188, 48, 94, 0.55);
    color: #ffd0dc;
}

.hr-qr-result__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.hr-qr-result--fast .hr-qr-result__body strong,
.hr-qr-result__body strong {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--hr-text);
}

.hr-qr-result--fast .hr-qr-result__body span,
.hr-qr-result__body span {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hr-muted);
    line-height: 1.4;
}

.hr-qr-result__body small {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--hr-text);
    line-height: 1.4;
}

.hr-qr-result--fast.is-flash {
    animation: hr-scan-flash .45s ease;
}

@keyframes hr-scan-flash {
    0% { transform: scale(0.985); filter: brightness(1.35); }
    100% { transform: scale(1); filter: brightness(1); }
}

.hr-qr-result--idle {
    border-color: var(--hr-border);
    background: rgba(255, 255, 255, 0.03);
}

.hr-qr-result--ok.hr-qr-result--check-in,
.hr-qr-result--check-in {
    border-color: rgba(105, 162, 62, 0.55);
    background: rgba(105, 162, 62, 0.14);
    box-shadow: inset 0 0 0 1px rgba(105, 162, 62, 0.12);
}

.hr-qr-result--ok.hr-qr-result--check-out,
.hr-qr-result--check-out {
    border-color: rgba(233, 216, 77, 0.55);
    background: rgba(233, 216, 77, 0.12);
    box-shadow: inset 0 0 0 1px rgba(233, 216, 77, 0.1);
}

.hr-qr-result--ok.hr-qr-result--check-in .hr-qr-result__body strong,
.hr-qr-result--check-in .hr-qr-result__body strong {
    color: #e7f7d4;
}

.hr-qr-result--ok.hr-qr-result--check-out .hr-qr-result__body strong,
.hr-qr-result--check-out .hr-qr-result__body strong {
    color: #fbf4b0;
}

.hr-qr-result--already,
.hr-qr-result--error,
.hr-qr-result--warn {
    border-color: rgba(188, 48, 94, 0.5);
    background: rgba(188, 48, 94, 0.14);
    box-shadow: inset 0 0 0 1px rgba(188, 48, 94, 0.1);
}

.hr-qr-result--already .hr-qr-result__body strong,
.hr-qr-result--error .hr-qr-result__body strong,
.hr-qr-result--warn .hr-qr-result__body strong {
    color: #ffd0dc;
}

.hr-barcode-input {
    font-size: 1rem !important;
    letter-spacing: 0.02em;
    background: var(--hr-surface-2) !important;
    border-color: rgba(233, 216, 77, 0.35) !important;
    color: var(--hr-text) !important;
    min-height: 46px;
}

.hr-barcode-input:focus {
    border-color: rgba(233, 216, 77, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(233, 216, 77, 0.12) !important;
}

@media (max-width: 767.98px) {
    .hr-qr-result,
    .hr-qr-result--fast {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        min-height: 0;
        padding: 16px;
    }

    .hr-qr-result__badge {
        min-width: 0;
        width: 100%;
        font-size: 1.2rem;
        padding: 10px 14px;
    }

    .hr-qr-result--fast .hr-qr-result__body strong,
    .hr-qr-result__body strong {
        font-size: 1.4rem;
    }

    .hr-qr-result--fast .hr-qr-result__body span,
    .hr-qr-result__body span {
        font-size: 0.98rem;
    }

    .hr-barcode-input {
        min-height: 48px;
        font-size: 1.05rem !important;
    }
}

.hr-qr-manual .hr-chip-btn {
    width: 100%;
    justify-content: center;
}

/* SweetAlert flash after scan — auto-closes, keeps USB focus */
.hr-scan-swal {
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: #12101f !important;
    color: #fff !important;
    padding: 1.35rem 1.2rem 1.1rem !important;
}

.hr-scan-swal .swal2-title {
    font-size: 1.55rem !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 0 0 8px !important;
}

.hr-scan-swal .swal2-html-container {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.hr-scan-swal__name {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 6px;
    color: #fff;
}

.hr-scan-swal__msg {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.hr-scan-swal__time {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    opacity: 1;
}

.hr-scan-swal--check-in {
    border-color: rgba(105, 162, 62, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(105, 162, 62, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35) !important;
}

.hr-scan-swal--check-out {
    border-color: rgba(233, 216, 77, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(233, 216, 77, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35) !important;
}

.hr-scan-swal--warn,
.hr-scan-swal--error {
    border-color: rgba(188, 48, 94, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(188, 48, 94, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35) !important;
}

.hr-scan-swal .swal2-timer-progress-bar {
    background: rgba(255, 255, 255, 0.35) !important;
}

/* ===== Employee ID cards gallery ===== */
.hr-cards-filters {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.hr-cards-filters__field .hr-label {
    margin-bottom: 6px;
}

.hr-cards-filters__actions {
    display: flex;
    align-items: end;
}

.hr-id-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.hr-id-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.hr-id-card {
    width: 208px;
    height: 321px;
    padding: 0;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(188, 48, 94, 0.28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
    color: #1a1214;
}

.hr-id-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
    background: linear-gradient(135deg, #5C1E20, #BC305E);
    color: #fff;
    text-align: right;
}

.hr-id-card__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: #fff;
    flex: 0 0 auto;
}

.hr-id-card__brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.hr-id-card__brand strong {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
}

.hr-id-card__brand span {
    font-size: 14px;
    opacity: 1;
    font-weight: 800;
    line-height: 1.15;
}

.hr-id-card__body {
    flex: 1 1 auto;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: radial-gradient(circle at top right, rgba(188, 48, 94, 0.08), transparent 45%), #fbf6f7;
}

.hr-id-card__name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #1a1214;
}

.hr-id-card__dept {
    font-size: 11px;
    font-weight: 700;
    color: #8a6b72;
}

.hr-id-card__qr {
    width: 104px;
    height: 104px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ead7dc;
    border-radius: 8px;
    padding: 4px;
}

.hr-id-card--qr-only .hr-id-card__qr {
    width: 140px;
    height: 140px;
    margin-top: 12px;
}

.hr-id-card__scan {
    width: 100%;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #ead7dc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hr-id-card--barcode-only .hr-id-card__scan {
    margin-top: 16px;
    border-top: 0;
    padding-top: 0;
}

.hr-id-card__barcode {
    width: 170px;
    height: 42px;
    object-fit: fill;
    background: #fff;
}

.hr-id-card--barcode-only .hr-id-card__barcode {
    width: 180px;
    height: 56px;
}

.hr-id-card__code {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    font-family: ui-monospace, Consolas, monospace;
    color: #1a1214;
}

.hr-id-card__footer {
    font-size: 10px;
    font-weight: 700;
    color: #8a6b72;
}

.hr-id-card-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.hr-id-card-actions .hr-chip-btn {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 12px;
}

@media (max-width: 767.98px) {
    .hr-cards-filters {
        grid-template-columns: 1fr;
    }

    .hr-cards-filters__actions {
        width: 100%;
    }

    .hr-cards-filters__actions .hr-chip-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Employee barcode lookup summary (home modal) */
.hr-barcode-lookup-modal .hr-modal__title small {
    color: #c4c4cc !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.hr-barcode-lookup-hint {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(105, 162, 62, 0.28);
    background: rgba(105, 162, 62, 0.1);
    color: #d9f0c2;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
}

.hr-barcode-lookup-modal .hr-label {
    color: #f4f4f5 !important;
    font-weight: 700;
    margin-bottom: 8px;
}

.hr-barcode-summary__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hr-border);
}

.hr-barcode-summary__name {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.hr-barcode-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    color: #d4d4d8;
    font-size: 0.95rem;
    font-weight: 600;
}

.hr-barcode-summary__meta .is-active { color: #b6e085; }
.hr-barcode-summary__meta .is-inactive { color: #ffb3c5; }

.hr-barcode-summary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hr-barcode-summary__card {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.hr-barcode-summary__card small {
    color: #e4e4e7;
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0.95;
}

.hr-barcode-summary__card strong {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.3;
}

.hr-barcode-summary__card span {
    color: #d4d4d8;
    font-size: 0.9rem;
    font-weight: 500;
}

.hr-barcode-summary__card--ok {
    border-color: rgba(105, 162, 62, 0.55);
    background: rgba(105, 162, 62, 0.16);
}

.hr-barcode-summary__card--warn {
    border-color: rgba(233, 216, 77, 0.55);
    background: rgba(233, 216, 77, 0.14);
}

.hr-barcode-summary__card--danger {
    border-color: rgba(188, 48, 94, 0.55);
    background: rgba(188, 48, 94, 0.16);
}

.hr-barcode-summary__card.is-due strong { color: #f7ef9a; }
.hr-barcode-summary__card.is-zero strong { color: #b6e085; }
.hr-barcode-summary__card.is-negative strong { color: #ffb3c5; }

@media (max-width: 575.98px) {
    .hr-barcode-summary__grid {
        grid-template-columns: 1fr;
    }

    .hr-barcode-summary__head {
        flex-direction: column;
    }
}

/* ===== Network splash — Facebook layout, Hamada brand colors ===== */
.hr-network-splash {
    position: fixed;
    inset: 0;
    z-index: 20080;
    pointer-events: none;
}

.hr-fb-snack[hidden] {
    display: none !important;
}

.hr-fb-snack:not([hidden]) {
    pointer-events: auto;
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    position: absolute;
    inset-inline-start: max(16px, env(safe-area-inset-left, 0px));
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
    padding: 10px 12px 10px 10px;
    border-radius: 12px;
    background: rgba(24, 24, 27, 0.96);
    color: var(--hr-text);
    border: 1px solid rgba(105, 162, 62, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    font-family: Tajawal, Tahoma, sans-serif;
}

.hr-fb-snack.is-offline:not([hidden]) {
    border-color: rgba(188, 48, 94, 0.45);
    background: rgba(28, 14, 18, 0.96);
}

.hr-fb-snack.is-weak:not([hidden]) {
    border-color: rgba(233, 216, 77, 0.4);
    background: rgba(28, 26, 12, 0.96);
}

.hr-fb-snack.is-online:not([hidden]) {
    border-color: rgba(105, 162, 62, 0.5);
    background: rgba(16, 28, 18, 0.96);
}

.hr-fb-snack.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hr-fb-snack.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.hr-fb-snack__icon {
    order: 0;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hr-muted);
    font-size: 1.15rem;
    position: relative;
}

.hr-fb-snack.is-offline .hr-fb-snack__icon {
    color: #ffb3c5;
}

.hr-fb-snack.is-offline .hr-fb-snack__icon i {
    position: relative;
}

.hr-fb-snack.is-offline .hr-fb-snack__icon i::after {
    content: '';
    position: absolute;
    inset: 46% -4px auto -4px;
    height: 2px;
    background: currentColor;
    transform: rotate(-40deg);
    border-radius: 2px;
}

.hr-fb-snack__icon.is-ok,
.hr-fb-snack.is-online .hr-fb-snack__icon {
    color: var(--hamada-green-soft);
    font-size: 1.15rem;
}

.hr-fb-snack.is-online {
    gap: 12px;
}

.hr-fb-snack.is-weak .hr-fb-snack__icon {
    color: var(--hamada-yellow);
}

.hr-fb-snack__text {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--hr-text);
    white-space: nowrap;
}

.hr-fb-snack__refresh {
    order: 2;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: var(--hamada-green-soft);
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    line-height: 1.2;
}

.hr-fb-snack__refresh:hover {
    color: var(--hamada-yellow);
}

.hr-fb-snack__close {
    order: 3;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--hr-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 0.78rem;
}

.hr-fb-snack__close:hover {
    background: rgba(105, 162, 62, 0.2);
    color: var(--hr-text);
}

.hr-fb-snack.is-offline .hr-fb-snack__close:hover {
    background: rgba(188, 48, 94, 0.22);
}

@media (max-width: 575.98px) {
    .hr-fb-snack:not([hidden]) {
        inset-inline: 12px;
        width: auto;
        max-width: none;
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    .hr-fb-snack__text {
        white-space: normal;
    }
}

