:root {
    --bg: #f3f6fb;
    --bg-soft: #eef3fb;
    --surface: #ffffff;
    --surface-muted: #f8fbff;
    --surface-accent: #eef4ff;
    --text: #152638;
    --text-soft: #607388;
    --text-faint: #8a99ab;
    --border: #dbe4ef;
    --border-strong: #c7d5e5;
    --primary: #2251d1;
    --primary-dark: #193ca2;
    --primary-rgb: 34, 81, 209;
    --primary-accent: #5c82f1;
    --primary-soft: #edf3ff;
    --theme-sidebar-start: #0f1c2e;
    --theme-sidebar-end: #152840;
    --theme-sidebar-rgb: 15, 28, 46;
    --theme-banner-start: #102447;
    --theme-banner-end: #2251d1;
    --success: #0f8a66;
    --success-soft: #eaf8f3;
    --warning: #d97706;
    --warning-soft: #fff5e8;
    --danger: #dc4c64;
    --danger-soft: #fff0f3;
    --shadow-sm: 0 12px 30px rgba(26, 43, 72, 0.06);
    --shadow-lg: 0 24px 50px rgba(17, 35, 63, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --sidebar-width: 300px;
    --app-font: "Tajawal", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[data-theme="emerald"] {
    --primary: #0f8a66;
    --primary-dark: #0b6b50;
    --primary-rgb: 15, 138, 102;
    --primary-accent: #1eb980;
    --primary-soft: #eaf8f3;
    --theme-sidebar-start: #0f2f33;
    --theme-sidebar-end: #15454b;
    --theme-sidebar-rgb: 15, 47, 51;
    --theme-banner-start: #0c3e41;
    --theme-banner-end: #16936e;
}

html[data-theme="purple"] {
    --primary: #6d28d9;
    --primary-dark: #4c1d95;
    --primary-rgb: 109, 40, 217;
    --primary-accent: #a78bfa;
    --primary-soft: #f3edff;
    --theme-sidebar-start: #211238;
    --theme-sidebar-end: #35205d;
    --theme-sidebar-rgb: 33, 18, 56;
    --theme-banner-start: #32145f;
    --theme-banner-end: #6d28d9;
}

html[data-theme="rose"] {
    --primary: #be185d;
    --primary-dark: #831843;
    --primary-rgb: 190, 24, 93;
    --primary-accent: #fb7185;
    --primary-soft: #fff1f5;
    --theme-sidebar-start: #351423;
    --theme-sidebar-end: #5b1934;
    --theme-sidebar-rgb: 53, 20, 35;
    --theme-banner-start: #641532;
    --theme-banner-end: #be185d;
}

html[data-theme="amber"] {
    --primary: #b45309;
    --primary-dark: #78350f;
    --primary-rgb: 180, 83, 9;
    --primary-accent: #f59e0b;
    --primary-soft: #fff7ed;
    --theme-sidebar-start: #2d2417;
    --theme-sidebar-end: #4b3418;
    --theme-sidebar-rgb: 45, 36, 23;
    --theme-banner-start: #5f340d;
    --theme-banner-end: #b45309;
}

html[data-theme="gray"] {
    --primary: #4b5563;
    --primary-dark: #1f2937;
    --primary-rgb: 75, 85, 99;
    --primary-accent: #94a3b8;
    --primary-soft: #f1f5f9;
    --theme-sidebar-start: #1f2937;
    --theme-sidebar-end: #334155;
    --theme-sidebar-rgb: 31, 41, 55;
    --theme-banner-start: #374151;
    --theme-banner-end: #64748b;
}

html[data-theme="pink"] {
    --primary: #db2777;
    --primary-dark: #9d174d;
    --primary-rgb: 219, 39, 119;
    --primary-accent: #f472b6;
    --primary-soft: #fdf2f8;
    --theme-sidebar-start: #4a1435;
    --theme-sidebar-end: #7a1f53;
    --theme-sidebar-rgb: 74, 20, 53;
    --theme-banner-start: #9d174d;
    --theme-banner-end: #ec4899;
}

html[data-theme="turquoise"] {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-rgb: 15, 118, 110;
    --primary-accent: #2dd4bf;
    --primary-soft: #ecfeff;
    --theme-sidebar-start: #10343b;
    --theme-sidebar-end: #0f4c59;
    --theme-sidebar-rgb: 16, 52, 59;
    --theme-banner-start: #0f766e;
    --theme-banner-end: #14b8a6;
}

html[data-theme="black"] {
    --primary: #111827;
    --primary-dark: #030712;
    --primary-rgb: 17, 24, 39;
    --primary-accent: #374151;
    --primary-soft: #f3f4f6;
    --theme-sidebar-start: #020617;
    --theme-sidebar-end: #111827;
    --theme-sidebar-rgb: 2, 6, 23;
    --theme-banner-start: #111827;
    --theme-banner-end: #1f2937;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a1220;
    --bg-soft: #0f1a2c;
    --surface: #111d31;
    --surface-muted: #15233a;
    --surface-accent: #182945;
    --text: #eef4ff;
    --text-soft: #b8c6db;
    --text-faint: #8fa2bc;
    --border: #25364d;
    --border-strong: #334963;
    --primary: #60a5fa;
    --primary-dark: #2563eb;
    --primary-rgb: 96, 165, 250;
    --primary-accent: #93c5fd;
    --primary-soft: #12243d;
    --theme-sidebar-start: #050b16;
    --theme-sidebar-end: #0f172a;
    --theme-sidebar-rgb: 5, 11, 22;
    --theme-banner-start: #0f172a;
    --theme-banner-end: #1d4ed8;
    --success: #34d399;
    --success-soft: #102a23;
    --warning: #f59e0b;
    --warning-soft: #3a2810;
    --danger: #fb7185;
    --danger-soft: #3d1620;
    --shadow-sm: 0 16px 34px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top, rgba(96, 165, 250, 0.08), transparent 32%),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
    color: var(--text);
}

html[data-theme="dark"] .topbar-link,
html[data-theme="dark"] .topbar-user-card,
html[data-theme="dark"] .topbar-search input,
html[data-theme="dark"] .language-switcher-form,
html[data-theme="dark"] .language-switcher-option,
html[data-theme="dark"] .theme-switcher-menu summary,
html[data-theme="dark"] .theme-switcher-panel,
html[data-theme="dark"] .global-search-trigger,
html[data-theme="dark"] .global-search-palette,
html[data-theme="dark"] .global-search-panel,
html[data-theme="dark"] .portal-panel,
html[data-theme="dark"] .surface-card,
html[data-theme="dark"] .data-table-shell,
html[data-theme="dark"] .employee-directory-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .accordion-item,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] .table,
html[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .small,
html[data-theme="dark"] .content-header-kicker,
html[data-theme="dark"] .content-header-text {
    color: var(--text-soft) !important;
}

html[data-theme="dark"] ::placeholder {
    color: var(--text-faint);
    opacity: 1;
}

html[data-theme="dark"] .theme-switcher-panel,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas {
    box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] .topbar {
    background: rgba(10, 18, 32, 0.88);
    border-bottom-color: rgba(37, 54, 77, 0.92);
}

html[data-theme="dark"] .topbar-search,
html[data-theme="dark"] .topbar-user-hovercard,
html[data-theme="dark"] .help-search-card,
html[data-theme="dark"] .help-image-note,
html[data-theme="dark"] .help-section-card,
html[data-theme="dark"] .notification-dropdown-menu,
html[data-theme="dark"] .sidebar-fullview-panel,
html[data-theme="dark"] .mobile-utility-drawer {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] .topbar-search i,
html[data-theme="dark"] .help-image-note,
html[data-theme="dark"] .help-search-card small,
html[data-theme="dark"] .help-section-icon,
html[data-theme="dark"] .topbar-page-indicator span {
    color: var(--text-faint);
}

html[data-theme="dark"] .help-section-title,
html[data-theme="dark"] .topbar-page-indicator strong {
    color: var(--text);
}

html[data-theme="dark"] .help-section-body {
    border-top-color: rgba(143, 162, 188, 0.16);
}

html[data-theme="dark"] .table-hover > tbody > tr:hover > *,
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .badge.bg-light,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-light {
    background: var(--surface-accent) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .link-dark {
    color: var(--text) !important;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-start,
html[data-theme="dark"] .border-end {
    border-color: var(--border) !important;
}

html {
    font-family: var(--app-font);
    direction: rtl;
}

html[dir="ltr"] {
    direction: ltr;
}

html[dir="ltr"] body,
body.culture-ltr {
    text-align: left;
}

html[dir="rtl"] body,
body.culture-rtl {
    text-align: right;
}

.language-switcher-form {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 999px;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
}

.language-switcher-option {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--text-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 800;
    height: 34px;
    line-height: 1;
    padding: 0;
    width: 34px;
}

.language-switcher-option.is-active {
    background: var(--primary);
    color: #fff;
}

.language-switcher-flag {
    border-radius: 999px;
    display: block;
    height: 18px;
    width: 18px;
}

.theme-switcher {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    display: inline-flex;
    min-height: 42px;
    position: relative;
}

.theme-switcher-menu summary {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    list-style: none;
    padding: 0 0.55rem;
}

.theme-switcher-menu summary::-webkit-details-marker {
    display: none;
}

.theme-switcher i {
    color: var(--primary);
    font-size: 1rem;
}

.theme-switcher-swatch {
    background: linear-gradient(135deg, var(--theme-banner-start), var(--theme-banner-end));
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    display: inline-flex;
    height: 18px;
    width: 18px;
}

.theme-switcher-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
    display: grid;
    gap: .4rem;
    inset-inline-end: 0;
    margin-top: .45rem;
    min-width: 56px;
    padding: .45rem;
    position: absolute;
    top: 100%;
    z-index: 30;
}

.theme-switcher-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    padding: .2rem;
}

.theme-switcher-option.is-active {
    background: rgba(var(--primary-rgb), 0.12);
}

.theme-switcher-option-swatch {
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58);
    display: inline-flex;
    height: 22px;
    width: 22px;
}

