body.hr-body {
    font-family: var(--hr-font-family);
    color: var(--hr-text);
    background: var(--hr-bg);
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   APP SHELL
   ========================================================= */

.hr-app-shell {
    min-height: 100vh;
    background: var(--hr-bg);
}

.hr-topbar {
    position: sticky;
    top: 0;
    z-index: 1035;
    min-height: var(--hr-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.25rem;
    background: linear-gradient(
        135deg,
        var(--hr-primary-deep),
        var(--hr-primary)
    );
    color: var(--hr-on-primary);
    box-shadow: 0 4px 14px rgba(var(--hr-primary-rgb), 0.18);
}

.hr-topbar-left,
.hr-topbar-right {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.hr-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: inherit;
}

.hr-brand:hover {
    color: inherit;
}

.hr-brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .24);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.hr-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.hr-brand-text strong {
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.hr-brand-text small {
    margin-top: .2rem;
    font-size: .72rem;
    opacity: .74;
}

.hr-school-chip {
    display: flex;
    flex-direction: column;
    padding: .4rem .8rem;
    border-left: 1px solid rgba(255, 255, 255, .25);
    line-height: 1.15;
}

.hr-school-chip-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    opacity: .68;
}

.hr-school-chip strong {
    margin-top: .18rem;
    font-size: .84rem;
    font-weight: 650;
}

.hr-user-block {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.hr-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    font-weight: 700;
}

.hr-user-copy {
    max-width: 180px;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.hr-user-copy span {
    font-size: .65rem;
    opacity: .66;
}

.hr-user-copy strong {
    margin-top: .15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 600;
}

.hr-topbar-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .08);
    font-size: .78rem;
}

.hr-topbar-btn:hover,
.hr-topbar-btn:focus {
    color: #fff;
    background: rgba(255, 255, 255, .17);
    border-color: rgba(255, 255, 255, .45);
}

.hr-topbar-btn-danger:hover,
.hr-topbar-btn-danger:focus {
    background: rgba(104, 12, 23, .28);
}

.hr-mobile-menu {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .2);
}

.hr-mobile-menu span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    background: #fff;
}

.hr-shell-body {
    display: flex;
    min-height: calc(100vh - var(--hr-topbar-height));
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.hr-sidebar {
    width: var(--hr-sidebar-width) !important;
    flex: 0 0 var(--hr-sidebar-width);
    background: var(--hr-surface);
    border-right: 1px solid var(--hr-border);
}

.hr-sidebar-body {
    height: calc(100vh - var(--hr-topbar-height));
    position: sticky;
    top: var(--hr-topbar-height);
    display: flex;
    flex-direction: column;
    padding: 1.15rem .8rem .8rem;
    overflow-y: auto;
}

.hr-sidebar-mobile-header {
    border-bottom: 1px solid var(--hr-border);
}

.hr-navigation {
    flex: 1 1 auto;
}

.hr-nav-section + .hr-nav-section {
    margin-top: 1.15rem;
}

.hr-nav-caption {
    padding: 0 .6rem .45rem;
    color: var(--hr-text-soft);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hr-nav-link {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: .12rem 0;
    padding: .55rem .65rem;
    border-radius: var(--hr-radius-sm);
    color: #4b5565;
    font-size: .84rem;
    font-weight: 540;
    transition: background .16s ease, color .16s ease;
}

.hr-nav-link:hover {
    color: var(--hr-primary);
    background: var(--hr-primary-soft);
}

.hr-nav-link.active {
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--hr-primary);
}

.hr-nav-icon {
    min-width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f0f3f7;
    color: #758091;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.hr-nav-link:hover .hr-nav-icon,
.hr-nav-link.active .hr-nav-icon {
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft-2);
}

.hr-sidebar-footer {
    margin-top: 1.4rem;
    padding: .9rem .65rem .25rem;
    border-top: 1px solid var(--hr-border);
    color: var(--hr-text-muted);
    display: flex;
    flex-direction: column;
    font-size: .72rem;
}

.hr-sidebar-footer small {
    margin-top: .15rem;
    color: var(--hr-text-soft);
}

/* =========================================================
   CONTENT
   ========================================================= */

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

.hr-content-container {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 1.75rem 2rem 2.5rem;
}

.hr-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.hr-page-eyebrow {
    margin-bottom: .28rem;
    color: var(--hr-primary);
    font-size: .69rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.hr-page-title {
    margin: 0;
    color: var(--hr-text);
    font-size: 1.7rem;
    font-weight: 720;
    letter-spacing: -.025em;
}

.hr-page-subtitle {
    margin: .42rem 0 0;
    color: var(--hr-text-muted);
    font-size: .9rem;
}

/* =========================================================
   CARDS
   ========================================================= */

.card.hr-card,
.hr-card {
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-md);
    background: var(--hr-surface);
    box-shadow: var(--hr-shadow-sm);
    overflow: hidden;
}

.hr-card-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--hr-surface);
    border-bottom: 1px solid var(--hr-border);
}

.hr-card-title {
    margin: 0;
    color: var(--hr-text);
    font-size: 1rem;
    font-weight: 700;
}

.hr-card-subtitle {
    margin: .25rem 0 0;
    color: var(--hr-text-muted);
    font-size: .78rem;
}

/* =========================================================
   BOOTSTRAP - THEME OVERRIDES
   ========================================================= */

.btn {
    border-radius: 6px;
    font-weight: 600;
    font-size: .84rem;
    padding: .52rem .9rem;
}

.btn-sm {
    padding: .32rem .62rem;
    font-size: .76rem;
}

.btn-primary {
    --bs-btn-bg: var(--hr-primary);
    --bs-btn-border-color: var(--hr-primary);
    --bs-btn-hover-bg: var(--hr-primary-dark);
    --bs-btn-hover-border-color: var(--hr-primary-dark);
    --bs-btn-active-bg: var(--hr-primary-deep);
    --bs-btn-active-border-color: var(--hr-primary-deep);
    --bs-btn-disabled-bg: var(--hr-primary);
    --bs-btn-disabled-border-color: var(--hr-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--hr-primary);
    --bs-btn-border-color: var(--hr-primary);
    --bs-btn-hover-bg: var(--hr-primary);
    --bs-btn-hover-border-color: var(--hr-primary);
    --bs-btn-active-bg: var(--hr-primary-dark);
    --bs-btn-active-border-color: var(--hr-primary-dark);
}

.btn-light {
    --bs-btn-bg: #f5f7fa;
    --bs-btn-border-color: #e2e7ee;
    --bs-btn-hover-bg: #e9edf3;
    --bs-btn-hover-border-color: #d9dfe8;
    --bs-btn-color: #4f5968;
}

.form-label {
    margin-bottom: .42rem;
    color: #3e4857;
    font-size: .78rem;
    font-weight: 650;
}

.form-control,
.form-select {
    min-height: 42px;
    border-color: var(--hr-border-strong);
    border-radius: 6px;
    color: var(--hr-text);
    background-color: #fff;
    font-size: .86rem;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(var(--hr-primary-rgb), .72);
    box-shadow: 0 0 0 .2rem rgba(var(--hr-primary-rgb), .12);
}

.form-check-input:checked {
    background-color: var(--hr-primary);
    border-color: var(--hr-primary);
}

.form-text {
    color: var(--hr-text-muted);
    font-size: .75rem;
}

.table {
    --bs-table-color: var(--hr-text);
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .78rem .85rem;
    border-bottom-color: var(--hr-border);
    vertical-align: middle;
}

.table thead th {
    color: #667182;
    background: #f8fafc;
    border-bottom: 1px solid var(--hr-border-strong);
    font-size: .7rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .045em;
    white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: var(--hr-primary-soft);
}

.alert.hr-alert {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: 6px;
    box-shadow: var(--hr-shadow-sm);
}

/* =========================================================
   FORMS / SETTINGS
   ========================================================= */

.hr-form-actions {
    display: flex;
    gap: .65rem;
    margin-top: 1.6rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--hr-border);
}

.hr-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-sm);
    background: var(--hr-surface-soft);
}

/* =========================================================
   THEME PICKER
   ========================================================= */

.hr-theme-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.hr-theme-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 50px;
    padding: .7rem .8rem;
    border: 1px solid var(--hr-border-strong);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.hr-theme-option:hover {
    border-color: #aeb7c3;
    box-shadow: var(--hr-shadow-sm);
}

.hr-theme-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hr-theme-swatch {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 5px;
    background: var(--preview-color, #b42832);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.hr-theme-option[data-preview-theme="red"] {
    --preview-color: #b42832;
}

.hr-theme-option[data-preview-theme="blue"] {
    --preview-color: #315ee9;
}

.hr-theme-option[data-preview-theme="green"] {
    --preview-color: #217a59;
}

.hr-theme-option[data-preview-theme="purple"] {
    --preview-color: #6c51bd;
}

.hr-theme-option[data-preview-theme="eggblue"] {
    --preview-color: #2c91a3;
}

.hr-theme-option[data-preview-theme="orange"] {
    --preview-color: #dc741d;
}

.hr-theme-option:has(.hr-theme-radio:checked) {
    border-color: var(--hr-primary);
    box-shadow: 0 0 0 2px rgba(var(--hr-primary-rgb), .12);
}

.hr-theme-option:has(.hr-theme-radio:checked)::after {
    content: "Selected";
    margin-left: auto;
    color: var(--hr-primary);
    font-size: .66rem;
    font-weight: 750;
}

.hr-theme-option-text {
    font-size: .82rem;
    font-weight: 620;
    color: var(--hr-text);
}

/* =========================================================
   PUBLIC / LOGIN SHELL
   ========================================================= */

.hr-public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f8fb;
}

.hr-public-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    padding: 0 1.4rem;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--hr-primary-deep),
        var(--hr-primary)
    );
}

.hr-public-main {
    flex: 1 1 auto;
}

.hr-public-footer {
    padding: 1rem 1.4rem;
    color: var(--hr-text-muted);
    border-top: 1px solid var(--hr-border);
    background: #fff;
    font-size: .76rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1199.98px) {
    .hr-user-copy {
        display: none;
    }

    .hr-school-chip {
        max-width: 180px;
    }
}

@media (max-width: 991.98px) {
    .hr-topbar {
        min-height: 64px;
        padding: 0 .8rem;
    }

    .hr-mobile-menu {
        display: block;
    }

    .hr-brand-text small {
        display: none;
    }

    .hr-sidebar {
        width: 270px !important;
    }

    .hr-sidebar-body {
        height: auto;
        position: static;
        padding-top: .8rem;
    }

    .hr-content-container {
        padding: 1.25rem 1rem 2rem;
    }

    .hr-school-chip,
    .hr-user-block {
        display: none;
    }

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

@media (max-width: 575.98px) {
    .hr-topbar-right {
        gap: .4rem;
    }

    .hr-topbar-btn {
        padding: .38rem .5rem;
        font-size: .7rem;
    }

    .hr-brand-mark {
        width: 34px;
        height: 34px;
    }

    .hr-brand-text strong {
        font-size: .86rem;
    }

    .hr-page-header {
        flex-direction: column;
    }

    .hr-page-title {
        font-size: 1.45rem;
    }

    .hr-theme-picker {
        grid-template-columns: 1fr;
    }

    .hr-form-actions {
        flex-direction: column;
    }

    .hr-form-actions .btn {
        width: 100%;
    }
}


/* =========================================================
   AUTHENTICATION - LOGIN
   ========================================================= */

.hr-auth-page {
    min-height: calc(100vh - 68px - 53px);
    display: grid;
    grid-template-columns: minmax(320px, 38%) 1fr;
    background: var(--hr-surface);
}

.hr-auth-panel {
    min-width: 0;
}

.hr-auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 3rem 3rem 1.5rem;
    color: var(--hr-on-primary);
    background:
        linear-gradient(
            145deg,
            var(--hr-primary-deep) 0%,
            var(--hr-primary-dark) 48%,
            var(--hr-primary) 100%
        );
}