.theme-switcher-option-swatch.theme-default {
    background: linear-gradient(135deg, #102447 0%, #2251d1 100%);
}

.theme-switcher-option-swatch.theme-emerald {
    background: linear-gradient(135deg, #0c3e41 0%, #16936e 100%);
}

.theme-switcher-option-swatch.theme-purple {
    background: linear-gradient(135deg, #32145f 0%, #6d28d9 100%);
}

.theme-switcher-option-swatch.theme-rose {
    background: linear-gradient(135deg, #641532 0%, #be185d 100%);
}

.theme-switcher-option-swatch.theme-amber {
    background: linear-gradient(135deg, #5f340d 0%, #b45309 100%);
}

.theme-switcher-option-swatch.theme-gray {
    background: linear-gradient(135deg, #374151 0%, #64748b 100%);
}

.theme-switcher-option-swatch.theme-pink {
    background: linear-gradient(135deg, #9d174d 0%, #ec4899 100%);
}

.theme-switcher-option-swatch.theme-turquoise {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.theme-switcher-option-swatch.theme-black {
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
}

.theme-switcher-option-swatch.theme-dark {
    background: linear-gradient(135deg, #0f172a 0%, #60a5fa 100%);
}

html[dir="ltr"] .app-shell {
    direction: ltr;
}

html[dir="ltr"] .sidebar {
    border-left: 0;
    border-right: 1px solid rgba(148, 163, 184, .12);
}

html[dir="ltr"] .breadcrumb-list,
html[dir="ltr"] .topbar-end,
html[dir="ltr"] .public-actions {
    direction: ltr;
}

.login-card-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.login-field {
    padding-inline: 5px;
}

.notification-dropdown {
    width: min(360px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    overflow: hidden auto;
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    text-align: right;
}

.notification-dropdown-minimal {
    overflow: hidden;
}

.notification-dropdown.is-floating {
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.notification-dropdown-head,
.notification-dropdown-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
}

.notification-dropdown-head a {
    font-size: .82rem;
    text-decoration: none;
}

.notification-dropdown-head {
    font-weight: 800;
}

.notification-dropdown-minimal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 0;
    font-weight: 800;
}

.notification-dropdown-minimal-summary {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
    display: flex;
    justify-content: center;
    padding: 1rem 1rem 1.15rem;
    text-align: center;
}

.notification-dropdown-count {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    min-width: 28px;
    padding-inline: .55rem;
}

.notification-dropdown-summary {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.2rem 1rem 1rem;
    text-align: center;
}

.notification-dropdown-count-large {
    color: var(--text);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.notification-dropdown-count-label {
    color: var(--text-soft);
    font-size: .82rem;
    font-weight: 700;
}

.notification-item {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid rgba(148, 163, 184, .22);
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.is-unread {
    background: #fff7ed;
}

.notification-item strong {
    font-size: .92rem;
}

.notification-item small,
.notification-empty {
    color: #64748b;
    font-size: .8rem;
}

.notification-center-list {
    display: grid;
    gap: 14px;
}

.notification-shell {
    display: grid;
    gap: 10px;
    padding: 0;
}

.notification-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.notification-card.is-unread {
    border-color: rgba(217, 119, 6, .32);
    background: linear-gradient(180deg, #fffaf1 0%, #ffffff 100%);
}

.notification-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.notification-icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex: 0 0 46px;
    color: #fff;
    background: var(--primary);
}

.notification-icon.secondary { background: #64748b; }
.notification-icon.success { background: var(--success); }
.notification-icon.warning { background: var(--warning); }
.notification-icon.danger { background: var(--danger); }
.notification-icon.primary { background: var(--primary); }
.notification-icon.info { background: #0ea5e9; }

.notification-card-copy {
    display: grid;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.notification-card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.notification-card-title {
    font-size: 1rem;
    margin-bottom: 4px;
}

.notification-card-desc {
    margin: 0;
    color: var(--text-soft);
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.notification-card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.notification-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-faint);
    font-size: .82rem;
}

.notification-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notification-card-foot {
    display: flex;
    justify-content: flex-start;
}

.notification-shell-actions {
    justify-content: flex-end;
    padding-inline: 4px 0;
}

.notification-item-head {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.unified-portal-alert {
    border-inline-start: 4px solid transparent;
    align-items: flex-start;
    border-radius: var(--radius-md);
    display: flex;
    gap: 0.6rem;
    padding-inline-end: 1rem;
}

.unified-portal-alert.alert-success { border-inline-start-color: var(--success); }
.unified-portal-alert.alert-danger { border-inline-start-color: var(--danger); }
.unified-portal-alert.alert-warning { border-inline-start-color: var(--warning); }
.unified-portal-alert.alert-info { border-inline-start-color: #0ea5e9; }

.unified-portal-alert i {
    margin-top: 0.15rem;
}

.notification-empty {
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
}

.notification-empty--compact {
    border-radius: 12px;
    font-size: 0.82rem;
    padding: 12px 10px;
}

@media (max-width: 767.98px) {
    .notification-card-head,
    .notification-card-title-row {
        flex-direction: column;
    }

    .notification-card-badges {
        justify-content: flex-start;
    }
}

.table-row-highlight {
    background: rgba(255, 247, 237, .72);
}

.performance-score-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1199.98px) {
    .performance-score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .performance-score-grid {
        grid-template-columns: 1fr;
    }
}

html,
body {
    min-height: 100%;
}

html,
body,
.app-shell-body {
    overflow-x: clip;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(34, 81, 209, 0.07), transparent 22rem),
        radial-gradient(circle at bottom left, rgba(15, 138, 102, 0.06), transparent 20rem),
        var(--bg);
    color: var(--text);
    direction: rtl;
    font-family: var(--app-font);
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    letter-spacing: 0;
}

body.sidebar-lock {
    overflow: hidden;
    touch-action: none;
}

button,
input,
select,
textarea {
    font: inherit;
    font-family: var(--app-font);
}

input,
select,
textarea,
.form-control,
.form-select {
    text-align: right;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-faint);
    opacity: 1;
}

table,
.table,
.table th,
.table td,
.badge,
.btn,
.nav,
.navbar,
.dropdown-menu,
.modal,
.modal-content,
.form-label,
.form-text,
.form-check,
.popover,
.tooltip {
    font-family: var(--app-font);
    letter-spacing: 0;
}

.table,
.table th,
.table td {
    vertical-align: middle;
}

.badge {
    line-height: 1.35;
}

.modal,
.dropdown-menu {
    text-align: right;
}

.app-shell-body,
.public-body,
.employee-theme,
.admin-theme {
    direction: rtl;
}

html[dir="rtl"] .text-start {
    text-align: start !important;
}

html[dir="rtl"] .text-end {
    text-align: end !important;
}

.help-center-page {
    display: grid;
    gap: 1rem;
}

.help-center-header .entity-page-subtitle {
    max-width: 760px;
}

.help-search-card,
.help-image-note,
.help-section-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.help-search-card {
    padding: 1rem;
}

.help-search-card small {
    color: #64748b;
    display: block;
    margin-top: .45rem;
}

.help-image-note {
    align-items: center;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .85rem 1rem;
}

.help-sections {
    display: grid;
    gap: .75rem;
}

.help-section-card {
    overflow: hidden;
}

.help-section-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    list-style: none;
    padding: 1rem 1.15rem;
    user-select: none;
}

.help-section-summary::-webkit-details-marker {
    display: none;
}

.help-section-title {
    align-items: center;
    color: #0f172a;
    display: inline-flex;
    font-weight: 800;
    gap: .6rem;
}

.help-section-title i {
    color: #0d6efd;
}

.help-section-icon {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    transition: transform .2s ease;
}

.help-section-card[open] .help-section-icon {
    transform: rotate(180deg);
}

.help-section-body {
    border-top: 1px solid rgba(15, 23, 42, .08);
    padding: 1rem 1.15rem 1.15rem;
}

.help-section-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
}

.help-section-copy h3,
.help-section-copy h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-top: 1rem;
}

.help-section-copy h3:first-child {
    margin-top: 0;
}

.help-section-copy li {
    margin-bottom: .45rem;
}

.help-screenshot-box {
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, .2);
    border-radius: 12px;
    display: grid;
    min-height: 220px;
    overflow: hidden;
    place-items: center;
}

.help-screenshot-box img {
    background: #fff;
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.help-screenshot-placeholder {
    color: #64748b;
    display: grid;
    gap: .35rem;
    justify-items: center;
    padding: 1.25rem;
    text-align: center;
}

.help-screenshot-placeholder i {
    color: #0d6efd;
    font-size: 2rem;
}

.help-screenshot-placeholder span {
    direction: ltr;
    font-size: .85rem;
    unicode-bidi: plaintext;
}

@media (max-width: 768px) {
    .help-section-grid {
        grid-template-columns: 1fr;
    }

    .help-screenshot-box {
        min-height: 180px;
    }
}

html[dir="rtl"] .form-check {
    align-items: center;
    display: inline-flex;
    gap: .65rem;
    padding-inline-start: 0;
    padding-inline-end: 0;
}

html[dir="rtl"] .form-check .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
    position: static;
}

html[dir="rtl"] .form-switch .form-check-input {
    margin-inline-end: 0;
}

html[dir="rtl"] .form-check .form-check-label {
    margin: 0;
    line-height: 1.5;
}

html[dir="rtl"] .form-switch {
    align-items: center;
    display: inline-flex;
    gap: .75rem;
    padding-inline-start: 0;
    padding-inline-end: 0;
}

html[dir="rtl"] .form-switch .form-check-input {
    margin-inline-end: 0;
}

html[dir="rtl"] .form-switch .form-check-label {
    margin: 0;
}

/* Arabic baseline: keep new views/forms/tables inheriting the same RTL + Tajawal defaults. */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

p {
    color: var(--text-soft);
}

a {
    color: inherit;
    text-decoration: none;
}

.public-body {
    min-height: 100vh;
}

.public-shell {
    min-height: 100vh;
}

.public-topbar {
    padding: 1.5rem 0 0;
}

.public-topbar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.public-brand {
    align-items: center;
    display: inline-flex;
    gap: 1rem;
}

.public-brand-mark,
.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
    border-radius: 18px;
    color: #fff;
    display: inline-flex;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.brand-mark.success {
    background: linear-gradient(135deg, var(--success), #1eb980);
}

.public-brand span,
.brand-copy {
    display: grid;
    gap: 2px;
}

.public-brand strong,
.brand-copy strong {
    font-size: 1rem;
}

.public-brand small,
.brand-copy small {
    color: var(--text-soft);
    font-size: 0.82rem;
}

.public-main {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 96px);
    padding-block: 2rem;
}

.public-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.public-pill {
    align-items: center;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(219, 228, 239, 0.92);
    border-radius: 999px;
    color: var(--text-soft);
    display: inline-flex;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0 0.95rem;
}

.public-hero {
    align-items: center;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
    width: 100%;
}

.public-hero-copy {
    display: grid;
    gap: 1rem;
    padding-inline: 1rem;
}

.public-hero-copy h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.public-kicker {
    align-items: center;
    background: rgba(34, 81, 209, 0.09);
    border: 1px solid rgba(34, 81, 209, 0.14);
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    min-height: 38px;
    padding: 0 0.9rem;
    width: fit-content;
}

.public-panel {
    width: min(100%, 720px);
}

.portal-switcher-page {
    width: 100%;
}

.portal-switcher-page .public-hero {
    align-items: stretch;
    grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.15fr);
}

.portal-switcher-page .public-hero > .public-panel {
    max-width: none;
    width: 100%;
}

.app-shell-body {
    min-height: 100vh;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    overflow-x: clip;
}

.sidebar {
    background: linear-gradient(180deg, var(--theme-sidebar-start) 0%, var(--theme-sidebar-end) 100%);
    color: rgba(255, 255, 255, 0.86);
    display: grid;
    gap: 1.5rem;
    grid-template-rows: auto 1fr auto;
    padding: 1.5rem 1rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: opacity 0.22s ease, transform 0.22s ease, padding 0.22s ease;
}

.employee-sidebar {
    background: linear-gradient(180deg, var(--theme-sidebar-start) 0%, var(--theme-sidebar-end) 100%);
}

.portal-content-header {
    align-items: start;
}

.portal-header-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.portal-header-chip {
    align-items: center;
    background: rgba(34, 81, 209, 0.08);
    border: 1px solid rgba(34, 81, 209, 0.12);
    border-radius: 999px;
    color: var(--text-soft);
    display: inline-flex;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0 0.85rem;
}

.portal-dashboard-hero {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    padding: .7rem;
}

.portal-hero-copy,
.portal-hero-side {
    display: grid;
    gap: 1rem;
}

.portal-hero-profile {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.portal-hero-profile-copy h2,
.portal-profile-copy h2 {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.portal-hero-avatar,
.portal-profile-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
    background-position: center;
    background-size: cover;
    border-radius: 24px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 88px;
    justify-content: center;
    overflow: hidden;
    width: 88px;
}

.portal-profile-avatar {
    height: 110px;
    width: 110px;
}

.portal-hero-avatar.fallback,
.portal-profile-avatar.fallback {
    font-size: 2rem;
    font-weight: 800;
}

.portal-hero-avatar.has-photo,
.portal-profile-avatar.has-photo {
    background-color: #fff;
    color: transparent;
}

.portal-hero-avatar.has-photo span,
.portal-profile-avatar.has-photo span {
    display: none;
}

.portal-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.portal-hero-side {
    align-content: start;
}

.portal-hero-status-card,
.portal-mini-stat,
.portal-highlight-card,
.portal-summary-card,
.portal-quick-link-card,
.portal-activity-item,
.portal-profile-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.portal-hero-status-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
}

.portal-hero-status-label,
.portal-mini-stat span,
.portal-highlight-label {
    color: var(--text-faint);
    font-size: 0.8rem;
    font-weight: 700;
}

.portal-hero-stacked {
    display: grid;
    gap: 0.75rem;
}

.portal-mini-stat {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
}

.portal-mini-stat strong {
    font-size: 1.1rem;
}

.portal-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    min-width: 0;
    margin-block: 1rem;
    padding: .7rem;
}

.portal-summary-card {
    display: grid;
    gap: 0.7rem;
    min-height: 280px;
    padding: 1rem;
}

.portal-summary-card-head {
    align-items: start;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-summary-label {
    color: var(--text-faint);
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.portal-summary-card h3 {
    font-size: 1.4rem;
}

.portal-summary-icon {
    align-items: center;
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.portal-summary-icon.secondary,
.portal-quick-link-icon.secondary,
.portal-activity-icon.secondary {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.portal-summary-icon.primary,
.portal-quick-link-icon.primary,
.portal-activity-icon.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
}

.portal-summary-icon.success,
.portal-quick-link-icon.success,
.portal-activity-icon.success {
    background: linear-gradient(135deg, var(--success), #1eb980);
}

.portal-summary-icon.warning,
.portal-quick-link-icon.warning,
.portal-activity-icon.warning {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
}

.portal-summary-icon.danger,
.portal-quick-link-icon.danger,
.portal-activity-icon.danger {
    background: linear-gradient(135deg, var(--danger), #fb7185);
}

.portal-summary-icon.info,
.portal-quick-link-icon.info,
.portal-activity-icon.info {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.portal-summary-desc {
    color: var(--text-soft);
    font-size: 0.88rem;
    margin: 0;
}

.portal-summary-link {
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 700;
    margin-right: .7rem;
    margin-left: .7rem;
}

.portal-dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    margin-bottom: 1rem;
}

.portal-panel {
    display: grid;
    gap: 1rem;
    padding:.7rem;
}

.portal-form-grid {
    padding-bottom: 1.5rem;
}

.portal-inline-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.portal-highlights-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-highlight-card {
    display: grid;
    gap: 0.3rem;
    padding: 1rem;
}

.portal-highlight-card strong {
    font-size: 1.02rem;
}

.portal-quick-links-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-quick-link-card {
    align-items: center;
    display: flex;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-quick-link-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.portal-quick-link-icon {
    align-items: center;
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.portal-quick-link-card strong {
    display: block;
    margin-bottom: 0.12rem;
}

.portal-quick-link-card small {
    color: var(--text-soft);
}

.portal-activity-list {
    display: grid;
    gap: 0.85rem;
}

.portal-activity-item {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.95rem 1rem;
}

.portal-activity-item.is-unread {
    background: #fff8ec;
    border-color: rgba(217, 119, 6, 0.15);
}

.portal-activity-icon {
    align-items: center;
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.portal-activity-copy {
    display: grid;
    gap: 0.22rem;
}

.portal-activity-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
}

.portal-activity-copy p {
    margin: 0;
}

.portal-activity-copy small {
    color: var(--text-soft);
}

.portal-activity-link {
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.portal-profile-header {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    padding: 1rem;
}

.portal-profile-identity {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.portal-profile-copy {
    display: grid;
    gap: 0.45rem;
}

.portal-profile-quick {
    display: grid;
    gap: 0.75rem;
}

.portal-detail-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.portal-empty-state {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    justify-items: center;
    padding: 2rem 1rem;
    text-align: center;
}

.portal-empty-state.compact {
    padding-block: 1.5rem;
}

.portal-empty-state-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 18px;
    color: var(--primary);
    display: inline-flex;
    font-size: 1.5rem;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.portal-empty-state h2,
.portal-empty-state h3 {
    font-size: 1.35rem;
}

.portal-empty-state p {
    margin: 0;
    max-width: 42rem;
}

.portal-inline-summary {
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 16px;
    padding: 14px;
    background: rgba(248, 250, 252, .72);
}

.portal-inline-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.portal-inline-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.portal-inline-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.portal-inline-summary-item.is-active {
    border-color: rgba(37, 99, 235, .38);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.portal-inline-summary-item span,
.portal-inline-summary-item small {
    color: #64748b;
}

@media (max-width: 575.98px) {
    .portal-inline-summary-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-inline-summary-grid {
        grid-template-columns: 1fr;
    }
}

.employee-hub-hero {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

.employee-hub-hero .portal-hero-avatar {
    height: 72px;
    width: 72px;
}

.employee-hub-hero-note {
    color: var(--text-soft);
    margin: 0;
    max-width: 26rem;
}

.employee-hub-kpis {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-block: 1rem;
}

.employee-hub-kpi {
    min-height: 0;
}

.employee-hub-kpi h3 {
    font-size: 1.28rem;
}

.employee-hub-actions-panel {
    margin-bottom: 1rem;
}

.employee-hub-quick-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.employee-hub-main-grid {
    align-items: start;
}

.employee-hub-list-item {
    padding-block: 0.5rem;
}

.employee-hub-payslip-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto auto;
    padding: 1rem;
}

.employee-hub-payslip-card h3,
.employee-hub-payslip-card strong {
    font-size: 1.25rem;
}

.employee-hub-doc-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-hub-expiry-list {
    display: grid;
    gap: 0.75rem;
}

.employee-hub-expiry-item {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
}

.employee-hub-expiry-item strong,
.employee-hub-expiry-item small {
    display: block;
}

.employee-hub-expiry-item small {
    color: var(--text-soft);
}

.portal-hero-profile-copy p,
.portal-profile-copy p {
    margin-bottom: 0;
}

.portal-identity-chip {
    gap: 0.45rem;
}

.portal-sidebar .sidebar-group-title {
    color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1199.98px) {
    .portal-dashboard-hero,
    .portal-profile-header,
    .portal-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .employee-hub-kpis,
    .employee-hub-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-highlights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .employee-hub-hero,
    .employee-hub-kpis,
    .employee-hub-quick-grid,
    .employee-hub-doc-grid {
        grid-template-columns: 1fr;
    }

    .employee-hub-hero {
        align-items: start;
    }

    .employee-hub-payslip-card {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .portal-hero-profile,
    .portal-profile-identity,
    .portal-activity-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .portal-hero-profile,
    .portal-profile-identity {
        display: grid;
    }

    .portal-summary-grid,
    .portal-highlights-grid,
    .portal-quick-links-grid,
    .portal-detail-grid {
        grid-template-columns: 1fr;
    }

    .portal-hero-actions {
        width: 100%;
    }

    .portal-hero-actions .btn {
        flex: 1 1 auto;
    }
}

.sidebar-brand {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

/* HR V1.4 final polish: keep dense action areas usable on small screens. */
@media (max-width: 767.98px) {
    .panel-actions,
    .entity-page-actions,
    .report-export-actions,
    .form-actions,
    .inline-actions,
    .page-toolbar {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .panel-actions .btn,
    .entity-page-actions .btn,
    .report-export-actions .btn,
    .form-actions .btn,
    .inline-actions .btn,
    .page-toolbar .btn,
    .panel-actions form,
    .entity-page-actions form {
        width: 100%;
    }

    .panel-actions form .btn,
    .entity-page-actions form .btn {
        justify-content: center;
        width: 100%;
    }

    .surface-panel,
    .entity-details-shell {
        border-radius: 14px;
    }

    .surface-panel .table-modern,
    .entity-details-shell .table-modern {
        min-width: 680px;
    }
}

/* Keep report, payroll, and payslip printouts clean even when later screen rules apply. */
.leave-calendar-page {
    display: grid;
    gap: 1.25rem;
}

.leave-calendar-filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.leave-calendar-actions {
    align-items: end;
    display: flex;
    gap: .75rem;
}

.leave-calendar-summary {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-block: 1rem;
}

.leave-calendar-stat {
    background: var(--surface, #fff);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
    display: grid;
    gap: .35rem;
    padding: 1rem 1.1rem;
}

.leave-calendar-stat span {
    color: var(--text-muted, #64748b);
    font-size: .85rem;
    font-weight: 700;
}

.leave-calendar-stat strong {
    color: var(--text-strong, #0f172a);
    font-size: 1.55rem;
    line-height: 1;
}

.leave-calendar-stat.is-warning {
    border-color: rgba(245, 158, 11, .35);
    background: rgba(255, 251, 235, .72);
}

.leave-calendar-list {
    display: grid;
    gap: 1rem;
}

.leave-calendar-day {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    display: grid;
    gap: .85rem;
    padding: 1rem;
}

.leave-calendar-day-header,
.leave-calendar-card-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.leave-calendar-day-kicker {
    color: var(--text-muted, #64748b);
    display: block;
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.leave-calendar-day-header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.leave-calendar-items {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.leave-calendar-card {
    background: rgba(248, 250, 252, .78);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    display: grid;
    gap: .8rem;
    padding: .95rem;
}

.leave-calendar-card-head strong {
    display: block;
    font-size: .98rem;
}

.leave-calendar-card-head small {
    color: var(--text-muted, #64748b);
}

.leave-calendar-meta {
    color: var(--text-muted, #64748b);
    display: grid;
    gap: .45rem;
    font-size: .86rem;
}

.leave-calendar-meta span {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
}

@media (max-width: 575.98px) {
    .leave-calendar-filters,
    .leave-calendar-summary,
    .leave-calendar-items {
        grid-template-columns: 1fr;
    }

    .leave-calendar-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .leave-calendar-day-header,
    .leave-calendar-card-head {
        display: grid;
    }
}

.biometric-file-picker {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    max-width: 100%;
}

.biometric-file-picker-name {
    color: #475569;
    min-width: 0;
    overflow-wrap: anywhere;
}

@media print {
    .app-sidebar,
    .admin-sidebar,
    .employee-portal-sidebar,
    .manager-portal-sidebar,
    .portal-sidebar,
    .admin-topbar,
    .topbar,
    .portal-topbar,
    .mobile-shell-toggle,
    .mobile-utility-toggle,
    .content-header,
    .panel-actions,
    .entity-page-actions,
    .report-export-actions,
    .report-filter-panel,
    .btn,
    .no-print {
        display: none !important;
    }

    .surface-panel,
    .entity-page-shell,
    .entity-details-shell,
    .payslip-print-sheet {
        background: #fff !important;
        box-shadow: none !important;
        max-width: none !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .surface-panel,
    .entity-details-shell,
    .payslip-print-sheet {
        border: 1px solid #ddd !important;
        border-radius: 0 !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table-modern {
        min-width: 0 !important;
    }
}

@media print {
    .global-print-company-header {
        display: block !important;
        width: 100% !important;
    }

    .print-company-header {
        display: flex !important;
        break-inside: avoid;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 10mm !important;
    }

    .print-company-logo {
        width: 24mm;
        height: 24mm;
    }
}

.report-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.global-print-company-header {
    display: none;
}

.company-logo-preview {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 16px;
    background: #fff;
    padding: .5rem;
}

.print-company-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 18px;
    background: #fff;
    color: #111827;
}

.print-company-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    flex: 0 0 auto;
}

.print-company-copy {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.print-company-copy strong {
    font-size: 1.15rem;
    color: #0f172a;
}

.print-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    color: #475569;
    font-size: .85rem;
}

.print-company-copy small {
    color: #64748b;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    body {
        background: #fff !important;
        color: #111 !important;
    }

    .app-sidebar,
    .admin-sidebar,
    .employee-portal-sidebar,
    .manager-portal-sidebar,
    .mobile-shell-toggle,
    .mobile-utility-toggle,
    .admin-topbar,
    .topbar,
    .portal-topbar,
    .portal-sidebar,
    .content-header,
    .entity-page-actions,
    .panel-actions,
    .report-export-actions,
    .report-filter-panel,
    .btn,
    .no-print {
        display: none !important;
    }

    .admin-main,
    .app-main,
    .portal-main,
    .employee-portal-main,
    .entity-page-shell,
    .surface-panel,
    .entity-details-shell {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .entity-page-head,
    .entity-details-shell {
        border: 1px solid #ddd !important;
        border-radius: 0 !important;
        padding: 12px !important;
        break-inside: avoid;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table,
    .table-modern {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 11px !important;
    }

    .table th,
    .table td {
        border: 1px solid #ddd !important;
        padding: 6px !important;
        color: #111 !important;
        background: #fff !important;
    }

    .status-badge,
    .badge {
        border: 1px solid #999 !important;
        color: #111 !important;
        background: #fff !important;
    }

    .payslip-page {
        display: block !important;
    }

    .payslip-print-sheet {
        border: 1px solid #ddd !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 12px !important;
    }

    .payslip-head,
    .payslip-info-grid {
        break-inside: avoid;
    }

    .payslip-info-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

.sidebar-brand-actions {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-inline-start: auto;
}

.sidebar-hide-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    width: 48px;
}

.sidebar-hide-button:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.sidebar-hide-button i {
    font-size: 1.1rem;
}

.brand-link {
    align-items: center;
    display: inline-flex;
    gap: 0.9rem;
}

.sidebar-close,
.topbar-icon-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 14px;
    color: inherit;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: 42px;
}

.sidebar-close:hover,
.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.sidebar-fullview-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 14px;
    color: inherit;
    display: inline-flex;
    gap: 0.5rem;
    height: 42px;
    justify-content: center;
    padding: 0;
    width: 42px;
    flex: 0 0 42px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.sidebar-fullview-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.56);
    outline-offset: 2px;
}

.sidebar-fullview-button i {
    font-size: 1rem;
}

.sidebar-fullview-button:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.sidebar-fullview-close-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    display: none;
    height: 42px;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: 42px;
}

.sidebar-fullview-close-button:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.sidebar-visibility-button,
.sidebar-restore-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 14px;
    color: inherit;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    width: 42px;
    flex: 0 0 42px;
}

.sidebar-visibility-button:hover,
.sidebar-restore-button:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.sidebar-visibility-button:focus-visible,
.sidebar-restore-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.56);
    outline-offset: 2px;
}

.sidebar-restore-button {
    background: linear-gradient(135deg, var(--theme-sidebar-start) 0%, var(--theme-sidebar-end) 100%);
    box-shadow: var(--shadow-lg);
    color: #fff;
    inset-block-start: 1rem;
    inset-inline-start: 1rem;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transform: translateX(-0.35rem);
    visibility: hidden;
    z-index: 35;
}

body.sidebar-hidden .app-shell {
    grid-template-columns: 84px minmax(0, 1fr);
}

body.sidebar-hidden .sidebar {
    gap: 1rem;
    opacity: 1;
    overflow: hidden;
    padding: 1rem 0.6rem;
    pointer-events: auto;
    transform: none;
    visibility: visible;
}

body.sidebar-hidden .sidebar-restore-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

body.sidebar-hidden .sidebar-brand {
    justify-content: center;
}

body.sidebar-hidden .brand-link {
    justify-content: center;
    width: 100%;
}

body.sidebar-hidden .brand-copy,
body.sidebar-hidden .sidebar-brand-actions,
body.sidebar-hidden .sidebar-foot {
    display: none !important;
}

body.sidebar-hidden .sidebar-scroll-shell {
    display: grid !important;
    min-height: 0;
}

body.sidebar-hidden .sidebar-section {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    padding-inline-end: 0;
}

body.sidebar-hidden .sidebar-stack,
body.sidebar-hidden .sidebar-fullview-content,
body.sidebar-hidden .sidebar-fullview-layout,
body.sidebar-hidden .sidebar-scroll-indicator {
    display: none !important;
}

body.sidebar-hidden .sidebar-compact-nav {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: flex-start;
    overflow-y: auto;
    padding-block: 0.25rem 0.35rem;
    scrollbar-width: none;
}

body.sidebar-hidden .sidebar-compact-nav::-webkit-scrollbar {
    display: none;
}

body.sidebar-hidden .brand-mark {
    border-radius: 22px;
    height: 52px;
    width: 52px;
}

.sidebar-section {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    overflow: auto;
    padding-inline-end: 0.25rem;
    scroll-behavior: smooth;
    scroll-padding-block: 5rem;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-section::-webkit-scrollbar {
    display: none;
}

.sidebar-scroll-shell {
    display: grid;
    min-height: 0;
    position: relative;
}

.sidebar-scroll-shell::before,
.sidebar-scroll-shell::after {
    content: "";
    inset-inline: 0.2rem;
    height: 54px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.sidebar-scroll-shell::before {
    background: linear-gradient(180deg, rgba(var(--theme-sidebar-rgb), 0.95) 0%, rgba(var(--theme-sidebar-rgb), 0) 100%);
    top: 0;
}

.employee-sidebar .sidebar-scroll-shell::before {
    background: linear-gradient(180deg, rgba(var(--theme-sidebar-rgb), 0.96) 0%, rgba(var(--theme-sidebar-rgb), 0) 100%);
}

.sidebar-scroll-shell::after {
    background: linear-gradient(0deg, rgba(var(--theme-sidebar-rgb), 0.95) 0%, rgba(var(--theme-sidebar-rgb), 0) 100%);
    bottom: 0;
}

.employee-sidebar .sidebar-scroll-shell::after {
    background: linear-gradient(0deg, rgba(var(--theme-sidebar-rgb), 0.96) 0%, rgba(var(--theme-sidebar-rgb), 0) 100%);
}

.sidebar-scroll-shell.can-scroll-up::before,
.sidebar-scroll-shell.can-scroll-down::after {
    opacity: 1;
}

.sidebar-scroll-indicator {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    justify-self: center;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    width: 38px;
    z-index: 2;
}

.sidebar-scroll-indicator:hover {
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-scroll-indicator.is-top {
    top: 0.5rem;
    transform: translateY(-6px);
}

.sidebar-scroll-indicator.is-bottom {
    bottom: 0.5rem;
    transform: translateY(6px);
}

.sidebar-scroll-shell:hover .sidebar-scroll-indicator,
.sidebar-scroll-shell:focus-within .sidebar-scroll-indicator {
    transform: translateY(0);
}

.sidebar-scroll-shell.can-scroll-up:hover .sidebar-scroll-indicator.is-top,
.sidebar-scroll-shell.can-scroll-up:focus-within .sidebar-scroll-indicator.is-top,
.sidebar-scroll-shell.can-scroll-down:hover .sidebar-scroll-indicator.is-bottom,
.sidebar-scroll-shell.can-scroll-down:focus-within .sidebar-scroll-indicator.is-bottom {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-overview-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.sidebar-overview-card.employee {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-overview-kicker {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    font-weight: 700;
}

.sidebar-stack {
    display: grid;
    gap: 1rem;
}

.sidebar-compact-nav {
    display: none;
}

.sidebar-compact-toggle,
.sidebar-compact-link {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    width: 44px;
}

.sidebar-compact-toggle:hover,
.sidebar-compact-link:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.sidebar-compact-toggle:focus-visible,
.sidebar-compact-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.42);
    outline-offset: 3px;
}

.sidebar-compact-toggle i,
.sidebar-compact-link i {
    font-size: 1.05rem;
}

.sidebar-compact-link.is-active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    color: #fff;
}

.sidebar-compact-divider {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    display: block;
    height: 1px;
    margin: 0.2rem 0 0.15rem;
    width: 42px;
}

.sidebar-group {
    display: grid;
    gap: 0.55rem;
}

.sidebar-group-title {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    padding-inline: 0.35rem;
}

.sidebar-group-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 0.65rem;
    justify-content: space-between;
    padding: 0.2rem 0.35rem;
    text-align: start;
    width: 100%;
}

.sidebar-group-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 3px;
}

.sidebar-group-toggle .sidebar-group-title {
    color: inherit;
    padding-inline: 0;
}

.sidebar-group-chevron {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    transition: transform 0.18s ease, color 0.18s ease;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-group-chevron,
.sidebar-group-toggle.is-open .sidebar-group-chevron {
    color: rgba(255, 255, 255, 0.8);
    transform: rotate(180deg);
}

.sidebar-group-menu {
    min-width: 0;
    overflow: hidden;
}

.sidebar-group-menu[hidden] {
    display: none !important;
}

.sidebar-group-menu.show {
    display: block;
}

.sidebar-nav {
    display: grid;
    gap: 0.45rem;
}

.sidebar-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.78);
    display: grid;
    gap: 0.9rem;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 60px;
    padding: 0.75rem 0.85rem;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.sidebar-link-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.sidebar-link i {
    font-size: 1rem;
}

.sidebar-link-copy {
    display: grid;
    gap: 0.1rem;
}

.sidebar-link-copy strong {
    color: inherit;
    font-size: 0.88rem;
}

.sidebar-link-copy small {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.76rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(-2px);
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.sidebar-link.is-active::before {
    content: "";
    position: absolute;
    inset-block: 0.7rem;
    inset-inline-start: 0.45rem;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.55));
}

.sidebar-link.is-active .sidebar-link-icon {
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-link.is-active .sidebar-link-copy small {
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-foot-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    display: grid;
    gap: 0.2rem;
    padding: 1rem;
}

.sidebar-foot-label {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.75rem;
}

.sidebar-foot-card strong {
    color: #fff;
}

.sidebar-foot-card small {
    color: rgba(255, 255, 255, 0.72);
}

.shell-backdrop {
    background: rgba(9, 15, 27, 0.45);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.sidebar-fullview-overlay {
    background: rgba(9, 15, 27, 0.58);
    backdrop-filter: blur(4px);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.2s ease, backdrop-filter 0.2s ease;
    z-index: 39;
}

body.sidebar-fullview-open {
    overflow: hidden;
}

body.sidebar-fullview-open .sidebar-fullview-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-fullview-open .sidebar-fullview-panel {
    box-shadow: var(--shadow-xl);
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    inset: 0;
    max-width: none;
    overflow: hidden;
    position: fixed;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    width: 100vw;
    z-index: 40;
    border-radius: 0;
}

body.sidebar-hidden.sidebar-fullview-open .sidebar-fullview-panel {
    gap: 1.5rem;
    opacity: 1;
    overflow: hidden;
    padding: 1.5rem 1rem 1rem;
    pointer-events: auto;
    transform: none;
    visibility: visible;
}

body.sidebar-hidden.sidebar-fullview-open .brand-copy,
body.sidebar-hidden.sidebar-fullview-open .sidebar-brand-actions {
    display: inline-flex !important;
}

body.sidebar-hidden.sidebar-fullview-open .brand-link {
    justify-content: flex-start;
    width: auto;
}

body.sidebar-hidden.sidebar-fullview-open .sidebar-scroll-shell {
    display: grid !important;
}

body.sidebar-hidden.sidebar-fullview-open .sidebar-foot {
    display: block !important;
}

body.sidebar-hidden.sidebar-fullview-open .sidebar-compact-nav {
    display: none !important;
}

body.sidebar-hidden.sidebar-fullview-open .sidebar-section,
body.sidebar-hidden.sidebar-fullview-open .sidebar-fullview-layout {
    display: grid !important;
}

body.sidebar-fullview-open .sidebar-brand {
    padding-inline-start: 4.5rem;
    position: relative;
}

body.sidebar-fullview-open .sidebar-hide-button {
    display: none !important;
}

body.sidebar-fullview-open .sidebar-fullview-close-button {
    display: inline-flex;
    left: 1rem;
    position: absolute;
    top: 1rem;
}

body.sidebar-fullview-open .sidebar-scroll-shell {
    min-height: 0;
    height: 100%;
}

body.sidebar-fullview-open .sidebar-scroll-indicator {
    display: none;
}

body.sidebar-fullview-open .sidebar-section {
    align-content: start;
    display: grid;
    gap: 1rem;
    overflow: auto;
    padding-inline-end: 0;
    padding-block: 0.15rem 0;
}

body.sidebar-fullview-open .sidebar-overview-card {
    display: none;
}

body.sidebar-fullview-open .sidebar-stack {
    display: none;
}

body.sidebar-fullview-open .sidebar-fullview-layout {
    display: grid;
    gap: 1.25rem;
}

body.sidebar-fullview-open .sidebar-fullview-groups {
    column-count: auto;
    column-gap: normal;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.sidebar-fullview-open .sidebar-fullview-group {
    background: transparent;
    border: 0;
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
}

body.sidebar-fullview-open .sidebar-group-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.94rem;
    padding-inline: 0;
}

body.sidebar-fullview-open .sidebar-fullview-group-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 56px;
    padding: 0.95rem 1.15rem;
    width: 100%;
}

body.sidebar-fullview-open .sidebar-fullview-group[data-fullview-selected="true"] .sidebar-fullview-group-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

body.sidebar-fullview-open .sidebar-group-chevron {
    color: rgba(255, 255, 255, 0.7);
}

body.sidebar-fullview-open .sidebar-fullview-group-menu {
    display: none !important;
}

body.sidebar-fullview-open .sidebar-fullview-content {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    display: grid;
    gap: 1rem;
    min-height: 420px;
    padding: 1rem;
}

body.sidebar-fullview-open .sidebar-fullview-panels {
    display: grid;
}

body.sidebar-fullview-open .sidebar-fullview-content[hidden] {
    display: none !important;
}

body.sidebar-fullview-open .sidebar-fullview-content-head {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    min-height: 44px;
    padding: 0 0.25rem 0.85rem;
}

body.sidebar-fullview-open .sidebar-fullview-content-head strong {
    color: #fff;
    font-size: 1.1rem;
}

body.sidebar-fullview-open .sidebar-fullview-links {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

body.sidebar-fullview-open .sidebar-fullview-links .sidebar-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    min-height: 72px;
    padding: 0.85rem 1rem;
}

body.sidebar-fullview-open .sidebar-fullview-links .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: none;
}

body.sidebar-fullview-open .sidebar-fullview-links .sidebar-link-icon {
    height: 44px;
    width: 44px;
}

body.sidebar-fullview-open .sidebar-fullview-links .sidebar-link-copy strong {
    font-size: 0.95rem;
}

body.sidebar-fullview-open .sidebar-fullview-links .sidebar-link-copy small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    line-height: 1.2;
}

@media (max-width: 991.98px) {
    body.sidebar-fullview-open .sidebar-fullview-panel {
        border-radius: 0;
        height: 100vh;
        inset: 0;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        width: 100vw;
    }

    body.sidebar-fullview-open .sidebar-fullview-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    body.sidebar-fullview-open .sidebar-brand {
        padding-inline-start: 4rem;
    }

    body.sidebar-fullview-open .sidebar-fullview-groups {
        grid-template-columns: 1fr;
    }

    body.sidebar-fullview-open .sidebar-fullview-content {
        min-height: 320px;
    }
}

@media (max-width: 419.98px) {
    body.sidebar-fullview-open .sidebar-fullview-links {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-fullview-overlay,
    .sidebar-fullview-button {
        transition: none;
    }
}

.shell-main {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    max-width: 100%;
}

.topbar {
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(219, 228, 239, 0.9);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 15;
}

.topbar-start,
.topbar-end {
    align-items: center;
    display: flex;
    flex: 1 1 320px;
    flex-wrap: wrap;
    min-width: 0;
    gap: 0.85rem;
}

.topbar-end {
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-inline-start: auto;
}

.topbar-page-indicator {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.topbar-page-indicator span {
    color: var(--text-faint);
    font-size: 0.76rem;
    font-weight: 700;
}

.topbar-page-indicator strong {
    color: var(--text);
    font-size: 0.98rem;
}

.topbar-page-indicator.success strong {
    color: var(--success);
}

.topbar-search {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    gap: 0.65rem;
    flex: 1 1 320px;
    max-width: 100%;
    min-width: min(280px, 38vw);
    padding: 0.85rem 1rem;
}

.topbar-search i {
    color: var(--text-faint);
}

.topbar-search input {
    background: transparent;
    border: 0;
    color: var(--text);
    outline: none;
    width: 100%;
}

.topbar-link {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    display: inline-flex;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0 1rem;
}

body.admin-theme .topbar-end > .topbar-link,
body.admin-theme .topbar-end > .topbar-logout-form .topbar-link,
body.admin-theme .topbar-end > .language-switcher .language-switcher-form,
body.admin-theme .topbar-end > .theme-switcher,
body.admin-theme .topbar-end > .topbar-notifications {
    min-height: 38px;
}

body.admin-theme .topbar-end > .topbar-link,
body.admin-theme .topbar-end > .topbar-logout-form .topbar-link,
body.admin-theme .topbar-end > .topbar-notifications,
body.admin-theme .topbar-end > .global-search-trigger {
    gap: 0;
    justify-content: center;
    min-width: 38px;
    padding: 0;
    width: 38px;
}

.topbar-logout-form {
    margin: 0;
}

.topbar-link-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.18);
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.topbar-link-danger:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.26);
    color: var(--danger);
}

.topbar-notifications {
    position: relative;
}

.topbar-counter {
    align-items: center;
    background: var(--danger);
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 800;
    height: 22px;
    justify-content: center;
    left: -4px;
    min-width: 22px;
    padding-inline: 0.25rem;
    position: absolute;
    top: -4px;
}

.topbar-counter.success {
    background: var(--success);
}

.topbar-user {
    align-items: center;
    display: inline-flex;
    gap: 0.75rem;
}

.topbar-user-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    gap: 0.75rem;
    min-height: 44px;
    padding: 0.25rem 0.45rem 0.25rem 0.75rem;
    position: relative;
}

.topbar-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--primary), #7b96f6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.topbar-avatar-photo {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: transparent;
}

body.admin-theme .topbar-user-card {
    gap: .55rem;
    min-height: 40px;
}

body.admin-theme .topbar-user {
    gap: .55rem;
}

body.admin-theme .topbar-avatar {
    height: 34px;
    width: 34px;
}

body.admin-theme .topbar-user strong {
    font-size: .9rem;
}

body.admin-theme .topbar-user small {
    font-size: .76rem;
}

.topbar-avatar.success {
    background: linear-gradient(135deg, var(--success), #26b480);
}

.topbar-user strong {
    display: block;
    font-size: 0.96rem;
}

.topbar-user small {
    color: var(--text-faint);
    display: block;
}

.topbar-user-photo-only {
    position: relative;
}

.topbar-user-photo-only .topbar-user-hovercard {
    background: rgba(17, 24, 39, 0.96);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
    color: #fff;
    inset-inline-start: calc(100% + 0.65rem);
    min-width: 160px;
    opacity: 0;
    padding: 0.65rem 0.8rem;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    visibility: hidden;
    z-index: 30;
}

.topbar-user-photo-only .topbar-user-hovercard strong,
.topbar-user-photo-only .topbar-user-hovercard small {
    color: #fff;
    white-space: nowrap;
}

.topbar-user-photo-only:hover .topbar-user-hovercard,
.topbar-user-photo-only:focus-within .topbar-user-hovercard {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    visibility: visible;
}

.topbar-user-card:has(.topbar-user-photo-only) {
    min-width: auto;
    padding: 0.25rem;
}

.topbar-user-card:has(.topbar-user-photo-only) .topbar-avatar {
    height: 38px;
    width: 38px;
}

html[dir="rtl"] .topbar-user-photo-only .topbar-user-hovercard {
    inset-inline-end: calc(100% + 0.65rem);
    inset-inline-start: auto;
    transform: translateY(-50%) translateX(-8px);
}

html[dir="rtl"] .topbar-user-photo-only:hover .topbar-user-hovercard,
html[dir="rtl"] .topbar-user-photo-only:focus-within .topbar-user-hovercard {
    transform: translateY(-50%) translateX(0);
}

.page-shell {
    display: grid;
    gap: 1.1rem;
    min-width: 0;
    padding: 1.15rem 1.5rem 1.5rem;
}

.page-shell-compact {
    gap: 0.75rem;
    padding-top: 0.85rem;
}

.content-header {
    align-items: start;
    background: linear-gradient(135deg, var(--theme-banner-start) 0%, var(--theme-banner-end) 100%);
    border-radius: var(--radius-xl);
    color: #fff;
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    overflow: hidden;
    padding: 1.35rem 1.5rem;
    position: relative;
}

.content-header-compact {
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.content-header::after {
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 42%);
    content: "";
    inset: 0;
    position: absolute;
}

.employee-content-header {
    background: linear-gradient(135deg, var(--theme-banner-start) 0%, var(--theme-banner-end) 100%);
}

.content-header > * {
    position: relative;
    z-index: 1;
}

.content-header-kicker {
    color: rgba(255, 255, 255, 0.84);
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.content-header-title {
    color: #fff;
    font-size: clamp(1.85rem, 3vw, 2.8rem);
    margin-bottom: 0.45rem;
}

.content-header-compact .content-header-kicker {
    margin-bottom: 0.35rem;
}

.content-header-compact .content-header-title {
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);
    margin-bottom: 0.3rem;
}

.content-header-text {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1rem;
    max-width: 760px;
}

.content-header-compact .content-header-text {
    margin-bottom: 0.6rem;
}

.content-header-no-meta {
    justify-content: flex-start;
}

.content-header-no-meta > div:first-child {
    max-width: 100%;
}

.content-header-no-meta .content-header-text {
    margin-bottom: 0.7rem;
}

.breadcrumb-list {
    align-items: center;
    color: rgba(255, 255, 255, 0.86);
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-list li:not(:last-child)::before {
    color: rgba(255, 255, 255, 0.58);
    content: "/";
    margin-inline-start: 0.6rem;
}

.breadcrumb-list .is-active {
    color: #fff;
    font-weight: 700;
}

.content-header-meta {
    display: grid;
    gap: 0.8rem;
    min-width: 220px;
}

.meta-card {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
}

.content-header-compact .content-header-meta {
    gap: 0.6rem;
    min-width: 190px;
}

.content-header-compact .meta-card {
    padding: 0.7rem 0.9rem;
}

.content-header-compact .meta-card strong {
    font-size: 0.92rem;
}

.meta-card span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.meta-card strong {
    color: #fff;
    font-size: 1rem;
}

.meta-card.soft {
    background: rgba(255, 255, 255, 0.08);
}

.meta-card.success-soft {
    background: rgba(255, 255, 255, 0.12);
}

.app-content {
    display: grid;
    gap: 1.5rem;
}

.app-content-compact {
    gap: 0.9rem;
}

.app-content > * {
    min-width: 0;
}

.entity-page {
    display: grid;
    gap: 1rem;
}

.entity-page-wide {
    max-width: 100%;
}

.employee-profile-shell {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.employee-profile-header,
.employee-profile-tabs-card,
.employee-profile-tab-content .showcase-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.employee-profile-header {
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--theme-banner-start) 86%, black 14%) 0%,
            color-mix(in srgb, var(--theme-banner-end) 92%, white 8%) 100%
        );
    color: #fff;
    overflow: hidden;
    position: relative;
}

.employee-profile-header::after {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 38%);
    content: "";
    inset: 0;
    position: absolute;
}

.employee-profile-header > * {
    position: relative;
    z-index: 1;
}

.employee-profile-header-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    padding: 1.35rem;
}

.employee-profile-photo-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.player-profile-emblem {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 34%),
        linear-gradient(
            145deg,
            color-mix(in srgb, var(--theme-banner-end) 90%, white 10%),
            color-mix(in srgb, var(--theme-banner-start) 88%, black 12%)
        );
    color: #fff;
}

.employee-profile-photo-frame {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    overflow: hidden;
}

.player-profile-emblem-inner {
    align-items: center;
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    min-height: 220px;
    padding: 1rem;
    text-align: center;
}

.player-profile-emblem-number {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1;
}

.player-profile-emblem-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0;
}

.employee-profile-photo {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.employee-profile-photo-meta {
    display: grid;
    gap: 0.55rem;
}

.employee-profile-main {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.employee-profile-kicker,
.employee-profile-tabs-kicker {
    color: rgba(255, 255, 255, 0.76);
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.employee-profile-title {
    color: #fff;
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
}

.employee-profile-subtitle {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
    margin: 0.3rem 0 0;
}

.employee-profile-title-row {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.employee-profile-badges,
.employee-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.employee-profile-details-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-profile-details-grid .detail-item {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.employee-profile-details-grid .detail-item span {
    color: rgba(255, 255, 255, 0.62);
}

.employee-profile-details-grid .detail-item strong {
    color: #fff;
}

.player-profile-header-grid-lite {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-profile-tabs-card {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.1rem 1.1rem;
}

.employee-profile-tabs-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.employee-profile-tabs-title {
    font-size: 1.08rem;
}

.employee-profile-tabs-text {
    color: var(--text-faint);
    margin: 0;
    max-width: 560px;
}

.employee-profile-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.employee-profile-tabs .nav-link {
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 800;
    white-space: nowrap;
}

.employee-profile-tabs .nav-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.employee-profile-tab-content {
    display: grid;
    gap: 1rem;
}

.employee-profile-section {
    scroll-margin-top: 120px;
}

.employee-profile-alert {
    margin-bottom: 0;
}

.employee-profile-alert-stack {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.employee-profile-tab-content .showcase-card {
    padding-bottom: 1rem;
}

.employee-profile-tab-content .panel-header {
    padding-bottom: 1rem;
}

.employee-profile-tab-content .empty-state {
    padding: 2.5rem 1.5rem;
}

.employee-profile-tab-content .table-shell {
    padding-bottom: 0.75rem;
}

.contract-profile-card {
    display: grid;
    gap: 1rem;
}

.contract-profile-top {
    align-items: start;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fe 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.1rem 1.2rem;
}

.contract-profile-summary {
    display: grid;
    gap: 0.5rem;
    min-width: min(100%, 420px);
}

.contract-profile-summary h4 {
    font-size: 1.15rem;
}

.contract-profile-summary p {
    margin: 0;
}

.contract-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contract-profile-total {
    align-items: end;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: grid;
    gap: 0.25rem;
    min-width: 220px;
    padding: 0.95rem 1rem;
    text-align: start;
}

.contract-profile-total span {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.contract-profile-total strong {
    font-size: 1.45rem;
}

.contract-profile-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contract-finance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contract-profile-notes {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
}

.contract-profile-notes span {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.contract-profile-notes strong {
    font-weight: 600;
}

.salary-profile-card {
    display: grid;
    gap: 1rem;
}

.salary-profile-top {
    align-items: start;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 260px;
    padding: 1.1rem;
}

.salary-profile-summary {
    display: grid;
    gap: 0.5rem;
}

.salary-profile-summary h4 {
    font-size: 1.15rem;
}

.salary-profile-summary p {
    margin: 0;
}

.salary-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.salary-profile-total {
    align-items: end;
    background: linear-gradient(135deg, rgba(46, 124, 255, 0.12), rgba(46, 124, 255, 0.04));
    border: 1px solid rgba(46, 124, 255, 0.2);
    border-radius: 20px;
    display: grid;
    gap: 0.35rem;
    justify-items: end;
    padding: 1rem;
    text-align: end;
}

.salary-profile-total span {
    color: var(--text-soft);
    font-size: 0.82rem;
}

.salary-profile-total strong {
    color: var(--primary);
    font-size: 1.5rem;
}

.salary-profile-grid {
    display: grid;
    gap: 0.85rem;
}

.salary-profile-notes {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: grid;
    gap: 0.4rem;
    padding: 1rem 1.1rem;
}

.salary-profile-notes span {
    color: var(--text-soft);
    font-size: 0.82rem;
}

.salary-profile-notes strong {
    font-weight: 600;
}

.salary-history-latest {
    background: rgba(46, 124, 255, 0.06);
}

.end-of-service-latest {
    background: rgba(220, 53, 69, 0.06);
}

.entity-page-narrow {
    margin-inline: auto;
    max-width: 1080px;
    width: 100%;
}

.entity-page-header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.entity-page-kicker {
    color: var(--primary);
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.entity-page-title {
    font-size: clamp(1.55rem, 2vw, 2rem);
    margin-bottom: 0.35rem;
}

.entity-page-text {
    margin: 0;
    max-width: 720px;
}

.entity-page-shell {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.entity-page-head,
.employee-profile-section-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.entity-page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.report-export-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.entity-details-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.detail-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-card {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
}

.detail-card span {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-card strong {
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
    word-break: break-word;
}

.detail-card small {
    color: var(--text-faint);
}

.detail-card-wide {
    grid-column: 1 / -1;
}

.metric-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.empty-state-panel {
    align-items: center;
    display: grid;
    gap: 0.6rem;
    justify-items: center;
    padding: 1.5rem;
    text-align: center;
}

.empty-state-panel.surface-card,
.search-empty-state,
.portal-empty-state {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.empty-state-panel.compact,
.search-empty-state.compact,
.portal-empty-state.compact {
    padding: 1.25rem;
}

.empty-state-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 18px;
    color: var(--primary);
    display: inline-flex;
    font-size: 1.6rem;
    height: 64px;
    justify-content: center;
    width: 64px;
}

.empty-state-title {
    font-size: 1.05rem;
    margin: 0;
}

.empty-state-subtitle {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin: 0;
}

.empty-state-text {
    color: var(--text-soft);
    margin: 0;
    max-width: 520px;
}

.text-fallback {
    color: var(--text-faint);
}

.text-fallback.is-empty {
    color: var(--text-faint);
    font-style: normal;
}

.summary-cards-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
}

.summary-card strong {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
}

.summary-card small {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 600;
}

.report-launch-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.report-launch-card-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.report-launch-icon {
    align-items: center;
    border-radius: 16px;
    display: inline-flex;
    font-size: 1.15rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.report-launch-title {
    font-size: 1.03rem;
    font-weight: 800;
    margin: 0;
}

.report-launch-text {
    color: var(--text-soft);
    margin: 0;
    min-height: 42px;
}

.report-launch-footnote {
    margin: 0;
}

.summary-label {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.showcase-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.showcase-grid > .employee-profile-section:last-child {
    grid-column: 1 / -1;
}

.approval-step-list,
.approval-history-list {
    display: grid;
    gap: 0.85rem;
}

.approval-step-item,
.approval-history-item {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.approval-step-item.is-current {
    background: var(--primary-soft);
    border-color: rgba(58, 109, 240, 0.18);
}

.approval-step-badge,
.approval-history-icon {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.approval-step-body,
.approval-history-body {
    display: grid;
    gap: 0.55rem;
}

.approval-step-head,
.approval-history-head {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.approval-step-head h4,
.approval-history-head h4 {
    font-size: 1rem;
    margin: 0;
}

.approval-step-head p,
.approval-history-head p {
    color: var(--text-soft);
    margin: 0.15rem 0 0;
}

.approval-step-meta,
.approval-history-note {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
}

.approval-step-meta span {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.approval-history-note {
    display: block;
}

.approval-history-note + .approval-history-note {
    margin-top: 0.35rem;
}

.entity-page-side {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.page-header-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    min-height: 36px;
    padding: 0 0.85rem;
}

.page-header-badge.primary {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.page-header-badge.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.page-header-badge.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.entity-form-shell {
    display: grid;
    gap: 1rem;
}

.entity-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    display: grid;
    overflow: hidden;
}

.entity-form-card-head {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fd 100%);
    border-bottom: 1px solid #e8eef7;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
   
}

.entity-form-card-head h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.entity-form-card-head p {
    margin: 0;
}

.entity-form-card-body,
.entity-form-card-foot {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.entity-form-card-body .form-field {
    grid-column: span 6;
}

.entity-form-card-body .form-field-full,
.entity-form-card-body .form-field-span-full {
    grid-column: 1 / -1;
}

.entity-form-card-foot {
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fd 100%);
    border-top: 1px solid #e8eef7;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.entity-form-sections {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.entity-form-actions {
    align-items: center;
    border-top: 1px solid #e8eef7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    padding: 1rem 1.25rem 1.25rem;
}

.employee-create-shell {
    display: grid;
    gap: 0.9rem;
    margin-inline: auto;
    max-width: 980px;
    width: 100%;
}

.employee-create-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.employee-create-header-copy {
    display: grid;
    gap: 0.45rem;
}

.employee-create-breadcrumb {
    align-items: center;
    color: var(--text-faint);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.82rem;
}

.employee-create-breadcrumb strong {
    color: var(--text);
}

.employee-create-title {
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    line-height: 1.25;
}

.employee-create-description {
    margin: 0;
    max-width: 760px;
}

.employee-create-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.employee-create-form {
    display: grid;
}

.employee-create-card {
    background: var(--surface);
    border: 1px solid #dde7f2;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.employee-create-card-head {
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    border-bottom: 1px solid #e8eef7;
    padding: 1.15rem 1.35rem;
}

.employee-create-card-head h2 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.employee-create-card-head p {
    margin: 0;
}

.employee-create-card-body {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
}

.employee-create-actions {
    align-items: center;
    border-top: 1px solid #e8eef7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    padding: 1rem 1.15rem 1.15rem;
}

.compact-alert {
    border: 1px solid rgba(220, 76, 100, 0.18);
    box-shadow: none;
    padding: 0.95rem 1rem;
}

.surface-card,
.surface-panel,
.app-content > form,
.app-content > .card,
.app-content > .alert,
.app-content > table,
.app-content > .table-responsive,
.app-content .table-shell,
.quick-action-card,
.metric-card,
.showcase-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding:0.7rem;
}

.surface-panel,
.app-content > form,
.app-content > .card,
.showcase-card {
    overflow: hidden;
}

.panel-header {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    /*padding: 1.35rem 1.5rem 0;*/
}

.panel-header + * {
    padding-inline: 1.5rem;
}

.panel-title {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.panel-text {
    color: var(--text-soft);
    margin: 0;
}

.panel-actions,
.toolbar-row,
.form-actions,
.inline-actions,
.page-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.toolbar-row {
    justify-content: space-between;
    padding: 1rem 1.5rem 0;
}

.toolbar-search {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    gap: 0.65rem;
    min-width: min(360px, 100%);
    padding: 0.82rem 1rem;
}

.toolbar-search input,
.toolbar-search select {
    background: transparent;
    border: 0;
    outline: none;
    width: 100%;
}

.table-actions {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.icon-btn {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-soft);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.icon-btn:hover {
    background: var(--surface-accent);
    border-color: var(--border-strong);
    color: var(--text);
}

.icon-btn.danger {
    background: var(--danger-soft);
    border-color: transparent;
    color: var(--danger);
}

.toolbar-chip {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    padding: 0.45rem 0.9rem;
}

.toolbar-chip.is-active {
    background: var(--primary-soft);
    border-color: rgba(34, 81, 209, 0.22);
    color: var(--primary-dark);
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    min-width: 0;
}

.metric-card {
    padding: 1.35rem;
    position: relative;
}

.metric-card::before {
    background: linear-gradient(135deg, rgba(34, 81, 209, 0.08), transparent);
    content: "";
    inset: 0;
    position: absolute;
}

.metric-card > * {
    position: relative;
    z-index: 1;
}

.metric-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.metric-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 14px;
    color: var(--primary);
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.metric-label {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
}

.metric-foot {
    color: var(--text-faint);
    font-size: 0.86rem;
    margin-top: 0.8rem;
}

.dashboard-page {
    gap: 1.2rem;
    min-width: 0;
}

.dashboard-role-section {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
}

.dashboard-role-section + .dashboard-role-section {
    margin-top: 0.25rem;
}

.dashboard-role-section-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-role-section-note {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.admin-main-screen-page {
    display: grid;
    gap: 1.25rem;
}

.admin-main-screen-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-main-screen-card {
    min-height: 96px;
}

.admin-main-screen-card small {
    display: block;
    line-height: 1.6;
}

.dashboard-priority-strip,
.dashboard-focus-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    min-width: 0;
}

.dashboard-priority-card,
.dashboard-focus-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #fbfdff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.65rem;
    padding: 1.1rem;
}

.dashboard-priority-card.dashboard-card-highlight,
.dashboard-focus-card.dashboard-card-highlight {
    border-color: rgba(34, 81, 209, 0.24);
    box-shadow: 0 16px 32px rgba(34, 81, 209, 0.08);
}

.dashboard-priority-label {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
    margin: 0;
}

.dashboard-priority-value,
.dashboard-focus-value {
    color: var(--text);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.dashboard-priority-desc,
.dashboard-focus-desc {
    color: var(--text-soft);
    font-size: 0.88rem;
    margin: 0;
}

.dashboard-priority-foot {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.dashboard-priority-link {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-priority-icon,
.dashboard-focus-icon {
    align-items: center;
    background: var(--surface-muted);
    border-radius: 14px;
    color: var(--primary);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.dashboard-priority-icon.bg-primary,
.dashboard-focus-icon.primary {
    background: var(--primary);
    color: #ffffff;
}

.dashboard-priority-icon.bg-success,
.dashboard-focus-icon.success {
    background: var(--success);
    color: #ffffff;
}

.dashboard-priority-icon.bg-warning,
.dashboard-focus-icon.warning {
    background: var(--warning);
    color: #1f2937;
}

.dashboard-priority-icon.bg-danger,
.dashboard-focus-icon.danger {
    background: var(--danger);
    color: #ffffff;
}

.dashboard-priority-icon.bg-info,
.dashboard-focus-icon.info {
    background: #0ea5e9;
    color: #ffffff;
}

.dashboard-priority-icon.bg-secondary,
.dashboard-focus-icon.secondary {
    background: #64748b;
    color: #ffffff;
}

.dashboard-panel-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-stack {
    display: grid;
    gap: 1rem;
}

.dashboard-hero {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 252, 255, 0.98) 100%),
        radial-gradient(circle at top right, rgba(34, 81, 209, 0.10), transparent 18rem),
        radial-gradient(circle at bottom left, rgba(15, 138, 102, 0.09), transparent 14rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    min-width: 0;
    padding: 1.4rem;
}

@media (max-width: 767.98px) {
    .admin-dashboard-hero {
        display: none !important;
    }
}

.dashboard-hero-main {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

.dashboard-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.dashboard-chip {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    display: inline-flex;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.dashboard-chip i {
    color: var(--primary);
}

.dashboard-hero-side {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1.1rem;
}

.dashboard-hero-status {
    display: grid;
    gap: 0.45rem;
}

.dashboard-hero-status-label {
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 800;
}

.dashboard-hero-status p {
    color: var(--text-faint);
    margin: 0;
}

.dashboard-hero-actions {
    display: grid;
    gap: 0.65rem;
}

.dashboard-hero-actions .btn {
    justify-content: flex-start;
}

.checklist-list {
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist-list li {
    align-items: flex-start;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    display: flex;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
}

.checklist-list li i {
    margin-top: 0.1rem;
}

.dashboard-section {
    display: grid;
    gap: 1rem;
}

.dashboard-section-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-section-head .panel-text {
    max-width: 56rem;
}

.dashboard-pending-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.dashboard-pending-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 0.9rem;
    padding: 1.2rem;
}

.dashboard-pending-head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.dashboard-pending-icon,
.dashboard-card-icon,
.dashboard-activity-icon,
.dashboard-quick-icon {
    align-items: center;
    border-radius: 16px;
    color: #ffffff;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.dashboard-pending-icon.bg-warning,
.dashboard-pending-icon.bg-info,
.dashboard-pending-icon.bg-secondary,
.dashboard-card-icon.bg-warning,
.dashboard-card-icon.bg-info,
.dashboard-card-icon.bg-secondary,
.dashboard-activity-icon.bg-warning,
.dashboard-activity-icon.bg-info,
.dashboard-activity-icon.bg-secondary,
.dashboard-quick-icon.bg-warning,
.dashboard-quick-icon.bg-info,
.dashboard-quick-icon.bg-secondary {
    color: #1f2937;
}

.dashboard-pending-title {
    font-size: 1rem;
    margin: 0;
}

.dashboard-pending-text {
    color: var(--text-soft);
    margin: 0;
}

.dashboard-pending-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

.dashboard-pending-time {
    color: var(--text-faint);
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-activity-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-activity-item {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1rem 1.1rem;
}

.dashboard-activity-body {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.dashboard-activity-top {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: space-between;
}

.dashboard-activity-top strong {
    font-size: 0.98rem;
}

.dashboard-activity-body p {
    color: var(--text-soft);
    margin: 0;
}

.dashboard-activity-meta {
    align-items: center;
    color: var(--text-faint);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.84rem;
    font-weight: 700;
    gap: 0.75rem;
}

.metric-value-long {
    font-size: 1.45rem;
    line-height: 1.35;
    word-break: break-word;
}

.dashboard-card-highlight {
    border-color: rgba(34, 81, 209, 0.28);
    box-shadow: 0 10px 24px rgba(34, 81, 209, 0.08);
}

.table-shell {
    padding: 0 1.5rem 1.5rem;
}

.table-responsive {
    border-radius: var(--radius-md);
}

.table {
    margin-bottom: 0;
    width: 100%;
}

.table-modern thead th,
.table thead th {
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 1rem 0.95rem;
    white-space: nowrap;
}

.table-modern tbody td,
.table tbody td {
    border-bottom: 1px solid #edf2f7;
    padding: 1rem 0.95rem;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: #fafcff;
}

.employee-history-latest {
    background: rgba(34, 81, 209, 0.045);
}

.table-primary {
    align-items: center;
    display: flex;
    gap: 0.8rem;
}

.table-avatar {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 14px;
    color: var(--primary);
    display: inline-flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.table-avatar.table-avatar-photo {
    background: #fff;
    overflow: hidden;
    padding: 0;
}

.table-avatar.table-avatar-photo img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.table-avatar.success {
    background: var(--success-soft);
    color: var(--success);
}

.table-title {
    color: var(--text);
    display: block;
    font-weight: 700;
}

.table-subtitle {
    color: var(--text-faint);
    display: block;
    font-size: 0.84rem;
}

.status-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0 0.8rem;
}

.status-badge.primary {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.status-badge.success {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-badge.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-badge.secondary {
    background: var(--surface-muted);
    color: var(--text-soft);
}

.status-badge.info {
    background: #e8f4ff;
    color: #1767b5;
}

.status-badge.dark {
    background: #e9edf3;
    color: #425466;
}

.actions-cluster {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
    min-height: 46px;
    padding-inline: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-sm {
    min-height: 36px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 16px 30px -24px rgba(var(--primary-rgb), 0.95);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-color: var(--primary-dark);
    color: #fff;
    box-shadow: 0 18px 32px -24px rgba(var(--primary-rgb), 0.9);
}

.btn-primary:focus-visible,
.btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.24);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.72), rgba(var(--primary-rgb), 0.56));
    border-color: rgba(var(--primary-rgb), 0.72);
    color: rgba(255, 255, 255, 0.92);
}

.btn-outline-primary {
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary,
.show > .btn-outline-primary.dropdown-toggle {
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
    border-color: var(--primary);
    color: #fff;
}

.btn-soft-primary,
.btn-soft-danger,
.btn-soft-success,
.btn-soft-warning,
.btn-soft-secondary {
    border: 1px solid transparent;
}

.btn-soft-primary {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.btn-soft-secondary {
    background: var(--surface-muted);
    border-color: var(--border);
    color: var(--text-soft);
}

.btn-soft-success {
    background: var(--success-soft);
    color: var(--success);
}

.btn-soft-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.btn-soft-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.stack-form {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
}

.form-card-head {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;

    margin-right: 0.95rem;
    margin-left: 0.8rem;
}

.form-card-head p {
    margin: 0.35rem 0 0;
}

.form-grid,
.details-grid,
.summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.reports-summary-grid {
    grid-template-columns: minmax(0, 1fr);
}

.reports-summary-grid > article {
    grid-column: 1 / -1;
}

.form-section,
.details-section {
    background: var(--surface-muted);
    border: 1px solid #e6edf6;
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.section-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.section-subtitle {
    color: var(--text-faint);
    font-size: 0.88rem;
    margin: 0 0 1rem;
}

.field-span-12 { grid-column: span 12; }
.field-span-8 { grid-column: span 8; }
.field-span-6 { grid-column: span 6; }
.field-span-4 { grid-column: span 4; }
.field-span-3 { grid-column: span 3; }

.form-label {
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.form-control,
.form-select {
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    min-height: 48px;
    padding-inline: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(34, 81, 209, 0.36);
    box-shadow: 0 0 0 0.2rem rgba(34, 81, 209, 0.12);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-check.modern-check {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: inline-flex;
    gap: 0.6rem;
    margin: 0;
    min-height: 48px;
    padding: 0.75rem 1rem;
}

.form-check.modern-check .form-check-input {
    float: none;
    margin: 0;
}

.account-active-check {
    align-items: center;
    direction: inherit;
    line-height: 1.4;
    width: fit-content;
}

[dir="rtl"] .account-active-check {
    flex-direction: row-reverse;
}

.account-active-check .form-check-input {
    flex: 0 0 auto;
    margin: 0;
    position: static;
}

.account-active-check .form-check-label {
    margin: 0;
    padding: 0;
}

.form-actions {
    justify-content: flex-start;
    padding-top: 0.25rem;
}

.form-section-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #e6edf6;
    border-radius: 20px;
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.employee-form-section-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #e5edf7;
    border-radius: 20px;
    display: grid;
    gap: 0.9rem;
    padding: 1.15rem;
}

.employee-form-section-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.employee-form-section-title {
    font-size: 1.02rem;
    margin-bottom: 0.2rem;
}

.employee-form-section-text {
    color: var(--text-faint);
    font-size: 0.88rem;
    margin: 0;
}

.form-section-card-head {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.form-section-card-head .section-subtitle {
    margin-bottom: 0;
}

.section-chip {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 800;
    min-height: 34px;
    padding: 0 0.8rem;
    white-space: nowrap;
}

.form-section-grid {
    display: grid;
    gap: 1rem 1.25rem;
}

.form-section-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-form-grid {
    display: grid;
    gap: 1rem 1.1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-form-field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.employee-form-field-full {
    grid-column: 1 / -1;
}

.employee-form-field .form-control,
.employee-form-field .form-select,
.employee-form-field textarea.form-control {
    width: 70%;
}

.document-form-grid .form-control,
.document-form-grid .form-select,
.document-upload-controls .form-control,
.document-upload-controls .form-select,
.document-upload-grid .form-control,
.document-upload-grid .form-select {
    width: 100%;
}

.employee-form-field textarea.form-control {
    min-height: 104px;
}

.shift-form-section {
    gap: 1rem;
}

.shift-form-grid .form-control,
.shift-form-grid .form-select {
    text-align: right;
}

.shift-active-check {
    width: fit-content;
}

.department-form-section {
    gap: 1rem;
}

.department-form-grid-single {
    grid-template-columns: 1fr;
}

.department-active-check {
    width: fit-content;
}

.attendance-form-section {
    gap: 1rem;
}

.attendance-form-grid .form-control,
.attendance-form-grid .form-select {
    text-align: right;
}

.shift-assignment-form-section {
    gap: 1rem;
}

.shift-assignment-filters {
    align-items: center;
}

.shift-assignment-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.shift-assignment-filter-select {
    min-width: 200px;
}

.shift-assignment-current-check {
    width: fit-content;
}

.form-field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.form-field-span-full {
    grid-column: 1 / -1;
}

.form-field .form-control,
.form-field .form-select {
    width: 100%;
}

 


.form-field textarea.form-control {
    min-height: 112px;
}

.required-dot {
    color: var(--danger);
    font-weight: 800;
}

.employee-form-field.is-required > .form-label::after {
    content: " *";
    color: var(--danger);
    font-weight: 800;
}

.field-note {
    color: var(--text-faint);
    font-size: 0.82rem;
    margin: 0;
}

.submit-flow-actions-wrap {
    display: grid;
    gap: 0.75rem;
}

.submit-flow-actions {
    align-items: center;
    flex-wrap: wrap;
}

.submit-flow-note {
    margin: 0;
}

button.is-loading,
input.is-loading {
    opacity: 0.9;
    cursor: progress;
}

.submit-button-spinner {
    width: 1rem;
    height: 1rem;
}

.submit-button-spinner + span {
    margin-inline-start: 0.5rem;
}

.employee-photo-uploader {
    display: grid;
    gap: 0.85rem;
}

.employee-photo-preview-card {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border: 1px solid #e2eaf5;
    border-radius: 18px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 132px minmax(0, 1fr);
    padding: 0.95rem;
}

.employee-photo-preview-shell {
    align-items: center;
    aspect-ratio: 1;
    background: #fff;
    border: 1px dashed #cfdced;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    width: 132px;
}

.employee-photo-preview {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.employee-photo-preview-copy {
    display: grid;
    gap: 0.3rem;
}

.employee-photo-preview-copy strong {
    color: var(--text);
    font-size: 1rem;
}

.employee-photo-preview-copy span {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.employee-photo-upload-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.employee-photo-browse {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    position: relative;
}

.employee-photo-file-input {
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
}

.employee-photo-url {
    direction: ltr;
    text-align: left;
}

.document-create-shell {
    display: grid;
    gap: 1rem;
}

.document-create-header {
    margin-bottom: 0.25rem;
}

.document-form-shell {
    display: grid;
}

.document-form-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #e6edf6;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.document-form-body {
    display: grid;
    gap: 1rem;
}

.document-form-section {
    gap: 1rem;
}

.document-form-grid {
    align-items: start;
}

.document-field-span-12 {
    grid-column: 1 / -1;
}

.document-input {
    min-height: 50px;
}

.document-upload-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.document-upload-panel {
    min-width: 0;
}

.document-upload-controls {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.document-file-row {
    align-items: stretch;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.document-path-input {
    flex: 1 1 320px;
    direction: ltr;
    text-align: left;
}

.document-browse-btn {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    position: relative;
}

.document-file-input {
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
}

.document-preview-shell {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
    border: 1px solid #e1e9f4;
    border-radius: 20px;
    display: grid;
    min-height: 300px;
    overflow: hidden;
    position: relative;
}

.document-preview-shell-large {
    min-height: 360px;
}

.document-preview-image,
.document-preview-pdf {
    height: 100%;
    inset: 0;
    object-fit: contain;
    width: 100%;
}

.document-preview-pdf {
    border: 0;
}

.document-preview-empty {
    align-items: center;
    color: var(--text-soft);
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    padding: 1.5rem;
    text-align: center;
}

.document-preview-empty i {
    color: var(--primary);
    font-size: 2rem;
}

.document-preview-empty strong {
    color: var(--text);
}

.document-preview-empty span {
    font-size: 0.88rem;
}

.document-preview-panel {
    min-width: 0;
}

.document-sample-note,
.document-notes-panel {
    align-items: flex-start;
    background: var(--surface-muted);
    border: 1px solid #e4ebf5;
    border-radius: 18px;
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
}

.document-sample-note i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 0.15rem;
}

.document-sample-note strong {
    display: block;
    margin-bottom: 0.25rem;
}

.document-sample-note p {
    margin: 0;
}

.document-notes-panel {
    display: grid;
}

.document-notes-text {
    margin: 0;
    color: var(--text);
    white-space: pre-wrap;
}

.document-actions {
    padding-top: 0.25rem;
}

.document-actions .btn {
    min-width: 82px;
}

.table-entity {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.table-entity-icon {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 14px;
    color: var(--primary);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.table-entity-icon.soft {
    background: var(--success-soft);
    color: var(--success);
}

.table-entity strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 800;
}

.table-entity small {
    color: var(--text-soft);
    display: block;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.file-path-link {
    color: var(--primary);
    direction: ltr;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-shell {
    padding: 0 1.5rem 1.5rem;
}

.surface-panel[data-table-root] .panel-header,
.surface-panel[data-table-root] .toolbar-row {
    padding-inline: 1.25rem;
}

.surface-panel[data-table-root] .table-shell {
    padding-inline: 1.25rem;
}

.surface-panel[data-table-root] .table-responsive {
    border: 1px solid #e6edf6;
}

.surface-panel[data-table-root] .table thead th {
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fd 100%);
}

.surface-panel .empty-state {
    padding: 2.5rem 1.5rem;
}

.details-grid {
    gap: 0.9rem;
}

.detail-item {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.metric-card,
.quick-action-card,
.showcase-card {
    border-color: #e5edf7;
}

.details-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-item {
    background: var(--surface-muted);
    border: 1px solid #e6edf6;
    border-radius: 14px;
    padding: 1rem;
}

.detail-item span {
    color: var(--text-faint);
    display: block;
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.detail-item strong {
    color: var(--text);
    display: block;
    font-size: 0.98rem;
}

.detail-primary-head {
    align-items: flex-start;
}

.detail-header-photo {
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.detail-header-photo-frame,
.detail-header-photo-empty {
    align-items: center;
    border-radius: 16px;
    display: flex;
    height: 70px;
    justify-content: center;
    overflow: hidden;
    width: 70px;
}

.detail-header-photo-frame {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e3ebf6;
    padding: 0.25rem;
}

.detail-header-photo-image {
    border-radius: 12px;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.detail-header-photo-empty {
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border: 1px dashed #d3dfef;
    color: var(--text-faint);
}

.detail-header-photo-empty i {
    font-size: 1.5rem;
}

.empty-state {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state i {
    color: var(--primary);
    font-size: 2rem;
}

.quick-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-action-card {
    display: grid;
    gap: 0.9rem;
    padding: 1.35rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.quick-action-icon {
    align-items: center;
    background: var(--surface-accent);
    border-radius: 16px;
    color: var(--primary);
    display: inline-flex;
    height: 50px;
    justify-content: center;
    width: 50px;
}

.showcase-card {
    padding-bottom: 1.5rem;
}

.showcase-card .panel-header {
    padding-bottom: 0;
}

.summary-list {
    display: grid;
    gap: 0.8rem;
    padding: 1rem 1.5rem 0;
}

.summary-row {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid #eaf0f6;
    border-radius: 14px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.95rem 1rem;
}

.summary-row strong {
    font-size: 0.96rem;
}

.login-page {
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(34, 81, 209, 0.18), transparent 22rem),
        radial-gradient(circle at bottom left, rgba(15, 138, 102, 0.14), transparent 18rem),
        linear-gradient(135deg, #edf3ff 0%, #ffffff 52%, #f0faf5 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.login-shell {
    width: min(100%, 1080px);
}

.login-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
}

.login-showcase,
.login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-showcase {
    background: linear-gradient(160deg, #0f2346 0%, #1d4ed8 100%);
    color: #fff;
    display: grid;
    gap: 1.5rem;
    padding: 2rem;
    position: relative;
}

.login-showcase::after {
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 40%);
    content: "";
    inset: 0;
    position: absolute;
}

.login-showcase > * {
    position: relative;
    z-index: 1;
}

.login-showcase h2,
.login-showcase h3 {
    color: #fff;
}

.login-showcase p,
.login-showcase li {
    color: rgba(255, 255, 255, 0.82);
}

.login-feature-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.login-feature {
    align-items: start;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 44px minmax(0, 1fr);
}

.login-feature-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.login-card-body {
    display: grid;
    gap: 1.25rem;
    padding: 2rem;
}

.login-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.85rem;
}

.login-brand h1 {
    font-size: 1.7rem;
}

.login-brand p {
    margin: 0.2rem 0 0;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-form .form-label {
    display: block;
    margin-bottom: 0.4rem;
}

.login-meta {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
}

.login-meta-item {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.login-meta-item strong {
    color: var(--text);
}

.alert {
    border-radius: 16px;
}

.text-danger,
.field-validation-error,
.validation-summary-errors {
    color: var(--danger) !important;
    font-size: 0.88rem;
}

@media (max-width: 1199.98px) {
    .content-header {
        flex-direction: column;
    }

    .content-header-meta {
        min-width: 100%;
    }

    .employee-profile-header-grid {
        grid-template-columns: 1fr;
    }

    .employee-profile-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contract-profile-grid,
    .contract-finance-grid,
    .salary-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    body.admin-theme .content-header {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar,
    .mobile-nav-drawer {
        height: 100dvh;
        inset-block: 0;
        inset-inline-end: 0;
        max-width: none;
        width: min(88vw, 320px);
        position: fixed;
        transform: translateX(calc(100% + 1rem));
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease;
        z-index: 30;
    }

    body.sidebar-open .sidebar,
    body.mobile-nav-open .sidebar,
    body.mobile-nav-open .mobile-nav-drawer,
    body.mobile-shell-open .sidebar {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-scroll-indicator {
        opacity: 1;
    }

    body.sidebar-open .shell-backdrop,
    body.mobile-nav-open .shell-backdrop,
    body.mobile-utility-open .shell-backdrop,
    body.mobile-shell-open .shell-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .topbar {
        padding: 1rem;
    }

    .sidebar-close {
        display: inline-flex;
    }

    .sidebar-restore-button {
        display: none !important;
    }

    .public-hero {
        grid-template-columns: 1fr;
    }

    body.mobile-utility-enhanced .topbar .topbar-search[data-mobile-utility-source],
    body.mobile-utility-enhanced .topbar .topbar-end[data-mobile-utility-source] {
        display: none !important;
    }

    .mobile-utility-drawer {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 22px;
        box-shadow: var(--shadow-lg);
        display: grid;
        gap: .8rem;
        max-height: calc(100dvh - 6.5rem);
        min-height: 0;
        overflow: hidden;
        padding: 0.9rem;
        pointer-events: none;
        position: fixed;
        inset-block: 0.85rem;
        inset-inline-start: 0;
        width: min(78vw, 338px);
        z-index: 31;
        transform: translateX(-110%);
        visibility: hidden;
    }

    html[dir="rtl"] .mobile-utility-drawer {
        inset-inline-start: auto;
        inset-inline-end: 0;
        transform: translateX(110%);
    }

    body.mobile-utility-open .mobile-utility-drawer {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-utility-drawer-head {
        align-items: center;
        display: flex;
        justify-content: space-between;
        gap: .75rem;
    }

    .mobile-utility-drawer-head strong {
        color: var(--text);
        font-size: 1rem;
        font-weight: 800;
    }

    .mobile-utility-close {
        align-items: center;
        background: rgba(15, 23, 42, 0.06);
        border: 0;
        border-radius: 14px;
        color: var(--text);
        display: inline-flex;
        height: 2.75rem;
        justify-content: center;
        transition: background .2s ease, transform .2s ease;
        width: 2.75rem;
    }

    .mobile-utility-close:hover {
        background: rgba(15, 23, 42, 0.1);
        transform: translateY(-1px);
    }

    .mobile-utility-drawer-body {
        align-content: start;
        align-items: start;
        display: grid;
        gap: .7rem;
        grid-auto-rows: max-content;
        min-height: 0;
        overflow: auto;
        padding-inline-end: .15rem;
    }

    .mobile-utility-drawer .topbar-search[data-mobile-utility-source] {
        display: flex !important;
        align-items: center;
        border-radius: 999px;
        height: 3.2rem;
        margin-inline: auto;
        min-width: 0;
        min-height: 3.2rem;
        padding: 0.58rem 0.82rem;
        width: 82%;
    }

    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] {
        align-items: stretch;
        display: grid;
        gap: .55rem;
        justify-content: stretch;
        margin-inline-start: 0;
        width: 100%;
    }

    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] > * {
        width: 100%;
    }

    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] > a,
    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] > form,
    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] > div,
    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] > details {
        width: 100%;
    }

    .mobile-utility-drawer .topbar-link,
    .mobile-utility-drawer .language-switcher-form,
    .mobile-utility-drawer .topbar-user-card,
    .mobile-utility-drawer .topbar-notifications,
    .mobile-utility-drawer .topbar-search {
        width: 100%;
        max-width: none;
    }

    .mobile-utility-drawer .topbar-link,
    .mobile-utility-drawer .topbar-user-card {
        justify-content: flex-start;
    }

    .mobile-utility-drawer .topbar-link,
    .mobile-utility-drawer .theme-switcher-menu summary,
    .mobile-utility-drawer .language-switcher-option {
        align-items: center;
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .mobile-utility-drawer .topbar-link,
    .mobile-utility-drawer .topbar-notifications,
    .mobile-utility-drawer .global-search-trigger {
        box-sizing: border-box;
        height: 2.9rem;
        min-height: 2.9rem;
        min-width: 100%;
        gap: 0.7rem;
        padding-inline: 0.9rem;
        width: 100% !important;
    }

    .mobile-utility-drawer .topbar-logout-form {
        width: 100%;
    }

    .mobile-utility-drawer .topbar-logout-form .topbar-link {
        width: 100% !important;
    }

    .mobile-utility-drawer .language-switcher-form {
        background: transparent;
        border: 0;
        box-shadow: none;
        display: grid;
        gap: 0.45rem;
        min-height: auto;
        padding: 0;
    }

    .mobile-utility-drawer .language-switcher-option {
        background: #fff;
        align-items: center;
        border: 1px solid var(--border);
        border-radius: 999px;
        display: inline-flex;
        gap: 0.65rem;
        height: 2.9rem;
        justify-content: flex-start;
        padding-inline: 0.9rem;
        width: 100%;
    }

    .mobile-utility-drawer .language-switcher-flag {
        height: 0.95rem;
        width: 0.95rem;
    }

    .mobile-utility-drawer .theme-switcher {
        min-height: auto;
        width: 100%;
    }

    .mobile-utility-drawer .theme-switcher-menu summary {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 999px;
        box-sizing: border-box;
        height: 2.9rem;
        min-height: 2.9rem;
        min-width: 100%;
        padding: 0 0.9rem;
        width: 100% !important;
    }

    .mobile-utility-drawer .theme-switcher-swatch {
        height: 1rem;
        width: 1rem;
    }

    .mobile-utility-drawer .topbar-user-card {
        min-height: 2.7rem;
        padding: 0.35rem 0.75rem;
    }

    .mobile-utility-drawer .visually-hidden {
        border: 0 !important;
        clip: rect(0, 0, 0, 0) !important;
        clip-path: inset(50%) !important;
        height: 1px !important;
        margin: -1px !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
        white-space: nowrap !important;
        width: 1px !important;
    }

    .mobile-utility-drawer .topbar-link::after,
    .mobile-utility-drawer .theme-switcher-menu summary::after,
    .mobile-utility-drawer .language-switcher-option::after {
        color: var(--text);
        display: block;
        flex: 1 1 auto;
        font-size: 0.92rem;
        font-weight: 700;
        line-height: 1.2;
        margin-inline-start: 0.75rem;
        order: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: start;
        white-space: nowrap;
    }

    .mobile-utility-drawer .topbar-link::after,
    .mobile-utility-drawer .theme-switcher-menu summary::after {
        content: attr(aria-label);
    }

    .mobile-utility-drawer .language-switcher-option::after {
        content: attr(aria-label);
    }

    .mobile-utility-drawer .topbar-user-card .topbar-avatar,
    .mobile-utility-drawer .topbar-user-card .topbar-avatar-photo {
        height: 2.3rem;
        width: 2.3rem;
    }

    .mobile-utility-drawer .topbar-link i,
    .mobile-utility-drawer .topbar-notifications i,
    .mobile-utility-drawer .global-search-trigger i,
    .mobile-utility-drawer .theme-switcher-menu summary i,
    .mobile-utility-drawer .language-switcher-flag,
    .mobile-utility-drawer .theme-switcher-swatch {
        flex: 0 0 auto;
        order: 0;
        opacity: 1;
        visibility: visible;
    }

    .mobile-utility-drawer .topbar-link i,
    .mobile-utility-drawer .topbar-notifications i,
    .mobile-utility-drawer .global-search-trigger i,
    .mobile-utility-drawer .theme-switcher-menu summary i {
        display: inline-flex;
        font-size: 1rem;
        justify-content: center;
        width: 1rem;
    }

    .mobile-utility-drawer .topbar-user {
        justify-content: flex-start;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard {
        background: transparent;
        box-shadow: none;
        color: var(--text);
        inset: auto;
        min-width: 0;
        opacity: 1;
        padding: 0;
        pointer-events: auto;
        position: static;
        transform: none;
        visibility: visible;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard strong,
    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard small {
        color: var(--text);
        white-space: normal;
    }

    .mobile-utility-drawer .topbar-user-card {
        align-items: center;
        border-radius: 999px;
        display: flex;
        min-height: 2.9rem;
    }

    .mobile-utility-drawer .topbar-user-card .topbar-user {
        align-items: center;
        display: flex;
        flex-direction: row-reverse;
        gap: 0.75rem;
        width: 100%;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard {
        align-items: center;
        display: flex;
        flex: 1 1 auto;
        gap: 0.35rem;
        justify-content: flex-start;
        min-width: 0;
        white-space: nowrap;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard strong,
    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard small {
        display: inline-block;
        line-height: 1.2;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard small {
        order: 1;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard small::after {
        content: " - ";
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard strong {
        font-size: 0.95rem;
        order: 2;
    }

    .mobile-utility-drawer .topbar-user-photo-only .topbar-user-hovercard small {
        color: var(--text-faint);
        font-size: 0.76rem;
    }

    .mobile-utility-drawer .topbar-search input {
        line-height: 1.2;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.94rem;
    }

    .mobile-utility-drawer .topbar-search i {
        font-size: 0.95rem;
    }

    .mobile-nav-toggle,
    .mobile-utility-toggle,
    .mobile-shell-toggle {
        display: inline-flex;
    }

    .topbar-search {
        min-width: 0;
        width: 100%;
    }

    .topbar-start,
    .topbar-end {
        flex: 1 1 auto;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .mobile-utility-drawer {
        width: min(76vw, 316px);
    }

    .mobile-utility-drawer .topbar-search[data-mobile-utility-source] {
        width: 78%;
    }

    .mobile-utility-drawer .topbar-end[data-mobile-utility-source] {
        gap: 0.45rem;
    }

    .mobile-utility-drawer .topbar-link,
    .mobile-utility-drawer .topbar-notifications,
    .mobile-utility-drawer .global-search-trigger {
        min-height: 2.7rem;
    }

    .mobile-utility-drawer .language-switcher-option {
        height: 2.7rem;
    }

    .mobile-utility-drawer .theme-switcher-menu summary {
        min-height: 2.7rem;
        padding: 0 0.8rem;
    }

    .mobile-utility-drawer .topbar-user-card .topbar-avatar,
    .mobile-utility-drawer .topbar-user-card .topbar-avatar-photo {
        height: 2.1rem;
        width: 2.1rem;
    }

    .page-shell {
        padding: 1rem;
    }

    .entity-page-header,
    .employee-create-header,
    .entity-form-card-head,
    .employee-form-section-head,
    .form-section-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-profile-title-row,
    .employee-profile-tabs-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-profile-details-grid {
        grid-template-columns: 1fr;
    }

    .entity-form-card-body .form-field,
    .entity-form-card-body .form-field-full,
    .entity-form-card-body .form-field-span-full {
        grid-column: 1 / -1;
    }

    .contract-profile-top {
        padding: 1rem;
    }

    .salary-profile-top {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .contract-profile-grid,
    .contract-finance-grid,
    .salary-profile-grid {
        grid-template-columns: 1fr;
    }

    .summary-cards-grid {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-grid > .employee-profile-section:last-child {
        grid-column: auto;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-start,
    .topbar-end,
    .toolbar-row,
    .form-actions,
    .page-toolbar {
        align-items: stretch;
        width: 100%;
    }

    .topbar-end,
    .toolbar-row,
    .form-actions,
    .page-toolbar {
        justify-content: stretch;
    }

    .public-topbar-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
    }

    .topbar-link,
    .topbar-user-card,
    .toolbar-search,
    .btn {
        width: 100%;
    }

    .topbar-user {
        justify-content: flex-start;
    }

    .panel-header,
    .toolbar-row {
        padding-inline: 1rem;
    }

    .table-shell,
    .summary-list {
        padding-inline: 1rem;
    }

    .stack-form,
    .login-card-body {
        padding: 1.25rem;
    }

    .field-span-8,
    .field-span-6,
    .field-span-4,
    .field-span-3 {
        grid-column: span 12;
    }

    .form-section-grid-2 {
        grid-template-columns: 1fr;
    }

    .employee-form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-span-full {
        grid-column: auto;
    }

    .employee-form-field-full {
        grid-column: auto;
    }

    .employee-photo-preview-card {
        grid-template-columns: 1fr;
    }

    .employee-photo-preview-shell {
        width: 100%;
    }

    .summary-row,
    .login-meta-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        padding: 1.15rem;
    }

    .dashboard-section-head,
    .dashboard-pending-head,
    .dashboard-activity-item,
    .dashboard-activity-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-activity-item {
        grid-template-columns: 1fr;
    }

    .dashboard-chip-row {
        gap: 0.5rem;
    }

    .dashboard-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-hero-actions .btn,
    .dashboard-pending-card .btn {
        width: 100%;
    }

    .metric-value-long {
        font-size: 1.25rem;
    }

    .employee-profile-actions {
        width: 100%;
    }

    .employee-profile-actions .btn {
        width: 100%;
    }

    .table-responsive {
        overflow-x: auto;
    }
}

.portal-alert {
    border-radius: 18px;
    padding-inline: 1rem;
}

.portal-empty-state {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
}

.portal-empty-state i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: .15rem;
}

.portal-context-links,
.employee-profile-context-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.employee-profile-context-links {
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.employee-profile-context-label {
    display: block;
    width: 100%;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
}

.portal-context-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: #fff;
    color: var(--body-color);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
    transition: .15s ease;
}

.portal-context-link:hover {
    background: rgba(13, 110, 253, .06);
    border-color: rgba(13, 110, 253, .18);
    color: var(--body-color);
    transform: translateY(-1px);
}

.portal-attachment-item {
    align-items: flex-start;
}

.portal-attachment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .45rem;
}

.portal-attachment-meta .status-badge {
    font-size: .78rem;
}

.portal-activity-item.active {
    border-color: rgba(13, 110, 253, .25);
    background: rgba(13, 110, 253, .03);
}

/* Global Search / Command Palette */
.global-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.global-search-trigger kbd,
.search-shortcut-hint kbd {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .5rem;
    padding: .15rem .45rem;
    font-size: .72rem;
    background: rgba(255, 255, 255, .7);
    color: inherit;
}

.global-search-modal .modal-content,
.global-search-modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, .18);
    overflow: hidden;
}

.global-search-modal .modal-header {
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 1));
}

.modal-kicker,
.panel-kicker,
.search-page-meta-chip,
.search-result-group-icon,
.search-command-icon,
.search-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-kicker,
.panel-kicker {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted, #6c757d);
    margin-bottom: .35rem;
}

.global-search-input-shell {
    position: relative;
}

.global-search-input-shell i,
.search-page-input-shell i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1rem;
    color: var(--text-muted, #6c757d);
    z-index: 2;
}

.global-search-input-shell .form-control,
.search-page-input-shell .form-control {
    padding-right: 2.75rem;
}

.global-search-modal-actions,
.search-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.global-search-modal-results {
    margin-top: 1rem;
}

.search-page-shell {
    display: grid;
    gap: 1rem;
}

.search-header-panel {
    padding: 1.25rem;
}

.search-page-form {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1rem;
}

.search-page-input-shell {
    position: relative;
    flex: 1 1 320px;
}

.search-page-meta-chip {
    gap: .4rem;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .05);
    font-size: .85rem;
}

.search-results-shell {
    display: grid;
    gap: 1rem;
}

.search-history-shell {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
}

.search-history-panel,
.search-history-panel-inline {
    display: grid;
    gap: 1rem;
}

.search-history-panel {
    padding: 1.25rem;
}

.search-history-block {
    display: grid;
    gap: .75rem;
}

.search-history-title {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 800;
    color: #0f172a;
}

.search-history-list,
.search-recent-searches {
    display: grid;
    gap: .65rem;
}

.search-recent-searches {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.search-recent-chip,
.search-history-empty {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .7rem .85rem;
    border-radius: .85rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.search-recent-chip {
    justify-content: space-between;
}

.search-recent-chip span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-recent-chip small,
.search-result-match-hint {
    color: var(--text-muted, #6c757d);
    font-size: .78rem;
}

.search-history-empty {
    justify-content: center;
    border-style: dashed;
    color: var(--text-muted, #6c757d);
}

.search-results-shell.is-compact {
    gap: .75rem;
}

.search-results-panel {
    padding: 1.25rem;
}

.search-commands-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.search-command-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .95rem 1rem;
    border-radius: .9rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.search-command-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 .75rem 1.5rem rgba(15, 23, 42, .08);
    border-color: rgba(13, 110, 253, .2);
}

.search-command-card.is-active,
.search-result-item.is-active,
.search-recent-chip.is-active {
    border-color: rgba(13, 110, 253, .45);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
}

.search-command-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    background: rgba(13, 110, 253, .08);
    color: #0d6efd;
    flex: 0 0 auto;
}

.search-command-copy {
    display: grid;
    gap: .2rem;
    flex: 1 1 auto;
    min-width: 0;
}

.search-command-copy strong,
.search-result-item-copy strong,
.search-result-group-title-shell h3 {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

.search-command-copy small,
.search-result-item-copy small,
.search-result-group-title-shell p,
.search-result-item-meta,
.search-empty-state p {
    color: var(--text-muted, #6c757d);
}

.search-result-group {
    display: grid;
    gap: .85rem;
    margin-top: 1.2rem;
}

.search-result-group:first-child {
    margin-top: 0;
}

.search-result-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.search-result-group-title-shell {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.search-result-group-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    background: rgba(15, 23, 42, .05);
    flex: 0 0 auto;
}

.search-result-group-title-shell p {
    margin: .15rem 0 0;
    font-size: .85rem;
}

.search-result-list {
    display: grid;
    gap: .75rem;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .95rem 1rem;
    border-radius: .9rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.search-result-item:hover {
    border-color: rgba(13, 110, 253, .2);
    box-shadow: 0 .75rem 1.5rem rgba(15, 23, 42, .06);
}

.search-result-item-icon {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: .8rem;
    background: rgba(13, 110, 253, .08);
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.search-result-item-copy {
    display: grid;
    gap: .15rem;
    flex: 1 1 auto;
    min-width: 0;
}

.search-result-item-meta {
    font-size: .82rem;
}

.search-result-item-side {
    display: grid;
    justify-items: end;
    gap: .35rem;
    flex: 0 0 auto;
    text-align: end;
}

.search-empty-state {
    display: grid;
    justify-items: center;
    gap: .65rem;
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed rgba(15, 23, 42, .12);
    border-radius: 1rem;
    background: rgba(248, 250, 252, .7);
}

.search-empty-state-loading,
.search-empty-state-error {
    min-height: 220px;
}

.search-empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    font-size: 1.4rem;
}

.search-empty-state strong {
    font-size: 1.05rem;
}

.settings-option-row {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    background: rgba(248, 250, 252, .78);
}

.settings-option-row .form-check-input {
    width: 3.25rem;
    height: 1.65rem;
    cursor: pointer;
}

.settings-option-row .form-check-label {
    cursor: pointer;
}

.payslip-print-sheet {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
    color: #0f172a;
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
}

.payslip-head {
    align-items: start;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 1rem;
}

.payslip-head h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: .25rem 0;
}

.payslip-head p,
.payslip-kicker,
.payslip-period span,
.payslip-info-grid span,
.payslip-footer-note {
    color: #64748b;
}

.payslip-kicker {
    font-size: .85rem;
    font-weight: 700;
}

.payslip-period {
    align-items: flex-end;
    display: grid;
    gap: .35rem;
    min-width: 180px;
    text-align: end;
}

.payslip-period strong {
    font-size: 1.15rem;
}

.payslip-section {
    display: grid;
    gap: .85rem;
}

.payslip-section-title {
    font-weight: 800;
}

.payslip-info-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payslip-info-grid > div {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 12px;
    display: grid;
    gap: .25rem;
    padding: .85rem;
}

.payslip-info-grid strong {
    font-size: .98rem;
}

.payslip-table th {
    width: 45%;
}

.payslip-net-row th,
.payslip-net-row td {
    background: rgba(37, 99, 235, .08) !important;
    font-size: 1.05rem;
    font-weight: 800;
}

.payslip-footer-note {
    border-top: 1px dashed rgba(15, 23, 42, .18);
    font-size: .9rem;
    padding-top: .9rem;
}

@media (max-width: 767.98px) {
    .payslip-print-sheet {
        border-radius: 14px;
        padding: 1rem;
    }

    .payslip-head {
        display: grid;
    }

    .payslip-period {
        justify-items: start;
        text-align: start;
    }

    .payslip-info-grid {
        grid-template-columns: 1fr;
    }
}

.manager-dashboard-workbench {
    margin-bottom: 1.25rem;
}

.manager-dashboard-workbench .portal-dashboard-grid {
    align-items: start;
}

.manager-dashboard-workbench .portal-activity-item {
    min-height: auto;
}

@media (max-width: 767.98px) {
    .manager-dashboard-workbench {
        padding: 1rem;
        border-radius: 16px;
    }

    .manager-dashboard-workbench .form-card-head {
        gap: .75rem;
        margin-bottom: 1rem;
    }

    .manager-dashboard-workbench .portal-summary-grid {
        gap: .75rem;
    }

    .manager-dashboard-workbench .portal-summary-card,
    .manager-dashboard-workbench .portal-panel,
    .manager-dashboard-workbench .portal-activity-item {
        padding: .85rem;
    }

    .manager-dashboard-workbench .portal-activity-title-row {
        align-items: flex-start;
        gap: .5rem;
    }

    .global-search-trigger span,
    .global-search-trigger kbd {
        display: none;
    }

    .search-page-form,
    .global-search-modal-actions,
    .search-page-meta,
    .search-history-shell,
    .search-result-group-head,
    .search-result-item {
        align-items: stretch;
    }

    .search-history-shell {
        grid-template-columns: 1fr;
    }

    .search-result-item {
        flex-direction: column;
    }

    .search-result-item-side {
        justify-items: start;
        text-align: start;
    }
}

.admin-ops-dashboard {
    display: grid;
    gap: 1rem;
}

    .admin-ops-dashboard .portal-panel.surface-card,
    .admin-ops-dashboard .dashboard-summary-card.surface-card,
    .admin-ops-dashboard .portal-quick-link-card.surface-card {
        padding-top: 1.15rem;
         
    }

.dashboard-summary-icon {
    padding-right: 0.7rem;
}

.admin-ops-dashboard .form-card-head,
.admin-ops-dashboard .dashboard-role-section-head {
    align-items: start;
    gap: .4rem;
    margin-bottom: 1rem;
}

.admin-ops-dashboard .form-card-head > div,
.admin-ops-dashboard .dashboard-role-section-head > div {
    display: grid;
    gap: .25rem;
}

.admin-ops-dashboard .entity-page-kicker {
    display: block;
    margin-bottom: .15rem;
}

.admin-ops-dashboard .panel-title {
    line-height: 1.3;
    margin: 0;
}

    .admin-ops-dashboard .admin-dashboard-side-card {
        padding-block-start: 1.25rem;
       
    }

    .admin-ops-dashboard .admin-dashboard-side-card-header {
        display: flex;
        flex-direction: column;
        gap: .4rem;
        margin-bottom: .9rem;


        margin-right: .9rem;
        margin-left: .9rem;
    }

.admin-ops-dashboard .admin-dashboard-side-card-header > div {
    display: grid;
    gap: .25rem;
}

.admin-ops-dashboard .admin-dashboard-side-card-kicker {
    display: block;
    margin-bottom: 0;
}

.admin-ops-dashboard .admin-dashboard-side-card-title {
    line-height: 1.35;
    margin: 0;
}

.admin-ops-dashboard .admin-dashboard-side-card-body {
    margin-top: .15rem;
}

.admin-ops-hero {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1.25rem;
}

.admin-ops-hero-main {
    min-width: 0;
}

.admin-ops-hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

.admin-ops-kpi-grid,
.admin-ops-snapshot-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-ops-kpi-card {
    align-items: flex-start;
    display: flex;
    gap: .85rem;
    min-height: auto;
    padding: 1.05rem 1rem .95rem;
}

.admin-ops-kpi-card p {
    color: var(--text-soft);
    font-size: .82rem;
    font-weight: 700;
    margin: 0 0 .3rem;
}

.admin-ops-kpi-card strong {
    color: var(--text-strong);
    display: block;
    font-size: 1.35rem;
    line-height: 1.15;
}

.admin-ops-kpi-card > div {
    display: grid;
    gap: .2rem;
    padding-top: .05rem;
}

.admin-ops-visuals {
    display: grid;
    gap: 1rem;
}

.admin-ops-visual-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-ops-donut-card,
.admin-ops-bar-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, white 12%), color-mix(in srgb, var(--surface-muted) 90%, white 10%));
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    min-height: 100%;
    padding: 1rem;
}

.admin-ops-donut-stack {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(0, 1fr);
    height: 100%;
}

.admin-ops-donut {
    --chart-value: 0;
    --chart-accent: var(--primary);
    --chart-track: #e6edf6;
    align-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at center, #ffffff 0 56%, transparent 57%),
        conic-gradient(var(--chart-accent) 0 calc(var(--chart-value) * 1%), var(--chart-track) 0 100%);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--chart-accent) 18%, transparent 82%),
        0 10px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    flex: 0 0 138px;
    place-items: center;
    position: relative;
    width: 138px;
}

.admin-ops-donut::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
    border-radius: 50%;
    content: "";
    inset: 16px;
    position: absolute;
    z-index: 0;
}

.admin-ops-donut-primary {
    --chart-accent: var(--primary);
}

.admin-ops-donut-success {
    --chart-accent: var(--success);
}

.admin-ops-donut-warning {
    --chart-accent: var(--warning);
}

.admin-ops-donut > div {
    display: grid;
    gap: .2rem;
    justify-items: center;
    position: relative;
    text-align: center;
    z-index: 2;
}

.admin-ops-donut strong {
    color: var(--text-strong);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
}

.admin-ops-donut span,
.admin-ops-donut-copy p {
    color: var(--text-soft);
    font-size: .8rem;
    margin: 0;
}

.admin-ops-donut-copy {
    display: grid;
    gap: .35rem;
}

.admin-ops-donut-copy h3,
.admin-ops-bar-card h3 {
    color: var(--text-strong);
    font-size: 1rem;
    margin: 0;
}

.admin-ops-donut-copy strong {
    color: var(--text-strong);
    font-size: 1.2rem;
}

.admin-ops-bar-card {
    display: grid;
    gap: 1rem;
}

.admin-ops-bar-card-head {
    align-items: start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.admin-ops-bar-list {
    display: grid;
    gap: .9rem;
}

.admin-ops-bar-row {
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-ops-bar-label {
    align-items: center;
    color: var(--text-strong);
    display: inline-flex;
    gap: .55rem;
    min-width: 0;
}

.admin-ops-bar-icon {
    align-items: center;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.admin-ops-bar-row strong {
    color: var(--text-strong);
    font-size: .95rem;
}

.employee-directory-showcase {
    --employee-card-min-width: 230px;
    --employee-card-photo-size: 76px;
    --employee-card-name-size: .9rem;
    --employee-card-role-size: .78rem;
    --employee-card-meta-size: .84rem;
    display: grid;
    gap: .85rem;
    margin-bottom: 1rem;
}

.employee-directory-showcase-head {
    align-items: start;
    display: flex;
    justify-content: space-between;
}

.employee-directory-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(var(--employee-card-min-width), 1fr));
}

.employee-directory-card {
    align-items: stretch;
    display: grid;
    gap: .75rem;
    grid-template-columns: var(--employee-card-photo-size) minmax(0, 1fr);
    overflow: hidden;
    padding: .7rem;
}

.employee-directory-photo-link {
    border-radius: 20px;
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.employee-directory-photo {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    display: block;
    height: calc(var(--employee-card-photo-size) - 8px);
    object-fit: cover;
    width: 100%;
}

.employee-directory-content {
    display: grid;
    gap: .65rem;
    min-width: 0;
}

.employee-directory-top {
    align-items: start;
    display: flex;
    gap: .55rem;
    justify-content: space-between;
}

.employee-directory-heading {
    min-width: 0;
}

.employee-directory-heading h4 {
    color: var(--text-strong);
    font-size: var(--employee-card-name-size);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 .18rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-directory-heading p {
    color: var(--text-soft);
    font-size: var(--employee-card-role-size);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-directory-code-text {
    color: var(--text-soft);
    font-size: var(--employee-card-role-size);
    font-weight: 700;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-directory-meta {
    display: grid;
    gap: .4rem;
}

.employee-directory-meta-item {
    align-items: center;
    color: var(--text-soft);
    display: inline-flex;
    font-size: var(--employee-card-meta-size);
    gap: .45rem;
    min-width: 0;
}

.employee-directory-meta-item i {
    color: var(--primary);
    flex: 0 0 auto;
    font-size: .88rem;
}

.employee-directory-meta-item a,
.employee-directory-meta-item span {
    color: inherit;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-directory-meta-item a:hover {
    color: var(--primary);
}

.employee-directory-footer {
    align-items: center;
    display: flex;
    gap: .55rem;
    justify-content: flex-end;
}

.employee-directory-card .status-badge {
    font-size: .72rem;
    padding: .22rem .55rem;
}

.employee-directory-card .actions-cluster {
    gap: .35rem;
}

.employee-directory-card .btn.btn-sm {
    font-size: .76rem;
    padding: .34rem .62rem;
}

.employee-directory-icon-btn {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.employee-directory-icon-btn i {
    font-size: .95rem;
    line-height: 1;
}

.employee-directory-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: space-between;
}

.employee-directory-pagination {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.employee-directory-page-btn {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(var(--primary-rgb), .18);
    border-radius: 999px;
    color: var(--text-soft);
    cursor: pointer;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 .65rem;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.employee-directory-page-btn.is-active,
.employee-directory-page-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.admin-ops-bar-track {
    background: color-mix(in srgb, var(--surface-muted) 88%, white 12%);
    border-radius: 999px;
    grid-column: 1 / -1;
    height: 10px;
    overflow: hidden;
}

.admin-ops-bar-fill {
    --bar-size: 0%;
    background: var(--primary);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--bar-size);
}

.admin-ops-bar-fill.is-success {
    background: linear-gradient(90deg, color-mix(in srgb, var(--success) 92%, white 8%), var(--success));
}

.admin-ops-bar-fill.is-warning {
    background: linear-gradient(90deg, color-mix(in srgb, var(--warning) 88%, white 12%), var(--warning));
}

.admin-ops-bar-fill.is-danger {
    background: linear-gradient(90deg, color-mix(in srgb, var(--danger) 92%, white 8%), var(--danger));
}

.admin-ops-bar-fill.is-info {
    background: linear-gradient(90deg, color-mix(in srgb, var(--info) 92%, white 8%), var(--info));
}

.admin-ops-kpi-icon,
.admin-ops-work-icon,
.admin-ops-audit-icon {
    align-items: center;
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.admin-ops-main-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.admin-ops-work-list,
.admin-ops-audit-list {
    display: grid;
    gap: .65rem;
}

.admin-ops-work-item,
.admin-ops-audit-item {
    align-items: start;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    color: inherit;
    display: grid;
    gap: .75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .95rem .75rem .85rem;
    text-decoration: none;
}

.admin-ops-work-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.admin-ops-work-body {
    display: grid;
    gap: .3rem;
    min-width: 0;
    padding-top: .05rem;
}

.admin-ops-work-body strong,
.admin-ops-audit-item strong {
    color: var(--text-strong);
    font-size: .95rem;
}

.admin-ops-work-body small,
.admin-ops-audit-item small,
.admin-ops-audit-item time {
    color: var(--text-soft);
    font-size: .8rem;
}

.admin-ops-work-count {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.admin-ops-facts {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.admin-ops-facts div,
.admin-ops-metric-row span {
    background: var(--surface-muted);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: .95rem .8rem .85rem;
}

.admin-ops-facts dt {
    color: var(--text-soft);
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.admin-ops-facts dd {
    color: var(--text-strong);
    font-weight: 800;
    margin: 0;
}

.admin-ops-metric-row {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-ops-metric-row span {
    color: var(--text-soft);
    display: grid;
    font-size: .82rem;
    gap: .3rem;
}

.admin-ops-metric-row strong {
    color: var(--text-strong);
    font-size: 1.35rem;
}

.admin-ops-audit-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.admin-ops-audit-item > div {
    display: grid;
    gap: .22rem;
    padding-top: .08rem;
}

.admin-ops-audit-icon {
    background: var(--text-strong);
    height: 38px;
    width: 38px;
}

.admin-ops-quick-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-attendance-preview-panel {
    display: grid;
    gap: 1rem;
}

.admin-attendance-preview-head {
    align-items: end;
}

.admin-attendance-preview-list {
    display: grid;
    gap: 0.8rem;
}

.admin-attendance-preview-row {
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(120px, 0.8fr)) auto;
    padding: 0.9rem 1rem;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-attendance-preview-row:hover {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border-soft) 72%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.admin-attendance-preview-employee {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
}

.admin-attendance-preview-avatar {
    align-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, white 84%), color-mix(in srgb, var(--primary) 8%, white 92%));
    border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent 86%);
    border-radius: 18px;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 52px;
    font-size: 0.95rem;
    font-weight: 800;
    height: 52px;
    justify-content: center;
    overflow: hidden;
    width: 52px;
}

.admin-attendance-preview-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.admin-attendance-preview-avatar > span {
    align-items: center;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.admin-attendance-preview-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.admin-attendance-preview-copy strong,
.admin-attendance-preview-meta strong {
    color: var(--text-strong);
    font-size: 0.96rem;
}

.admin-attendance-preview-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-attendance-preview-copy small,
.admin-attendance-preview-label {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.admin-attendance-preview-meta {
    display: grid;
    gap: 0.15rem;
}

.admin-attendance-preview-icon {
    color: var(--primary);
    font-size: 1rem;
}

.admin-ops-dashboard .dashboard-summary-card {
    align-items: start;
    padding: .7rem;
}

.admin-ops-dashboard .dashboard-summary-card > div {
    display: grid;
    gap: .2rem;
    padding-top: .1rem;
}

.admin-ops-dashboard .dashboard-summary-card h3 {
    line-height: 1.2;
    margin: 0;
}

.admin-ops-dashboard .dashboard-summary-card .dashboard-summary-title {
    margin-top: .1rem;
}

.admin-ops-dashboard .portal-quick-link-card {
    align-items: start;
    padding-top: 1rem;
}

.admin-ops-dashboard .portal-quick-link-card > span {
    display: grid;
    gap: .22rem;
    padding-top: .05rem;
}

.admin-hr-insights-section {
    display: grid;
    gap: 1rem;
}

.admin-hr-insights-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.4fr);
}

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

.admin-hr-metric-card {
    display: grid;
    gap: .85rem;
    padding: 1rem;
}

.admin-hr-metric-head {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.admin-hr-metric-head strong {
    color: var(--text-strong);
    font-size: 1.5rem;
    line-height: 1;
}

.admin-hr-metric-copy {
    display: grid;
    gap: .3rem;
}

.admin-hr-metric-copy h3 {
    color: var(--text-strong);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.admin-hr-metric-copy p {
    color: var(--text-soft);
    font-size: .86rem;
    margin: 0;
}

@media (max-width: 1199.98px) {
    .admin-ops-kpi-grid,
    .admin-ops-snapshot-grid,
    .admin-ops-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-attendance-preview-row {
        grid-template-columns: 1fr 1fr;
    }

    .admin-attendance-preview-icon {
        display: none;
    }

    .admin-ops-visual-grid {
        grid-template-columns: 1fr;
    }

    .admin-ops-main-grid {
        grid-template-columns: 1fr;
    }

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

    .employee-directory-showcase {
        --employee-card-min-width: 220px;
        --employee-card-photo-size: 70px;
    }
}

@media (max-width: 767.98px) {
    .admin-ops-hero {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .admin-ops-hero-actions {
        justify-content: stretch;
        
    }

    .admin-ops-hero-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .admin-ops-kpi-grid,
    .admin-ops-snapshot-grid,
    .admin-ops-quick-links,
    .admin-ops-visual-grid,
    .admin-hr-insights-grid,
    .admin-hr-metrics-grid,
    .admin-ops-facts,
    .admin-ops-metric-row {
        grid-template-columns: 1fr;
    }

    .admin-attendance-preview-head {
        align-items: start;
    }

    .admin-attendance-preview-row {
        grid-template-columns: 1fr;
    }

    .admin-ops-donut-stack,
    .admin-ops-kpi-card,
    .admin-ops-work-item,
    .admin-ops-audit-item,
    .admin-ops-dashboard .dashboard-summary-card,
    .admin-ops-dashboard .portal-quick-link-card {
        padding: .85rem .75rem .8rem;
    }

    .admin-ops-donut-stack {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .admin-ops-donut-copy {
        justify-items: center;
    }

    .admin-ops-audit-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-ops-audit-item time {
        grid-column: 2;
    }

    .employee-directory-card {
        grid-template-columns: 66px minmax(0, 1fr);
        padding: .65rem;
    }

    .employee-directory-top,
    .employee-directory-footer {
        align-items: start;
        flex-direction: column;
    }

    .employee-directory-footer .actions-cluster {
        width: 100%;
    }

    .employee-directory-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .employee-directory-pagination {
        justify-content: flex-start;
    }
}

.payroll-policy-page {
    display: grid;
    gap: 1.25rem;
}

.payroll-policy-page .panel-heading {
    align-items: flex-start;
    gap: 1rem;
}

.payroll-policy-form {
    display: grid;
    gap: 1rem;
}

.payroll-policy-validation:empty {
    display: none;
}

.payroll-policy-group {
    background: var(--surface-muted);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
}

.payroll-policy-group-header {
    display: grid;
    gap: .35rem;
}

.payroll-policy-kicker {
    color: var(--text-soft);
    font-size: .78rem;
    font-weight: 800;
}

.payroll-policy-group-header h3 {
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
    margin: 0;
}

.payroll-policy-grid,
.payroll-policy-toggle-grid,
.payroll-policy-mixed-grid {
    display: grid;
    gap: .9rem;
}

.payroll-policy-grid-basics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.payroll-policy-toggle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payroll-policy-mixed-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .75fr);
}

.payroll-policy-field,
.payroll-policy-toggle {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    min-width: 0;
    padding: .9rem;
}

.payroll-policy-field {
    display: grid;
    gap: .45rem;
}

.payroll-policy-field label {
    color: var(--text-strong);
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

.payroll-policy-field .form-control,
.payroll-policy-field .form-select {
    min-height: 44px;
    width: 100%;
}

.payroll-policy-field .text-danger {
    display: block;
    font-size: .78rem;
    line-height: 1.35;
}

.payroll-policy-toggle {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: .75rem;
    min-height: 74px;
}

.payroll-policy-toggle .form-check-input {
    flex: 0 0 auto;
    margin: .15rem 0 0;
}

.payroll-policy-toggle-copy {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.payroll-policy-toggle-copy strong {
    color: var(--text-strong);
    font-size: .9rem;
    font-weight: 850;
    line-height: 1.45;
}

.payroll-policy-toggle-inline {
    min-height: auto;
}

.payroll-policy-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: flex-end;
    padding-top: .25rem;
}

html[dir="rtl"] .payroll-policy-actions {
    justify-content: flex-start;
}

html[dir="rtl"] .payroll-policy-toggle {
    flex-direction: row;
}

.payroll-adjustment-input {
    min-width: 110px;
}

.payroll-adjustment-reason {
    min-width: 180px;
}

.payroll-adjustment-form {
    margin: 0;
}

.page-search-highlight {
    background: rgba(255, 193, 7, .35);
    border-radius: .25rem;
    box-decoration-break: clone;
    color: inherit;
    padding-inline: .1rem;
    -webkit-box-decoration-break: clone;
}

.attendance-exception-form,
.action-stack {
    display: grid;
    gap: .5rem;
    min-width: 14rem;
}

.attendance-exception-form .form-select,
.attendance-exception-form .form-control {
    min-width: 12rem;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.payroll-note-action {
    display: grid;
    gap: .5rem;
    min-width: min(18rem, 100%);
}

.payroll-note-action .form-control {
    min-width: 0;
}

.payroll-index-actions {
    align-items: center;
    gap: .4rem;
    max-width: 42rem;
}

.payroll-index-actions .btn,
.payroll-index-actions form {
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .payroll-index-actions {
        display: grid;
        grid-template-columns: 1fr;
        max-width: none;
    }

    .payroll-index-actions .btn,
    .payroll-index-actions form,
    .payroll-index-actions button {
        width: 100%;
    }

    .payroll-note-action {
        width: 100%;
    }
}

@media (max-width: 1199.98px) {
    .payroll-policy-grid-basics,
    .payroll-policy-toggle-grid,
    .payroll-policy-mixed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .payroll-policy-page {
        gap: 1rem;
    }

    .payroll-policy-page .panel-heading {
        align-items: stretch;
    }

    .payroll-policy-page .panel-heading > .btn {
        justify-content: center;
        width: 100%;
    }

    .payroll-policy-group {
        border-radius: 14px;
        gap: .85rem;
        padding: .9rem;
    }

    .payroll-policy-grid-basics,
    .payroll-policy-toggle-grid,
    .payroll-policy-mixed-grid {
        grid-template-columns: 1fr;
    }

    .payroll-policy-field,
    .payroll-policy-toggle {
        padding: .85rem;
    }

    .payroll-policy-toggle {
        min-height: 0;
    }

    .payroll-policy-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

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

/* HR V1.4 final cascade: keep the final polish rules last. */
@media (max-width: 767.98px) {
    .panel-actions,
    .entity-page-actions,
    .report-export-actions,
    .form-actions,
    .inline-actions,
    .page-toolbar {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .panel-actions .btn,
    .entity-page-actions .btn,
    .report-export-actions .btn,
    .form-actions .btn,
    .inline-actions .btn,
    .page-toolbar .btn,
    .panel-actions form,
    .entity-page-actions form {
        width: 100%;
    }

    .panel-actions form .btn,
    .entity-page-actions form .btn {
        justify-content: center;
        width: 100%;
    }

    .surface-panel .table-modern,
    .entity-details-shell .table-modern {
        min-width: 680px;
    }
}

.employee-profile-print-page {
    padding: 1.5rem;
}

.employee-profile-print-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-bottom: 1rem;
}

.employee-profile-print-sheet {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .08);
    color: #0f172a;
    margin-inline: auto;
    max-width: 1050px;
    padding: 1.35rem;
}

.employee-profile-print-title {
    align-items: flex-start;
    border-bottom: 1px solid rgba(148, 163, 184, .3);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding-bottom: 1rem;
}

.employee-profile-print-title h1 {
    font-size: 1.7rem;
    margin: .15rem 0;
}

.employee-profile-print-title p,
.employee-profile-print-meta span,
.employee-profile-print-kicker,
.employee-profile-print-grid span,
.employee-profile-print-grid small {
    color: #64748b;
}

.employee-profile-print-kicker {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.employee-profile-print-meta {
    min-width: 170px;
    text-align: end;
}

.employee-profile-print-meta strong {
    display: block;
    margin-top: .25rem;
}

.employee-profile-print-section {
    break-inside: avoid;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 14px;
    margin-top: 1rem;
    padding: 1rem;
    page-break-inside: avoid;
}

.employee-profile-print-section h2 {
    font-size: 1rem;
    margin: 0 0 .85rem;
}

.employee-profile-print-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.employee-profile-print-grid > div,
.employee-profile-print-stats > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
    padding: .75rem;
}

.employee-profile-print-grid strong,
.employee-profile-print-grid small {
    overflow-wrap: anywhere;
}

.employee-profile-print-stats {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: .85rem;
}

.employee-profile-print-table {
    border-collapse: collapse;
    font-size: .9rem;
    width: 100%;
}

.employee-profile-print-table th,
.employee-profile-print-table td {
    border: 1px solid #e2e8f0;
    padding: .55rem;
    text-align: start;
    vertical-align: top;
}

.employee-profile-print-table th {
    background: #f8fafc;
}

.employee-profile-print-empty {
    color: #64748b;
    margin: 0;
}

@media (max-width: 768px) {
    .employee-profile-print-page {
        padding: .75rem;
    }

    .employee-profile-print-title,
    .employee-profile-print-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .employee-profile-print-grid,
    .employee-profile-print-stats {
        grid-template-columns: 1fr;
    }
}

@media print {
    .app-sidebar,
    .admin-sidebar,
    .employee-portal-sidebar,
    .manager-portal-sidebar,
    .portal-sidebar,
    .admin-topbar,
    .topbar,
    .portal-topbar,
    .mobile-shell-toggle,
    .mobile-utility-toggle,
    .content-header,
    .panel-actions,
    .entity-page-actions,
    .report-export-actions,
    .report-filter-panel,
    .btn,
    .no-print {
        display: none !important;
    }

    .surface-panel,
    .entity-page-shell,
    .entity-details-shell,
    .payslip-print-sheet {
        background: #fff !important;
        box-shadow: none !important;
        max-width: none !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .surface-panel,
    .entity-details-shell,
    .payslip-print-sheet {
        border: 1px solid #ddd !important;
        border-radius: 0 !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .table-modern {
        min-width: 0 !important;
    }

    .employee-profile-print-page {
        padding: 0 !important;
    }

    .employee-profile-print-sheet {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-width: none !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .employee-profile-print-section {
        border-color: #ddd !important;
        margin-top: .75rem !important;
        padding: .75rem !important;
    }

    .employee-profile-print-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

.end-of-service-page {
    display: grid;
    gap: 1rem;
}

.end-of-service-header {
    align-items: flex-start;
    gap: 1rem;
}

.end-of-service-header__copy {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.end-of-service-header__copy p {
    color: var(--text-muted);
    margin: 0;
}

.end-of-service-header__actions {
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
}

.end-of-service-summary {
    padding: 1rem 1.15rem 1.15rem;
}

.end-of-service-summary-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.end-of-service-summary-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(248, 250, 252, .94));
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
    display: grid;
    gap: .45rem;
    min-width: 0;
    padding: .95rem 1rem;
}

.end-of-service-summary-card span,
.end-of-service-reference-card span {
    color: var(--text-muted);
    font-size: .86rem;
    font-weight: 600;
}

.end-of-service-summary-card strong,
.end-of-service-reference-card strong {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.end-of-service-layout {
    align-items: stretch;
}

.end-of-service-reference,
.end-of-service-form,
.end-of-service-action-panel {
    border-radius: 22px;
    padding: 1.1rem;
}

.end-of-service-reference-grid {
    display: grid;
    gap: .85rem;
}

.end-of-service-reference-card {
    background: var(--surface-muted);
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: 18px;
    display: grid;
    gap: .35rem;
    min-width: 0;
    padding: .9rem 1rem;
}

.end-of-service-reference-card small {
    color: var(--text-muted);
    display: block;
    font-weight: 600;
}

.end-of-service-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.end-of-service-field--full {
    grid-column: 1 / -1;
}

.end-of-service-notes {
    min-height: 130px;
    resize: vertical;
}

.end-of-service-totals {
    margin-top: 1rem;
}

.end-of-service-totals .payroll-final-summary__item {
    min-width: 0;
}

.end-of-service-form-footer {
    align-items: center;
    border-top: 1px solid rgba(148, 163, 184, .16);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
}

.end-of-service-form-footer__note {
    color: var(--text-muted);
    font-size: .92rem;
    font-weight: 600;
}

.end-of-service-actions-bar {
    align-items: center;
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
}

.end-of-service-action-panel .actions-cluster {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    width: 100%;
}

.end-of-service-payment-form {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: 16px;
    display: flex;
    flex: 1 1 360px;
    flex-wrap: wrap;
    gap: .65rem;
    padding: .75rem;
}

.end-of-service-payment-form .form-control {
    flex: 1 1 220px;
    min-width: 0;
}

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

    .end-of-service-form-grid {
        grid-template-columns: 1fr;
    }

    .end-of-service-field--full {
        grid-column: auto;
    }
}

@media (max-width: 767.98px) {
    .end-of-service-page {
        gap: .85rem;
    }

    .end-of-service-header,
    .end-of-service-header__actions,
    .end-of-service-form-footer,
    .end-of-service-actions-bar,
    .end-of-service-action-panel .actions-cluster,
    .end-of-service-payment-form {
        align-items: stretch;
        flex-direction: column;
    }

    .end-of-service-header__actions .btn,
    .end-of-service-actions-bar .btn,
    .end-of-service-action-panel form,
    .end-of-service-action-panel .btn,
    .end-of-service-payment-form .btn,
    .end-of-service-payment-form .form-control {
        width: 100%;
    }

    .end-of-service-summary-grid {
        grid-template-columns: 1fr;
    }

    .end-of-service-reference,
    .end-of-service-form,
    .end-of-service-action-panel,
    .end-of-service-summary {
        border-radius: 18px;
        padding: .9rem;
    }

    .end-of-service-summary-card,
    .end-of-service-reference-card {
        padding: .85rem .9rem;
    }
}

.end-of-service-archive-page {
    display: grid;
    gap: 1rem;
    min-width: 0;
    overflow-x: clip;
}

.end-of-service-archive-page .panel-header {
    padding-inline: 1.25rem;
}

.end-of-service-archive-page .panel-actions {
    justify-content: flex-end;
    max-width: 100%;
    min-width: 0;
}

.end-of-service-archive-page .end-of-service-archive-body {
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding-inline: 1.25rem;
}

.end-of-service-archive-page .settlement-archive-table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.end-of-service-archive-page .settlement-archive-table-wrap .table-responsive {
    min-width: 100%;
}

.end-of-service-archive-page .end-of-service-archive-table {
    min-width: 1120px;
    width: 100%;
}

.end-of-service-archive-print-title {
    display: none;
}

.end-of-service-archive-page .filter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.end-of-service-archive-page .filter-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1rem;
}

.end-of-service-archive-table {
    min-width: 1120px;
}

@media (max-width: 991.98px) {
    .end-of-service-archive-page .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .end-of-service-archive-page .filter-grid {
        grid-template-columns: 1fr;
    }

    .end-of-service-archive-page .filter-actions,
    .end-of-service-archive-page .panel-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .end-of-service-archive-page .filter-actions .btn,
    .end-of-service-archive-page .panel-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .end-of-service-archive-page .end-of-service-archive-body {
        padding-inline: 1rem;
    }

    .end-of-service-archive-page .actions-cluster {
        display: grid;
        gap: 0.4rem;
        grid-template-columns: 1fr;
        width: 100%;
    }
}

@media print {
    .end-of-service-archive-page {
        box-shadow: none !important;
        display: block !important;
        padding: 0 !important;
    }

    .end-of-service-archive-print-title {
        display: block !important;
        margin-bottom: 8mm;
        text-align: center;
    }

    .end-of-service-archive-print-title h1 {
        font-size: 18pt;
        margin: 0;
    }

    .end-of-service-archive-page .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        margin-bottom: 8mm !important;
    }

    .end-of-service-archive-table {
        font-size: 9pt;
        min-width: 0 !important;
    }
}

.employee-letter-form .form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.employee-timeline-list,
.employee-internal-notes-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.employee-timeline-item {
    align-items: flex-start;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto 1fr;
    padding: 1rem;
}

.employee-timeline-icon {
    align-items: center;
    background: rgba(37, 99, 235, .1);
    border-radius: 16px;
    color: #2563eb;
    display: inline-flex;
    font-size: 1.2rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.employee-timeline-content {
    min-width: 0;
}

.employee-timeline-top {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.employee-timeline-top h3 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.employee-timeline-top p {
    color: #64748b;
    margin: .25rem 0 0;
    overflow-wrap: anywhere;
}

.employee-timeline-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .75rem;
    margin-top: .75rem;
}

.employee-timeline-link {
    display: inline-flex;
    gap: .35rem;
    margin-top: .75rem;
}

.employee-internal-note-form {
    background: rgba(248, 250, 252, .92);
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    margin-top: 1rem;
    padding: 1rem;
}

.employee-internal-note-form textarea {
    resize: vertical;
}

.employee-internal-note-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: .85rem;
}

.employee-internal-note {
    align-items: flex-start;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.employee-internal-note-body {
    min-width: 0;
}

.employee-internal-note-body p {
    color: #0f172a;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

@media (max-width: 640px) {
    .employee-timeline-item,
    .employee-internal-note {
        grid-template-columns: 1fr;
    }

    .employee-timeline-top,
    .employee-internal-note {
        flex-direction: column;
    }

    .employee-internal-note form,
    .employee-internal-note .btn,
    .employee-internal-note-actions .btn {
        width: 100%;
    }
}

.employee-letter-form .employee-letter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.employee-letter-archive-filter .employee-letter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.employee-letter-form .employee-letter-field,
.employee-letter-archive-filter .employee-letter-field {
    grid-column: span 6;
}

.employee-letter-form .employee-letter-field-wide,
.employee-letter-archive-filter .employee-letter-field-wide {
    grid-column: 1 / -1;
}

.employee-letter-form .employee-letter-field .form-control,
.employee-letter-form .employee-letter-field .form-select,
.employee-letter-archive-filter .employee-letter-field .form-control,
.employee-letter-archive-filter .employee-letter-field .form-select {
    width: 100%;
    max-width: 100%;
}

.employee-letter-form .employee-letter-actions,
.employee-letter-archive-filter .employee-letter-actions {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: flex-start;
    padding-top: .5rem;
}

.employee-letter-form .employee-letter-actions .btn,
.employee-letter-archive-filter .employee-letter-actions .btn {
    min-width: 180px;
}

.employee-letter-sheet {
    min-height: 920px;
}

.employee-letter-print-page .employee-profile-print-sheet,
.employee-letter-page .employee-profile-print-sheet {
    max-width: 820px;
}

.employee-letter-body {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    color: #111827;
    font-size: 1.05rem;
    line-height: 2;
    margin: 1.25rem 0;
    padding: 1.5rem;
}

.employee-letter-body h2 {
    color: #0f172a;
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

.employee-letter-recipient {
    font-weight: 800;
    margin-bottom: .75rem;
}

.employee-letter-notes {
    line-height: 1.8;
    white-space: pre-line;
}

.employee-letter-body,
.employee-letter-signatures {
    break-inside: avoid;
    page-break-inside: avoid;
}

.employee-letter-signatures {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    margin-top: 3rem;
}

.employee-letter-signatures div {
    border-top: 1px solid rgba(15, 23, 42, .35);
    color: #475569;
    font-weight: 700;
    min-height: 90px;
    padding-top: .75rem;
}

@media (max-width: 640px) {
    .employee-letter-signatures {
        grid-template-columns: 1fr;
    }

    .employee-letter-form .employee-letter-grid,
    .employee-letter-archive-filter .employee-letter-grid {
        grid-template-columns: 1fr;
    }

    .employee-letter-form .employee-letter-field,
    .employee-letter-form .employee-letter-field-wide,
    .employee-letter-archive-filter .employee-letter-field,
    .employee-letter-archive-filter .employee-letter-field-wide {
        grid-column: 1 / -1;
    }

    .employee-letter-form .employee-letter-actions .btn,
    .employee-letter-archive-filter .employee-letter-actions .btn {
        width: 100%;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    .employee-letter-page .employee-profile-print-sheet,
    .employee-letter-print-page .employee-profile-print-sheet {
        max-width: none !important;
    }

    .employee-letter-sheet {
        min-height: 0 !important;
    }

    .employee-letter-body {
        font-size: .95rem !important;
        line-height: 1.7 !important;
        margin: .85rem 0 !important;
        padding: 1rem !important;
    }

    .employee-letter-signatures {
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }

    .employee-letter-signatures div {
        min-height: 70px !important;
        padding-top: .5rem !important;
    }

    .employee-letter-page .employee-profile-print-title,
    .employee-letter-print-page .employee-profile-print-title {
        margin-top: .5rem !important;
        padding-bottom: .75rem !important;
    }

    .employee-letter-page .employee-profile-print-section,
    .employee-letter-print-page .employee-profile-print-section {
        margin-top: .75rem !important;
        padding: .75rem !important;
    }

    .employee-letter-page .employee-profile-print-grid,
    .employee-letter-print-page .employee-profile-print-grid {
        gap: .5rem !important;
    }

    .employee-letter-page .employee-profile-print-grid > div,
    .employee-letter-print-page .employee-profile-print-grid > div {
        padding: .55rem !important;
    }

    .employee-letter-page .employee-profile-print-toolbar,
    .employee-letter-print-page .employee-profile-print-toolbar,
    .employee-letter-page .no-print,
    .employee-letter-print-page .no-print,
    .employee-letter-page .app-sidebar,
    .employee-letter-print-page .app-sidebar,
    .employee-letter-page .admin-sidebar,
    .employee-letter-print-page .admin-sidebar,
    .employee-letter-page .employee-portal-sidebar,
    .employee-letter-print-page .employee-portal-sidebar,
    .employee-letter-page .manager-portal-sidebar,
    .employee-letter-print-page .manager-portal-sidebar,
    .employee-letter-page .portal-sidebar,
    .employee-letter-print-page .portal-sidebar,
    .employee-letter-page .admin-topbar,
    .employee-letter-print-page .admin-topbar,
    .employee-letter-page .topbar,
    .employee-letter-print-page .topbar,
    .employee-letter-page .portal-topbar,
    .employee-letter-print-page .portal-topbar,
    .employee-letter-page .content-header,
    .employee-letter-print-page .content-header,
    .employee-letter-page .btn,
    .employee-letter-print-page .btn {
        display: none !important;
    }

    .audit-ip,
    .audit-log-ip {
        direction: ltr;
        unicode-bidi: plaintext;
        text-align: left;
    }
}