.hr-auth-brand-panel::before,
.hr-auth-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hr-auth-brand-panel::before {
    width: 360px;
    height: 360px;
    right: -190px;
    top: -140px;
    border: 1px solid rgba(255, 255, 255, .12);
}

.hr-auth-brand-panel::after {
    width: 260px;
    height: 260px;
    left: -150px;
    bottom: -140px;
    background: rgba(255, 255, 255, .035);
}

.hr-auth-brand-content,
.hr-auth-brand-footer {
    position: relative;
    z-index: 1;
}

.hr-auth-brand-badge {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.hr-auth-brand-content h1 {
    max-width: 420px;
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.55rem);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.hr-auth-brand-content h1 span {
    display: block;
    color: rgba(255, 255, 255, .72);
    font-weight: 500;
}

.hr-auth-brand-content > p {
    max-width: 440px;
    margin: 1.25rem 0 0;
    color: rgba(255, 255, 255, .74);
    font-size: .96rem;
    line-height: 1.7;
}

.hr-auth-feature-list {
    max-width: 440px;
    margin-top: 3rem;
}

.hr-auth-feature {
    display: flex;
    gap: .85rem;
    padding: .85rem 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.hr-auth-feature-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, .10);
    font-size: .63rem;
    font-weight: 800;
}

.hr-auth-feature div {
    display: flex;
    flex-direction: column;
}

.hr-auth-feature strong {
    font-size: .82rem;
    font-weight: 650;
}

.hr-auth-feature small {
    margin-top: .2rem;
    color: rgba(255, 255, 255, .62);
    font-size: .72rem;
    line-height: 1.5;
}

.hr-auth-brand-footer {
    color: rgba(255, 255, 255, .46);
    font-size: .72rem;
}

.hr-auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #fbfcfe;
}

.hr-auth-form-wrap {
    width: min(100%, 430px);
}

.hr-auth-mobile-brand {
    display: none;
}

.hr-auth-heading h2 {
    margin: 0;
    color: var(--hr-text);
    font-size: 2rem;
    font-weight: 730;
    letter-spacing: -.035em;
}

.hr-auth-heading p {
    margin: .7rem 0 0;
    color: var(--hr-text-muted);
    font-size: .9rem;
    line-height: 1.6;
}

.hr-auth-alert {
    margin-top: 1.5rem;
    border: 1px solid #f0c9cd;
    border-left: 4px solid var(--hr-danger);
    border-radius: var(--hr-radius-sm);
}

.hr-auth-form {
    margin-top: 2rem;
}

.hr-google-btn {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    font-size: .88rem;
}

.hr-google-icon {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: var(--hr-primary-dark);
    background: #fff;
    font-weight: 800;
}

.hr-auth-security-note {
    display: flex;
    gap: .7rem;
    margin-top: 1.15rem;
    padding: .9rem 1rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-sm);
    background: var(--hr-surface);
}

.hr-auth-security-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
    font-size: .72rem;
    font-weight: 800;
}

.hr-auth-security-note p {
    margin: 0;
    color: var(--hr-text-muted);
    font-size: .74rem;
    line-height: 1.55;
}

.hr-auth-help {
    margin-top: 1.8rem;
    color: var(--hr-text-soft);
    font-size: .73rem;
    text-align: center;
}

/* =========================================================
   ACCESS DENIED
   ========================================================= */

.hr-access-page {
    min-height: calc(100vh - 68px - 53px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background:
        radial-gradient(
            circle at top right,
            var(--hr-primary-soft) 0,
            transparent 34%
        ),
        #f7f8fb;
}

.hr-access-card {
    width: min(100%, 560px);
    padding: 2.5rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-lg);
    background: var(--hr-surface);
    box-shadow: var(--hr-shadow-md);
    text-align: center;
}

.hr-access-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.3rem;
    border-radius: 50%;
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
    border: 1px solid var(--hr-primary-soft-2);
    font-size: 1.45rem;
    font-weight: 800;
}

.hr-access-card h1 {
    margin: .25rem 0 0;
    color: var(--hr-text);
    font-size: 1.8rem;
    font-weight: 730;
    letter-spacing: -.03em;
}

.hr-access-message {
    margin: .7rem auto 0;
    color: var(--hr-text-muted);
    font-size: .92rem;
}

.hr-access-note {
    margin: 1.4rem 0 0;
    padding: .9rem 1rem;
    border-radius: var(--hr-radius-sm);
    background: var(--hr-surface-soft);
    color: var(--hr-text-muted);
    font-size: .78rem;
    line-height: 1.55;
}

.hr-access-actions {
    display: flex;
    justify-content: center;
    gap: .65rem;
    margin-top: 1.6rem;
}

/* =========================================================
   AUTH RESPONSIVE
   ========================================================= */

@media (max-width: 991.98px) {
    .hr-auth-page {
        grid-template-columns: minmax(280px, 42%) 1fr;
    }

    .hr-auth-brand-panel {
        padding: 3.5rem 2.5rem 2rem;
    }

    .hr-auth-form-panel {
        padding: 2.2rem;
    }
}

@media (max-width: 767.98px) {
    .hr-auth-page {
        display: block;
        min-height: calc(100vh - 68px - 53px);
    }

    .hr-auth-brand-panel {
        display: none;
    }

    .hr-auth-form-panel {
        min-height: calc(100vh - 68px - 53px);
        padding: 2rem 1.2rem;
    }

    .hr-auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: .65rem;
        margin-bottom: 2.4rem;
        color: var(--hr-text);
    }

    .hr-auth-mobile-brand .hr-brand-mark {
        color: #fff;
        background: var(--hr-primary);
        border-color: var(--hr-primary);
    }

    .hr-auth-mobile-brand div {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
    }

    .hr-auth-mobile-brand strong {
        font-size: .9rem;
    }

    .hr-auth-mobile-brand small {
        margin-top: .16rem;
        color: var(--hr-text-muted);
        font-size: .7rem;
    }

    .hr-auth-heading h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .hr-access-card {
        padding: 2rem 1.25rem;
    }

    .hr-access-actions {
        flex-direction: column;
    }

    .hr-access-actions .btn {
        width: 100%;
    }
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.hr-dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.hr-dashboard-school-badge {
    min-width: 230px;
    display: flex;
    flex-direction: column;
    padding: .85rem 1rem;
    border: 1px solid var(--hr-primary-soft-2);
    border-radius: var(--hr-radius-md);
    background: var(--hr-primary-soft);
}

.hr-dashboard-school-badge span {
    color: var(--hr-primary);
    font-size: .64rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.hr-dashboard-school-badge strong {
    margin-top: .22rem;
    color: var(--hr-text);
    font-size: .9rem;
}

.hr-dashboard-school-badge small {
    margin-top: .18rem;
    color: var(--hr-text-muted);
    font-size: .7rem;
}

.hr-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hr-stat-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.05rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-md);
    background: var(--hr-surface);
    box-shadow: var(--hr-shadow-sm);
}

.hr-stat-card-attention {
    border-color: rgba(var(--hr-primary-rgb), .35);
    background:
        linear-gradient(
            135deg,
            var(--hr-surface),
            var(--hr-primary-soft)
        );
}

.hr-stat-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.hr-stat-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hr-stat-copy span {
    color: var(--hr-text-muted);
    font-size: .72rem;
    font-weight: 620;
}

.hr-stat-copy strong {
    margin-top: .08rem;
    color: var(--hr-text);
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.hr-stat-copy small {
    margin-top: .16rem;
    overflow: hidden;
    color: var(--hr-text-soft);
    font-size: .66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.hr-module-card {
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--hr-border);
    border-radius: 8px;
    color: var(--hr-text);
    background: var(--hr-surface);
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.hr-module-card:hover {
    color: var(--hr-text);
    border-color: rgba(var(--hr-primary-rgb), .34);
    background: var(--hr-primary-soft);
    box-shadow: var(--hr-shadow-sm);
    transform: translateY(-1px);
}

.hr-module-card-static:hover {
    transform: none;
    background: var(--hr-surface);
    border-color: var(--hr-border);
    box-shadow: none;
}

.hr-module-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft-2);
    font-size: .68rem;
    font-weight: 800;
}

.hr-module-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hr-module-copy strong {
    font-size: .86rem;
    font-weight: 700;
}

.hr-module-copy small {
    margin-top: .25rem;
    color: var(--hr-text-muted);
    font-size: .7rem;
    line-height: 1.45;
}

.hr-module-arrow {
    margin-left: auto;
    color: var(--hr-primary);
    font-size: 1.5rem;
    font-weight: 300;
}

.hr-quick-list {
    display: flex;
    flex-direction: column;
}

.hr-quick-link {
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    padding: .75rem 1.1rem;
    color: var(--hr-text);
    border-bottom: 1px solid var(--hr-border);
    font-size: .8rem;
    font-weight: 600;
}

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

.hr-quick-link:hover {
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
}

.hr-quick-link strong {
    color: var(--hr-primary);
    font-size: 1.15rem;
    font-weight: 400;
}

.hr-count-badge {
    min-width: 27px;
    padding: .18rem .42rem;
    border-radius: 999px;
    color: #fff;
    background: var(--hr-primary);
    font-size: .65rem;
    font-weight: 750;
    text-align: center;
}

.hr-data-status {
    display: flex;
    flex-direction: column;
}

.hr-data-status-label {
    color: var(--hr-text-muted);
    font-size: .69rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hr-data-status strong {
    margin-top: .35rem;
    color: var(--hr-text);
    font-size: .95rem;
}

.hr-data-status small {
    margin-top: .45rem;
    color: var(--hr-text-soft);
    font-size: .72rem;
    line-height: 1.5;
}

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

@media (max-width: 767.98px) {
    .hr-dashboard-hero {
        flex-direction: column;
    }

    .hr-dashboard-school-badge {
        width: 100%;
        min-width: 0;
    }

    .hr-module-grid {
        grid-template-columns: 1fr;
    }
}

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


/* =========================================================
   SCHOOLS / ORGANIZATION ADMINISTRATION
   ========================================================= */

.hr-mini-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 180px));
    gap: .75rem;
    margin-bottom: 1rem;
}
.hr-mini-stat {
    padding: .75rem .9rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-sm);
    background: var(--hr-surface);
}
.hr-mini-stat span {
    display: block;
    color: var(--hr-text-muted);
    font-size: .67rem;
    font-weight: 650;
}
.hr-mini-stat strong {
    display: block;
    margin-top: .15rem;
    color: var(--hr-text);
    font-size: 1.25rem;
}
.hr-table-primary { font-weight: 700; color: var(--hr-text); }
.hr-table-secondary { margin-top: .12rem; color: var(--hr-text-soft); font-size: .68rem; }
.hr-code-badge {
    display: inline-flex;
    padding: .25rem .48rem;
    border-radius: 5px;
    background: #f0f3f7;
    color: #4e5969;
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .04em;
}
.hr-status-badge {
    display: inline-flex;
    align-items: center;
    padding: .26rem .52rem;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 700;
}
.hr-status-active { color: #176746; background: #e7f6ef; }
.hr-status-inactive { color: #687384; background: #eef1f5; }
.hr-table-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }

.hr-theme-label,
.hr-theme-preview,
.hr-school-choice-theme {
    --school-preview: #b42832;
}
[data-preview-theme="red"] { --school-preview: #b42832; }
[data-preview-theme="blue"] { --school-preview: #315ee9; }
[data-preview-theme="green"] { --school-preview: #217a59; }
[data-preview-theme="purple"] { --school-preview: #6c51bd; }
[data-preview-theme="eggblue"] { --school-preview: #2c91a3; }
[data-preview-theme="orange"] { --school-preview: #dc741d; }

.hr-theme-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--hr-text-muted);
    font-size: .74rem;
    font-weight: 620;
}
.hr-theme-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    flex: 0 0 10px;
    border-radius: 50%;
    background: var(--school-preview);
}
.hr-theme-preview {
    display: flex;
    align-items: center;
    gap: .8rem;
}
.hr-theme-preview-swatch {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 9px;
    background: var(--school-preview);
}
.hr-theme-preview div { display: flex; flex-direction: column; }
.hr-theme-preview span { color: var(--hr-text-muted); font-size: .68rem; }
.hr-theme-preview strong { margin-top: .15rem; font-size: .95rem; }

.hr-detail-list { display: flex; flex-direction: column; }
.hr-detail-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(150px, 34%) 1fr;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1.25rem;
    border-bottom: 1px solid var(--hr-border);
}
.hr-detail-row:last-child { border-bottom: 0; }
.hr-detail-row > span { color: var(--hr-text-muted); font-size: .76rem; }
.hr-detail-row > strong { color: var(--hr-text); font-size: .82rem; font-weight: 650; }

.hr-empty-state {
    padding: 3.5rem 1.5rem;
    text-align: center;
}
.hr-empty-icon {
    width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; border-radius: 9px; color: var(--hr-primary-dark);
    background: var(--hr-primary-soft); font-size: .7rem; font-weight: 800;
}
.hr-empty-state h3 { margin: 0; font-size: 1rem; }
.hr-empty-state p { margin: .45rem 0 1rem; color: var(--hr-text-muted); font-size: .78rem; }

.hr-school-select-page {
    min-height: calc(100vh - var(--hr-topbar-height));
    padding: 2.2rem 1rem 3rem;
}
.hr-school-select-wrap { width: min(100%, 1050px); margin: 0 auto; }
.hr-school-select-heading { margin-bottom: 1.35rem; }
.hr-school-select-heading h1 {
    margin: 0; color: var(--hr-text); font-size: 1.8rem; font-weight: 730; letter-spacing: -.03em;
}
.hr-school-select-heading p {
    max-width: 700px; margin: .5rem 0 0; color: var(--hr-text-muted); font-size: .86rem;
}
.hr-school-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}
.hr-school-choice {
    --school-preview: #b42832;
    position: relative;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1rem .9rem 1.15rem;
    overflow: hidden;
    border: 1px solid var(--hr-border);
    border-radius: 8px;
    background: var(--hr-surface);
    cursor: pointer;
    box-shadow: var(--hr-shadow-sm);
}
.hr-school-choice:hover { border-color: #b8c0cb; }
.hr-school-choice input { position: absolute; opacity: 0; pointer-events: none; }
.hr-school-choice-accent {
    position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--school-preview);
}
.hr-school-choice-main { min-width: 0; display: flex; flex-direction: column; }
.hr-school-choice-main strong { color: var(--hr-text); font-size: .88rem; }
.hr-school-choice-main small { margin-top: .2rem; color: var(--hr-text-muted); font-size: .68rem; }
.hr-school-choice-theme {
    margin-left: auto; display: inline-flex; align-items: center; gap: .35rem;
    color: var(--hr-text-muted); font-size: .68rem;
}
.hr-school-choice-check {
    width: 25px; height: 25px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--hr-border-strong); border-radius: 50%; color: transparent; font-size: .7rem;
}
.hr-school-choice:has(input:checked) {
    border-color: var(--school-preview);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--school-preview) 12%, transparent);
}
.hr-school-choice:has(input:checked) .hr-school-choice-check {
    color: #fff; border-color: var(--school-preview); background: var(--school-preview);
}
.hr-school-select-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--hr-border);
    border-radius: 8px; background: var(--hr-surface);
}
.hr-school-select-actions > span { color: var(--hr-text-muted); font-size: .75rem; }

@media (max-width: 767.98px) {
    .hr-mini-stat-row { grid-template-columns: repeat(3, 1fr); }
    .hr-school-choice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .hr-mini-stat-row { grid-template-columns: 1fr; }
    .hr-detail-row { grid-template-columns: 1fr; gap: .25rem; }
    .hr-school-select-actions { align-items: stretch; flex-direction: column; }
    .hr-school-select-actions .btn { width: 100%; }
    .hr-school-choice-theme { display: none; }
}
\n\n/* =========================================================\n   STAGE 4.1 — TYPOGRAPHY & ENTERPRISE SIDEBAR REFINEMENT\n   ========================================================= */\n\nbody.hr-body {\n    font-size: 1rem;\n    line-height: 1.5;\n}\n\n/* Readability uplift */\n.hr-brand-text strong { font-size: 1.02rem; }\n.hr-brand-text small { font-size: .76rem; }\n.hr-school-chip-label { font-size: .72rem; }\n.hr-school-chip strong { font-size: .9rem; }\n.hr-user-copy span { font-size: .7rem; }\n.hr-user-copy strong { font-size: .84rem; }\n.hr-topbar-btn { font-size: .84rem; }\n.hr-page-eyebrow { font-size: .74rem; }\n.hr-page-title { font-size: 1.8rem; }\n.hr-page-subtitle { font-size: .96rem; line-height: 1.55; }\n.hr-card-title { font-size: 1.06rem; }\n.hr-card-subtitle { font-size: .84rem; }\n.btn { font-size: .9rem; }\n.btn-sm { font-size: .81rem; }\n.form-label { font-size: .84rem; }\n.form-control, .form-select { font-size: .92rem; min-height: 44px; }\n.form-text { font-size: .8rem; }\n.table { font-size: .9rem; }\n.table thead th { font-size: .76rem; }\n.hr-table-secondary { font-size: .75rem; }\n.hr-code-badge, .hr-status-badge { font-size: .75rem; }\n.hr-theme-label { font-size: .8rem; }\n.hr-detail-row > span { font-size: .82rem; }\n.hr-detail-row > strong { font-size: .9rem; }\n.hr-mini-stat span { font-size: .74rem; }\n.hr-empty-state p { font-size: .84rem; }\n.hr-stat-copy span { font-size: .79rem; }\n.hr-stat-copy small { font-size: .73rem; }\n.hr-module-copy strong { font-size: .92rem; }\n.hr-module-copy small { font-size: .77rem; }\n.hr-quick-link { font-size: .87rem; }\n\n/* Enterprise sidebar */\n.hr-sidebar {\n    width: 264px !important;\n    flex: 0 0 264px;\n    background: #fbfcfe;\n    border-right: 1px solid #dfe4eb;\n    box-shadow: 4px 0 18px rgba(20, 32, 52, .025);\n}\n\n.hr-sidebar-body {\n    padding: 1rem .85rem .85rem;\n    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);\n}\n\n.hr-sidebar-context {\n    display: flex;\n    align-items: center;\n    gap: .7rem;\n    margin: 0 .1rem 1.05rem;\n    padding: .75rem;\n    border: 1px solid var(--hr-border);\n    border-radius: 9px;\n    background: #fff;\n}\n.hr-sidebar-context-mark {\n    width: 34px;\n    height: 34px;\n    flex: 0 0 34px;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    border-radius: 8px;\n    color: #fff;\n    background: linear-gradient(135deg, var(--hr-primary-dark), var(--hr-primary));\n    font-size: .67rem;\n    font-weight: 800;\n    letter-spacing: .04em;\n}\n.hr-sidebar-context > div { min-width: 0; display: flex; flex-direction: column; }\n.hr-sidebar-context small { color: var(--hr-text-soft); font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: .045em; }\n.hr-sidebar-context strong { margin-top: .14rem; overflow: hidden; color: var(--hr-text); font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }\n\n.hr-nav-section + .hr-nav-section {\n    margin-top: 1.3rem;\n    padding-top: .2rem;\n}\n.hr-nav-caption {\n    padding: 0 .72rem .45rem;\n    color: #9099a7;\n    font-size: .7rem;\n    font-weight: 760;\n    letter-spacing: .085em;\n}\n.hr-nav-link {\n    position: relative;\n    min-height: 46px;\n    gap: .72rem;\n    margin: .16rem 0;\n    padding: .58rem .7rem;\n    border: 1px solid transparent;\n    border-radius: 8px;\n    color: #475467;\n    font-size: .91rem;\n    font-weight: 580;\n}\n.hr-nav-link:hover {\n    color: var(--hr-primary-dark);\n    border-color: var(--hr-primary-soft-2);\n    background: var(--hr-primary-soft);\n}\n.hr-nav-link.active {\n    color: var(--hr-primary-dark);\n    border-color: rgba(var(--hr-primary-rgb), .16);\n    background: linear-gradient(90deg, var(--hr-primary-soft-2), var(--hr-primary-soft));\n    box-shadow: none;\n    font-weight: 720;\n}\n.hr-nav-link.active::before {\n    content: \"\";\n    position: absolute;\n    left: -1px;\n    top: 9px;\n    bottom: 9px;\n    width: 3px;\n    border-radius: 0 3px 3px 0;\n    background: var(--hr-primary);\n}\n.hr-nav-icon {\n    min-width: 30px;\n    width: 30px;\n    height: 30px;\n    border-radius: 7px;\n    background: #f1f4f8;\n    color: #687588;\n}\n.hr-nav-icon svg { width: 16px; height: 16px; fill: currentColor; }\n.hr-nav-link:hover .hr-nav-icon { color: var(--hr-primary-dark); background: var(--hr-primary-soft-2); }\n.hr-nav-link.active .hr-nav-icon { color: #fff; background: var(--hr-primary); box-shadow: 0 3px 8px rgba(var(--hr-primary-rgb), .2); }\n.hr-sidebar-footer {\n    margin-top: 1.5rem;\n    padding: 1rem .7rem .3rem;\n    font-size: .77rem;\n}\n.hr-sidebar-footer small { font-size: .7rem; }\n\n@media (max-width: 991.98px) {\n    .hr-sidebar { width: 280px !important; }\n}\n\n@media (max-width: 575.98px) {\n    .hr-page-title { font-size: 1.55rem; }\n    .table { font-size: .86rem; }\n}\n

/* =========================================================
   STAFF MANAGEMENT
   ========================================================= */

.hr-staff-stats {
    grid-template-columns: repeat(3, minmax(0, 190px));
}

.hr-staff-table {
    min-width: 1080px;
}

.hr-staff-identity {
    min-width: 210px;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.hr-staff-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
    font-size: .82rem;
    font-weight: 800;
}

.hr-order-number {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f2f4f7;
    color: var(--hr-text-muted);
    font-size: .76rem;
    font-weight: 700;
}

.hr-table-value {
    color: var(--hr-text);
    font-size: .8rem;
}

.hr-group-badge {
    display: inline-flex;
    padding: .3rem .55rem;
    border: 1px solid var(--hr-border);
    border-radius: 6px;
    background: #f8f9fb;
    color: var(--hr-text);
    font-size: .73rem;
    font-weight: 650;
}

.hr-status-linked {
    color: var(--hr-primary-dark);
    background: var(--hr-primary-soft);
}

.hr-status-neutral {
    color: #667085;
    background: #f0f2f5;
}

.hr-muted-value {
    color: var(--hr-text-soft);
    font-size: .75rem;
}

.hr-login-email {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hr-setting-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.hr-setting-option {
    min-height: 74px;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem .95rem;
    border: 1px solid var(--hr-border);
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.hr-setting-option:hover {
    border-color: rgba(var(--hr-primary-rgb), .35);
    background: var(--hr-primary-soft);
}

.hr-setting-option .form-check-input {
    flex: 0 0 auto;
    margin-top: .18rem;
}

.hr-setting-option > span {
    display: flex;
    flex-direction: column;
}

.hr-setting-option strong {
    color: var(--hr-text);
    font-size: .8rem;
    font-weight: 680;
}

.hr-setting-option small {
    margin-top: .2rem;
    color: var(--hr-text-muted);
    font-size: .72rem;
    line-height: 1.45;
}

.hr-setting-option-single {
    max-width: 620px;
}

.hr-form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 1rem;
    padding: .85rem 1rem;
    border: 1px solid var(--hr-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -4px 18px rgba(16, 24, 40, .06);
    backdrop-filter: blur(8px);
}

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

    .hr-setting-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hr-form-actions-sticky {
        position: static;
    }

    .hr-form-actions-sticky .btn {
        flex: 1;
    }
}


/* =========================================================
   STAGE 5.1 — SIDEBAR SPACING CORRECTION
   Keeps Stage 4.1 enterprise sidebar + Stage 5 Staff styles.
   ========================================================= */

/*
   Create clearer visual hierarchy:
   sidebar edge
       ↓
   workspace identity
       ↓
   generous separation
       ↓
   OVERVIEW navigation
*/

.hr-sidebar-body {
    padding:
        1.25rem
        1rem
        1rem;
}

/* Workspace identity card */
.hr-sidebar-context {
    align-items: center;
    gap: .85rem;

    /* more air around the card itself */
    margin:
        .1rem
        .15rem
        1.65rem;

    padding:
        .9rem
        .95rem;

    min-height: 66px;
}

/* HR mark */
.hr-sidebar-context-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;

    font-size: .72rem;
}

/* Workspace wording */
.hr-sidebar-context > div {
    gap: .16rem;
}

.hr-sidebar-context small {
    line-height: 1.25;
    font-size: .72rem;
}

/* School name */
.hr-sidebar-context strong {
    margin-top: .12rem;
    line-height: 1.3;
    font-size: .9rem;
}

/* First navigation section starts clearly below workspace */
.hr-navigation > .hr-nav-section:first-child {
    margin-top: .15rem;
}

/* Give section titles more left/right space and room below them */
.hr-nav-caption {
    padding:
        0
        .82rem
        .58rem;

    line-height: 1.25;
}

/* Keep menu text aligned with the improved sidebar margins */
.hr-nav-link {
    margin-left: .08rem;
    margin-right: .08rem;

    padding-left: .78rem;
    padding-right: .78rem;
}

/* Slightly more breathing room between major sections */
.hr-nav-section + .hr-nav-section {
    margin-top: 1.45rem;
}

/* Footer uses the same horizontal alignment */
.hr-sidebar-footer {
    margin-left: .15rem;
    margin-right: .15rem;
    padding-left: .8rem;
    padding-right: .8rem;
}

@media (max-width: 991.98px) {
    .hr-sidebar-body {
        padding:
            1rem
            .9rem
            .9rem;
    }

    .hr-sidebar-context {
        margin-bottom: 1.35rem;
    }
}


/* =========================================================
   GLOBAL DATE / TIME PICKERS
   ========================================================= */

.hr-date-picker-wrap {
    position: relative;
    width: 100%;
}

.hr-date-display-input {
    padding-right: 2.75rem !important;
    cursor: pointer;
    background-color: #fff !important;
}

.hr-date-display-input:focus {
    cursor: pointer;
}

.hr-native-picker-source {
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    min-width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.hr-picker-icon {
    position: absolute;
    top: 50%;
    right: .8rem;
    z-index: 2;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: var(--hr-primary);
    cursor: pointer;
    pointer-events: auto;
}

.hr-picker-icon::before {
    content: "";
    width: 1rem;
    height: 1rem;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.hr-picker-icon-date::before {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
}

.hr-picker-icon-time::before {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.hr-date-picker-wrap:hover .hr-date-display-input:not(:disabled) {
    border-color: var(--hr-primary);
}

.hr-picker-disabled .hr-picker-icon {
    opacity: .45;
    cursor: default;
}

.hr-picker-disabled .hr-date-display-input {
    cursor: default;
    background: #f2f4f7 !important;
}


/* =========================================================
   GLOBAL TABLE PAGINATION + ACTION ICON STANDARD
   ========================================================= */

.hr-global-table tbody tr.hr-page-hidden,
.hr-global-table tbody tr[hidden] {
    display: none !important;
}

.hr-table-pagination {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 1rem;
    margin-top: .9rem;
    padding: .78rem .9rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-sm);
    background: var(--hr-surface);
}

.hr-table-page-size label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    color: var(--hr-text-muted);
    font-size: .82rem;
    font-weight: 650;
    white-space: nowrap;
}

.hr-page-size-select {
    width: auto;
    min-width: 76px;
    font-size: .82rem;
}

.hr-table-page-summary {
    color: var(--hr-text-muted);
    font-size: .82rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.hr-table-page-nav,
.hr-page-numbers {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.hr-table-page-nav {
    justify-content: flex-end;
}

.hr-page-btn,
.hr-page-number {
    min-width: 34px;
    height: 34px;
    padding: 0 .45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hr-border);
    border-radius: 7px;
    color: var(--hr-text-muted);
    background: #fff;
    font-size: .78rem;
    font-weight: 700;
}

.hr-page-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hr-page-btn:hover:not(:disabled),
.hr-page-number:hover:not(.active) {
    color: var(--hr-primary);
    border-color: var(--hr-primary-soft-2);
    background: var(--hr-primary-soft);
}

.hr-page-number.active {
    color: #fff;
    border-color: var(--hr-primary);
    background: var(--hr-primary);
}

.hr-page-btn:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.hr-page-status {
    min-width: 92px;
    padding: 0 .35rem;
    color: var(--hr-text-muted);
    font-size: .8rem;
    font-weight: 650;
    text-align: center;
    white-space: nowrap;
}

.hr-page-ellipsis {
    min-width: 24px;
    color: var(--hr-text-soft);
    text-align: center;
}

/*
 * Deliberately NOT display:flex on the <td> itself. A table cell
 * forced into flex/inline-flex stops behaving like a table cell — it
 * shrinks to fit its content instead of stretching to fill the
 * column — which breaks the table's row-hover fill for exactly that
 * cell (the highlight only covers the shrunk box, leaving a gap out
 * to the column's real edge). The flex/wrap layout lives on the
 * .hr-table-actions <div> wrapper inside the cell instead; this class
 * only right-aligns the <td> itself. See docs/ARCHITECTURE.md.
 */
.hr-table-actions-cell {
    text-align: right;
}

.hr-table-actions > form {
    display: inline-block;
    margin: 0 .1rem;
}

.hr-table-action-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: .1rem .08rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    line-height: 1 !important;
    vertical-align: middle;
}

.hr-table-action-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.hr-table-action-input {
    font-size: 0 !important;
}

.hr-table-action-btn.hr-action-view {
    color: var(--hr-primary) !important;
    border-color: var(--hr-primary-soft-2) !important;
    background: var(--hr-primary-soft) !important;
}

.hr-table-action-btn.hr-action-edit {
    color: #8a5a00 !important;
    border-color: #f0d79d !important;
    background: #fff8e8 !important;
}

.hr-table-action-btn.hr-action-delete,
.hr-table-action-btn.hr-action-deactivate,
.hr-table-action-btn.hr-action-reject {
    color: var(--hr-danger) !important;
    border-color: #efc6ca !important;
    background: #fff2f3 !important;
}

.hr-table-action-btn.hr-action-activate,
.hr-table-action-btn.hr-action-approve {
    color: #1e704d !important;
    border-color: #bfe2d2 !important;
    background: #eef9f4 !important;
}

.hr-table-action-btn.hr-action-verify {
    color: #0a6b78 !important;
    border-color: #b8e4ea !important;
    background: #eafbfd !important;
}

.hr-table-action-btn.hr-action-complete {
    color: #1e704d !important;
    border-color: #bfe2d2 !important;
    background: #eef9f4 !important;
}

.hr-table-action-btn.hr-action-lock,
.hr-table-action-btn.hr-action-unlock,
.hr-table-action-btn.hr-action-download,
.hr-table-action-btn.hr-action-print {
    color: var(--hr-text-muted) !important;
    border-color: var(--hr-border) !important;
    background: #fff !important;
}

.hr-table-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 9px rgba(20, 32, 52, .10);
    filter: brightness(.98);
}

.hr-table-action-btn:focus-visible,
.hr-page-btn:focus-visible,
.hr-page-number:focus-visible {
    outline: 3px solid var(--hr-primary-soft-2);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .hr-table-pagination {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .hr-table-page-summary {
        text-align: left;
    }

    .hr-table-page-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* =========================================================
   SETTINGS MODULE CARDS
   ========================================================= */

.hr-settings-card {
    min-height: 190px;
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
    background: var(--hr-surface);
    color: var(--hr-text);
    text-decoration: none;
    box-shadow: var(--hr-shadow-sm);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.hr-settings-card:hover {
    color: var(--hr-text);
    border-color: var(--hr-primary-soft-2);
    box-shadow: var(--hr-shadow);
    transform: translateY(-2px);
}

.hr-settings-card-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--hr-primary);
    background: var(--hr-primary-soft);
}

.hr-settings-card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hr-settings-card-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.hr-settings-card-content strong {
    font-size: 1rem;
    font-weight: 750;
    color: var(--hr-text);
}

.hr-settings-card-content span {
    color: var(--hr-text-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.hr-settings-card-arrow {
    margin-left: auto;
    color: var(--hr-text-soft);
    font-size: 1.55rem;
    line-height: 1;
}

.hr-settings-card:hover .hr-settings-card-arrow {
    color: var(--hr-primary);
}

.hr-settings-placeholder {
    padding: .5rem 0;
    color: var(--hr-text-muted);
}

.hr-settings-placeholder strong {
    display: block;
    margin-bottom: .35rem;
    color: var(--hr-text);
}

@media (max-width: 575.98px) {
    .hr-settings-card {
        min-height: 0;
        padding: 1.1rem;
    }
}

/* =========================================================
   SIDEBAR SCROLLING (BOOTSTRAP OFFCANVAS OVERRIDE)
   ========================================================= */

/*
   The sidebar is markup-wise a Bootstrap offcanvas (`.offcanvas-lg`)
   so it can slide in on phones. Above the lg breakpoint Bootstrap
   applies:

       .offcanvas-lg .offcanvas-body { overflow-y: visible; }

   which, at specificity (0,2,0), outranks the `.hr-sidebar-body`
   rule (0,1,0) in the SIDEBAR section above that asks for
   `overflow-y: auto`. The panel therefore never scrolled on desktop:
   a navigation taller than the viewport simply overflowed the pinned
   (position: sticky) box, so its last items — Users, SuperAdmins —
   could only be brought into view by scrolling the whole page, and
   every navigation reset that page scroll and hid them again.

   This restores the intended behaviour with a selector specific
   enough to win. Mobile is untouched: below the breakpoint the
   offcanvas panel does its own scrolling.
*/
@media (min-width: 992px) {
    .hr-sidebar.offcanvas-lg .offcanvas-body.hr-sidebar-body {
        overflow-y: auto;
    }
}
