﻿:root {
    --bg: #f6f7fb;
    --bg-soft: #f0f2ff;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: #ffffff;
    --surface-muted: #f8f9fd;
    --ink: #141627;
    --muted: #6f748c;
    --line: #e8ebf4;
    --line-strong: #dfe4f0;
    --brand: #5b5bd6;
    --brand-strong: #4646be;
    --brand-soft: rgba(91, 91, 214, 0.12);
    --blue-soft: #eef4ff;
    --green: #1fa45f;
    --green-soft: rgba(31, 164, 95, 0.14);
    --amber: #e4a11b;
    --amber-soft: rgba(228, 161, 27, 0.18);
    --red: #d95b6a;
    --red-soft: rgba(217, 91, 106, 0.16);
    --shadow: 0 24px 60px rgba(23, 28, 56, 0.08);
    --radius: 24px;
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 92px;
    --shell-gap: 24px;
    --sidebar-transition: 220ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Roboto', Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(173, 127, 255, 0.14), transparent 24%),
        radial-gradient(circle at top left, rgba(91, 91, 214, 0.08), transparent 28%),
        linear-gradient(180deg, #fbfbfe 0%, #f4f6fb 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(91, 91, 214, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(91, 91, 214, 0.035) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 70%);
}

h1,
h2,
h3,
h4,
strong {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
}

p,
a,
label,
small,
span,
td,
th,
input,
select,
textarea,
button {
    font-family: inherit;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

.page-shell {
    min-height: 100vh;
    padding: var(--shell-gap);
}

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--shell-gap);
    left: var(--shell-gap);
    z-index: 30;
    height: calc(100vh - (var(--shell-gap) * 2));
    overflow-y: auto;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: transform var(--sidebar-transition), opacity var(--sidebar-transition);
}

.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 16px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--brand), #8b5cf6);
    color: white;
    box-shadow: 0 10px 24px rgba(91, 91, 214, 0.22);
    flex-shrink: 0;
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-size: 1.06rem;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.87rem;
}

.sidebar-group {
    margin-top: 14px;
}

.sidebar-label {
    padding: 0 10px;
    margin-bottom: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: #2c3045;
    font-weight: 600;
    transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #f1edff;
    color: var(--brand-strong);
}

.asset-workspace {
    display: grid;
    gap: 22px;
}

.asset-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
}

.asset-requests-grid {
    grid-template-columns: minmax(0, 1fr);
}

.asset-dashboard-grid .employee-dashboard-main {
    max-width: none;
}

.asset-requests-grid .employee-dashboard-main,
.asset-requests-grid .employee-dashboard-side {
    max-width: none;
}

.asset-request-form-area {
    order: -1;
}

.asset-requests-grid .employee-side-card {
    width: 100%;
}

.asset-requests-grid .employee-inline-performance-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-profile-full-grid {
    grid-template-columns: minmax(0, 1fr);
}

.employee-profile-full-grid .employee-dashboard-main {
    max-width: none;
}

.asset-action-row,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-bar {
    margin-bottom: 18px;
}

.pagination-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    color: #647389;
    font-size: 0.86rem;
    font-weight: 800;
}

.filter-bar .form-control,
.filter-bar .form-select {
    max-width: 280px;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

.responsive-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.responsive-table th,
.responsive-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.responsive-table th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.responsive-table td small {
    color: var(--muted);
}

.responsive-table th,
.responsive-table td,
.table-wrap th,
.table-wrap td {
    overflow-wrap: anywhere;
}

.field-error {
    color: var(--red);
    font-weight: 700;
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #2c3045;
    box-shadow: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    transition: background-color 180ms ease, color 180ms ease;
}

.sidebar-logout-link:hover,
.sidebar-logout-link:focus-visible {
    background: #f1edff;
    color: var(--brand-strong);
    outline: none;
}

.sidebar-logout-link:hover .nav-icon,
.sidebar-logout-link:focus-visible .nav-icon {
    background: rgba(91, 91, 214, 0.14);
    color: var(--brand-strong);
    border-color: rgba(91, 91, 214, 0.16);
}

.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4f6fb;
    border: 1px solid var(--line);
    color: var(--muted);
    flex-shrink: 0;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon {
    background: rgba(91, 91, 214, 0.14);
    color: var(--brand-strong);
    border-color: rgba(91, 91, 214, 0.16);
}

.sidebar-promo {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #171d33 0%, #242b45 100%);
    color: white;
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
}

.sidebar-promo h3 {
    margin: 8px 0 6px;
    font-size: 1.12rem;
}

.sidebar-promo p:last-of-type {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.sidebar-promo .sidebar-label {
    padding: 0;
    color: rgba(255, 255, 255, 0.56);
}

.sidebar-promo-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.sidebar-toggle {
    appearance: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
    color: #51576f;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    background: #f4f2ff;
    color: var(--brand-strong);
    border-color: rgba(91, 91, 214, 0.16);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
}

.toolbar-toggle {
    display: none;
    width: 44px;
    padding: 0;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 19, 35, 0.38);
    opacity: 0;
    pointer-events: none;
    border: 0;
    z-index: 20;
    transition: opacity var(--sidebar-transition);
}

.main-panel {
    margin-left: calc(var(--sidebar-width) + var(--shell-gap) + 20px);
    padding: 4px 0 32px;
    transition: none;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.topbar-copy {
    display: grid;
    gap: 8px;
}

.topbar h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    line-height: 1.15;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.search-shell {
    min-width: 270px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
}

.search-shell span {
    font-size: 0.86rem;
    font-weight: 600;
}

.search-shell input {
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    color: var(--ink);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.eyebrow {
    color: #8a7fb1;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
}

.button,
.button.secondary,
button.button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: white;
    box-shadow: 0 14px 28px rgba(91, 91, 214, 0.2);
}

.button.secondary {
    background: rgba(91, 91, 214, 0.1);
    color: var(--brand-strong);
}

.button.light-button {
    background: white;
    color: var(--brand-strong);
    box-shadow: none;
}

.button.button-small {
    padding: 10px 14px;
    font-size: 0.88rem;
}

.button:hover,
.text-link:hover,
.table-link:hover {
    transform: translateY(-1px);
}

.panel,
.stat-card,
.hero-card,
.mini-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.soft-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 244, 255, 0.96));
}

.panel,
.stat-card,
.mini-card {
    padding: 22px;
}

.dashboard-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.dashboard-intro h2 {
    margin: 10px 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    max-width: 18ch;
}

.hero-copy {
    max-width: 62ch;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stats-grid,
.cards-grid,
.content-grid,
.dashboard-grid,
.feature-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.metric-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 132px;
}

.metric-card p {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.metric-card strong {
    display: block;
    margin: 12px 0 8px;
    font-size: 2rem;
}

.metric-card small {
    color: var(--muted);
    line-height: 1.45;
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

.metric-icon svg {
    width: 18px;
    height: 18px;
}

.metric-icon.sky {
    background: #edf5ff;
    color: #2674d8;
}

.metric-icon.violet {
    background: #f3edff;
    color: #7b4be0;
}

.metric-icon.green {
    background: #ebfff4;
    color: var(--green);
}

.metric-icon.amber {
    background: #fff6e6;
    color: #c7830f;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 2.05fr) minmax(300px, 0.95fr);
    align-items: start;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 18px;
}

.feature-grid {
    grid-template-columns: 1.02fr 1.3fr;
}

.highlight-panel {
    background: linear-gradient(180deg, #6750de 0%, #7a4de0 100%);
    color: white;
}

.highlight-panel .eyebrow,
.highlight-panel p,
.highlight-panel span,
.highlight-panel .muted-note {
    color: rgba(255, 255, 255, 0.78);
}

.no-border {
    margin-bottom: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-header h3 {
    font-size: 1.2rem;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pill,
.pill-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.pill-soft {
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
}

.highlight-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.highlight-metrics div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.highlight-metrics span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.highlight-metrics strong {
    font-size: 1.8rem;
}

.highlight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.highlight-footer p {
    max-width: 30ch;
    line-height: 1.6;
}

.chart-panel {
    background: rgba(255, 255, 255, 0.95);
}

.muted-note {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.chart-stack {
    display: grid;
    gap: 16px;
}

.progress-row {
    display: grid;
    grid-template-columns: minmax(100px, 120px) minmax(0, 1fr) 54px;
    gap: 12px;
    align-items: center;
}

.progress-copy small,
.side-list-item small,
.person-cell small,
.metric-row span,
.mini-card p,
.empty-state {
    color: var(--muted);
}

.progress-copy strong,
.side-list-item strong {
    display: block;
    margin-bottom: 4px;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    background: #eff2f9;
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.progress-fill.success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.progress-fill.info {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #fb7185, #e11d48);
}

.progress-value {
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

.table-panel {
    padding-bottom: 10px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    padding: 14px 16px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

thead th:first-child {
    border-top-left-radius: 16px;
}

thead th:last-child {
    border-top-right-radius: 16px;
}

tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.person-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.person-cell span:last-child {
    display: grid;
    gap: 4px;
}

.avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d9ddff, #ece6ff);
    color: var(--brand-strong);
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-badge > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.text-link,
.table-link {
    color: var(--brand-strong);
    text-decoration: none;
    font-weight: 700;
}

.side-panel {
    padding: 20px;
}

.status-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.status-chip {
    padding: 14px 12px;
    border-radius: 18px;
    display: grid;
    gap: 4px;
}

.status-chip strong {
    font-size: 1.25rem;
}

.status-chip span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.status-chip-success {
    background: #effcf4;
}

.status-chip-warning {
    background: #fff7e8;
}

.status-chip-muted {
    background: #f5f6fa;
}

.side-list,
.list-stack {
    display: grid;
    gap: 12px;
}

.side-list-item,
.list-row,
.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
}

.side-list-link,
.list-row {
    text-decoration: none;
}

.side-list-item > div,
.list-row > div {
    display: grid;
    gap: 4px;
}

.pill {
    background: #eef1fb;
    color: #475072;
}

.pill.pending {
    background: var(--amber-soft);
    color: #a86900;
}

.pill.approved,
.pill.status-active {
    background: var(--green-soft);
    color: #177745;
}

.pill.rejected,
.pill.status-resigned {
    background: var(--red-soft);
    color: #b33d52;
}

.pill.cancelled {
    background: #eef2f7;
    color: #64748b;
}

.pill.status-on_leave {
    background: rgba(91, 91, 214, 0.14);
    color: var(--brand-strong);
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mini-card h4 {
    margin: 10px 0 8px;
}

.mini-card-link {
    display: block;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mini-card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 91, 214, 0.22);
    box-shadow: 0 20px 34px rgba(91, 91, 214, 0.08);
}

.mini-meta,
.toolbar,
.form-actions,
.topbar-actions,
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.content-grid.two-up,
.content-grid.profile-layout,
.two-up,
.profile-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-grid div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
}

.form-panel.narrow {
    max-width: 760px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.grid-form.single-column {
    grid-template-columns: 1fr;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-group label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #2f344b;
}

.full-width,
.full-span {
    grid-column: 1 / -1;
}

.form-control,
.form-select,
textarea,
input,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #ffffff;
    color: var(--ink);
    outline: none;
}

.field-group input[type="file"] {
    min-height: 42px;
    padding: 8px 12px;
}

.field-group input[type="checkbox"] {
    width: auto;
    padding: 0;
}

.employee-basic-info-grid {
    align-items: start;
}

.employee-photo-field,
.employee-photo-upload-field {
    display: grid;
    gap: 8px;
    align-content: start;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
    border-color: rgba(91, 91, 214, 0.38);
    box-shadow: 0 0 0 4px rgba(91, 91, 214, 0.1);
}

.messages {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.message {
    padding: 14px 16px;
    border-radius: 16px;
    background: #edf2ff;
    color: var(--brand-strong);
    border: 1px solid rgba(91, 91, 214, 0.12);
}

.error-text {
    color: var(--red);
    font-size: 0.9rem;
}

.form-error-summary {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(217, 91, 106, 0.24);
    border-radius: 12px;
    background: var(--red-soft);
    color: #9f2f2f;
}

.form-error-summary span {
    color: #9f2f2f;
    font-size: 0.92rem;
}

.empty-state,
.empty-cell {
    color: var(--muted);
}

.empty-cell {
    padding: 22px;
    text-align: center;
}

.compact-toolbar {
    justify-content: flex-start;
}

.metric-row.stacked {
    align-items: flex-start;
    flex-direction: column;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding-inline: 12px;
}

body.sidebar-collapsed .sidebar-head {
    flex-direction: column;
    justify-content: center;
}

body.sidebar-collapsed .brand {
    justify-content: center;
    padding-inline: 0;
    padding-bottom: 8px;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-promo {
    display: none;
}

body.sidebar-collapsed .sidebar-toggle-inline {
    display: inline-flex;
}

body.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .main-panel {
    margin-left: calc(var(--sidebar-collapsed-width) + var(--shell-gap) + 20px);
}

@media (max-width: 1380px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .page-shell {
        padding: 18px;
    }

    .sidebar {
        left: 18px;
        top: 18px;
        height: calc(100vh - 36px);
        width: min(320px, calc(100vw - 36px));
    }

    .main-panel,
    body.sidebar-collapsed .main-panel {
        margin-left: 0;
        padding-top: 0;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(calc(-100% - 22px));
        opacity: 0;
        pointer-events: none;
    }

    body:not(.sidebar-collapsed) .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-toggle {
        display: inline-flex;
    }

    .topbar-tools {
        justify-content: space-between;
    }
}

@media (max-width: 900px) {
    .dashboard-intro,
    .highlight-footer,
    .toolbar,
    .form-actions,
    .topbar-actions,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-shell {
        min-width: 0;
        width: 100%;
    }

    .highlight-metrics,
    .status-chip-row,
    .stats-grid,
    .content-grid.two-up,
    .content-grid.profile-layout,
    .two-up,
    .profile-layout,
    .detail-grid,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .progress-row {
        grid-template-columns: 1fr;
    }

    .progress-value {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 14px;
    }

    .sidebar {
        left: 14px;
        top: 14px;
        width: calc(100vw - 28px);
        height: calc(100vh - 28px);
    }

    .panel,
    .stat-card,
    .mini-card,
    .side-panel,
    .sidebar {
        border-radius: 22px;
    }

    .toolbar-toggle {
        width: 44px;
        padding: 0;
    }

    .main-panel {
        padding-bottom: 20px;
    }

    .topbar h1 {
        font-size: 1.8rem;
    }
}


.department-page {
    display: grid;
    gap: 22px;
}

.department-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
    gap: 20px;
    align-items: stretch;
    padding: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 242, 255, 0.98));
}

.department-hero-copy h2 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.department-hero-text {
    max-width: 56ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}

.department-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.department-stat-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #6356df 0%, #7a5df2 100%);
    color: white;
    box-shadow: 0 22px 40px rgba(91, 91, 214, 0.2);
}

.department-stat-card.compact {
    display: block;
}

.department-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.department-stat-icon svg {
    width: 24px;
    height: 24px;
}

.department-stat-label {
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.78);
}

.department-stat-card strong {
    display: block;
    font-size: clamp(1.55rem, 2.4vw, 2.4rem);
    line-height: 1;
    margin-bottom: 8px;
    word-break: break-word;
}

.department-stat-card small {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.department-roster-panel {
    padding: 24px;
}

.department-roster-header {
    align-items: end;
}

.department-roster-count {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.department-member-list {
    display: grid;
    gap: 16px;
}

.department-member-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.department-member-card:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 91, 214, 0.18);
    box-shadow: 0 18px 32px rgba(91, 91, 214, 0.08);
}

.department-member-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.department-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dddfff, #efe9ff);
    color: var(--brand-strong);
    font-weight: 800;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.department-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.department-member-avatar > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.department-member-main h4 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}

.department-member-main p {
    color: var(--muted);
}

.department-member-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.department-meta-chip {
    min-width: 180px;
    padding: 11px 14px;
    border-radius: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
}

.department-meta-chip span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.department-meta-chip strong {
    font-size: 0.95rem;
}

.department-empty-state {
    padding: 32px 24px;
    border-radius: 22px;
    border: 1px dashed var(--line-strong);
    background: var(--surface-muted);
}

.department-empty-state h3 {
    margin: 10px 0 8px;
}

.department-empty-state p:last-child {
    color: var(--muted);
}

@media (max-width: 1120px) {
    .department-hero,
    .department-member-card {
        grid-template-columns: 1fr;
    }

    .department-member-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .department-hero,
    .department-roster-panel {
        padding: 20px;
    }

    .department-directory-card-bottom {
        grid-template-columns: 1fr;
    }

    .department-stat-card {
        align-items: flex-start;
    }

    .department-meta-chip {
        min-width: 0;
        width: 100%;
    }
}


.employee-photo-preview {
    width: 140px;
    height: 140px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.employee-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-photo-remove-button {
    appearance: none;
    width: fit-content;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid rgba(196, 63, 63, 0.3);
    border-radius: 8px;
    background: rgba(196, 63, 63, 0.08);
    color: #9f2f2f;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

.employee-photo-remove-button:hover,
.employee-photo-remove-button:focus {
    background: #9f2f2f;
    border-color: #9f2f2f;
    color: #fff;
    outline: none;
}

.employee-profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.employee-profile-photo {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dddfff, #efe9ff);
    color: var(--brand-strong);
    font-weight: 800;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.employee-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.department-directory-page {
    display: grid;
    gap: 22px;
}

.department-directory-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
    gap: 22px;
    align-items: stretch;
    padding: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 242, 255, 0.98));
}

.department-directory-copy h2 {
    margin: 10px 0 12px;
    font-size: clamp(1.55rem, 2.8vw, 1.9rem);
    line-height: 1;
}

body:has(.department-directory-page) .topbar h1 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

body:has(.department-directory-page) .topbar .eyebrow {
    display: inline-block;
    justify-self: start;
    background: var(--mono-muted);
    color: var(--mono-muted-fg);
    line-height: 1;
    padding: 0.12rem 0.18rem;
}

.department-directory-text {
    max-width: 58ch;
    color: var(--muted);
    line-height: 1.7;
}

.department-directory-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

.directory-stat-tile {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.directory-stat-tile.highlight {
    background: linear-gradient(180deg, #6356df 0%, #7a5df2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 20px 38px rgba(91, 91, 214, 0.2);
}

.directory-stat-tile span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.directory-stat-tile.highlight span,
.directory-stat-tile.highlight small {
    color: rgba(255, 255, 255, 0.8);
}

.directory-stat-tile strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 2rem;
    line-height: 1;
}

.directory-stat-tile small {
    color: var(--muted);
    line-height: 1.5;
}

.department-directory-stats .button {
    grid-column: 1 / -1;
    justify-self: start;
}

.department-directory-panel {
    padding: 24px;
}

.department-directory-header {
    align-items: end;
}

.department-directory-note {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.department-directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.department-directory-card {
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 0;
    text-decoration: none;
    border: 1px solid var(--mono-border);
    background: var(--mono-card);
    box-shadow: none;
    color: var(--mono-fg);
    transition: background-color 100ms linear, color 100ms linear;
}

.department-directory-card:hover {
    background: var(--mono-inverse);
    color: var(--mono-inverse-fg);
}

.department-directory-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.department-directory-icon {
    width: 42px;
    height: 42px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid currentColor;
    color: currentColor;
}

.department-directory-icon svg {
    width: 20px;
    height: 20px;
}

.department-directory-code {
    padding: 8px 12px;
    border-radius: 0;
    background: transparent;
    border: 1px solid currentColor;
    color: currentColor;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.department-directory-card h4 {
    margin: 0;
    font-size: 1.2rem;
}

.department-directory-card p {
    color: var(--mono-muted-fg);
    line-height: 1.65;
    min-height: 4.8em;
}

.department-directory-card-bottom {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--mono-border);
}

.department-directory-card-bottom span {
    display: block;
    color: var(--mono-muted-fg);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.department-directory-card-bottom strong {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-word;
}

.department-directory-open {
    color: currentColor;
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0;
}

.department-directory-card:hover p,
.department-directory-card:hover .department-directory-card-bottom span {
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1120px) {
    .department-directory-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .department-directory-hero,
    .department-directory-panel {
        padding: 20px;
    }

    .department-directory-stats,
    .department-directory-grid {
        grid-template-columns: 1fr;
    }

    .department-directory-card-bottom {
        grid-template-columns: 1fr;
    }
}


.inline-form {
    margin: 0;
}

.ghost-button {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(100%, 960px);
}

.login-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
    padding: 32px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(244, 242, 255, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.login-brand h1 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.login-copy {
    max-width: 34ch;
    color: var(--muted);
    line-height: 1.7;
}

.login-form {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    align-self: start;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #ffffff;
}

.login-form input:focus {
    outline: none;
    border-color: rgba(91, 91, 214, 0.38);
    box-shadow: 0 0 0 4px rgba(91, 91, 214, 0.1);
}

@media (max-width: 800px) {
    .login-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}

body {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
}

.sidebar {
    overscroll-behavior: contain;
}

.main-panel {
    min-width: 0;
}

.table-wrap {
    -webkit-overflow-scrolling: touch;
}

.search-shell {
    min-height: 52px;
}

.search-shell input {
    min-width: 0;
    font-size: 16px;
}

.topbar-actions .button,
.topbar-actions .inline-form,
.topbar-actions .inline-form .button {
    width: 100%;
}

.inline-form .button {
    justify-content: center;
}

@media (max-width: 900px) {
    .topbar {
        gap: 18px;
    }

    .topbar-tools {
        width: 100%;
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 12px;
        align-items: stretch;
    }

    .toolbar-toggle {
        width: 52px;
        height: 52px;
    }

    .search-shell,
    .topbar-actions {
        grid-column: 1 / -1;
    }

    .topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    .button,
    .button.secondary,
    button.button {
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .metric-card {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 16px);
    }

    .topbar {
        margin-bottom: 18px;
    }

    .topbar-copy {
        gap: 6px;
    }

    .topbar h1 {
        font-size: 1.7rem;
        line-height: 1.08;
    }

    .topbar-tools {
        grid-template-columns: 1fr;
    }

    .toolbar-toggle,
    .search-shell,
    .topbar-actions {
        grid-column: auto;
    }

    .toolbar-toggle {
        justify-self: start;
    }

    .topbar-actions {
        grid-template-columns: 1fr;
    }

    .panel,
    .stat-card,
    .mini-card,
    .side-panel {
        padding: 18px;
    }

    .metric-card {
        align-items: center;
    }

    .metric-card strong {
        font-size: 1.7rem;
    }

    .table-wrap {
        margin-inline: -6px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .login-body {
        padding: 14px;
    }

    .login-card,
    .login-form {
        padding: 20px;
    }
}


@media (max-width: 1180px) {
    .page-shell {
        display: block;
    }

    .main-panel,
    body .main-panel,
    body.sidebar-collapsed .main-panel,
    body:not(.sidebar-collapsed) .main-panel {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        transform: none !important;
    }
}


.employee-workspace {
    display: grid;
    gap: 22px;
}

.employee-workspace-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(244, 242, 255, 0.98));
}

.employee-workspace-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.employee-workspace-avatar {
    width: 78px;
    height: 78px;
    border-radius: 24px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dddfff, #efe9ff);
    color: var(--brand-strong);
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 16px 30px rgba(91, 91, 214, 0.14);
}

.employee-workspace-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-workspace-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.employee-workspace-copy h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.employee-workspace-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.employee-workspace-meta span {
    display: inline-flex;
    align-items: center;
}

.employee-workspace-meta span:not(:last-child)::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c7cce0;
    margin-left: 10px;
}

.employee-workspace-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.employee-role-pill,
.employee-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.employee-role-pill {
    background: rgba(91, 91, 214, 0.12);
    color: var(--brand-strong);
}

.employee-type-pill {
    background: #eef4ff;
    color: #2f63c7;
}

.employee-workspace-shell {
    display: grid;
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.employee-side-nav-panel {
    padding: 14px;
    position: sticky;
    top: 24px;
}

.employee-side-nav {
    display: grid;
    gap: 8px;
}

.employee-side-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: #2f344b;
    font-weight: 700;
    transition: background-color 180ms ease, color 180ms ease;
}

.employee-side-nav a:hover,
.employee-side-nav a.active {
    background: #f1edff;
    color: var(--brand-strong);
}

.employee-workspace-main {
    display: grid;
    gap: 18px;
}

.employee-section-panel {
    padding: 24px;
}

.employee-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.employee-section-header h3 {
    margin-top: 6px;
    font-size: 1.4rem;
}

.employee-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.employee-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.employee-info-item {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.employee-info-item span,
.employee-detail-row span,
.employee-snapshot-card span {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.employee-detail-rows {
    display: grid;
    gap: 2px;
}

.employee-detail-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 20px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
}

.employee-detail-row:last-child {
    border-bottom: 0;
}

.employee-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.employee-snapshot-card {
    display: grid;
    gap: 8px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.employee-snapshot-card.highlight {
    border-color: transparent;
    background: linear-gradient(135deg, #5b5bd6, #7a5df2);
    color: white;
    box-shadow: 0 22px 40px rgba(91, 91, 214, 0.2);
}

.employee-snapshot-card.highlight span,
.employee-snapshot-card.highlight small {
    color: rgba(255, 255, 255, 0.8);
}

.employee-snapshot-card strong {
    font-size: 2rem;
    line-height: 1.04;
}

.employee-snapshot-card small {
    color: var(--muted);
    line-height: 1.55;
}

.employee-activity-list {
    display: grid;
    gap: 12px;
}

.employee-activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.employee-activity-item > div {
    display: grid;
    gap: 4px;
}

.employee-activity-item small {
    color: var(--muted);
}

@media (max-width: 1100px) {
    .employee-workspace-shell {
        grid-template-columns: 1fr;
    }

    .employee-side-nav-panel {
        position: static;
    }

    .employee-side-nav {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 760px) {
    .employee-workspace-hero,
    .employee-section-panel {
        padding: 18px;
    }

    .employee-workspace-hero,
    .employee-workspace-identity,
    .employee-section-header,
    .employee-activity-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-info-grid,
    .employee-snapshot-grid,
    .employee-detail-row {
        grid-template-columns: 1fr;
    }

    .employee-side-nav {
        grid-template-columns: 1fr;
    }

    .employee-workspace-avatar {
        width: 68px;
        height: 68px;
        border-radius: 22px;
    }
}

.employee-placeholder-card,
.employee-form-note-block {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px dashed var(--line-strong);
    background: linear-gradient(180deg, #fbfbff 0%, #f7f8fe 100%);
}

.employee-placeholder-card p,
.employee-form-note-block p {
    color: var(--muted);
    line-height: 1.7;
}

.employee-snapshot-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-form-workspace .employee-workspace-hero {
    margin-bottom: 0;
}

.employee-workspace-avatar-form {
    background: linear-gradient(135deg, #eef1ff, #f6f1ff);
}

.employee-form-panel-shell {
    display: grid;
    gap: 18px;
}

.employee-structured-form {
    display: grid;
    gap: 18px;
}

.employee-form-section-block {
    display: grid;
    gap: 18px;
}

.employee-form-section-head {
    display: grid;
    gap: 6px;
}

.employee-form-section-head h4,
.employee-form-note-block h4 {
    margin: 0;
    font-size: 1.12rem;
}

.employee-form-section-head p {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 760px) {
    .employee-snapshot-grid-compact {
        grid-template-columns: 1fr;
    }
}

.employee-detail-rows-spaced {
    margin-top: 16px;
}

.qualifications-panel {
    background:
        radial-gradient(circle at top right, rgba(91, 91, 214, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 255, 0.98) 100%);
}

.qualification-hero-grid,
.qualification-detail-grid {
    display: grid;
    gap: 16px;
}

.qualification-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.qualification-highlight-card,
.qualification-skill-card,
.qualification-detail-card {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.qualification-highlight-card {
    border-color: rgba(91, 91, 214, 0.14);
    background: linear-gradient(135deg, rgba(91, 91, 214, 0.08), rgba(139, 92, 246, 0.04));
}

.qualification-highlight-card span,
.qualification-skill-card span,
.qualification-detail-card span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.qualification-highlight-card strong {
    font-size: 1.5rem;
    line-height: 1.2;
}

.qualification-highlight-card small {
    color: var(--muted);
    line-height: 1.6;
}

.qualification-skill-card {
    align-content: start;
}

.qualification-chip-list {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.qualification-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(91, 91, 214, 0.1);
    color: var(--brand-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.qualification-chip-list.muted .qualification-chip,
.qualification-chip.muted {
    background: #eef2fb;
    color: #55607f;
}

.qualification-detail-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    margin-top: 16px;
}

.qualification-detail-card.summary p {
    margin: 0;
    color: #2f344b;
    line-height: 1.75;
}

@media (max-width: 760px) {
    .qualification-hero-grid,
    .qualification-detail-grid {
        grid-template-columns: 1fr;
    }
}

.qualification-copy-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(91, 91, 214, 0.08);
    color: var(--brand-strong);
}

.qualification-copy-card.muted {
    background: #eef2fb;
    color: #55607f;
}

.qualification-copy-card p {
    margin: 0;
    line-height: 1.7;
    font-weight: 600;
}

.employee-profile-page-v2 {
    display: grid;
    gap: 22px;
}

.employee-hero-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 255, 0.98));
}

.employee-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.employee-hero-avatar {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dfe3ff, #efe8ff);
    color: var(--brand-strong);
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(91, 91, 214, 0.14);
    flex-shrink: 0;
}

.employee-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-hero-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.employee-hero-copy h2 {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.employee-hero-meta,
.employee-hero-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.employee-hero-meta {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.employee-hero-meta span:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 10px;
    border-radius: 50%;
    background: #c7cce0;
    vertical-align: middle;
}

.employee-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(91, 91, 214, 0.1);
    color: var(--brand-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.employee-chip.muted {
    background: #eef2fb;
    color: #55607f;
}

.employee-page-grid {
    display: grid;
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.employee-section-nav-card {
    padding: 14px;
    position: sticky;
    top: 24px;
}

.employee-section-nav {
    display: grid;
    gap: 8px;
}

.employee-section-nav a {
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: #2f344b;
    font-weight: 700;
    transition: background-color 180ms ease, color 180ms ease;
}

.employee-section-nav a:hover {
    background: #f1edff;
    color: var(--brand-strong);
}

.employee-section-stack {
    display: grid;
    gap: 18px;
}

.employee-detail-card,
.employee-form-card-v2 {
    padding: 24px;
}

.employee-card-head,
.employee-form-section-copy {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.employee-card-head h3,
.employee-form-section-copy h4 {
    font-size: 1.35rem;
}

.employee-info-grid-v2,
.employee-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.employee-info-box,
.employee-summary-box,
.employee-document-card,
.employee-note-card,
.qualification-feature-card,
.qualification-feature-card.alt {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.employee-info-box.full {
    grid-column: 1 / -1;
}

.employee-info-box span,
.employee-detail-row-v2 span,
.employee-summary-box span,
.employee-document-card span,
.qualification-feature-card span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.employee-detail-rows-v2,
.employee-mini-list {
    display: grid;
    gap: 2px;
}

.employee-detail-row-v2,
.employee-mini-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 20px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
}

.employee-detail-row-v2:last-child,
.employee-mini-row:last-child {
    border-bottom: 0;
}

.qualifications-card-v2 {
    background: radial-gradient(circle at top right, rgba(91, 91, 214, 0.08), transparent 24%), linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 255, 0.98) 100%);
}

.qualification-grid-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.qualification-feature-card {
    border-color: rgba(91, 91, 214, 0.16);
    background: linear-gradient(135deg, rgba(91, 91, 214, 0.1), rgba(139, 92, 246, 0.05));
}

.qualification-feature-card.alt p,
.employee-document-card p,
.employee-note-card p {
    margin: 0;
    color: #2f344b;
    line-height: 1.7;
}

.employee-form-layout-v2 {
    display: grid;
    gap: 18px;
}

.employee-form-section-v2 {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid var(--line);
    scroll-margin-top: 6rem;
}

@media (max-width: 1100px) {
    .employee-page-grid {
        grid-template-columns: 1fr;
    }

    .employee-section-nav-card {
        position: static;
    }

    .employee-section-nav {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 760px) {
    .employee-hero-card,
    .employee-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-info-grid-v2,
    .employee-summary-grid,
    .qualification-grid-v2,
    .employee-detail-row-v2,
    .employee-mini-row,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .employee-section-nav {
        grid-template-columns: 1fr;
    }
}

.employee-profile-page-v3 {
    gap: 1.5rem;
}

.employee-hero-card-v3 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
}

.employee-hero-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

.employee-hero-facts {
    display: grid;
    gap: 0.9rem;
}

.employee-hero-facts div {
    border: 1px solid rgba(104, 92, 255, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(249, 250, 255, 0.96), rgba(241, 242, 255, 0.96));
    padding: 1rem 1.1rem;
}

.employee-hero-facts span,
.employee-stat-card-v3 span,
.employee-callout-card-v3 span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.employee-hero-facts strong,
.employee-stat-card-v3 strong,
.employee-callout-card-v3 strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.05rem;
}

.employee-page-grid-v3 {
    align-items: start;
}

.employee-section-card-v3 {
    display: grid;
    gap: 1.25rem;
}

.employee-rich-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-rich-grid .employee-info-box {
    min-height: 108px;
}

.employee-detail-rows-v3 {
    gap: 0;
}

.employee-detail-rows-v3 .employee-detail-row-v2 {
    align-items: start;
}

.employee-detail-rows-v3 .employee-detail-row-v2 strong {
    line-height: 1.6;
}

.qualification-grid-v3 .qualification-feature-card p {
    margin: 0.55rem 0 0;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.6;
}

.employee-stat-grid-v3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-stat-card-v3,
.employee-callout-card-v3,
.employee-document-card-v3,
.employee-note-card-v3 {
    border: 1px solid rgba(104, 92, 255, 0.12);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(249, 250, 255, 0.96), rgba(241, 242, 255, 0.96));
    padding: 1.15rem 1.2rem;
}

.employee-stat-card-v3 small,
.employee-callout-card-v3 p,
.employee-document-card-v3 p,
.employee-note-card-v3 p {
    display: block;
    margin: 0.45rem 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.employee-callout-grid-v3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-document-card-v3,
.employee-note-card-v3 {
    padding: 1.3rem 1.35rem;
}

.employee-document-card-v3 strong {
    display: block;
    margin-top: 0.4rem;
    font-size: 1rem;
}

.employee-form-card-v3 {
    width: 100%;
    max-width: none;
}

.employee-form-header-v3 {
    margin-bottom: 1.25rem;
}

.employee-form-layout-v3 {
    gap: 1.25rem;
}

.employee-form-layout-v3 .employee-form-section-v2 {
    padding: 1.4rem;
}

@media (max-width: 1180px) {
    .employee-hero-card-v3,
    .employee-callout-grid-v3,
    .employee-stat-grid-v3,
    .employee-rich-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .employee-hero-card-v3,
    .employee-callout-grid-v3,
    .employee-stat-grid-v3,
    .employee-rich-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .employee-hero-aside {
        align-items: stretch;
    }
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 58px;
}

.checkbox-field label {
    margin: 0;
}

.checkbox-field .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}

.employee-detail-card-contrast {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.employee-card-head-inline {
    margin-bottom: 1rem;
}

.employee-fact-list {
    display: grid;
    border: 1px solid rgba(216, 222, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    overflow: hidden;
}

.employee-fact-row {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: start;
    gap: 1rem 1.5rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(228, 232, 244, 0.9);
}

.employee-fact-row:last-child {
    border-bottom: 0;
}

.employee-fact-label {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: #5c647c;
    font-size: 0.95rem;
    font-weight: 600;
}

.employee-fact-label::before {
    content: '';
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 12px;
    border: 1px solid rgba(214, 220, 237, 0.95);
    background: linear-gradient(180deg, #ffffff, #f4f7ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
}

.employee-fact-value {
    color: #1f2437;
    font-size: 0.97rem;
    font-weight: 700;
    line-height: 1.7;
    word-break: break-word;
}

.employee-fact-row-wide {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

@media (max-width: 780px) {
    .employee-fact-row,
    .employee-fact-row-wide {
        grid-template-columns: minmax(0, 1fr);
    }

    .employee-fact-value {
        padding-left: 2.9rem;
    }
}

.employee-profile-shell-alt {
    display: grid;
    gap: 1rem;
}

.employee-overview-bar,
.employee-tabs-panel,
.employee-data-card {
    padding: 1.2rem 1.3rem;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
}

.employee-overview-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.employee-overview-bar h3,
.employee-data-head h3 {
    margin: 0;
    font-size: 1.28rem;
}

.employee-overview-bar p {
    margin: 0.45rem 0 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 60ch;
}

.employee-overview-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.employee-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(226, 84, 152, 0.12);
    color: #cf3d7c;
    font-size: 0.82rem;
    font-weight: 700;
}

.employee-tabs-panel {
    overflow: hidden;
}

.employee-top-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.employee-top-tabs a {
    flex: 0 0 auto;
    text-decoration: none;
    color: #596078;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.9rem 1rem;
    border-bottom: 2px solid transparent;
}

.employee-top-tabs a:hover {
    color: #2a3145;
    border-bottom-color: rgba(95, 178, 102, 0.55);
}

.employee-data-card {
    display: grid;
    gap: 1rem;
}

.employee-data-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.employee-data-grid {
    display: grid;
    gap: 1rem 1.2rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 1.25rem;
    border: 1px solid rgba(224, 229, 242, 0.95);
    border-radius: 22px;
    background: #ffffff;
}

.employee-data-item {
    display: grid;
    gap: 0.4rem;
    align-content: start;
    min-height: 3.9rem;
}

.employee-data-item span {
    color: #9aa1b5;
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: none;
}

.employee-data-item strong {
    color: #1f2437;
    font-size: 0.98rem;
    line-height: 1.65;
    word-break: break-word;
}

.employee-data-item-wide {
    grid-column: span 3;
}

@media (max-width: 1100px) {
    .employee-data-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-data-item-wide {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .employee-overview-bar,
    .employee-data-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-data-grid {
        grid-template-columns: 1fr;
    }

    .employee-data-item-wide {
        grid-column: auto;
    }
}

html {
    scroll-behavior: smooth;
}

.employee-tabs-panel {
    position: sticky;
    top: 1rem;
    z-index: 4;
    box-shadow: 0 16px 34px rgba(31, 36, 55, 0.06);
}

.employee-top-tabs {
    scrollbar-width: none;
}

.employee-top-tabs::-webkit-scrollbar {
    display: none;
}

.employee-top-tabs a {
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
    border-radius: 12px 12px 0 0;
}

.employee-top-tabs a.active {
    color: #1f2437;
    border-bottom-color: #6fca7a;
    background: linear-gradient(180deg, rgba(111, 202, 122, 0.08), rgba(111, 202, 122, 0.02));
}

.employee-data-card {
    scroll-margin-top: 6rem;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.employee-data-grid {
    min-height: 0;
}

.employee-data-item {
    transition: transform 180ms ease, background-color 180ms ease;
}

.employee-data-item:hover {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .employee-top-tabs a,
    .employee-data-card,
    .employee-data-item {
        transition: none;
    }
}

@media (max-width: 760px) {
    .employee-tabs-panel {
        top: 0.5rem;
    }

    .employee-data-card {
        scroll-margin-top: 5rem;
    }
}


.employee-contact-groups {
    display: grid;
    gap: 1rem;
}

.employee-contact-group {
    display: grid;
    gap: 0.9rem;
    padding: 1.1rem;
    border: 1px solid rgba(224, 229, 242, 0.95);
    border-radius: 22px;
    background: #ffffff;
}

.employee-contact-group-head {
    display: grid;
    gap: 0.2rem;
}

.employee-contact-group-head h4 {
    margin: 0;
    color: #1f2437;
    font-size: 1.05rem;
}

.employee-data-grid-compact {
    padding: 0;
    border: 0;
    border-radius: 0;
    min-height: 0;
}

.salary-history-timeline {
    position: relative;
    display: grid;
    gap: 1rem;
    padding: 0.25rem 0 0.1rem 1.35rem;
}

.salary-history-timeline::before {
    content: '';
    position: absolute;
    top: 0.7rem;
    bottom: 0.6rem;
    left: 0.42rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(91, 91, 214, 0.32), rgba(91, 91, 214, 0.08));
}

.salary-history-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 0.95rem minmax(0, 700px);
    gap: 0.85rem;
    align-items: start;
}

.salary-history-timeline-marker {
    position: relative;
    z-index: 1;
    width: 0.9rem;
    height: 0.9rem;
    margin-top: 0.55rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.94);
    background: linear-gradient(135deg, #5b5bd6, #8b5cf6);
    box-shadow: 0 0 0 4px rgba(91, 91, 214, 0.12);
}

.salary-history-entry {
    position: relative;
    display: grid;
    gap: 0.55rem;
    width: min(100%, 700px);
    justify-self: start;
    padding: 0.95rem 1rem 1rem 1.05rem;
    border: 1px solid rgba(224, 229, 242, 0.95);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 12px 24px rgba(31, 36, 55, 0.05);
}

.salary-history-entry::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: -0.68rem;
    width: 0.68rem;
    height: 2px;
    background: rgba(91, 91, 214, 0.22);
}

.salary-history-entry-date {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #5b5bd6, #7f64eb);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(91, 91, 214, 0.16);
}

.salary-history-entry-head {
    display: block;
}

.salary-history-entry-head strong {
    color: #1f2437;
    font-size: 1rem;
}

.salary-history-entry-summary,
.salary-history-entry-text {
    color: #4b5368;
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 760px) {
    .salary-history-timeline {
        padding-left: 1.05rem;
    }

    .salary-history-timeline::before {
        left: 0.32rem;
    }

    .salary-history-timeline-item {
        grid-template-columns: 0.85rem minmax(0, 1fr);
        gap: 0.7rem;
    }

    .salary-history-entry {
        width: 100%;
        padding: 0.9rem 0.9rem 0.95rem 0.95rem;
    }

    .salary-history-entry::before {
        left: -0.55rem;
        width: 0.55rem;
    }
}

@media (min-width: 900px) {
    .employee-contact-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .employee-data-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-data-grid-compact .employee-data-item-wide {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .employee-contact-group {
        padding: 1rem;
    }

    .employee-data-grid-compact .employee-data-item-wide {
        grid-column: auto;
    }
}


.employee-identity-grid {
    column-gap: 1.25rem;
    row-gap: 1rem;
    align-items: start;
}

.employee-identity-grid .full-width {
    margin-top: 0.15rem;
}

/* Minimalist Monochrome Design System */
:root {
    --mono-bg: #ffffff;
    --mono-fg: #000000;
    --mono-muted: #f5f5f5;
    --mono-muted-fg: #525252;
    --mono-border: #000000;
    --mono-border-light: #e5e5e5;
    --mono-card: #ffffff;
    --mono-inverse: #000000;
    --mono-inverse-fg: #ffffff;
    --font-display: "Roboto", Arial, sans-serif;
    --font-body: "Roboto", Arial, sans-serif;
    --font-mono: "Roboto", Arial, sans-serif;
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-xl: 0px;
    --shadow-soft: none;
}

html {
    background: var(--mono-bg);
}

body {
    position: relative;
    background: var(--mono-bg);
    color: var(--mono-fg);
    font-family: var(--font-body);
}

body::before,
body::after {
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

body::before {
    background: none;
    opacity: 0;
}

body::after {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
}

.page-shell,
.login-shell {
    position: relative;
    z-index: 1;
}

.main-panel {
    background: transparent;
}

.sidebar {
    background: var(--mono-inverse);
    border: 2px solid var(--mono-border);
    border-radius: 0;
    box-shadow: none;
    color: var(--mono-inverse-fg);
    backdrop-filter: none;
}

.sidebar-head,
.sidebar-group + .sidebar-group {
    border-color: rgba(255, 255, 255, 0.18);
}

.brand-copy strong,
.brand-copy small,
.sidebar-label,
.sidebar-nav a {
    color: var(--mono-inverse-fg);
}

.brand-copy strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand-copy small,
.sidebar-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brand-mark,
.sidebar-toggle,
.nav-icon {
    border-radius: 0;
    box-shadow: none;
}

.brand-mark {
    background: var(--mono-bg);
    color: var(--mono-fg);
}

.sidebar-toggle {
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: var(--mono-inverse-fg);
}

.sidebar-nav a {
    border: 1px solid transparent;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 100ms linear, color 100ms linear, border-color 100ms linear;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--mono-bg);
    border-color: var(--mono-bg);
    color: var(--mono-fg);
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon {
    background: transparent;
    border-color: var(--mono-border);
    color: var(--mono-fg);
}

.nav-icon {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: currentColor;
}

.topbar {
    align-items: end;
    border-bottom: 4px solid var(--mono-border);
    margin-bottom: 2.75rem;
    padding-bottom: 1.35rem;
}

.topbar h1,
.login-brand h1,
.employee-overview-bar h3,
.employee-data-head h3 {
    color: var(--mono-fg);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.05em;
}

.topbar h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    line-height: 1.15;
    max-width: none;
}

.topbar p,
.employee-overview-bar p,
.login-copy {
    color: var(--mono-muted-fg);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.7;
}

.eyebrow,
.login-brand .eyebrow,
.employee-data-item span,
.salary-history-label {
    color: var(--mono-muted-fg);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.search-shell,
input,
select,
textarea {
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--mono-border);
    border-radius: 0;
    box-shadow: none;
    color: var(--mono-fg);
    font-family: var(--font-body);
}

.search-shell {
    padding: 0 0 0.85rem;
}

.search-shell svg,
.search-shell .button-icon {
    color: var(--mono-fg);
}

input::placeholder,
textarea::placeholder,
.search-shell input::placeholder {
    color: var(--mono-muted-fg);
    font-style: italic;
}

input:focus,
select:focus,
textarea:focus,
.search-shell:focus-within {
    border-bottom-width: 4px;
    outline: none;
}

.button,
.button.secondary,
.button.ghost,
a.button,
button,
input[type="submit"] {
    border-radius: 0;
    box-shadow: none;
    font-family: var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background-color 100ms linear, color 100ms linear, border-color 100ms linear;
}

.button,
a.button,
input[type="submit"] {
    background: var(--mono-inverse);
    border: 2px solid var(--mono-border);
    color: var(--mono-inverse-fg);
}

.button:hover,
.button:focus-visible,
a.button:hover,
a.button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
    background: var(--mono-bg);
    color: var(--mono-fg);
}

.button.secondary,
.button.ghost {
    background: transparent;
    border: 2px solid var(--mono-border);
    color: var(--mono-fg);
}

.button.secondary:hover,
.button.secondary:focus-visible,
.button.ghost:hover,
.button.ghost:focus-visible {
    background: var(--mono-inverse);
    color: var(--mono-inverse-fg);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--mono-border);
    outline-offset: 3px;
}

.panel,
.stat-card,
.table-wrap,
.login-card,
.employee-overview-bar,
.employee-tabs-panel,
.employee-data-card,
.employee-contact-group,
.salary-history-entry {
    background: var(--mono-card);
    border: 1px solid var(--mono-border);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.panel,
.stat-card,
.table-wrap,
.login-card {
    padding: 1.75rem;
}

.table-wrap thead th {
    border-bottom: 2px solid var(--mono-border);
    color: var(--mono-fg);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.table-wrap tbody tr + tr td {
    border-top: 1px solid var(--mono-border-light);
}

.login-body {
    background: var(--mono-bg);
}

.login-shell {
    width: min(calc(100vw - 48px), 56rem);
}

.login-card {
    grid-template-columns: minmax(15rem, 0.9fr) minmax(18rem, 1fr);
    gap: clamp(1.25rem, 4vw, 2.25rem);
    max-width: none;
}

.login-brand {
    min-width: 0;
}

.login-brand h1 {
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.login-form {
    min-width: 0;
}

.login-form input {
    background: #eef4ff;
    border: 1px solid var(--mono-border-light);
    border-radius: 0.85rem;
}

.login-form input:focus {
    border-color: #6d7cff;
    box-shadow: 0 0 0 4px rgba(109, 124, 255, 0.18);
}

.employee-profile-shell-alt {
    gap: 1.8rem;
}

.employee-overview-bar,
.employee-tabs-panel,
.employee-data-card {
    padding: 1.7rem;
}

.employee-overview-bar {
    border-top: 4px solid var(--mono-border);
}

.employee-overview-bar h3,
.employee-data-head h3 {
    font-size: clamp(1rem, 2vw, 1.42rem);
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.employee-role-badge,
.employee-chip {
    background: var(--mono-inverse);
    border: 1px solid var(--mono-border);
    border-radius: 0;
    color: var(--mono-inverse-fg);
    font-family: var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.employee-top-tabs {
    border-bottom: 2px solid var(--mono-border);
    gap: 0.8rem;
    padding-bottom: 0.85rem;
}

.employee-top-tabs a {
    border: 1px solid var(--mono-border);
    border-radius: 0;
    color: var(--mono-fg);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    padding: 0.8rem 1rem;
    text-transform: uppercase;
}

.employee-top-tabs a:hover,
.employee-top-tabs a.active {
    background: var(--mono-inverse);
    color: var(--mono-inverse-fg);
}

.employee-data-card {
    border-top-width: 4px;
}

.employee-data-grid,
.employee-data-grid-compact,
.employee-identity-grid {
    background: transparent;
    padding: 1.3rem;
}

.employee-data-item strong,
.employee-data-item a,
.employee-contact-group strong {
    color: var(--mono-fg);
    font-family: var(--font-body);
    font-size: 1.16rem;
    font-weight: 600;
    line-height: 1.55;
}

.employee-contact-group {
    padding: 1.25rem;
}

.employee-contact-group p,
.employee-data-item p,
.salary-history-entry-summary,
.salary-history-entry-text {
    color: var(--mono-muted-fg);
}

.salary-history {
    margin-top: 2.2rem;
}

.salary-history-timeline {
    padding-left: 1.75rem;
}

.salary-history-timeline::before {
    background: var(--mono-border);
    left: 0.35rem;
    opacity: 1;
    width: 1px;
}

.salary-history-timeline-item {
    gap: 1rem;
    grid-template-columns: 0.8rem minmax(0, 42rem);
}

.salary-history-dot {
    background: var(--mono-bg);
    border: 3px solid var(--mono-border);
    box-shadow: none;
    height: 0.9rem;
    width: 0.9rem;
}

.salary-history-entry {
    background: var(--mono-card);
    border: 1px solid var(--mono-border);
    border-top-width: 4px;
    border-radius: 0;
    max-width: 42rem;
    padding: 1.2rem 1.2rem 1.25rem;
}

.salary-history-entry::before {
    background: var(--mono-border);
    height: 1px;
    left: -0.9rem;
    top: 1.2rem;
    width: 0.9rem;
}

.salary-history-entry-date {
    background: var(--mono-inverse);
    border: 1px solid var(--mono-border);
    border-radius: 0;
    box-shadow: none;
    color: var(--mono-inverse-fg);
    display: inline-flex;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    padding: 0.45rem 0.7rem;
    text-transform: uppercase;
}

.salary-history-entry-head strong {
    color: var(--mono-fg);
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.salary-history-entry-summary {
    font-size: 1.02rem;
}

@media (max-width: 1024px) {
    .topbar h1 {
        font-size: clamp(1.3rem, 3.6vw, 1.65rem);
        max-width: none;
    }

    .sidebar {
        border-width: 0 2px 0 0;
    }
}

@media (max-width: 760px) {
    .login-shell {
        width: min(calc(100vw - 32px), 34rem);
    }

    .login-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .login-brand h1 {
        font-size: clamp(1.85rem, 10vw, 2.65rem);
    }

    .topbar {
        margin-bottom: 2rem;
    }

    .employee-overview-bar h3,
    .employee-data-head h3 {
        font-size: clamp(0.95rem, 5.5vw, 1.07rem);
    }

    .topbar h1 {
        font-size: clamp(1.25rem, 6vw, 1.55rem);
    }

    .panel,
    .stat-card,
    .table-wrap,
    .login-card,
    .employee-overview-bar,
    .employee-tabs-panel,
    .employee-data-card,
    .employee-contact-group,
    .salary-history-entry {
        padding: 1.1rem;
    }

    .salary-history-timeline {
        padding-left: 1.15rem;
    }

    .salary-history-timeline::before {
        left: 0.26rem;
    }

    .salary-history-timeline-item {
        gap: 0.7rem;
        grid-template-columns: 0.55rem minmax(0, 1fr);
    }

    .salary-history-entry {
        max-width: 100%;
    }

    .salary-history-entry::before {
        left: -0.7rem;
        width: 0.7rem;
    }
}

/* Minimalist Monochrome Refinements */
.sidebar-toggle,
.sidebar-toggle-inline {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--mono-inverse-fg);
    padding: 0.25rem;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.sidebar-toggle-inline:hover,
.sidebar-toggle-inline:focus-visible {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--mono-inverse-fg);
    transform: none;
}

.employee-bullet-list {
    display: grid;
    gap: 0.45rem;
    list-style: disc;
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
}

.employee-bullet-list li {
    color: var(--mono-fg);
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.5;
}

.employee-bullet-list li::marker {
    color: var(--mono-fg);
}

.stats-grid,
.dashboard-grid,
.dashboard-main,
.dashboard-side,
.department-page,
.department-member-list,
.cards-grid,
.content-grid,
.detail-grid,
.form-actions,
.toolbar {
    gap: 1rem;
}

.stats-grid,
.dashboard-stats {
    margin-bottom: 1.5rem;
}

.panel-header,
.department-roster-header {
    align-items: end;
    margin-bottom: 1rem;
}

.panel-header h3,
.department-roster-header h3,
.department-directory-header h2,
.department-directory-header h3,
.page-head h1,
.page-head h2,
.page-head h3 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    letter-spacing: -0.03em;
    line-height: 1;
}

.department-directory-header h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.metric-card,
.mini-card,
.side-list-item,
.department-member-card,
.department-meta-chip,
.detail-grid div,
.toolbar.compact-toolbar {
    background: var(--mono-card);
    border: 1px solid var(--mono-border);
    border-radius: 0;
    box-shadow: none;
}

.metric-card {
    align-items: flex-start;
    gap: 1rem;
    min-height: 0;
    padding: 1.5rem;
}

.metric-card p,
.department-stat-label,
.department-roster-count,
.mini-card p,
.detail-grid span,
.muted-note,
.compact-toolbar label,
.side-list-item small,
.person-cell small,
.department-meta-chip span {
    color: var(--mono-muted-fg);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin: 0.45rem 0 0.3rem;
    font-size: 2.35rem;
    line-height: 1;
}

.metric-card small,
.department-hero-text,
.department-member-main p,
.hero-copy {
    color: var(--mono-muted-fg);
    line-height: 1.7;
}

.metric-icon,
.metric-icon.sky,
.metric-icon.violet,
.metric-icon.green,
.metric-icon.amber,
.department-stat-icon {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: currentColor;
    height: auto;
    justify-content: center;
    width: auto;
}

.metric-icon svg,
.department-stat-icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.text-link,
.table-link,
.side-list-link,
.mini-card-link {
    border-bottom: 1px solid var(--mono-border);
    color: var(--mono-fg);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    padding-bottom: 0.15rem;
    text-decoration: none;
    text-transform: uppercase;
}

.text-link:hover,
.table-link:hover,
.side-list-link:hover,
.mini-card-link:hover {
    color: var(--mono-fg);
}

.pill,
.pill-soft,
.pill.pending,
.pill.approved,
.pill.rejected,
.pill.status-active,
.pill.status-resigned,
.pill.status-on_leave,
.pill.status-draft,
.pill.status-finalized {
    background: var(--mono-card);
    border: 1px solid var(--mono-border);
    border-radius: 0;
    color: var(--mono-fg);
}

.avatar-badge,
.department-member-avatar {
    background: var(--mono-card);
    border: 1px solid var(--mono-border);
    border-radius: 0;
    color: var(--mono-fg);
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.92fr);
}

.table-panel,
.department-roster-panel,
.form-panel {
    padding: 1.5rem;
}

.table-wrap {
    border-radius: 0;
    padding: 0;
}

thead th {
    background: transparent;
}

.department-hero {
    background: var(--mono-card);
    border-radius: 0;
    border-top: 4px solid var(--mono-border);
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    padding: 1.75rem;
}

.department-hero-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 4.4rem);
    letter-spacing: -0.05em;
    line-height: 0.94;
    margin: 0.65rem 0 1rem;
}

.department-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    background: var(--mono-inverse);
    border: 1px solid var(--mono-border);
    border-top-width: 4px;
    border-radius: 1.25rem;
}

.department-stat-card {
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    box-shadow: none;
    color: var(--mono-inverse-fg);
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0.85rem 1rem;
    align-items: center;
    min-height: 7rem;
    padding: 1.35rem 1.5rem;
}

.department-stat-card:first-child {
    border-top: 0;
}

.department-stat-card.wide {
    grid-column: 1 / -1;
}

.department-stat-card.compact {
    grid-template-columns: minmax(4rem, auto) auto minmax(0, 1fr);
    align-items: center;
    min-height: 5.25rem;
}

.department-stat-card.compact + .department-stat-card.compact {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.department-stat-card > div {
    display: grid;
    gap: 0.45rem;
}

.department-stat-card.compact .department-stat-label {
    margin: 0;
}

.department-stat-label,
.department-stat-card small {
    color: rgba(255, 255, 255, 0.72);
}

.department-stat-card strong {
    font-size: clamp(1.55rem, 2.4vw, 2.3rem);
    line-height: 1;
    margin: 0;
}

.department-stat-card.compact strong {
    display: inline-block;
    margin-right: 0.75rem;
    vertical-align: middle;
}

.department-stat-card.compact small {
    display: inline-block;
    vertical-align: middle;
}

.department-member-card {
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1rem 1.15rem;
    transition: none;
}

.department-member-card:hover {
    border-color: var(--mono-border);
    box-shadow: none;
    transform: none;
}

.department-member-avatar {
    height: 3.25rem;
    width: 3.25rem;
}

.department-member-main h4 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1;
    margin: 0 0 0.25rem;
}

.department-member-meta {
    align-items: stretch;
    gap: 0.75rem;
}

.department-meta-chip {
    min-width: 160px;
    padding: 0.85rem 1rem;
}

.department-empty-state {
    background: var(--mono-card);
    border-radius: 0;
    border: 1px dashed var(--mono-border);
    padding: 1.5rem;
}

.toolbar.compact-toolbar {
    align-items: end;
    padding: 1rem 1.1rem;
}

.compact-toolbar input,
.compact-toolbar select {
    min-height: 3rem;
}

.content-grid.two-up {
    align-items: start;
}

.cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-card {
    min-height: 0;
    padding: 1rem 1.1rem;
}

.mini-card h4,
.detail-grid strong {
    color: var(--mono-fg);
    font-family: var(--font-body);
    font-size: 1.35rem;
    line-height: 1.25;
}

.detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
    padding: 1rem 1.1rem;
}

.form-actions.full-span {
    border-top: 4px solid var(--mono-border);
    justify-content: flex-start;
    margin-top: 0.2rem;
    padding-top: 1rem;
}

@media (max-width: 1024px) {
    .dashboard-grid,
    .department-hero,
    .cards-grid,
    .detail-grid,
    .content-grid.two-up {
        grid-template-columns: 1fr;
    }

    .department-member-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .metric-card,
    .department-hero,
    .department-stat-card,
    .department-roster-panel,
    .department-member-card,
    .mini-card,
    .detail-grid div,
    .toolbar.compact-toolbar {
        padding: 1rem;
    }

    .department-member-meta {
        justify-content: flex-start;
    }

    .department-meta-chip {
        min-width: 0;
        width: 100%;
    }
}

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

    .department-stat-card.compact {
        grid-template-columns: minmax(4rem, auto) auto minmax(0, 1fr);
    }

    .department-stat-card.compact + .department-stat-card.compact {
        border-left: 0;
    }
}

.department-hero .department-summary-grid {
    align-self: start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.department-hero .department-summary-card {
    align-content: start;
    background: var(--mono-inverse);
    border: 1px solid var(--mono-border);
    border-radius: 8px;
    color: var(--mono-inverse-fg);
    display: grid;
    gap: 0.55rem;
    min-height: 8.25rem;
    padding: 1.15rem;
}

.department-hero .department-summary-card:not(.compact) {
    grid-template-columns: 1.35rem minmax(0, 1fr);
}

.department-hero .department-summary-card.compact {
    min-height: 6.25rem;
}

.department-hero .department-summary-icon {
    align-items: center;
    color: rgba(255, 255, 255, 0.84);
    display: inline-flex;
    height: 1.35rem;
    justify-content: center;
    margin-top: 1.75rem;
    width: 1.35rem;
}

.department-hero .department-summary-icon svg {
    height: 1.1rem;
    width: 1.1rem;
}

.department-hero .department-summary-card div {
    min-width: 0;
}

.department-hero .department-summary-card span {
    color: rgba(255, 255, 255, 0.66);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.department-hero .department-summary-card strong {
    color: #fff;
    display: block;
    font-family: var(--font-body);
    font-size: clamp(1.8rem, 2.2vw, 2.25rem);
    line-height: 1;
    margin: 0.35rem 0;
    word-break: break-word;
}

.department-hero .department-summary-card strong.department-summary-money {
    font-size: clamp(1.5rem, 2vw, 2.05rem);
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
}

.department-hero .department-summary-card small {
    color: rgba(255, 255, 255, 0.72);
    display: block;
    font-size: 0.86rem;
    line-height: 1.4;
}

.department-hero .department-gender-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    margin-top: 0.75rem;
}

.department-hero .department-gender-split span {
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

@media (max-width: 1024px) {
    .department-hero .department-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .department-hero .department-summary-card:not(.compact) {
        grid-template-columns: minmax(0, 1fr);
    }

    .department-hero .department-summary-icon {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .department-hero .department-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .department-hero .department-summary-grid {
        grid-template-columns: 1fr;
    }
}

.department-page .department-hero.panel {
    display: block;
}

.department-page .department-hero-copy {
    margin-bottom: 1.4rem;
}

.department-page .department-hero .department-summary-grid {
    grid-template-columns: minmax(280px, 0.9fr) minmax(380px, 1.25fr);
}

.department-page .department-hero .department-summary-card,
.department-page .department-hero .department-summary-card:not(.compact) {
    grid-template-columns: minmax(0, 1fr);
    min-height: 7.5rem;
}

.department-page .department-hero .department-summary-card:nth-child(2) {
    min-width: 380px;
}

.department-page .department-hero .department-summary-icon {
    display: none;
}

.department-page .department-hero .department-summary-card strong {
    font-size: clamp(1.7rem, 2vw, 2.15rem);
}

.department-page .department-hero .department-summary-card strong.department-summary-money {
    font-size: clamp(1.35rem, 1.55vw, 1.7rem);
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .department-page .department-hero .department-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .department-page .department-hero .department-summary-card:nth-child(2) {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .department-page .department-hero .department-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Career History Timeline */
.career-history {
    margin-top: 0.7rem;
}

.career-history .salary-history-timeline {
    padding-left: 1.55rem;
}

.career-history-entry {
    max-width: 100%;
}

.career-history-entry-date {
    color: var(--mono-inverse-fg) !important;
    margin-bottom: 0.85rem;
}

.career-history-entry-head strong {
    color: var(--mono-fg);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.career-history-entry-text {
    color: var(--mono-fg);
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 760px) {
    .career-history .salary-history-timeline {
        padding-left: 1.15rem;
    }
}



/* Contact Detail Layout Normalization */
.employee-contact-groups {
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-contact-group {
    align-content: start;
    grid-template-rows: auto 1fr;
    height: 100%;
}

.employee-data-grid-compact {
    align-content: start;
    display: grid;
    gap: 1.35rem 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 100%;
    min-height: 0;
}

.employee-data-grid-compact .employee-data-item,
.employee-data-grid-compact .employee-data-item-wide {
    min-width: 0;
}

.employee-data-grid-compact .employee-data-item-wide {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .employee-contact-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .employee-data-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* Employee dashboard profile layout */
body:has(.employee-dashboard) {
    background: #eef3f6;
}

body:has(.employee-dashboard) .topbar {
    margin-bottom: 1.1rem;
}

.employee-dashboard {
    display: grid;
    gap: 1rem;
    color: #20242f;
}

.employee-profile-topbar,
.employee-dashboard-tabs,
.employee-dashboard-card,
.employee-side-card {
    background: #ffffff;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(28, 39, 49, 0.05);
}

.employee-profile-topbar {
    display: grid;
    grid-template-columns: minmax(15rem, 1.2fr) minmax(22rem, 1.5fr) auto;
    align-items: center;
    gap: 1.4rem;
    padding: 1.15rem 1.35rem;
}

.employee-profile-identity,
.employee-profile-actions,
.employee-profile-facts {
    display: flex;
    align-items: center;
    min-width: 0;
}

.employee-profile-identity {
    gap: 0.9rem;
}

.employee-icon-button {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #dce4e9;
    border-radius: 50%;
    background: #ffffff;
    color: #1d2530;
    text-decoration: none;
}

.employee-icon-button svg {
    width: 1.05rem;
    height: 1.05rem;
}

.employee-profile-avatar {
    width: 3.3rem;
    height: 3.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: #b9ded7;
    color: #24433e;
    font-size: 1rem;
    font-weight: 800;
}

.employee-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-profile-name {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.employee-profile-name h2 {
    margin: 0;
    overflow: hidden;
    color: #18202b;
    font-size: 1.15rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-status-pill {
    width: fit-content;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #8ac06a;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.employee-status-on_leave {
    background: #d59d3d;
}

.employee-status-resigned {
    background: #8b95a1;
}

.employee-profile-facts {
    justify-content: space-between;
    gap: 1rem;
}

.employee-profile-facts article {
    min-width: 0;
    padding-left: 1.35rem;
    border-left: 1px solid #dfe6eb;
}

.employee-profile-facts span,
.employee-detail-table span,
.employee-address-block span,
.employee-side-info-grid span,
.employee-notes-block > span,
.employee-stat-grid span {
    display: block;
    margin-bottom: 0.45rem;
    color: #7f8794;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.employee-profile-facts strong {
    display: block;
    overflow: hidden;
    color: #18202b;
    font-size: 0.86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-profile-actions {
    justify-content: flex-end;
    gap: 0.65rem;
}

.employee-count {
    color: #687280;
    font-size: 0.86rem;
    white-space: nowrap;
}

.employee-send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.45rem;
    padding: 0 0.9rem;
    border-radius: 7px;
    background: #2f6b65;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.employee-send-button svg {
    width: 1rem;
    height: 1rem;
}

.employee-dashboard-tabs {
    position: sticky;
    top: 0.75rem;
    z-index: 3;
    display: flex;
    gap: 1.6rem;
    overflow-x: auto;
    padding: 0 1.25rem;
    border-radius: 0;
    scrollbar-width: none;
}

.employee-dashboard-tabs::-webkit-scrollbar {
    display: none;
}

.employee-dashboard-tabs a,
.employee-dashboard-tabs a.active {
    flex: 0 0 auto;
    padding: 1rem 0 0.72rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #5f6874;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
}

.employee-dashboard-tabs a:hover,
.employee-dashboard-tabs a.active {
    border-bottom-color: #1b2028;
    color: #151922;
}

body:has(.employee-dashboard) .employee-dashboard-tabs a,
body:has(.employee-dashboard) .employee-dashboard-tabs a.active,
body:has(.employee-dashboard) .employee-dashboard-tabs a:hover,
body:has(.employee-dashboard) .employee-dashboard-tabs a:focus-visible {
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    color: #5f6874;
    box-shadow: none;
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
}

body:has(.employee-dashboard) .employee-dashboard-tabs a.active,
body:has(.employee-dashboard) .employee-dashboard-tabs a:hover,
body:has(.employee-dashboard) .employee-dashboard-tabs a:focus-visible {
    border-bottom-color: #151922;
    color: #151922;
}

.employee-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 23rem);
    gap: 1rem;
    align-items: start;
}

.employee-dashboard-main,
.employee-dashboard-side {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.employee-dashboard-side {
    position: sticky;
    top: 4.9rem;
}

.employee-dashboard-card,
.employee-side-card {
    display: grid;
    gap: 1.1rem;
    padding: 1.15rem;
    scroll-margin-top: 5rem;
}

.employee-dashboard-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.employee-dashboard-card-head h3 {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    min-width: 0;
    margin: 0;
    color: #1d232d;
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
}

.employee-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0 0.75rem;
    border: 1px solid #dfe6eb;
    border-radius: 7px;
    background: #ffffff;
    color: #1f2630;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.employee-edit-link svg {
    width: 0.95rem;
    height: 0.95rem;
}

.employee-detail-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #e3e8ed;
}

.employee-detail-table article {
    min-width: 0;
    padding: 1.05rem 1rem 1.05rem 0;
    border-bottom: 1px solid #e3e8ed;
}

.employee-detail-table article:nth-child(2n) {
    padding-left: 1rem;
}

.employee-detail-table article:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.employee-detail-table .sensitive-data-item {
    position: relative;
    padding-right: 3.4rem;
}

.sensitive-eye-button {
    position: absolute;
    top: 50%;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid #b7d6ff;
    border-radius: 999px;
    background: #eef6ff;
    color: #155bd4;
    cursor: pointer;
    transform: translateY(-50%);
}

.sensitive-eye-button svg {
    width: 1rem;
    height: 1rem;
}

.sensitive-eye-button:hover,
.sensitive-eye-button.is-active {
    border-color: #155bd4;
    background: #155bd4;
    color: #ffffff;
}

.sensitive-data-item.is-restricted strong,
.sensitive-data-item [data-sensitive-value] {
    color: #64748b;
}

.employee-detail-table strong,
.employee-address-block strong,
.employee-side-info-grid strong,
.employee-notes-block strong,
.employee-stat-grid strong {
    display: block;
    min-width: 0;
    color: #1e2530;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.employee-detail-wide {
    grid-column: 1 / -1;
}

.employee-address-block {
    display: grid;
    gap: 0;
    border-top: 1px solid #e3e8ed;
}

.employee-address-block article {
    padding: 1rem 0;
    border-bottom: 1px solid #e3e8ed;
}

.employee-address-block article:last-child {
    border-bottom: 0;
}

.employee-side-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.05rem 1rem;
    padding-top: 0.2rem;
}

.employee-side-info-grid strong {
    color: #216b9a;
    font-size: 0.84rem;
}

.employee-side-link {
    width: fit-content;
    color: #1d232d;
    font-size: 0.84rem;
    font-weight: 800;
}

.employee-side-link.compact {
    padding: 0.6rem 0.9rem;
    border: 1px solid #cfeadd;
    border-radius: 999px;
    background: #f0fbf6;
    color: #2f6b65;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.employee-side-kicker {
    display: block;
    margin-bottom: 0.45rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.employee-holiday-card .employee-dashboard-card-head {
    align-items: flex-start;
}

.employee-holiday-card .employee-dashboard-card-head h3 {
    font-size: clamp(1.55rem, 2.4vw, 2.05rem);
    line-height: 1.05;
}

.employee-holiday-list {
    display: grid;
    gap: 0.8rem;
}

.employee-holiday-item {
    display: grid;
    grid-template-columns: minmax(6.8rem, auto) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid #d4e4f0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff, #f8fbfd);
}

.employee-holiday-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0 0.7rem;
    border: 1px solid #b9d8ca;
    border-radius: 8px;
    background: #effaf3;
    color: #245b55;
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-align: center;
}

.employee-holiday-copy {
    min-width: 0;
}

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

.employee-holiday-item strong {
    color: #1d232d;
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1.25;
}

.employee-holiday-item small {
    margin-top: 0.35rem;
    color: #66758b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 620px) {
    .employee-holiday-item {
        grid-template-columns: 1fr;
    }

    .employee-holiday-date {
        justify-content: flex-start;
        width: fit-content;
    }
}

.employee-tag-box,
.employee-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.employee-tag-box {
    min-height: 6.3rem;
    align-content: flex-start;
    padding: 0.8rem;
    border: 1px solid #dfe6eb;
    border-radius: 7px;
}

.employee-tag-box span,
.employee-tag-list strong {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: #edf5f3;
    color: #2f6b65;
    font-size: 0.8rem;
    font-weight: 800;
}

.employee-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.employee-stat-grid article,
.employee-stat-card {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #dfe6eb;
    border-radius: 7px;
    background: #f7fafb;
}

.employee-stat-card {
    display: grid;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.employee-stat-card:hover,
.employee-stat-card:focus-visible {
    border-color: #9bc5ff;
    background: #eef6ff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.employee-stat-grid strong {
    font-size: 1.4rem;
    line-height: 1;
}

.employee-notes-block {
    display: grid;
    gap: 0.8rem;
    padding-top: 0.2rem;
}

.employee-evaluation-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    gap: 0.9rem;
    align-items: start;
}

.employee-evaluation-card {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    min-width: 0;
    padding: 0.95rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #f8fbfd;
}

.employee-evaluation-card h4 {
    margin: 0;
    color: #1d232d;
    font-size: 0.95rem;
    font-weight: 850;
    line-height: 1.25;
}

.employee-performance-stats {
    margin-bottom: 0.9rem;
}

.employee-performance-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.9rem;
    margin-top: 0.9rem;
}

.employee-inline-performance-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    align-content: start;
}

.employee-inline-performance-form .full-width {
    grid-column: 1 / -1;
}

.employee-inline-performance-form .field-group {
    min-width: 0;
    align-content: start;
    gap: 0.35rem;
}

.employee-inline-performance-form label {
    color: #66758b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-inline-performance-form input,
.employee-inline-performance-form select,
.employee-inline-performance-form textarea {
    min-height: 2.55rem;
    border: 1px solid #d9e3ea;
    border-radius: 7px;
    background: #ffffff;
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
}

.employee-inline-performance-form textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.employee-inline-performance-form .form-actions {
    justify-content: flex-end;
    padding-top: 0.2rem;
}

.performance-form-subhead {
    margin-top: 0.25rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #dfe6eb;
    border-radius: 7px;
    background: #ffffff;
    color: #216b9a;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.employee-evaluation-table {
    display: grid;
    border: 1px solid #d9e3ea;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.employee-evaluation-table.supervisor {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
}

.employee-evaluation-table.self {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr) minmax(0, 1.25fr);
}

.employee-evaluation-table article {
    min-width: 0;
    min-height: 6.4rem;
    padding: 0.85rem;
    border-right: 1px solid #d9e3ea;
}

.employee-evaluation-table article:last-child {
    border-right: 0;
}

.employee-evaluation-table span {
    display: block;
    margin-bottom: 0.55rem;
    color: #66758b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.employee-evaluation-table strong {
    display: block;
    color: #1e2530;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.employee-yearly-evaluation-block {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.95rem;
}

.employee-yearly-evaluation-list {
    display: grid;
    gap: 0.8rem;
}

.employee-yearly-evaluation-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.95rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #ffffff;
}

.employee-yearly-evaluation-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #edf1f4;
}

.employee-yearly-evaluation-card header div {
    display: grid;
    gap: 0.2rem;
}

.employee-yearly-evaluation-card small,
.employee-yearly-evaluation-grid span {
    color: #66758b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-yearly-evaluation-card strong {
    color: #1d232d;
    font-size: 0.95rem;
}

.employee-yearly-evaluation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.employee-yearly-evaluation-grid section {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #edf1f4;
    border-radius: 7px;
    background: #f8fbfd;
}

.employee-yearly-evaluation-grid p {
    margin: 0;
    color: #1e2530;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.employee-career-list {
    display: grid;
    gap: 0.7rem;
}

.employee-career-list article {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
    border: 1px solid #dfe6eb;
    border-radius: 7px;
    background: #f7fafb;
}

.employee-career-list small {
    color: #7f8794;
    font-weight: 700;
}

.employee-career-list p {
    margin: 0;
    color: #586273;
    line-height: 1.6;
}

@media (max-width: 1240px) {
    .employee-profile-topbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .employee-profile-facts {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .employee-profile-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 1020px) {
    .employee-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .employee-dashboard-side {
        position: static;
    }
}

@media (max-width: 680px) {
    .employee-profile-topbar,
    .employee-dashboard-card,
    .employee-side-card {
        padding: 0.95rem;
    }

    .employee-profile-identity,
    .employee-profile-actions {
        flex-wrap: wrap;
    }

    .employee-profile-facts {
        display: grid;
        grid-template-columns: 1fr;
    }

    .employee-profile-facts article {
        padding: 0;
        border-left: 0;
    }

    .employee-detail-table,
    .employee-side-info-grid,
    .employee-stat-grid,
    .employee-evaluation-grid,
    .employee-performance-form-grid,
    .employee-inline-performance-form,
    .employee-yearly-evaluation-grid,
    .employee-evaluation-table.supervisor,
    .employee-evaluation-table.self {
        grid-template-columns: 1fr;
    }

    .employee-evaluation-table article {
        border-right: 0;
        border-bottom: 1px solid #d9e3ea;
    }

    .employee-evaluation-table article:last-child {
        border-bottom: 0;
    }

    .employee-detail-table article,
    .employee-detail-table article:nth-child(2n) {
        padding-left: 0;
        padding-right: 0;
    }

    .employee-detail-table article:nth-last-child(-n + 2) {
        border-bottom: 1px solid #e3e8ed;
    }

    .employee-detail-table article:last-child {
        border-bottom: 0;
    }
}

/* Organization chart */
.org-chart-page {
    display: grid;
    gap: 1.1rem;
}

.org-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(28, 39, 49, 0.05);
}

.org-chart-toolbar h2 {
    margin: 0.2rem 0 0;
    color: #1f2530;
    font-size: 1.35rem;
    line-height: 1.2;
}

.org-chart-metrics {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.org-chart-metrics article {
    min-width: 7.5rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #f7fafb;
}

.org-chart-metrics span,
.org-person-card span,
.org-directory-list span {
    display: block;
    color: #667180;
    font-size: 0.78rem;
    font-weight: 600;
}

.org-chart-metrics strong {
    display: block;
    margin-top: 0.2rem;
    color: #151b24;
    font-size: 1.35rem;
    line-height: 1;
}

.org-chart-canvas {
    position: relative;
    overflow-x: auto;
    min-height: 42rem;
    padding: 1.4rem 1.2rem 1.8rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #fbfcfd;
    box-shadow: 0 10px 22px rgba(28, 39, 49, 0.05);
}

.org-chart-grid-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#cfd8df 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.7;
    pointer-events: none;
}

.org-chart-root,
.org-chart-lanes {
    position: relative;
    z-index: 1;
}

.org-chart-root {
    display: flex;
    justify-content: center;
    min-width: 82rem;
    padding-bottom: 2.15rem;
}

.org-chart-root::after {
    content: '';
    position: absolute;
    bottom: 0.4rem;
    left: 3rem;
    right: 3rem;
    height: 1px;
    background: #9da9b5;
}

.org-chart-lanes {
    display: grid;
    grid-template-columns: repeat(11, 15rem);
    align-items: start;
    gap: 1.15rem;
    min-width: 82rem;
}

.org-lane {
    position: relative;
    display: grid;
    gap: 1rem;
}

.org-lane::before {
    content: '';
    position: absolute;
    top: -1.75rem;
    left: 50%;
    width: 1px;
    height: 1.75rem;
    background: #9da9b5;
}

.org-lane h3 {
    margin: 0;
    padding: 0.58rem 0.65rem;
    border-radius: 8px;
    background: #2f64dc;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.org-lane-slate h3 {
    background: #253243;
}

.org-lane-blue h3 {
    background: #3f6ee8;
}

.org-lane-green h3 {
    background: #12a47a;
}

.org-lane-amber h3 {
    background: #c88920;
}

.org-lane-teal h3 {
    background: #25807b;
}

.org-lane-indigo h3 {
    background: #4f5fc9;
}

.org-lane-rose h3 {
    background: #c6536e;
}

.org-lane-purple h3 {
    background: #7b5ac8;
}

.org-lane-orange h3 {
    background: #cf6f2f;
}

.org-lane-gray h3 {
    background: #596575;
}

.org-lane-cyan h3 {
    background: #2389a8;
}

.org-lane-people {
    display: grid;
    gap: 0.8rem;
}

.org-person-card {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    min-height: 4.15rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(28, 39, 49, 0.06);
}

.org-person-card-root {
    width: 17rem;
}

.org-avatar {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcebe8;
    color: #2f6b65;
    font-size: 0.8rem;
    font-weight: 900;
}

.org-person-card strong {
    display: block;
    overflow: hidden;
    color: #1b222d;
    font-size: 0.84rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-person-card span {
    margin-top: 0.18rem;
    line-height: 1.35;
}

.org-directory-panel {
    padding: 1.1rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(28, 39, 49, 0.05);
}

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

.org-directory-card {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
    padding: 0.95rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #f9fbfc;
}

.org-directory-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.org-directory-card-head h4 {
    margin: 0;
    color: #1d2530;
    font-size: 1rem;
}

.org-directory-card-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e7f0f4;
    color: #2d5d70;
    font-weight: 900;
}

.org-directory-list {
    display: grid;
}

.org-directory-list div {
    display: grid;
    gap: 0.18rem;
    padding: 0.65rem 0;
    border-top: 1px solid #e2e8ed;
}

.org-directory-list strong {
    color: #202733;
    font-size: 0.86rem;
}

@media (max-width: 1100px) {
    .org-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .org-chart-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .org-chart-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .org-chart-metrics article {
        min-width: 0;
    }

    .org-directory-grid {
        grid-template-columns: 1fr;
    }
}

/* Organization structure editor */
body:has(.org-structure-app) {
    background: #d9dee5;
}

body:has(.org-structure-app) .topbar {
    display: none;
}

body:has(.org-structure-app) .main-panel {
    padding-top: 0;
}

.org-structure-app {
    min-height: calc(100vh - 2rem);
    overflow: hidden;
    border: 1px solid #d9e0e6;
    border-radius: 10px;
    background: #f8fafc;
    box-shadow: 0 20px 45px rgba(18, 28, 39, 0.12);
}

.org-editor-topbar,
.org-editor-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #ffffff;
    border-bottom: 1px solid #e1e7ed;
}

.org-editor-topbar {
    min-height: 4.2rem;
    padding: 0.85rem 1.25rem;
}

.org-editor-title,
.org-editor-actions,
.org-status-left,
.org-status-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.org-editor-title > strong {
    padding-left: 1rem;
    border-left: 1px solid #e0e7ed;
    color: #1e2633;
    font-size: 0.9rem;
}

.org-back-button,
.org-round-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dde5eb;
    border-radius: 50%;
    background: #ffffff;
    color: #566171;
}

.org-back-button {
    width: 2.2rem;
    height: 2.2rem;
}

.org-back-button svg,
.org-round-button svg,
.org-mini-button svg,
.org-search-field svg {
    width: 1rem;
    height: 1rem;
}

.org-editor-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: #1f2631;
    font-size: 1.05rem;
    font-weight: 900;
}

.org-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.3rem;
    background: #f4c542;
    color: #26313e;
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
}

.org-editor-button,
.org-mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.2rem;
    padding: 0 1.25rem;
    border: 1px solid #dbe4ea;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2631;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.org-editor-button-save {
    min-width: 6.8rem;
    border-color: #2d6b66;
    background: #2d6b66;
    color: #ffffff;
}

.org-editor-statusbar {
    min-height: 3.4rem;
    padding: 0.62rem 1rem;
}

.org-status-left span {
    color: #758191;
    font-size: 0.8rem;
    font-weight: 700;
}

.org-round-button {
    width: 2rem;
    height: 2rem;
}

.org-editor-shell {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    height: calc(100vh - 10.6rem);
    min-height: 38rem;
    background: #eef4f8;
}

.org-editor-sidebar {
    overflow-y: auto;
    padding: 1rem;
    border-right: 1px solid #dce5ec;
    background: #ffffff;
}

.org-search-field {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    min-height: 2.35rem;
    padding: 0 0.75rem;
    border: 1px solid #dfe7ed;
    border-radius: 7px;
    color: #9aa5b2;
}

.org-search-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #26313e;
    font-size: 0.82rem;
}

.org-tree-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.15rem;
}

.org-tree-group {
    display: grid;
    gap: 0.7rem;
}

.org-tree-group > a {
    display: grid;
    grid-template-columns: 0.8rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    color: #26313e;
    text-decoration: none;
}

.org-tree-caret {
    color: #687586;
    font-size: 0.72rem;
    font-weight: 900;
}

.org-tree-group strong {
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-tree-group em {
    min-width: 1.25rem;
    padding: 0.16rem 0.35rem;
    border-radius: 0.35rem;
    background: #eef2f5;
    color: #687586;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
    text-align: center;
}

.org-tree-people {
    display: grid;
    gap: 0.65rem;
    padding-left: 1rem;
}

.org-tree-people span {
    display: grid;
    grid-template-columns: 1.55rem minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    color: #526071;
    font-size: 0.8rem;
    font-weight: 700;
}

.org-tree-people i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    background: #d8eee9;
    color: #2d6b66;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.org-editor-canvas {
    position: relative;
    overflow: auto;
    background: #f5f9fc;
}

.org-canvas-grid {
    position: absolute;
    inset: 0;
    min-width: 164rem;
    min-height: 78rem;
    background-image: radial-gradient(#c8d4de 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.78;
    pointer-events: none;
}

.org-canvas-content {
    position: relative;
    z-index: 1;
    width: 164rem;
    min-height: 78rem;
    padding: 0.5rem 2.2rem 4rem;
}

.org-root-row {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 0 0 4.6rem;
}

.org-root-row::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1.5px;
    height: 4.25rem;
    background: #2d8ee4;
}

.org-department-network {
    position: relative;
    display: grid;
    grid-template-columns: repeat(11, 13rem);
    align-items: start;
    gap: 1.5rem;
}

.org-department-network::before {
    content: '';
    position: absolute;
    top: -2.25rem;
    left: 6.5rem;
    right: 6.5rem;
    height: 1.5px;
    background: #2d8ee4;
}

.org-network-column {
    position: relative;
    display: grid;
    gap: 3.3rem;
}

.org-network-column::before {
    content: '';
    position: absolute;
    top: -2.25rem;
    left: 50%;
    width: 1.5px;
    height: 2.25rem;
    background: #2d8ee4;
}

.org-team-branch {
    position: relative;
    display: grid;
    gap: 1.55rem;
}

.org-team-branch::before {
    content: '';
    position: absolute;
    top: -2.8rem;
    bottom: 2.5rem;
    left: 50%;
    width: 1.5px;
    background: #91c4f1;
}

.org-team-branch .org-node-card {
    position: relative;
}

.org-team-branch .org-node-card::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -1.55rem;
    width: 1.5px;
    height: 1.55rem;
    background: #91c4f1;
}

.org-node-card {
    position: relative;
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.55rem 0.7rem;
    min-height: 5rem;
    padding: 0.75rem 0.8rem 0.55rem;
    border: 1px solid #dfe8ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(33, 47, 62, 0.08);
}

.org-node-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 0 0 8px 8px;
    background: #2d8ee4;
}

.org-node-card-primary::after,
.org-network-slate .org-node-card::after {
    background: #ba4fe4;
}

.org-network-blue .org-node-card::after,
.org-network-indigo .org-node-card::after,
.org-network-cyan .org-node-card::after {
    background: #2d8ee4;
}

.org-network-green .org-node-card::after,
.org-network-teal .org-node-card::after {
    background: #19a37f;
}

.org-network-amber .org-node-card::after,
.org-network-orange .org-node-card::after {
    background: #e0a22b;
}

.org-network-rose .org-node-card::after,
.org-network-purple .org-node-card::after {
    background: #c45dd7;
}

.org-node-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    background: #d9eee9;
    color: #2d6b66;
    font-size: 0.75rem;
    font-weight: 900;
}

.org-node-copy {
    min-width: 0;
}

.org-node-copy strong,
.org-node-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-node-copy strong {
    color: #1e2633;
    font-size: 0.78rem;
    line-height: 1.25;
}

.org-node-copy span {
    margin-top: 0.16rem;
    color: #667385;
    font-size: 0.7rem;
    font-weight: 700;
}

.org-node-tools {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.35rem;
    color: #9ba7b5;
    font-size: 0.62rem;
    font-weight: 900;
    text-align: center;
}

.org-node-tools:empty {
    display: none;
}

.org-node-tools a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 4px;
    background: #f2f6f9;
    color: #516173;
    font-size: 0.66rem;
    font-weight: 900;
    text-decoration: none;
}

.org-node-tools a:hover,
.org-node-tools a:focus-visible {
    background: #e4f0fb;
    color: #1e6bad;
}

.org-node-add {
    position: absolute;
    left: 50%;
    bottom: -1.02rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateX(-50%);
    border: 0;
    border-radius: 50%;
    background: #111923;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

@media (max-width: 900px) {
    .org-editor-shell {
        grid-template-columns: 1fr;
        height: auto;
    }

    .org-editor-sidebar {
        max-height: 18rem;
        border-right: 0;
        border-bottom: 1px solid #dce5ec;
    }

    .org-editor-canvas {
        min-height: 38rem;
    }
}

/* Circular visual organization tree */
body:has(.org-tree-page) {
    background: #eef2f5;
}

body:has(.org-tree-page) .topbar {
    margin-bottom: 1rem;
}

.org-tree-page {
    display: grid;
    gap: 1rem;
}

.org-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(28, 39, 49, 0.05);
}

.org-tree-header h2 {
    margin: 0.2rem 0 0;
    color: #202733;
    font-size: 1.35rem;
    line-height: 1.2;
}

.org-tree-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0 1rem;
    border-radius: 7px;
    background: #2f6b65;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.org-tree-canvas {
    overflow: auto;
    min-height: 44rem;
    padding: 2.2rem 2rem 3rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(28, 39, 49, 0.05);
}

.org-tree-root,
.org-tree-branches,
.org-tree-branch,
.org-tree-children {
    position: relative;
}

.org-tree-root {
    display: flex;
    justify-content: center;
    min-width: 78rem;
    padding-bottom: 4.2rem;
}

.org-tree-root::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: 4rem;
    transform: translateX(-50%);
    background: #d7d7d7;
}

.org-tree-branches {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    min-width: 78rem;
    padding-top: 3rem;
}

.org-tree-branches::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7rem;
    right: 7rem;
    height: 2px;
    background: #d7d7d7;
}

.org-tree-branch {
    display: grid;
    justify-items: center;
    gap: 3.2rem;
    width: 10.5rem;
}

.org-tree-branch::before {
    content: '';
    position: absolute;
    top: -3rem;
    left: 50%;
    width: 2px;
    height: 3rem;
    transform: translateX(-50%);
    background: #d7d7d7;
}

.org-tree-children {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.1rem;
    width: max-content;
    max-width: 32rem;
    flex-wrap: wrap;
    padding-top: 2.7rem;
}

.org-tree-children::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.85rem;
    right: 1.85rem;
    height: 2px;
    background: #d7d7d7;
}

.org-tree-children::after {
    content: '';
    position: absolute;
    top: -3.2rem;
    left: 50%;
    width: 2px;
    height: 3.2rem;
    transform: translateX(-50%);
    background: #d7d7d7;
}

.org-tree-children .org-tree-person::before {
    content: '';
    position: absolute;
    top: -2.7rem;
    left: 50%;
    width: 2px;
    height: 2.7rem;
    transform: translateX(-50%);
    background: #d7d7d7;
}

.org-tree-person {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.35rem;
    width: 9.6rem;
    color: #3a3d44;
    text-align: center;
}

.org-tree-avatar {
    position: relative;
    width: 5.5rem;
    height: 5.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0.35rem solid currentColor;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 32%, #ffd2b8 0 18%, transparent 19%),
        linear-gradient(#26313e 0 44%, #f3f6fa 45% 100%);
    box-shadow:
        inset 0 0 0 0.35rem rgba(255, 255, 255, 0.9),
        0 6px 14px rgba(24, 35, 48, 0.14);
    color: transparent;
    overflow: hidden;
}

.org-tree-avatar::before {
    content: '';
    position: absolute;
    top: 1.1rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #ffd2b8;
}

.org-tree-avatar::after {
    content: '';
    position: absolute;
    bottom: 0.95rem;
    width: 2.55rem;
    height: 2.2rem;
    border-radius: 1.4rem 1.4rem 0.4rem 0.4rem;
    background: #2f3a47;
}

.org-tree-person strong {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #50545d;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.org-tree-person small {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #8b9098;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-tree-person-small {
    width: 6.7rem;
}

.org-tree-person-small .org-tree-avatar {
    width: 3.9rem;
    height: 3.9rem;
    border-width: 0.24rem;
}

.org-tree-person-small .org-tree-avatar::before {
    top: 0.75rem;
    width: 0.8rem;
    height: 0.8rem;
}

.org-tree-person-small .org-tree-avatar::after {
    bottom: 0.66rem;
    width: 1.85rem;
    height: 1.5rem;
}

.org-tree-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
    opacity: 0;
    transition: opacity 140ms ease;
}

.org-tree-person:hover .org-tree-links,
.org-tree-person:focus-within .org-tree-links {
    opacity: 1;
}

.org-tree-links a {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: #f2f5f7;
    color: #566170;
    font-size: 0.58rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
}

.org-ring-root {
    color: #5d4d31;
}

.org-ring-slate {
    color: #df5b22;
}

.org-ring-blue,
.org-ring-indigo,
.org-ring-cyan {
    color: #19a9db;
}

.org-ring-green,
.org-ring-teal {
    color: #76ba42;
}

.org-ring-amber,
.org-ring-orange {
    color: #f6a600;
}

.org-ring-rose,
.org-ring-purple {
    color: #e05270;
}

.org-ring-gray {
    color: #8a8f98;
}

@media (max-width: 900px) {
    .org-tree-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .org-tree-canvas {
        padding: 1.5rem 1rem 2rem;
    }
}

/* Department directory redesign */
body:has(.department-directory-page) {
    background: #f3f7fa;
}

body:has(.department-directory-page) .topbar {
    align-items: flex-start;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dbe5ec;
}

body:has(.department-directory-page) .topbar h1 {
    color: #18212c;
    font-family: inherit;
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0;
}

body:has(.department-directory-page) .topbar .eyebrow,
.department-directory-page .eyebrow {
    width: fit-content;
    padding: 0;
    background: transparent;
    color: #69768a;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body:has(.department-directory-page) .search-shell {
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.8rem 0.95rem;
}

body:has(.department-directory-page) .button,
body:has(.department-directory-page) .button.secondary,
body:has(.department-directory-page) .ghost-button {
    border-radius: 8px;
    letter-spacing: 0.08em;
}

.department-directory-page {
    display: grid;
    gap: 1.1rem;
}

.department-directory-hero.panel,
.department-directory-panel.panel {
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(31, 47, 65, 0.07);
}

.department-directory-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.82fr);
    gap: 2rem;
    align-items: center;
    padding: 1.35rem;
}

.department-directory-copy {
    display: grid;
    gap: 0.65rem;
}

.department-directory-copy h2 {
    margin: 0;
    color: #18212c;
    font-family: inherit;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.1;
}

.department-directory-text {
    max-width: 42rem;
    margin: 0;
    color: #66758b;
    font-size: 0.96rem;
    line-height: 1.65;
}

.department-directory-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.directory-stat-tile {
    min-height: 6.2rem;
    padding: 1rem;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #f8fbfd;
    box-shadow: none;
}

.directory-stat-tile.highlight {
    border-color: #4f6fda;
    background: linear-gradient(135deg, #4f6fda 0%, #6a5be7 100%);
    box-shadow: 0 18px 34px rgba(83, 102, 218, 0.22);
}

.directory-stat-tile span {
    display: block;
    color: #738198;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.directory-stat-tile strong {
    display: block;
    margin: 0.45rem 0 0.35rem;
    color: #18212c;
    font-size: 1.75rem;
    line-height: 1;
}

.directory-stat-tile small {
    color: #66758b;
    font-size: 0.78rem;
    font-weight: 700;
}

.directory-stat-tile.highlight span,
.directory-stat-tile.highlight strong,
.directory-stat-tile.highlight small {
    color: #ffffff;
}

.department-add-button {
    grid-column: 1 / -1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0 1.05rem;
    border: 1px solid #2f6b65;
    border-radius: 8px;
    background: #2f6b65;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 12px 22px rgba(47, 107, 101, 0.18);
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.department-add-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
    line-height: 1;
}

.department-add-button:hover,
.department-add-button:focus-visible {
    background: #255a55;
    border-color: #255a55;
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(47, 107, 101, 0.24);
    transform: translateY(-1px);
}

.department-directory-panel {
    padding: 1.3rem;
}

.department-directory-header {
    align-items: center;
    margin-bottom: 1rem;
}

.department-directory-header h2 {
    margin: 0.15rem 0 0;
    color: #18212c;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
}

.department-directory-note {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #eef6ff;
    color: #2f68a5;
    font-size: 0.82rem;
    font-weight: 850;
}

.department-directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.department-directory-card {
    display: grid;
    gap: 0.95rem;
    min-height: 10.6rem;
    padding: 1rem;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #ffffff;
    color: #18212c;
    box-shadow: none;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.department-directory-card:hover,
.department-directory-card:focus-visible {
    border-color: #9bc2e6;
    background: #f8fbfd;
    box-shadow: 0 10px 20px rgba(31, 47, 65, 0.08);
    color: #18212c;
    transform: translateY(-1px);
}

body:has(.department-directory-page) .department-directory-card:hover,
body:has(.department-directory-page) .department-directory-card:focus-visible {
    background: #f8fbfd;
    color: #18212c;
}

body:has(.department-directory-page) .department-directory-card:hover h4,
body:has(.department-directory-page) .department-directory-card:hover strong,
body:has(.department-directory-page) .department-directory-card:focus-visible h4,
body:has(.department-directory-page) .department-directory-card:focus-visible strong {
    color: #18212c;
}

.department-directory-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.department-directory-icon {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid #cfdde8;
    border-radius: 8px;
    background: #f4f8fb;
    color: #2f6b65;
    line-height: 1;
}

.department-directory-icon svg {
    width: 1rem;
    height: 1rem;
    display: block;
    margin: auto;
    place-self: center;
}

.department-directory-code {
    padding: 0.42rem 0.55rem;
    border: 1px solid #cfdde8;
    border-radius: 7px;
    background: #ffffff;
    color: #4c5a6d;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.department-directory-card h4 {
    margin: 0;
    color: #18212c;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.25;
}

.department-directory-card-bottom {
    display: grid;
    grid-template-columns: 1.05fr 1.45fr 0.9fr auto;
    gap: 0.75rem;
    align-items: end;
    padding-top: 0.85rem;
    border-top: 1px solid #dbe5ec;
}

.department-directory-card-bottom span:not(.department-directory-open) {
    display: block;
    margin-bottom: 0.25rem;
    color: #7a879a;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.department-directory-card-bottom strong {
    display: block;
    color: #18212c;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.25;
}

.department-directory-open {
    color: #2f6b65;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.department-directory-card:hover .department-directory-card-bottom span:not(.department-directory-open) {
    color: #7a879a;
}

@media (max-width: 1180px) {
    .department-directory-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .department-directory-hero.panel,
    .department-directory-panel.panel {
        padding: 1rem;
    }

    .department-directory-stats,
    .department-directory-grid,
    .department-directory-card-bottom {
        grid-template-columns: 1fr;
    }

    .department-directory-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Department detail redesign */
body:has(.department-page):not(:has(.department-directory-page)) {
    background: #f3f7fa;
}

body:has(.department-page):not(:has(.department-directory-page)) .topbar {
    align-items: flex-start;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dbe5ec;
}

body:has(.department-page):not(:has(.department-directory-page)) .topbar h1 {
    color: #18212c;
    font-family: inherit;
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0;
}

body:has(.department-page):not(:has(.department-directory-page)) .topbar .eyebrow,
.department-page .eyebrow {
    color: #69768a;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body:has(.department-page):not(:has(.department-directory-page)) .search-shell {
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.8rem 0.95rem;
}

.department-page {
    display: grid;
    gap: 1.1rem;
}

.department-page .department-hero.panel,
.department-page .department-roster-panel.panel {
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(31, 47, 65, 0.07);
}

.department-page .department-hero.panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(28rem, 0.9fr);
    align-items: center;
    gap: 2rem;
    padding: 1.35rem;
    border-top: 1px solid #dbe5ec;
}

.department-page .department-hero-copy {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.department-page .department-hero-copy h2 {
    margin: 0;
    color: #18212c;
    font-family: inherit;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.05;
}

.department-page .department-hero-text {
    max-width: 44rem;
    margin: 0;
    color: #66758b;
    font-size: 0.96rem;
    line-height: 1.65;
}

.department-page .department-hero .department-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
}

.department-page .department-hero .department-summary-card,
.department-page .department-hero .department-summary-card:not(.compact) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem;
    min-height: 8rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #f8fbfd;
    color: #18212c;
}

.department-page .department-hero .department-summary-card:nth-child(2) {
    min-width: 0;
    border-color: #5366da;
    background: linear-gradient(135deg, #4f6fda 0%, #6a5be7 100%);
    box-shadow: 0 18px 34px rgba(83, 102, 218, 0.22);
    color: #ffffff;
}

.department-page .department-hero .department-summary-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-grid;
    place-items: center;
    align-self: start;
    justify-self: center;
    margin: 0;
    padding: 0;
    border-radius: 9px;
    background: #edf7f5;
    color: #2f6b65;
    line-height: 1;
    position: relative;
}

.department-page .department-hero .department-summary-icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    margin: 0;
    transform: translate(-50%, -50%);
}

.department-page .department-hero .department-summary-card > div {
    display: grid;
    align-content: start;
}

.department-page .department-hero .department-summary-card:nth-child(2) .department-summary-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.department-page .department-hero .department-summary-icon svg {
    width: 1.18rem;
    height: 1.18rem;
    display: block;
    stroke-width: 2.1;
    overflow: visible;
}

.department-page .department-hero .department-summary-icon svg * {
    vector-effect: non-scaling-stroke;
}

.department-page .department-hero .department-summary-card span {
    display: block;
    color: #738198;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.department-page .department-hero .department-summary-card strong,
.department-page .department-hero .department-summary-card strong.department-summary-money {
    display: block;
    margin: 0.45rem 0 0.35rem;
    color: #18212c;
    font-family: inherit;
    font-size: clamp(1.65rem, 2.4vw, 2.1rem);
    font-weight: 900;
    line-height: 1;
    white-space: normal;
}

.department-page .department-hero .department-summary-card:nth-child(2) span,
.department-page .department-hero .department-summary-card:nth-child(2) strong,
.department-page .department-hero .department-summary-card:nth-child(2) small {
    color: #ffffff;
}

.department-page .department-hero .department-summary-card small {
    color: #66758b;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
}

.department-page .department-hero .department-gender-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.department-page .department-hero .department-gender-split span {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #e9f2f7;
    color: #4d6376;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: none;
}

.department-page .department-roster-panel.panel {
    padding: 1.2rem;
}

.department-page .department-roster-header {
    align-items: center;
    margin-bottom: 1rem;
}

.department-page .department-roster-header h3 {
    margin: 0.15rem 0 0;
    color: #18212c;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
}

.department-page .department-roster-count {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #eef6ff;
    color: #2f68a5;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: none;
}

.department-page .department-member-list {
    display: grid;
    gap: 0.75rem;
}

.department-page .department-member-card {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(0, auto);
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.department-page .department-member-card:hover,
.department-page .department-member-card:focus-within {
    border-color: #9bc2e6;
    background: #f8fbfd;
    box-shadow: 0 10px 20px rgba(31, 47, 65, 0.08);
    transform: translateY(-1px);
}

.department-page .department-member-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.department-page .department-member-avatar {
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: #dcebe8;
    color: #2f6b65;
    font-weight: 900;
    letter-spacing: 0;
}

.department-page .department-member-main h4 {
    margin: 0 0 0.25rem;
    color: #18212c;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
}

.department-page .department-member-main p {
    margin: 0;
    color: #66758b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.department-page .table-link {
    border: 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: 0;
    padding: 0;
    text-decoration: none;
    text-transform: none;
}

.department-page .table-link:hover {
    color: #2f68a5;
}

.department-page .department-member-meta {
    display: grid;
    grid-template-columns: minmax(14rem, 18rem) minmax(8rem, 10rem) auto;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.department-page .department-meta-chip {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #f8fbfd;
}

.department-page .department-meta-chip span {
    display: block;
    margin: 0 0 0.25rem;
    color: #7a879a;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.department-page .department-meta-chip strong {
    display: block;
    color: #18212c;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.department-page .pill {
    min-height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid #cfe4d8;
    border-radius: 999px;
    background: #effaf3;
    color: #2f7a4b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.department-page .pill.status-resigned {
    border-color: #d9dfe7;
    background: #f1f4f7;
    color: #637083;
}

.department-page .pill.status-on_leave {
    border-color: #f1ddb2;
    background: #fff8eb;
    color: #a66d16;
}

@media (max-width: 1180px) {
    .department-page .department-hero.panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .department-page .department-member-card {
        grid-template-columns: 1fr;
    }

    .department-page .department-member-meta {
        grid-template-columns: minmax(0, 1fr) minmax(8rem, 10rem) auto;
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .department-page .department-hero .department-summary-grid {
        grid-template-columns: 1fr;
    }

    .department-page .department-roster-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .department-page .department-member-meta,
    .department-page .department-meta-chip {
        width: 100%;
    }

    .department-page .department-member-meta {
        grid-template-columns: 1fr;
    }
}

/* Employee directory redesign */
body:has(.employee-directory-page) {
    background: #f3f7fa;
}

body:has(.employee-directory-page) .topbar {
    align-items: flex-start;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dbe5ec;
}

body:has(.employee-directory-page) .topbar h1 {
    color: #18212c;
    font-family: inherit;
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0;
}

body:has(.employee-directory-page) .topbar .eyebrow,
.employee-directory-page .eyebrow {
    width: fit-content;
    padding: 0;
    background: transparent;
    color: #69768a;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body:has(.employee-directory-page) .search-shell {
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.8rem 0.95rem;
}

body:has(.employee-directory-page) .button,
body:has(.employee-directory-page) .button.secondary,
body:has(.employee-directory-page) .ghost-button {
    border-radius: 8px;
    letter-spacing: 0.08em;
}

.employee-directory-page {
    display: grid;
    gap: 1.1rem;
}

.employee-directory-hero.panel,
.employee-directory-panel.panel {
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(31, 47, 65, 0.07);
}

.employee-directory-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.82fr);
    gap: 2rem;
    align-items: center;
    padding: 1.35rem;
}

.employee-directory-copy {
    display: grid;
    gap: 0.65rem;
}

.employee-directory-copy h2 {
    margin: 0;
    color: #18212c;
    font-family: inherit;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.1;
}

.employee-directory-text {
    max-width: 42rem;
    margin: 0;
    color: #66758b;
    font-size: 0.96rem;
    line-height: 1.65;
}

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

.employee-directory-stat {
    min-height: 6.2rem;
    padding: 1rem;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #f8fbfd;
}

.employee-directory-stat.highlight {
    border-color: #4f6fda;
    background: linear-gradient(135deg, #4f6fda 0%, #6a5be7 100%);
    box-shadow: 0 18px 34px rgba(83, 102, 218, 0.22);
}

.employee-directory-stat span {
    display: block;
    color: #738198;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.employee-directory-stat strong {
    display: block;
    margin: 0.45rem 0 0.35rem;
    color: #18212c;
    font-size: 1.75rem;
    line-height: 1;
}

.employee-directory-stat small {
    color: #66758b;
    font-size: 0.78rem;
    font-weight: 700;
}

.employee-directory-stat.highlight span,
.employee-directory-stat.highlight strong,
.employee-directory-stat.highlight small {
    color: #ffffff;
}

.employee-directory-panel {
    padding: 1.3rem;
}

.employee-directory-filter {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(13rem, 18rem) auto auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.employee-directory-filter input,
.employee-directory-filter select {
    width: 100%;
    min-height: 2.6rem;
    padding: 0 0.85rem;
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #ffffff;
    color: #18212c;
    font-size: 0.88rem;
}

.employee-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0 1.05rem;
    border: 1px solid #2f6b65;
    border-radius: 8px;
    background: #2f6b65;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 12px 22px rgba(47, 107, 101, 0.18);
}

.employee-filter-button:hover,
.employee-filter-button:focus-visible {
    background: #255a55;
    border-color: #255a55;
}

.employee-directory-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0 1.05rem;
    border: 1px solid #d2e1ec;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.employee-directory-create:hover,
.employee-directory-create:focus-visible {
    border-color: #2f6b65;
    color: #2f6b65;
}

.employee-directory-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    background: #ffffff;
}

.employee-directory-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: separate;
    border-spacing: 0;
}

.employee-directory-table thead th {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #dbe5ec;
    background: #f8fbfd;
    color: #728197;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-align: left;
    text-transform: uppercase;
}

.employee-directory-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5edf2;
    color: #18212c;
    font-size: 0.88rem;
    vertical-align: middle;
}

.employee-directory-table tbody tr:last-child td {
    border-bottom: 0;
}

.employee-directory-table tbody tr {
    transition: background-color 140ms ease;
}

.employee-directory-table tbody tr:hover {
    background: #f8fbfd;
}

.employee-directory-page .person-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    border: 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: 0;
    padding: 0;
    text-decoration: none;
    text-transform: none;
}

.employee-directory-page .avatar-badge {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: #dcebe8;
    color: #2f6b65;
    font-weight: 900;
}

.employee-directory-page .avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-directory-page .person-cell strong {
    display: block;
    color: #18212c;
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.2;
}

.employee-directory-page .person-cell small,
.employee-directory-table td small {
    display: block;
    margin-top: 0.22rem;
    color: #66758b;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-directory-page .pill {
    min-height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid #cfe4d8;
    border-radius: 999px;
    background: #effaf3;
    color: #2f7a4b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.employee-directory-page .pill.status-resigned {
    border-color: #d9dfe7;
    background: #f1f4f7;
    color: #637083;
}

.employee-directory-page .pill.status-on_leave {
    border-color: #f1ddb2;
    background: #fff8eb;
    color: #a66d16;
}

.employee-directory-page .empty-cell {
    padding: 2rem;
    color: #66758b;
    text-align: center;
}

@media (max-width: 1020px) {
    .employee-directory-hero,
    .employee-directory-filter {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .employee-directory-hero.panel,
    .employee-directory-panel.panel {
        padding: 1rem;
    }

    .employee-directory-stats {
        grid-template-columns: 1fr;
    }
}

/* Sidebar refresh to match HRIS design reference */
.sidebar {
    border: 1px solid #dbe5ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(31, 47, 65, 0.1);
    backdrop-filter: none;
}

.brand {
    padding: 0.75rem 0.7rem 1rem;
}

.brand-mark {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 10px;
    background: #edf7f5;
    color: #2f6b65;
    box-shadow: none;
}

.brand-copy strong {
    color: #18212c;
    font-size: 1rem;
    line-height: 1.15;
}

.brand-copy small {
    color: #66758b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.35;
    text-transform: uppercase;
}

.sidebar-toggle-inline {
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #f8fbfd;
    color: #4e6074;
}

.sidebar-group {
    margin-top: 0.95rem;
}

.sidebar-label {
    padding: 0 0.75rem;
    margin-bottom: 0.45rem;
    color: #738198;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.sidebar-nav {
    gap: 0.25rem;
}

.sidebar-nav a,
.sidebar-logout-link {
    min-height: 2.75rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #425066;
    font-weight: 850;
    letter-spacing: 0;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.sidebar-logout-link:hover,
.sidebar-logout-link:focus-visible {
    border-color: #dbe5ec;
    background: #f4f8fb;
    color: #18212c;
}

.sidebar-nav a.active {
    border-color: #c8dce9;
    background: #eef6ff;
    color: #1f5f96;
}

.nav-icon {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #ffffff;
    color: #607187;
}

.nav-icon svg {
    width: 1rem;
    height: 1rem;
    display: block;
    margin: auto;
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon,
.sidebar-logout-link:hover .nav-icon,
.sidebar-logout-link:focus-visible .nav-icon {
    border-color: #b8d7ea;
    background: #ffffff;
    color: #2f6b65;
}

.sidebar-subnav {
    display: grid;
    gap: 0.2rem;
    margin: -0.1rem 0 0.35rem 2.55rem;
    padding-left: 0.85rem;
    border-left: 1px solid #dbe5ec;
}

.sidebar-subnav a {
    min-height: 2rem;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    color: #647389;
    font-size: 0.78rem;
    font-weight: 850;
}

.sidebar-subnav a:hover,
.sidebar-subnav a.active {
    border-color: #c8dce9;
    background: #eef6ff;
    color: #1f5f96;
}

body.sidebar-collapsed .sidebar-subnav {
    display: none;
}

.sidebar-logout-link {
    color: #66758b;
}

/* Readability fixes for wide organization trees */
.org-tree-canvas {
    min-height: 48rem;
    padding: 2.4rem 2.4rem 3.4rem;
}

.org-tree-root {
    min-width: 192rem;
    padding-bottom: 4.4rem;
}

.org-tree-branches {
    display: grid;
    grid-template-columns: repeat(11, minmax(15.5rem, 1fr));
    gap: 2.4rem;
    min-width: 192rem;
}

.org-tree-branches::before {
    left: 7.75rem;
    right: 7.75rem;
}

.org-tree-branch {
    width: 100%;
    min-width: 15.5rem;
    gap: 3.4rem;
}

.org-tree-children {
    display: grid;
    grid-template-columns: repeat(3, minmax(5.8rem, 1fr));
    gap: 1.45rem 0.85rem;
    width: 100%;
    max-width: none;
    justify-items: center;
}

.org-tree-children::before {
    left: 2.9rem;
    right: 2.9rem;
}

.org-tree-person {
    width: 10.8rem;
}

.org-tree-person-small {
    width: 5.9rem;
}

.org-tree-person strong {
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: normal;
}

.org-tree-person small {
    display: -webkit-box;
    min-height: 1.55rem;
    overflow: hidden;
    font-size: 0.58rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.org-tree-person-small strong {
    font-size: 0.58rem;
}

.org-tree-person-small small {
    font-size: 0.5rem;
}

.org-tree-avatar {
    width: 5.1rem;
    height: 5.1rem;
}

.org-tree-person-small .org-tree-avatar {
    width: 3.3rem;
    height: 3.3rem;
}

/* Employee document upload rows */
.employee-document-formset {
    display: grid;
    gap: 0.85rem;
}

.employee-document-form-row {
    display: grid;
    grid-template-columns: minmax(11rem, 0.8fr) minmax(12rem, 1fr) minmax(14rem, 1.1fr) minmax(10rem, 0.75fr);
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(31, 47, 65, 0.05);
}

.employee-document-upload-field {
    display: grid;
    gap: 0.4rem;
}

.document-current-file {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 1.8rem;
    padding: 0 0.65rem;
    border: 1px solid #c8dcf2;
    border-radius: 999px;
    background: #eef6ff;
    color: #1f5f96;
    font-size: 0.72rem;
    font-weight: 900;
    text-decoration: none;
}

.document-current-file:hover,
.document-current-file:focus-visible {
    border-color: #a9cce9;
    background: #e5f2ff;
}

.document-delete-field {
    align-items: flex-start;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.document-remove-action {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0 0.8rem;
    border: 1px solid #ead1d1;
    border-radius: 999px;
    background: #fff5f5;
    color: #9b2f2f;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.document-remove-action input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.document-remove-action:hover,
.document-remove-action:focus-within {
    border-color: #dfb8b8;
    background: #ffecec;
}

.document-remove-action:has(input:checked) {
    border-color: #d99a9a;
    background: #ffe2e2;
    color: #7f1d1d;
}

.document-remove-action:has(input:checked) span::after {
    content: " selected";
}

.employee-document-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.employee-document-card-v3 {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #ffffff;
    color: #18212c;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(31, 47, 65, 0.05);
}

.employee-document-card-v3:hover,
.employee-document-card-v3:focus-visible {
    border-color: #c6d9e7;
    background: #f8fbfd;
}

.employee-document-card-v3 span {
    color: #71829a;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.employee-document-card-v3 strong {
    overflow-wrap: anywhere;
    color: #18212c;
    font-size: 0.9rem;
    font-weight: 900;
}

.employee-document-card-v3 small {
    color: #66758b;
    font-size: 0.76rem;
    font-weight: 800;
}

@media (max-width: 1060px) {
    .employee-document-form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .employee-document-form-row {
        grid-template-columns: 1fr;
    }
}

/* Final organization structure tree with inline editing */
body:has(.org-final-structure) {
    background: #f3f7fa;
    overflow-x: hidden;
}

body:has(.org-final-structure) .topbar {
    border-bottom: 1px solid #d7e4ee;
}

.org-final-structure {
    display: grid;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
}

.org-final-header {
    align-items: center;
    min-width: 0;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(31, 47, 65, 0.06);
}

.org-final-header h2 {
    color: #18212c;
    letter-spacing: 0;
}

.org-final-header p:not(.eyebrow) {
    max-width: 46rem;
    margin: 0.35rem 0 0;
    color: #66758b;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.55;
}

.org-final-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.org-save-status {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid #d7e4ee;
    border-radius: 999px;
    background: #f8fbfd;
    color: #66758b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.org-save-status[data-tone="saving"] {
    border-color: #f1ddb2;
    background: #fff8eb;
    color: #a66d16;
}

.org-save-status[data-tone="saved"] {
    border-color: #cfe4d8;
    background: #effaf3;
    color: #2f7a4b;
}

.org-save-status[data-tone="error"] {
    border-color: #ead1d1;
    background: #fff5f5;
    color: #9b2f2f;
}

.org-final-canvas {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 54rem;
    overflow: auto;
    padding: 2rem;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(31, 47, 65, 0.06);
}

.org-final-tree {
    display: flex;
    width: max-content;
    min-width: 100%;
    max-width: none;
    justify-content: center;
    gap: 3rem;
    padding: 1rem 1.5rem 2.5rem;
}

.org-final-node-wrap {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 2.55rem;
}

.org-final-children {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    width: max-content;
    padding-top: 2.45rem;
}

.org-final-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: 5.5rem;
    right: 5.5rem;
    height: 2px;
    background: #bfc5cc;
}

.org-final-children::after {
    content: "";
    position: absolute;
    top: -2.55rem;
    left: 50%;
    width: 2px;
    height: 2.55rem;
    transform: translateX(-50%);
    background: #bfc5cc;
}

.org-final-children > .org-final-node-wrap::before {
    content: "";
    position: absolute;
    top: -2.45rem;
    left: 50%;
    width: 2px;
    height: 2.45rem;
    transform: translateX(-50%);
    background: #bfc5cc;
}

.org-final-node {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    width: 10.8rem;
    color: #f6a600;
    text-align: center;
}

.org-final-node-root {
    width: 15rem;
    color: #7b5cff;
}

.org-final-avatar {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 4.9rem;
    height: 4.9rem;
    border: 0.38rem solid currentColor;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(31, 47, 65, 0.14);
}

.org-final-avatar span {
    position: relative;
    display: block;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 50% 50% 45% 45%;
    background: currentColor;
}

.org-final-avatar span::before {
    content: "";
    position: absolute;
    top: -0.62rem;
    left: 50%;
    width: 1.2rem;
    height: 1.2rem;
    transform: translateX(-50%);
    border-radius: 50%;
    background: currentColor;
}

.org-final-card {
    display: grid;
    gap: 0.12rem;
    min-width: 9rem;
    max-width: 15rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #e5e7e9;
    color: #555d66;
    box-shadow: inset 0 -1px 0 rgba(31, 47, 65, 0.08);
}

.org-final-node-root .org-final-card {
    min-width: 14rem;
}

.org-final-card strong,
.org-final-card span,
.org-final-card em {
    display: block;
    min-width: 2rem;
    outline: 0;
    overflow-wrap: anywhere;
    color: #555d66;
    font-style: normal;
    line-height: 1.18;
}

.org-final-card strong {
    font-size: 0.72rem;
    font-weight: 900;
}

.org-final-card span {
    font-size: 0.66rem;
    font-weight: 800;
}

.org-final-card em {
    color: #737b85;
    font-size: 0.58rem;
    font-weight: 800;
}

.org-final-editable[contenteditable="true"] {
    cursor: text;
    border-radius: 6px;
    padding: 0.05rem 0.2rem;
}

.org-final-editable[contenteditable="true"]:focus {
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(47, 107, 101, 0.16);
}

.org-final-empty-field {
    color: #9aa3ad !important;
}

.org-final-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    opacity: 0;
    transition: opacity 140ms ease;
}

.org-final-node:hover .org-final-tools,
.org-final-node:focus-within .org-final-tools {
    opacity: 1;
}

.org-final-tools form {
    margin: 0;
}

.org-final-tools a,
.org-final-tools button {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0 0.45rem;
    border: 1px solid #d7e4ee;
    border-radius: 999px;
    background: #ffffff;
    color: #425066;
    font-size: 0.58rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
}

.org-final-tools button {
    border-color: #ead1d1;
    background: #fff5f5;
    color: #9b2f2f;
    cursor: pointer;
    font-family: inherit;
}

.org-final-tools button:hover,
.org-final-tools button:focus-visible {
    border-color: #dfb8b8;
    background: #ffecec;
}

.org-final-collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0 0.55rem;
    border: 1px solid #c8dcf2;
    border-radius: 999px;
    background: #eef6ff;
    color: #1f5f96;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.org-final-collapse:hover,
.org-final-collapse:focus-visible {
    border-color: #a9cce9;
    background: #e5f2ff;
}

.org-final-node-wrap.is-collapsed {
    gap: 0;
}

.org-final-node-wrap.is-collapsed > .org-final-children {
    display: none;
}

.org-final-node-wrap.is-collapsed > .org-final-node .org-final-collapse {
    border-color: #cfe4d8;
    background: #effaf3;
    color: #2f7a4b;
}

.org-final-node.is-dragging {
    opacity: 0.45;
}

[data-org-drag-handle] {
    cursor: grab;
}

[data-org-drag-handle]:active {
    cursor: grabbing;
}

.org-final-node.is-drop-target .org-final-avatar {
    box-shadow: 0 0 0 0.45rem rgba(47, 107, 101, 0.14), 0 5px 14px rgba(31, 47, 65, 0.14);
}

.org-final-node.is-drop-target .org-final-card {
    background: #edf7f5;
    color: #2f6b65;
}

.org-final-tone-root,
.org-final-tone-purple,
.org-final-tone-indigo {
    color: #7b5cff;
}

.org-final-tone-rose {
    color: #eb168b;
}

.org-final-tone-amber,
.org-final-tone-orange,
.org-final-tone-slate {
    color: #f6a600;
}

.org-final-tone-green,
.org-final-tone-teal {
    color: #71b943;
}

.org-final-tone-blue,
.org-final-tone-cyan {
    color: #19a9db;
}

.org-final-tone-gray {
    color: #818995;
}

.org-final-note {
    display: grid;
    gap: 0.7rem;
    width: min(36rem, 100%);
    margin: 2rem auto 0;
    padding: 1rem 1.25rem;
    border: 1px solid #bfc5cc;
    background: #e5e7e9;
    color: #5b616a;
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
}

.org-final-note span {
    display: block;
}

@media (max-width: 900px) {
    .org-final-header,
    .org-final-actions {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .org-final-canvas {
        padding: 1rem;
    }
}

/* Salary history delete controls */
.salary-history-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.salary-history-title-row > span {
    margin: 0;
}

.salary-history-title-row form,
.salary-history-entry-head form {
    margin: 0;
}

.salary-history-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.salary-history-clear-button,
.salary-history-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.8rem;
    padding: 0 0.65rem;
    border: 1px solid #ead1d1;
    border-radius: 999px;
    background: #fff5f5;
    color: #9b2f2f;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.salary-history-clear-button:hover,
.salary-history-clear-button:focus-visible,
.salary-history-delete-button:hover,
.salary-history-delete-button:focus-visible {
    border-color: #dfb8b8;
    background: #ffecec;
}

.salary-increment-quick-form {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #f8fbfd;
}

.salary-increment-quick-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.salary-increment-quick-form-head h4 {
    margin: 0;
    color: #152236;
    font-size: 0.95rem;
}

.salary-increment-quick-form-head span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.salary-increment-quick-fields {
    display: grid;
    grid-template-columns: minmax(9rem, 0.8fr) minmax(9rem, 0.8fr) minmax(14rem, 1.4fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.salary-increment-quick-fields .field-group {
    margin: 0;
}

.salary-increment-quick-fields textarea {
    min-height: 2.65rem;
    resize: vertical;
}

.salary-increment-save-button {
    min-height: 2.65rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .salary-increment-quick-form-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .salary-increment-quick-fields {
        grid-template-columns: 1fr;
    }
}

/* Evaluation entry form */
.employee-evaluation-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.employee-evaluation-form-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #f8fbfd;
}

.employee-evaluation-form-card h5 {
    margin: 0;
    color: #18212c;
    font-size: 0.95rem;
    font-weight: 900;
}

.employee-section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.75rem;
    border: 1px solid #cfe4d8;
    border-radius: 999px;
    background: #effaf3;
    color: #2f6b65;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
}

.employee-section-action:hover,
.employee-section-action:focus-visible {
    border-color: #b9d8ca;
    background: #e5f5eb;
}

@media (max-width: 900px) {
    .employee-evaluation-form-grid {
        grid-template-columns: 1fr;
    }
}
.pro-module-page {
    display: grid;
    gap: 1.25rem;
}

.pro-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

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

.pro-card-list {
    display: grid;
    gap: 0.85rem;
}

.pro-list-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.pro-list-card h4,
.pro-list-card p {
    margin: 0;
}

.pro-list-card p {
    color: var(--muted);
    line-height: 1.55;
}

.org-insight-grid {
    margin-top: 1.25rem;
}

.org-inactive-panel {
    margin-top: 1.25rem;
}

.button-link {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.org-vacant-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.13);
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Professional org chart presentation */
.org-final-header {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) auto auto;
    gap: 1rem;
    padding: 1.1rem;
}

.org-final-header-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(6.5rem, 1fr));
    gap: 0.7rem;
    align-items: stretch;
}

.org-final-header-metrics article {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.8rem 0.95rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #f8fbfd;
}

.org-final-header-metrics span {
    color: #66758b;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.org-final-header-metrics strong {
    color: #1d232d;
    font-size: 1.45rem;
    line-height: 1;
}

.org-final-canvas {
    min-height: 38rem;
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 253, 0.96)),
        radial-gradient(circle at 1px 1px, rgba(159, 174, 188, 0.22) 1px, transparent 0);
    background-size: auto, 18px 18px;
}

.org-final-canvas:has(.org-final-tree) {
    cursor: grab;
}

.org-final-canvas.is-panning {
    cursor: grabbing;
    user-select: none;
}

.org-final-canvas .org-final-node,
.org-final-canvas .org-chart-toolbar-v2,
.org-final-canvas .org-final-note {
    cursor: auto;
}

.org-chart-toolbar-v2 {
    position: sticky;
    left: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-width: min(64rem, max-content);
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(28, 39, 49, 0.06);
}

.org-chart-toolbar-v2 strong,
.org-chart-toolbar-v2 span {
    display: block;
}

.org-chart-toolbar-v2 strong {
    color: #1d232d;
    font-size: 0.98rem;
}

.org-chart-toolbar-v2 span {
    color: #66758b;
    font-size: 0.78rem;
    font-weight: 700;
}

.org-chart-legend {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.org-chart-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.org-final-structure .org-chart-collapse-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0 0.95rem;
    border: 1px solid #b9d8ca;
    border-radius: 8px;
    background: #effaf3;
    color: #2f6b65;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
    box-shadow: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.org-final-structure .org-chart-collapse-all:hover,
.org-final-structure .org-chart-collapse-all:focus-visible {
    border-color: #8fc0aa;
    background: #e5f5eb;
    color: #245b55;
    outline: 3px solid rgba(47, 122, 75, 0.14);
    outline-offset: 2px;
    transform: translateY(-1px);
}

.org-final-structure .org-chart-collapse-all.is-active {
    border-color: #b9ccdb;
    background: #eef6fb;
    color: #216b9a;
}

.org-final-structure .org-chart-collapse-all:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    transform: none;
}

.org-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #4d5968;
    font-size: 0.76rem;
    font-weight: 850;
}

.org-chart-legend i {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    display: inline-block;
}

.legend-active {
    background: #216b9a;
}

.legend-vacant {
    background: #b7791f;
}

.legend-linked {
    background: #2f7a4b;
}

.org-final-tree {
    --org-node-width: 13.6rem;
    --org-branch-gap: 1.35rem;
    align-items: flex-start;
    gap: 2.4rem;
    padding: 0.75rem 1.5rem 2rem;
}

.org-final-node-wrap {
    width: max-content;
    gap: 2rem;
    justify-items: center;
}

.org-final-children {
    gap: var(--org-branch-gap);
    padding-top: 2rem;
}

.org-final-children::before,
.org-final-children::after,
.org-final-children > .org-final-node-wrap::before {
    background: #aebbc7;
}

.org-final-children::before {
    left: calc(var(--org-node-width) / 2);
    right: calc(var(--org-node-width) / 2);
}

.org-final-children::after {
    top: -2rem;
    height: 2rem;
}

.org-final-children > .org-final-node-wrap::before {
    top: -2rem;
    height: 2rem;
}

.org-final-node,
.org-final-node-root {
    width: var(--org-node-width);
    gap: 0.55rem;
    justify-items: center;
}

.org-final-avatar {
    width: 3.6rem;
    height: 3.6rem;
    border: 3px solid currentColor;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(28, 39, 49, 0.12);
}

.org-final-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.org-final-avatar > span,
.org-final-avatar span::before {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    border-radius: 0;
    background: transparent;
}

.org-final-avatar-initials {
    color: currentColor;
    font-size: 0.9rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.org-final-card {
    position: relative;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0.85rem 0.9rem 0.9rem;
    border: 1px solid #dfe6eb;
    border-top: 4px solid currentColor;
    border-radius: 8px;
    background: #ffffff;
    color: #1d232d;
    box-shadow: 0 14px 26px rgba(28, 39, 49, 0.08);
    justify-items: center;
    text-align: center;
}

.org-final-node-root .org-final-card {
    min-width: 0;
}

.org-final-card strong,
.org-final-card span,
.org-final-card em {
    color: #1d232d;
}

.org-final-card strong {
    font-size: 0.88rem;
    line-height: 1.25;
}

.org-final-card span {
    color: #4d5968;
    font-size: 0.76rem;
    line-height: 1.35;
}

.org-final-card em {
    color: #66758b;
    font-size: 0.7rem;
}

.org-vacant-badge {
    align-self: center;
    margin-top: 0.1rem;
    border: 1px solid rgba(183, 121, 31, 0.25);
    border-radius: 999px;
    background: #fff7ed;
    color: #92400e;
}

.org-role-badge-filled {
    border-color: rgba(47, 122, 75, 0.24);
    background: #effaf3;
    color: #2f7a4b;
}

.org-final-node-vacant .org-final-card {
    background: #fffaf3;
}

.org-final-tools {
    opacity: 1;
    width: 100%;
    justify-content: center;
}

.org-final-tools a,
.org-final-tools button,
.org-final-collapse {
    min-height: 1.75rem;
    border-radius: 7px;
    font-size: 0.62rem;
}

.org-final-collapse {
    justify-self: center;
}

.org-final-note {
    position: sticky;
    left: 0;
    width: min(42rem, 100%);
    margin-top: 1rem;
    border-color: #dfe6eb;
    border-radius: 8px;
    background: #ffffff;
    color: #4d5968;
    font-size: 0.86rem;
    box-shadow: 0 10px 24px rgba(28, 39, 49, 0.06);
}

@media (max-width: 1180px) {
    .org-final-header {
        grid-template-columns: 1fr;
    }

    .org-final-header-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .org-final-header-metrics,
    .org-chart-toolbar-v2 {
        grid-template-columns: 1fr;
        display: grid;
    }

    .org-chart-toolbar-actions {
        justify-content: flex-start;
    }

    .org-chart-legend {
        align-items: flex-start;
    }
}

@media (max-width: 980px) {
    .pro-two-column,
    .pro-form-grid {
        grid-template-columns: 1fr;
    }
}

.employee-profile-form-page {
    display: grid;
    gap: 1.1rem;
}

.employee-form-hero-v4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 251, 0.94)),
        radial-gradient(circle at top right, rgba(39, 111, 143, 0.12), transparent 34%);
}

.employee-form-hero-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 1rem;
}

.employee-form-hero-avatar {
    width: 4.6rem;
    height: 4.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #edf5f3, #e7f0f5);
    color: #216b9a;
    font-size: 1.55rem;
    font-weight: 900;
    box-shadow: 0 16px 28px rgba(28, 39, 49, 0.08);
}

.employee-form-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-form-hero-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.employee-form-hero-copy h2 {
    margin: 0;
    color: #1d232d;
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    line-height: 1.1;
}

.employee-form-hero-meta,
.employee-form-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.employee-form-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0 0.7rem;
    border: 1px solid #dfe6eb;
    border-radius: 999px;
    background: #ffffff;
    color: #586273;
    font-size: 0.82rem;
    font-weight: 800;
}

.employee-form-workbench {
    display: grid;
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
}

.employee-form-nav-v4 {
    position: sticky;
    top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
}

.employee-form-nav-v4 .employee-top-tabs {
    display: grid;
    gap: 0.45rem;
}

.employee-form-nav-v4 .employee-top-tabs a {
    justify-content: flex-start;
    width: 100%;
    min-height: 2.55rem;
    padding: 0.65rem 0.75rem;
    border-radius: 7px;
    border: 1px solid transparent;
    color: #4d5968;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 850;
}

.employee-form-nav-v4 .employee-top-tabs a:hover,
.employee-form-nav-v4 .employee-top-tabs a:focus {
    border-color: #d9e3ea;
    background: #f7fafb;
    color: #216b9a;
}

.employee-form-card-v4 {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}

.employee-form-card-v4 .employee-form-header-v3 {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #dfe6eb;
    background: #ffffff;
}

.draft-autosave-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 0.9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #d9e6ee;
    border-radius: 8px;
    background: #f8fbfd;
    color: #526176;
    font-size: 0.84rem;
    font-weight: 750;
}

.employee-form-layout-v4 > .draft-autosave-status {
    margin: 1rem 1.15rem 0;
}

.draft-autosave-status [data-draft-message] {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 0.5rem;
    line-height: 1.35;
}

.draft-autosave-status [data-draft-message]::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 0.2rem rgba(148, 163, 184, 0.14);
}

.draft-autosave-status.has-draft {
    border-color: #bdebd0;
    background: #f1fbf5;
    color: #166534;
}

.draft-autosave-status.has-draft [data-draft-message]::before {
    background: var(--design-primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 164, 95, 0.16);
}

.draft-autosave-status [data-clear-draft] {
    min-height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid #cfdce6;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.draft-autosave-status [data-clear-draft]:hover,
.draft-autosave-status [data-clear-draft]:focus-visible {
    border-color: #bfdbfe;
    background: #ffffff;
    color: var(--design-blue);
    outline: none;
}

.employee-form-layout-v4 {
    gap: 0;
}

.employee-form-required-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid #dfe6eb;
    background: #f8fbff;
}

.employee-form-required-strip strong,
.employee-form-required-strip span,
.section-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0 0.55rem;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #ffffff;
    color: #526176;
    font-size: 0.72rem;
    font-weight: 850;
}

.employee-form-required-strip strong {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}

.section-badge {
    margin-left: 0.4rem;
    vertical-align: middle;
}

.employee-form-layout-v4 .employee-form-section-v2 {
    margin: 0;
    padding: 1.15rem;
    border: 0;
    border-bottom: 1px solid #e3e8ed;
    border-radius: 0;
    background: #ffffff;
}

.employee-form-layout-v4 .employee-form-section-v2:nth-of-type(even) {
    background: #fbfcfd;
}

.employee-form-layout-v4 .employee-form-section-copy {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.95rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #edf1f4;
}

.employee-form-layout-v4 .employee-form-section-copy h4 {
    margin: 0;
    color: #1d232d;
    font-size: 1.05rem;
    line-height: 1.2;
}

.employee-form-layout-v4 .grid-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.employee-form-layout-v4 .employee-basic-info-grid + .employee-identity-grid {
    margin-top: 1.45rem;
}

.employee-form-layout-v4 .employee-identity-grid {
    padding: 0;
}

.employee-form-layout-v4 .employee-citizenship-field {
    grid-column: span 2;
}

.employee-form-layout-v4 .grid-form.single-column,
.employee-form-layout-v4 .employee-evaluation-form-card .grid-form {
    grid-template-columns: 1fr;
}

.employee-form-layout-v4 .full-width {
    grid-column: 1 / -1;
}

.employee-form-layout-v4 .field-group {
    min-width: 0;
    gap: 0.45rem;
}

.employee-form-layout-v4 .field-group label {
    color: #566271;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-form-layout-v4 .field-group:has(input[required]) label::after,
.employee-form-layout-v4 .field-group:has(select[required]) label::after,
.employee-form-layout-v4 .field-group:has(textarea[required]) label::after {
    content: " *";
    color: #dc2626;
}

.employee-form-layout-v4 .field-group input:not([type="checkbox"]),
.employee-form-layout-v4 .field-group select,
.employee-form-layout-v4 .field-group textarea {
    min-height: 2.75rem;
    border: 1px solid #d9e3ea;
    border-radius: 7px;
    background: #ffffff;
    color: #1d232d;
}

.employee-form-layout-v4 .field-group textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.employee-form-layout-v4 .field-group input:focus,
.employee-form-layout-v4 .field-group select:focus,
.employee-form-layout-v4 .field-group textarea:focus {
    border-color: #216b9a;
    box-shadow: 0 0 0 3px rgba(33, 107, 154, 0.12);
}

.employee-form-layout-v4 .checkbox-field {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.75rem;
    border: 1px solid #d9e3ea;
    border-radius: 7px;
    background: #f7fafb;
}

.employee-form-layout-v4 .checkbox-field label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0;
    text-transform: none;
}

.employee-form-layout-v4 .document-delete-field {
    align-items: flex-start;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.employee-form-layout-v4 .document-delete-field label::after {
    content: none;
}

.employee-form-layout-v4 .employee-evaluation-form-grid {
    gap: 0.9rem;
}

.employee-form-layout-v4 .employee-evaluation-form-card {
    border-radius: 8px;
    background: #f8fbfd;
}

.employee-document-form-row {
    border-radius: 8px;
}

.employee-form-actions-v4 {
    position: sticky;
    bottom: 0;
    z-index: 5;
    justify-content: flex-end;
    padding: 0.95rem 1.15rem;
    border-top: 1px solid #dfe6eb;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.photo-preview-group {
    margin: 1rem 1.15rem 0;
    padding: 1rem;
    border: 1px solid #dfe6eb;
    border-radius: 8px;
    background: #f8fbfd;
}

@media (max-width: 1180px) {
    .employee-form-workbench {
        grid-template-columns: 1fr;
    }

    .employee-form-nav-v4 {
        position: static;
    }

    .employee-form-nav-v4 .employee-top-tabs {
        display: flex;
        overflow-x: auto;
    }

    .employee-form-nav-v4 .employee-top-tabs a {
        width: auto;
        white-space: nowrap;
    }
}

@media (max-width: 860px) {
    .employee-form-hero-v4,
    .employee-form-layout-v4 .employee-form-section-copy {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-form-hero-actions {
        width: 100%;
    }

    .employee-form-hero-actions .button,
    .employee-form-actions-v4 .button {
        flex: 1 1 10rem;
    }

    .employee-form-layout-v4 .grid-form {
        grid-template-columns: 1fr;
    }
}

.employee-form-workbench {
    grid-template-columns: 1fr;
}

.employee-form-nav-v4 {
    position: static;
    padding: 0.65rem;
}

.employee-form-nav-v4 .employee-top-tabs {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.employee-form-nav-v4 .employee-top-tabs a {
    width: auto;
    min-height: 2.4rem;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d9e3ea;
    border-radius: 7px;
    background: #ffffff;
    color: #4d5968;
    white-space: nowrap;
}

.employee-form-nav-v4 .employee-top-tabs a:hover,
.employee-form-nav-v4 .employee-top-tabs a:focus {
    background: #f7fafb;
    color: #216b9a;
}

/* Design.md visual system override */
:root {
    --design-bg: #f4f8fb;
    --design-surface: #ffffff;
    --design-surface-soft: #f8fbfd;
    --design-line: #d7e4ee;
    --design-line-soft: #e7eff5;
    --design-ink: #152236;
    --design-muted: #64748b;
    --design-primary: #1fa45f;
    --design-primary-dark: #16824a;
    --design-blue: #216b9a;
    --design-shadow: 0 14px 34px rgba(31, 47, 65, 0.07);
    --design-radius: 14px;
}

body:not(.login-body) {
    background: linear-gradient(180deg, #f7fbfd 0%, var(--design-bg) 100%);
    color: var(--design-ink);
}

body:not(.login-body)::before {
    background-image:
        radial-gradient(circle at 14% 10%, rgba(33, 107, 154, 0.08), transparent 28rem),
        radial-gradient(circle at 88% 4%, rgba(31, 164, 95, 0.06), transparent 24rem);
}

.sidebar {
    border: 1px solid rgba(215, 228, 238, 0.95);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--design-shadow);
    color: var(--design-ink);
    backdrop-filter: blur(16px);
}

.brand-mark,
.nav-icon,
.sidebar-toggle,
.icon-tile {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--design-line);
    border-radius: 12px;
    background: #eef6fb;
    color: var(--design-blue);
}

.brand-copy strong,
.sidebar-nav a,
.topbar h1,
.panel h1,
.panel h2,
.panel h3,
.metric-card strong,
.stat-card strong {
    color: var(--design-ink);
}

.brand-copy span,
.sidebar-label,
.muted,
.helper-text,
.metric-card small,
.stat-card small,
.empty-cell {
    color: var(--design-muted);
}

.sidebar-nav a {
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus,
.sidebar-nav a.active {
    background: #eef7f3;
    border-color: #cfeadd;
    color: var(--design-primary-dark);
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a:focus .nav-icon,
.sidebar-nav a.active .nav-icon {
    background: #daf3e5;
    border-color: #bfe7d0;
    color: var(--design-primary-dark);
}

.topbar {
    border-bottom: 1px solid var(--design-line);
    box-shadow: none;
}

.eyebrow,
.panel .eyebrow,
.field-group label,
th {
    color: #5d6f86;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.search-shell,
.field-group input:not([type="checkbox"]),
.field-group select,
.field-group textarea,
input.form-control,
select.form-select,
textarea.form-control {
    border: 1px solid var(--design-line);
    border-radius: 12px;
    background: var(--design-surface);
    color: var(--design-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-shell:focus-within,
.field-group input:not([type="checkbox"]):focus,
.field-group select:focus,
.field-group textarea:focus,
input.form-control:focus,
select.form-select:focus,
textarea.form-control:focus {
    border-color: rgba(33, 107, 154, 0.5);
    box-shadow: 0 0 0 4px rgba(33, 107, 154, 0.1);
    outline: 0;
}

.button,
a.button,
button.button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid var(--design-primary);
    border-radius: 12px;
    background: var(--design-primary);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(31, 164, 95, 0.18);
    letter-spacing: 0.08em;
}

.button:hover,
a.button:hover,
button.button:hover,
input[type="submit"]:hover {
    background: var(--design-primary-dark);
    border-color: var(--design-primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

.topbar-actions .button:not(.secondary):not(.ghost)::before,
.pro-module-page .form-actions .button:not(.secondary):not(.ghost)::before,
.holiday-import-form .button:not(.secondary):not(.ghost)::before {
    content: "+";
    display: inline-grid;
    width: 1.15rem;
    height: 1.15rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    font-weight: 900;
    line-height: 1;
}

.button.secondary,
.button.ghost,
a.button.secondary,
a.button.ghost,
button.button.secondary,
button.button.ghost {
    border-color: var(--design-line);
    background: var(--design-surface);
    color: var(--design-ink);
    box-shadow: none;
}

.button.secondary:hover,
.button.ghost:hover,
a.button.secondary:hover,
a.button.ghost:hover,
button.button.secondary:hover,
button.button.ghost:hover {
    border-color: #b9ccdb;
    background: #eef6fb;
    color: var(--design-blue);
}

.panel,
.stat-card,
.metric-card,
.table-wrap,
.table-panel,
.form-panel,
.side-panel,
.employee-tabs-panel,
.employee-form-card-v4,
.employee-form-nav-v4 {
    border: 1px solid var(--design-line);
    border-radius: var(--design-radius);
    background: var(--design-surface);
    box-shadow: var(--design-shadow);
}

.stat-card,
.metric-card {
    overflow: hidden;
}

.dashboard-stats .metric-card:first-child,
.metric-card.highlight {
    border-color: rgba(76, 103, 214, 0.22);
    background: linear-gradient(135deg, #5c6ee6 0%, #2584c8 58%, #1fa45f 100%);
    color: #ffffff;
}

.dashboard-stats .metric-card:first-child p,
.dashboard-stats .metric-card:first-child strong,
.dashboard-stats .metric-card:first-child small,
.metric-card.highlight p,
.metric-card.highlight strong,
.metric-card.highlight small {
    color: #ffffff;
}

.panel-header {
    border-bottom-color: var(--design-line-soft);
}

.table-wrap {
    overflow: hidden;
}

table {
    border-color: var(--design-line);
    background: var(--design-surface);
}

thead th {
    background: #f3f8fb;
    border-bottom: 1px solid var(--design-line);
    color: #52657b;
}

tbody td {
    border-bottom: 1px solid var(--design-line-soft);
}

tbody tr:hover {
    background: #f8fbfd;
}

.pro-module-page {
    color: var(--design-ink);
}

.pro-module-page .stats-grid {
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pro-module-page .metric-card {
    min-height: 7rem;
    padding: 1.15rem;
}

.pro-module-page .panel {
    padding: 1.25rem;
}

.pro-module-page .panel-header {
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: 0;
}

.pro-module-page .panel-header h3 {
    margin-top: 0.1rem;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.1;
}

.celebrations-page {
    --celebrations-ink: #0b0f19;
    --celebrations-muted: #64748b;
    --celebrations-line: #e2e8f0;
    --celebrations-navy: #0f2942;
    --celebrations-canvas: #f4f6f9;
    color: var(--celebrations-ink);
}

.celebrations-page .celebrations-stats {
    grid-template-columns: repeat(2, minmax(220px, 324px));
    align-items: stretch;
    gap: 1.25rem;
    margin-bottom: 3.6rem;
}

.celebrations-page .metric-card,
.celebrations-page .dashboard-stats .metric-card:first-child,
.celebrations-page .metric-card.highlight {
    min-height: 9.5rem;
    padding: 1.45rem 1.55rem;
    border: 1px solid var(--celebrations-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    color: var(--celebrations-ink);
}

.celebrations-page .metric-card::after,
.celebrations-page .dashboard-stats .metric-card:first-child::after {
    display: none;
}

.celebrations-page .dashboard-stats .metric-card:first-child {
    border-color: var(--celebrations-navy);
    background: var(--celebrations-navy);
}

.celebrations-page .metric-card p,
.celebrations-page .dashboard-stats .metric-card:first-child p {
    margin: 0 0 0.8rem;
    color: var(--celebrations-muted);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.celebrations-page .metric-card strong,
.celebrations-page .dashboard-stats .metric-card:first-child strong {
    color: var(--celebrations-ink);
    font-size: 2.65rem;
    line-height: 1;
}

.celebrations-page .metric-card small,
.celebrations-page .dashboard-stats .metric-card:first-child small {
    margin-top: 0.8rem;
    color: var(--celebrations-muted);
    font-size: 0.98rem;
    font-weight: 700;
}

.celebrations-page .dashboard-stats .metric-card:first-child p,
.celebrations-page .dashboard-stats .metric-card:first-child strong,
.celebrations-page .dashboard-stats .metric-card:first-child small {
    color: #ffffff;
}

.celebrations-page .celebrations-grid {
    gap: 1.25rem;
}

.celebrations-page .celebrations-panel {
    padding: 1.55rem;
    border: 1px solid var(--celebrations-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

.celebrations-page .panel-header {
    margin-bottom: 1.45rem;
}

.celebrations-page .panel-header .eyebrow {
    color: var(--celebrations-muted);
}

.celebrations-page .panel-header h3 {
    color: var(--celebrations-ink);
    font-size: clamp(1.5rem, 2vw, 2rem);
}

.celebrations-page .side-list {
    gap: 0.9rem;
}

.celebrations-page .side-list-item {
    min-height: 5.5rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--celebrations-line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
    color: var(--celebrations-ink);
    text-decoration: none;
}

.celebrations-page .side-list-item:hover,
.celebrations-page .side-list-item:focus {
    border-color: var(--celebrations-navy);
    background: var(--celebrations-canvas);
}

.celebrations-page .side-list-item strong {
    color: var(--celebrations-ink);
    font-size: 1.02rem;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.celebrations-page .side-list-item small {
    margin-top: 0.35rem;
    color: #525a66;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.celebrations-page .empty-state {
    border: 1px solid var(--celebrations-line);
    border-radius: 6px;
    background: var(--celebrations-canvas);
    color: var(--celebrations-muted);
    box-shadow: none;
}

.pro-module-page .form-grid {
    gap: 0.85rem;
}

.pro-module-page .field-group {
    gap: 0.38rem;
}

.pro-module-page .field-group textarea {
    min-height: 6rem;
}

.pro-module-page .field-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--design-primary);
}

.pro-module-page .field-group:has(input[type="checkbox"]) {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 2.8rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--design-line);
    border-radius: 12px;
    background: var(--design-surface-soft);
}

.pro-module-page .field-group:has(input[type="checkbox"]) label {
    grid-column: 2;
    grid-row: 1;
    letter-spacing: 0;
    text-transform: none;
}

.pro-module-page .field-group:has(input[type="checkbox"]) input {
    grid-column: 1;
    grid-row: 1;
}

.pro-module-page .form-actions {
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.35rem;
}

.employee-form-nav-v4 .employee-top-tabs a {
    border-color: var(--design-line);
    border-radius: 12px;
    background: var(--design-surface);
    color: var(--design-muted);
}

.employee-form-nav-v4 .employee-top-tabs a:hover,
.employee-form-nav-v4 .employee-top-tabs a:focus,
.employee-form-nav-v4 .employee-top-tabs a.active {
    background: #eef7f3;
    border-color: #cfeadd;
    color: var(--design-primary-dark);
}

@media (max-width: 900px) {
    .pro-two-column,
    .pro-form-grid,
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .pro-module-page .panel {
        padding: 1rem;
    }
}

.holiday-import-strip {
    display: grid;
    grid-template-columns: minmax(18rem, 0.72fr) minmax(38rem, 1.28fr);
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.15rem 1.25rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96)),
        var(--design-surface);
}

.holiday-import-strip h3 {
    margin: 0.15rem 0 0.35rem;
    color: var(--design-ink);
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    line-height: 1.1;
}

.holiday-import-copy .muted {
    max-width: 33rem;
    margin: 0;
}

.holiday-import-form {
    display: grid;
    grid-template-columns: minmax(20rem, 1fr) minmax(13rem, 14rem);
    align-items: end;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid var(--design-line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.holiday-import-form .field-group {
    min-width: 0;
    gap: 0.3rem;
}

.holiday-import-form .button {
    min-height: 2.8rem;
    white-space: nowrap;
}

.holiday-import-form .button.secondary {
    color: var(--design-blue);
    background: #f4f9fc;
}

.holiday-import-button-stack {
    display: grid;
    gap: 0.55rem;
}

.holiday-import-button-stack .button {
    width: 100%;
}

.holiday-import-form input[type="file"] {
    width: 100%;
    min-height: 2.9rem;
    border: 1px solid var(--design-line);
    border-radius: 12px;
    background: var(--design-surface);
    color: var(--design-muted);
    font-size: 0.82rem;
}

.holiday-import-form input[type="file"]::file-selector-button {
    margin-right: 0.8rem;
    min-height: 2.8rem;
    padding: 0 0.95rem;
    border: 0;
    border-right: 1px solid var(--design-line);
    background: #eef6fb;
    color: var(--design-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.holiday-calendar-page {
    display: grid;
    gap: 1.6rem;
}

.holiday-calendar-page .dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    width: 100%;
}

.holiday-calendar-page .metric-card {
    min-height: 6.6rem;
}

.holiday-calendar-page .pro-two-column {
    align-items: start;
    gap: 1rem;
    margin-top: 0;
}

.holiday-calendar-page .holiday-import-strip {
    margin-bottom: 0;
}

.holiday-calendar-page .panel {
    min-width: 0;
}

.holiday-calendar-page .table-panel {
    padding-bottom: 1rem;
}

.holiday-calendar-page .table-wrap {
    margin-top: 0.15rem;
}

@media (max-width: 1100px) {
    .holiday-import-strip,
    .holiday-import-form {
        grid-template-columns: 1fr;
    }

    .holiday-import-form .button {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .holiday-calendar-page .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* App-wide Design.md alignment pass */
:root {
    --design-bg: #f4f7fb;
    --design-surface: #ffffff;
    --design-surface-soft: #f8fbff;
    --design-line: #dbe5ef;
    --design-line-soft: #e6eef6;
    --design-ink: #0f172a;
    --design-muted: #64748b;
    --design-primary: #16a34a;
    --design-primary-dark: #15803d;
    --design-blue: #2563eb;
    --design-radius: 18px;
    --design-radius-sm: 13px;
    --design-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    --design-shadow-hover: 0 10px 28px rgba(15, 23, 42, 0.06);
}

html {
    background: var(--design-bg);
}

body:not(.login-body) {
    min-height: 100vh;
    background: var(--design-bg);
    color: var(--design-ink);
}

.page-shell {
    gap: clamp(1rem, 1.5vw, 1.5rem);
}

.main-panel {
    min-width: 0;
    padding: clamp(1rem, 1.8vw, 1.5rem);
}

.topbar {
    align-items: center;
    gap: 1rem;
    margin-bottom: clamp(1.25rem, 2vw, 2rem);
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--design-line);
}

.topbar-tools {
    align-items: center;
    gap: 0.75rem;
}

.topbar h1 {
    margin: 0;
    color: var(--design-ink);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.eyebrow,
.sidebar-label,
.field-group label,
.form-group label,
.input-group label,
.panel .eyebrow,
th {
    margin-bottom: 0.35rem;
    color: var(--design-muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.muted,
.helper-text,
.empty-cell,
.card-copy p,
.panel p,
.stat-card small,
.metric-card small {
    color: var(--design-muted);
}

.sidebar,
.panel,
.stat-card,
.metric-card,
.table-wrap,
.table-panel,
.form-panel,
.side-panel,
.employee-tabs-panel,
.employee-form-card-v4,
.employee-form-nav-v4,
.employee-directory-card,
.department-card,
.report-card,
.announcement-card,
.leave-card,
.attendance-card,
.detail-card,
.timeline-card,
.employee-profile-card,
.employee-section-card,
.org-node-card,
.role-card {
    border: 1px solid var(--design-line);
    border-radius: var(--design-radius);
    background: var(--design-surface);
    box-shadow: var(--design-shadow);
}

.panel,
.table-panel,
.form-panel,
.side-panel,
.employee-tabs-panel,
.employee-directory-card,
.department-card,
.report-card,
.announcement-card,
.leave-card,
.attendance-card,
.detail-card,
.timeline-card,
.employee-profile-card,
.employee-section-card {
    padding: clamp(1rem, 1.6vw, 1.75rem);
}

.panel:hover,
.employee-directory-card:hover,
.department-card:hover,
.report-card:hover,
.announcement-card:hover,
.leave-card:hover,
.attendance-card:hover,
.detail-card:hover,
.timeline-card:hover,
.employee-profile-card:hover,
.employee-section-card:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
    box-shadow: var(--design-shadow-hover);
}

.panel-header,
.card-header,
.section-header,
.table-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel h2,
.panel h3,
.card-header h2,
.card-header h3,
.section-header h2,
.section-header h3 {
    margin: 0;
    color: var(--design-ink);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.dashboard-stats,
.stats-grid,
.summary-grid,
.cards-grid,
.reports-grid,
.department-grid,
.employee-grid,
.metrics-grid {
    gap: 1rem;
}

.stat-card,
.metric-card {
    min-width: 0;
    min-height: 6.5rem;
    padding: 1.15rem 1.2rem;
}

.stat-card p,
.metric-card p {
    margin: 0 0 0.45rem;
    color: var(--design-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong,
.metric-card strong {
    color: var(--design-ink);
    font-size: clamp(1.75rem, 2.3vw, 2.25rem);
    line-height: 1;
}

.dashboard-stats .metric-card:first-child,
.stats-grid .metric-card.highlight,
.metric-card.highlight {
    border-color: transparent;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: #ffffff;
}

.dashboard-stats .metric-card:first-child p,
.dashboard-stats .metric-card:first-child strong,
.dashboard-stats .metric-card:first-child small,
.metric-card.highlight p,
.metric-card.highlight strong,
.metric-card.highlight small {
    color: #ffffff;
}

.form-grid,
.grid-form,
.pro-form-grid,
form .field-grid {
    gap: 1rem;
}

.field-group,
.form-group,
.input-group {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    margin: 0;
}

.field-group input:not([type="checkbox"]):not([type="radio"]),
.field-group select,
.field-group textarea,
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea,
.input-group input:not([type="checkbox"]):not([type="radio"]),
.input-group select,
.input-group textarea,
.search-shell,
input.form-control,
select.form-select,
textarea.form-control {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #cbddec;
    border-radius: var(--design-radius-sm);
    background: #ffffff;
    color: var(--design-ink);
    font-size: 0.9rem;
    line-height: 1.4;
}

.field-group textarea,
.form-group textarea,
.input-group textarea,
textarea.form-control {
    min-height: 6rem;
    resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.search-shell:focus-within,
input.form-control:focus,
select.form-select:focus,
textarea.form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
    outline: 0;
}

.checkbox-field,
.checkbox-row,
.check-row,
.form-check,
.field-group:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    margin-top: 0.15rem;
    border: 1px solid #d6e4f0;
    border-radius: var(--design-radius-sm);
    background: #f8fbff;
}

.checkbox-field label,
.checkbox-row label,
.check-row label,
.form-check label,
.field-group:has(input[type="checkbox"]) label {
    margin: 0;
    color: #52657a;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--design-primary);
}

.form-actions,
.button-row,
.actions-row,
.employee-form-actions-v4 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.button,
a.button,
button.button,
input[type="submit"] {
    min-height: 2.75rem;
    padding: 0 1.15rem;
    border: 1px solid var(--design-primary);
    border-radius: 999px;
    background: var(--design-primary);
    color: #ffffff;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.16);
}

.button:hover,
a.button:hover,
button.button:hover,
input[type="submit"]:hover {
    border-color: var(--design-primary-dark);
    background: var(--design-primary-dark);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(22, 128, 61, 0.18);
}

.button.secondary,
.button.ghost,
a.button.secondary,
a.button.ghost,
button.button.secondary,
button.button.ghost {
    border-color: var(--design-line);
    background: #ffffff;
    color: var(--design-ink);
    box-shadow: none;
}

.button.secondary:hover,
.button.ghost:hover,
a.button.secondary:hover,
a.button.ghost:hover,
button.button.secondary:hover,
button.button.ghost:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
    color: var(--design-blue);
}

.table-wrap {
    padding: 0;
    overflow: hidden;
}

table {
    width: 100%;
    border-color: var(--design-line);
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

thead {
    background: #f8fafc;
}

thead th {
    border-bottom: 1px solid var(--design-line);
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
}

tbody td {
    border-top: 1px solid #e2e8f0;
    border-bottom: 0;
    color: #334155;
}

tbody tr:hover {
    background: #f8fbff;
}

.message {
    border: 1px solid var(--design-line);
    border-radius: var(--design-radius-sm);
    box-shadow: var(--design-shadow);
}

.status-active,
.badge-success,
.active-badge {
    background: #dcfce7;
    color: #166534;
}

.status-pending,
.badge-warning,
.pending-badge {
    background: #fef3c7;
    color: #92400e;
}

.status-inactive,
.badge-danger,
.inactive-badge {
    background: #fee2e2;
    color: #991b1b;
}

.icon-tile,
.nav-icon,
.brand-mark {
    width: 2.625rem;
    height: 2.625rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.icon-tile svg,
.nav-icon svg,
.brand-mark svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.pro-module-page,
.dashboard-page,
.employee-detail-page,
.employee-directory-page,
.department-page,
.reports-page,
.performance-page {
    display: grid;
    gap: clamp(1rem, 1.5vw, 1.5rem);
}

.pro-two-column {
    gap: 1rem;
}

.holiday-calendar-page {
    gap: 1.5rem;
}

.holiday-calendar-page .holiday-import-strip,
.holiday-calendar-page .panel,
.holiday-calendar-page .metric-card {
    border-radius: var(--design-radius);
}

.holiday-import-strip {
    padding: clamp(1rem, 1.4vw, 1.4rem);
}

.holiday-import-form {
    border-radius: var(--design-radius);
}

.holiday-import-button-stack {
    align-self: stretch;
}

.holiday-import-button-stack .button {
    min-height: 2.65rem;
}

@media (max-width: 1180px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-tools {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .search-shell {
        flex: 1 1 18rem;
    }
}

@media (max-width: 760px) {
    .main-panel {
        padding: 0.85rem;
    }

    .panel-header,
    .card-header,
    .section-header,
    .table-header {
        flex-direction: column;
    }

    .button,
    a.button,
    button.button,
    input[type="submit"] {
        width: 100%;
    }
}

/* Header hamburger cleanup */
.toolbar-toggle {
    display: none !important;
}

@media (max-width: 760px) {
    .toolbar-toggle {
        display: inline-grid !important;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0;
    }

    .topbar-tools {
        display: grid;
        grid-template-columns: 2.75rem minmax(0, 1fr);
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }

    .topbar-tools .search-shell {
        grid-column: 2;
        width: 100%;
    }

    .topbar-actions {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Form rhythm fix: keep labels and inputs from touching */
.form-grid,
.grid-form,
.pro-form-grid,
.employee-inline-performance-form,
.employee-form-layout-v4 .grid-form {
    row-gap: 1.2rem !important;
    column-gap: 1rem;
}

.panel-header {
    margin-bottom: 1.25rem !important;
}

.field-group,
.form-group,
.input-group,
.pro-module-page .field-group,
.holiday-import-form .field-group,
.employee-inline-performance-form .field-group,
.employee-form-layout-v4 .field-group {
    gap: 0.68rem !important;
}

.field-group label,
.form-group label,
.input-group label,
.pro-module-page .field-group label,
.employee-inline-performance-form label,
.employee-form-layout-v4 .field-group label {
    display: block;
    margin: 0 !important;
    line-height: 1.2;
}

.field-group input:not([type="checkbox"]):not([type="radio"]),
.field-group select,
.field-group textarea,
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea,
.input-group input:not([type="checkbox"]):not([type="radio"]),
.input-group select,
.input-group textarea {
    display: block;
}

.field-group:has(textarea),
.employee-inline-performance-form .field-group:has(textarea),
.pro-module-page .field-group:has(textarea) {
    gap: 0.72rem !important;
}

/* Definitive HRIS form layout rule */
.form-grid,
.pro-form-grid,
.grid-form,
.employee-inline-performance-form,
.employee-form-layout-v4 .grid-form {
    display: grid !important;
    align-items: start;
    row-gap: 1.45rem !important;
    column-gap: 1rem !important;
}

.field-group,
.form-group,
.input-group,
.pro-module-page .field-group,
.employee-inline-performance-form .field-group,
.employee-form-layout-v4 .field-group {
    margin: 0 !important;
    padding: 0 !important;
}

.field-group + .field-group,
.form-group + .form-group,
.input-group + .input-group {
    margin-top: 1.1rem !important;
}

.field-group label,
.form-group label,
.input-group label {
    margin-bottom: 0.28rem !important;
}

.field-group:has(textarea),
.form-group:has(textarea),
.input-group:has(textarea) {
    margin-bottom: 0.35rem !important;
}

.field-group:has(textarea) + .field-group,
.field-group:has(textarea) + .checkbox-field,
.form-group:has(textarea) + .form-group,
.input-group:has(textarea) + .input-group {
    margin-top: 1.45rem !important;
}

.form-actions,
.button-row,
.actions-row {
    margin-top: 1rem !important;
    padding-bottom: 0.25rem;
}

/* Grid forms should use row-gap, not sibling top margins. */
.form-grid > .field-group + .field-group,
.pro-form-grid > .field-group + .field-group,
.grid-form > .field-group + .field-group,
.employee-inline-performance-form > .field-group + .field-group,
.employee-form-layout-v4 .grid-form > .field-group + .field-group {
    margin-top: 0 !important;
}

.form-grid > .field-group:has(textarea) + .field-group,
.pro-form-grid > .field-group:has(textarea) + .field-group,
.grid-form > .field-group:has(textarea) + .field-group,
.employee-inline-performance-form > .field-group:has(textarea) + .field-group {
    margin-top: 0 !important;
}

/* Sidebar icon color standard */
.sidebar .brand-mark,
.sidebar .nav-icon,
.sidebar .sidebar-toggle {
    border-color: #dbe5ef;
    background: #f8fbff;
    color: #111827;
}

.sidebar .brand-mark svg,
.sidebar .nav-icon svg,
.sidebar .sidebar-toggle svg {
    color: currentColor;
    stroke: currentColor;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a:focus .nav-icon,
.sidebar-nav a.active .nav-icon,
.sidebar-logout-link:hover .nav-icon,
.sidebar-logout-link:focus-visible .nav-icon {
    border-color: #dbe5ef;
    background: #ffffff;
    color: #111827;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus,
.sidebar-nav a.active {
    background: #eefdf4;
    color: #111827;
}

/* Sticky topbar without horizontal divider */
.topbar {
    position: static;
    top: 0;
    z-index: 30;
    border-bottom: 0 !important;
    background: transparent;
    backdrop-filter: none;
}

.topbar::after {
    display: none !important;
    content: none !important;
}

.search-shell input,
.search-shell input:focus,
.search-shell input:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.search-shell:focus-within {
    border-color: #bfdbfe !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18) !important;
}

/* Announcements page form layout */
.announcements-page .pro-two-column {
    grid-template-columns: minmax(28rem, 1.1fr) minmax(22rem, 0.9fr);
    gap: 1.2rem;
}

.announcement-form-panel {
    padding: clamp(1.35rem, 2vw, 2rem);
}

.announcement-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.35rem !important;
}

.announcement-form-grid .field-group.full-width {
    grid-column: 1 / -1;
}

.announcement-form-grid textarea {
    min-height: 8rem;
}

.announcement-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-self: end;
}

.announcement-check-grid .checkbox-field {
    min-height: 2.75rem !important;
    height: 2.75rem;
    margin: 0 !important;
    padding: 0.45rem 0.75rem !important;
    gap: 0.5rem;
    border-radius: 12px;
}

.announcement-check-grid .checkbox-field input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    appearance: none;
    display: inline-grid;
    place-items: center;
    margin: 0;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    background: #ffffff;
    outline: 0;
    box-shadow: none;
}

.announcement-check-grid .checkbox-field input[type="checkbox"]:checked {
    border-color: #16a34a;
    background: #16a34a;
}

.announcement-check-grid .checkbox-field input[type="checkbox"]:checked::after {
    content: "";
    width: 0.35rem;
    height: 0.62rem;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.announcement-check-grid .checkbox-field input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

/* Cleaner announcement checkbox: avoid native browser artifacts */
.announcement-check-grid .checkbox-field {
    position: relative;
}

.announcement-check-grid .checkbox-field input[type="checkbox"] {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin: 0;
    opacity: 0;
    transform: translateY(-50%);
}

.announcement-check-grid .checkbox-field label {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 1rem;
    padding-left: 1.55rem;
}

.announcement-check-grid .checkbox-field label::before {
    content: "";
    position: absolute;
    left: 0;
    width: 0.95rem;
    height: 0.95rem;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    background: #ffffff;
}

.announcement-check-grid .checkbox-field input[type="checkbox"]:checked + label::before {
    border-color: #16a34a;
    background: #16a34a;
}

.announcement-check-grid .checkbox-field input[type="checkbox"]:checked + label::after {
    content: "";
    position: absolute;
    left: 0.32rem;
    top: 50%;
    width: 0.25rem;
    height: 0.5rem;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: translateY(-60%) rotate(45deg);
}

.announcement-check-grid .checkbox-field input[type="checkbox"]:focus-visible + label::before {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.announcement-check-grid .checkbox-field label {
    font-size: 0.82rem;
    line-height: 1.2;
}

.announcement-form-grid .form-actions {
    margin-top: 0.35rem !important;
}

@media (max-width: 1180px) {
    .announcements-page .pro-two-column,
    .announcement-form-grid,
    .announcement-check-grid {
        grid-template-columns: 1fr;
    }
}

/* Employee form tabs: sticky and no underline */
.employee-profile-form-page .employee-form-nav-v4 {
    position: sticky;
    top: 5.25rem;
    z-index: 25;
    padding: 0.9rem 1rem;
    border-bottom: 0 !important;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
}

.employee-profile-form-page .employee-top-tabs {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.employee-profile-form-page .employee-top-tabs::after {
    display: none !important;
    content: none !important;
}

.employee-profile-form-page .employee-top-tabs a {
    border-bottom: 1px solid var(--design-line) !important;
}

.employee-profile-form-page .employee-top-tabs a:hover,
.employee-profile-form-page .employee-top-tabs a:focus,
.employee-profile-form-page .employee-top-tabs a.active {
    border-bottom-color: #cfeadd !important;
}

@media (max-width: 860px) {
    .employee-profile-form-page .employee-form-nav-v4 {
        top: 0.75rem;
    }
}

.error-page {
    display: grid;
    min-height: min(34rem, 70vh);
    place-items: center;
    padding: 2rem 0;
}

.error-status-page .error-page {
    align-items: start;
    min-height: min(30rem, 62vh);
    padding-top: clamp(3.5rem, 13vh, 7rem);
}

.suppress-sidebar-active .sidebar-nav a.active,
.suppress-sidebar-active .sidebar-subnav a.active {
    border-color: #dbe6f1;
    background: transparent;
    color: #001a33;
    box-shadow: none;
}

.suppress-sidebar-active .sidebar-nav a.active .nav-icon {
    background: transparent;
    color: inherit;
}

.error-card {
    width: min(44rem, 100%);
    display: grid;
    gap: 1.35rem;
    padding: 2rem;
    text-align: center;
}

.error-code {
    justify-self: center;
    display: inline-grid;
    width: 4.5rem;
    height: 4.5rem;
    place-items: center;
    border: 1px solid #cfe0ec;
    border-radius: 18px;
    background: #f4f9fc;
    color: #216b9a;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.error-card h1,
.error-card h2 {
    margin: 0.35rem 0 0.5rem;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.05;
}

.error-card p:not(.eyebrow) {
    max-width: 34rem;
    margin: 0 auto;
    color: #5f6f83;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.standalone-error-shell {
    min-height: 100vh;
    padding: 2rem;
}

/* Department workspace polish */
.sidebar {
    width: 300px;
}

.main-panel {
    margin-left: calc(300px + var(--shell-gap) + 20px);
}

body.sidebar-collapsed .main-panel {
    margin-left: calc(var(--sidebar-collapsed-width) + var(--shell-gap) + 20px);
}

.sidebar-head {
    gap: 0.65rem;
}

.brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.75rem;
    padding-right: 0.2rem;
}

.brand-copy strong {
    max-width: 8.2rem;
    font-size: 0.96rem;
}

.brand-copy small {
    max-width: 10.5rem;
    overflow: hidden;
    color: #607187;
    font-size: 0.67rem;
    letter-spacing: 0.1em;
    line-height: 1.25;
}

.sidebar-toggle-inline {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
}

.topbar-tools {
    flex: 0 1 42rem;
    justify-content: flex-end;
    min-width: 0;
}

.search-shell {
    width: clamp(22rem, 28vw, 30rem);
    max-width: 100%;
    min-width: 18rem;
    flex: 0 1 auto;
}

.search-shell input {
    min-width: 0;
}

.department-page {
    max-width: 100%;
}

.department-page .department-hero.panel {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding: 1.45rem 1.55rem;
}

.department-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.department-title-row h2 {
    min-width: 0;
}

.department-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.department-actions form {
    margin: 0;
}

.button.danger,
button.button.danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b91c1c;
}

.button.danger:hover,
button.button.danger:hover,
.button.danger:focus-visible,
button.button.danger:focus-visible {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #991b1b;
}

.department-page .department-hero-copy h2 {
    font-size: clamp(2rem, 3.2vw, 2.85rem);
}

.department-page .department-hero .department-summary-grid {
    width: min(100%, 48rem);
    margin-top: 1.1rem;
    grid-template-columns: minmax(13rem, 1fr) minmax(15rem, 1.1fr);
    gap: 0.8rem;
}

.department-page .department-hero .department-summary-card,
.department-page .department-hero .department-summary-card:not(.compact) {
    min-height: 7.25rem;
    padding: 0.9rem 1rem;
    gap: 0.75rem;
}

.department-page .department-hero .department-summary-card span {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    line-height: 1.25;
}

.department-page .department-hero .department-summary-card strong,
.department-page .department-hero .department-summary-card strong.department-summary-money {
    font-size: clamp(1.55rem, 2vw, 1.95rem);
    line-height: 1.08;
}

.department-page .department-hero .department-summary-card strong.department-summary-money {
    white-space: nowrap;
}

.department-page .department-hero .department-summary-card small {
    font-size: 0.75rem;
}

.department-page .department-roster-panel.panel {
    padding: 1.1rem 1.25rem;
}

.department-page .department-member-card {
    grid-template-columns: minmax(14rem, 1fr) minmax(26rem, 0.95fr);
    padding: 0.8rem 0.95rem;
}

.department-page .department-member-meta {
    grid-template-columns: minmax(12rem, 1.55fr) minmax(8rem, 0.85fr) auto;
}

.department-page .department-meta-chip {
    min-height: 3.5rem;
    padding: 0.6rem 0.7rem;
}

@media (max-width: 1280px) {
    .department-page .department-hero.panel {
        grid-template-columns: 1fr;
    }

    .department-page .department-member-card,
    .department-page .department-member-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .sidebar {
        width: var(--sidebar-width);
    }

    .main-panel,
    body.sidebar-collapsed .main-panel {
        margin-left: calc(var(--sidebar-width) + var(--shell-gap) + 20px);
    }
}

@media (max-width: 760px) {
    .search-shell {
        width: 100%;
        min-width: 0;
    }

    .department-title-row,
    .department-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .department-actions {
        justify-content: flex-start;
    }

    .department-actions .button {
        width: 100%;
    }

    .department-page .department-hero .department-summary-grid {
        grid-template-columns: 1fr;
    }

    .department-page .department-hero .department-summary-card strong.department-summary-money {
        white-space: normal;
    }
}

/* Department detail action/header refinements */
.department-page .department-hero.panel {
    min-height: 0;
}

.department-page .department-hero-copy {
    display: grid;
    gap: 0.95rem;
    max-width: 58rem;
}

.department-page .department-title-row {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.department-page .department-title-row h2 {
    margin: 0;
    line-height: 1.05;
}

.department-page .department-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding-top: 0.18rem;
}

.department-page .department-actions .button,
.department-page .department-actions button.button {
    min-height: 2.65rem;
    border: 1px solid #d6e2ec;
    border-radius: 8px;
    box-shadow: none;
    padding: 0 1rem;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.department-page .department-actions .button.secondary {
    background: #ffffff;
    color: #172033;
}

.department-page .department-actions .button.secondary:hover,
.department-page .department-actions .button.secondary:focus-visible {
    border-color: #b8c8d8;
    background: #f6f9fc;
}

.department-page .department-actions .button.danger,
.department-page .department-actions button.button.danger {
    border-color: #f1b8b8;
    background: #fff4f4;
    color: #b42318;
}

.department-page .department-actions .button.danger:hover,
.department-page .department-actions button.button.danger:hover,
.department-page .department-actions .button.danger:focus-visible,
.department-page .department-actions button.button.danger:focus-visible {
    border-color: #e08f8f;
    background: #ffe9e9;
    color: #8f1b13;
}

.department-page .department-hero-text {
    margin: 0;
}

.department-page .department-hero .department-summary-grid {
    width: min(100%, 51rem);
    margin-top: 0.15rem;
}

@media (max-width: 760px) {
    .department-page .department-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .department-page .department-actions {
        justify-content: flex-start;
        padding-top: 0;
    }

    .department-page .department-actions .button,
    .department-page .department-actions button.button {
        width: 100%;
    }
}

/* Employee profile polish from design.md */
body:has(.employee-dashboard) {
    background: #f4f7fb;
}

body:has(.employee-dashboard) .topbar {
    align-items: flex-start;
    margin-bottom: 1.4rem;
}

body:has(.employee-dashboard) .topbar h1 {
    color: #0f172a;
    font-size: clamp(1.85rem, 2.7vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.employee-dashboard {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
}

.employee-profile-topbar,
.employee-dashboard-tabs,
.employee-dashboard-card,
.employee-side-card {
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.employee-profile-topbar {
    grid-template-columns: minmax(16rem, 1.1fr) minmax(20rem, 1.25fr) minmax(14rem, auto);
    gap: 1.25rem;
    padding: 1.35rem 1.55rem;
}

.employee-profile-name h2 {
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
}

.employee-status-pill,
.employee-dashboard .pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 1.85rem;
    padding: 0 0.65rem;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.employee-status-on_leave,
.employee-dashboard .pill.status-on_leave {
    border-color: #fde68a;
    background: #fef3c7;
    color: #92400e;
}

.employee-status-resigned,
.employee-dashboard .pill.status-resigned {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.employee-profile-facts article {
    padding-left: 1rem;
    border-left: 1px solid #e2e8f0;
}

.employee-profile-facts span,
.employee-detail-table span,
.employee-address-block span,
.employee-side-info-grid span,
.employee-notes-block > span,
.employee-stat-grid span,
.employee-evaluation-table span,
.employee-yearly-evaluation-grid span,
.employee-career-list small {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.employee-profile-facts strong,
.employee-detail-table strong,
.employee-address-block strong,
.employee-side-info-grid strong,
.employee-notes-block strong,
.employee-stat-grid strong {
    color: #0f172a;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.employee-dashboard-tabs {
    position: sticky;
    top: 0.6rem;
    z-index: 4;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
}

body:has(.employee-dashboard) .employee-dashboard-tabs a,
body:has(.employee-dashboard) .employee-dashboard-tabs a.active,
body:has(.employee-dashboard) .employee-dashboard-tabs a:hover,
body:has(.employee-dashboard) .employee-dashboard-tabs a:focus-visible {
    min-height: 2.25rem;
    padding: 0.55rem 0.8rem;
    border: 0;
    border-radius: 999px;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

body:has(.employee-dashboard) .employee-dashboard-tabs a.active,
body:has(.employee-dashboard) .employee-dashboard-tabs a:hover,
body:has(.employee-dashboard) .employee-dashboard-tabs a:focus-visible {
    background: #eef6ff;
    color: #0f172a;
}

.employee-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 28rem);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.employee-dashboard-main,
.employee-dashboard-side {
    width: 100%;
    min-width: 0;
}

.employee-dashboard-side {
    position: static;
    z-index: auto;
}

.employee-dashboard-card,
.employee-side-card {
    min-width: 0;
    padding: 1.55rem;
    overflow: hidden;
    scroll-margin-top: 6rem;
}

.employee-dashboard-card-head {
    align-items: flex-start;
    gap: 0.9rem;
    padding-bottom: 0.15rem;
}

.employee-dashboard-card-head h3 {
    color: #0f172a;
    font-size: clamp(1.1rem, 1.4vw, 1.28rem);
    font-weight: 800;
    line-height: 1.2;
}

.employee-detail-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #e2e8f0;
}

.employee-detail-table article {
    padding: 1.05rem 1rem 1.05rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.employee-detail-table article:nth-child(2n) {
    padding-left: 1rem;
}

.employee-side-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.employee-side-info-grid strong {
    color: #1d6697;
    font-size: 0.88rem;
}

.employee-side-link,
.employee-section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 2.15rem;
    padding: 0 0.8rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.employee-side-link:hover,
.employee-section-action:hover,
.employee-section-action:active,
.employee-section-action.active,
.employee-section-action:focus-visible {
    background: #dbeafe;
    color: #1e3a8a;
    box-shadow: none;
}

.employee-holiday-card .employee-dashboard-card-head h3 {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.employee-holiday-item {
    grid-template-columns: minmax(5.8rem, auto) minmax(0, 1fr);
    border-radius: 14px;
}

.employee-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.employee-stat-grid article,
.employee-stat-card,
.employee-evaluation-card,
.employee-yearly-evaluation-card,
.employee-career-list article,
.employee-tag-box,
.department-meta-chip {
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #f8fbff;
}

.employee-evaluation-grid,
.employee-performance-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.employee-evaluation-table.supervisor,
.employee-evaluation-table.self {
    grid-template-columns: 1fr;
}

.employee-evaluation-table article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
}

.employee-evaluation-table article:last-child {
    border-bottom: 0;
}

.employee-inline-performance-form {
    row-gap: 1.15rem;
    column-gap: 1rem;
}

.employee-inline-performance-form .field-group {
    gap: 0.55rem;
}

.employee-inline-performance-form input,
.employee-inline-performance-form select,
.employee-inline-performance-form textarea {
    min-height: 2.75rem;
    border: 1px solid #cbddec;
    border-radius: 13px;
}

@media (max-width: 1320px) {
    .employee-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .employee-dashboard-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .employee-profile-topbar,
    .employee-dashboard-side,
    .employee-evaluation-grid,
    .employee-performance-form-grid {
        grid-template-columns: 1fr;
    }

    .employee-profile-facts {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .employee-profile-topbar,
    .employee-dashboard-card,
    .employee-side-card {
        padding: 1rem;
    }

    .employee-detail-table,
    .employee-side-info-grid,
    .employee-stat-grid,
    .employee-inline-performance-form,
    .employee-yearly-evaluation-grid {
        grid-template-columns: 1fr;
    }

    .employee-detail-table article,
    .employee-detail-table article:nth-child(2n) {
        padding-left: 0;
        padding-right: 0;
    }

    .employee-dashboard-tabs {
        position: static;
    }
}

/* Holiday calendar employee/admin view */
.holiday-calendar-page {
    display: grid;
    gap: 1.2rem;
}

.holiday-upcoming-panel {
    padding: 1.55rem;
}

.holiday-calendar-toolbar {
    align-items: center;
}

.holiday-month-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.holiday-month-nav > strong {
    min-width: 6.5rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}

.holiday-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
    gap: 1rem;
}

.holiday-month-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    background: #f8fbff;
}

.holiday-single-month {
    padding: 1.1rem;
}

.holiday-month-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.holiday-month-card header span,
.holiday-weekday-row span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.holiday-month-card header strong {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 850;
}

.holiday-weekday-row,
.holiday-calendar-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.holiday-weekday-row {
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.holiday-weekday-row span {
    padding: 0.4rem 0;
    text-align: center;
}

.holiday-calendar-board {
    gap: 0.35rem;
}

.holiday-day-cell {
    min-width: 0;
    min-height: 7.2rem;
    padding: 0.45rem;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #ffffff;
}

.holiday-day-cell.has-holiday {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.holiday-day-cell.is-today {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.14);
}

.holiday-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 850;
}

.holiday-day-cell.has-holiday .holiday-day-number {
    background: #2563eb;
    color: #ffffff;
}

.holiday-day-cell.is-today .holiday-day-number {
    background: #16a34a;
    color: #ffffff;
}

.holiday-day-event {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.35rem;
    padding: 0.45rem;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.holiday-day-event strong {
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.holiday-day-event small {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.holiday-event-list-panel {
    padding: 1.35rem 1.55rem;
}

.holiday-event-list {
    display: grid;
    gap: 0.75rem;
}

.holiday-event-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #dbe5ef;
    border-radius: 14px;
    background: #f8fbff;
}

.holiday-event-row time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 900;
}

.holiday-event-row strong,
.holiday-event-row span,
.holiday-event-row p {
    display: block;
    min-width: 0;
}

.holiday-event-row strong {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 850;
}

.holiday-event-row span {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.holiday-event-row p {
    margin: 0.4rem 0 0;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .holiday-month-grid {
        grid-template-columns: 1fr;
    }

    .holiday-month-card {
        overflow-x: auto;
    }

    .holiday-weekday-row,
    .holiday-calendar-board {
        min-width: 42rem;
    }

    .holiday-calendar-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .holiday-month-nav {
        justify-content: flex-start;
    }

    .holiday-event-row {
        grid-template-columns: 1fr;
    }

    .holiday-event-row time {
        width: fit-content;
    }
}

/* Full-width HRIS workspace */
.main-panel {
    box-sizing: border-box;
    --workspace-gutter: clamp(1.5rem, 3.2vw, 4rem);
    margin-left: calc(300px + var(--workspace-gutter));
    width: calc(100vw - 300px - (var(--workspace-gutter) * 2));
    max-width: none;
}

body.sidebar-collapsed .main-panel {
    margin-left: calc(var(--sidebar-collapsed-width) + var(--workspace-gutter));
    width: calc(100vw - var(--sidebar-collapsed-width) - (var(--workspace-gutter) * 2));
}

.main-panel > *,
.employee-dashboard,
.asset-workspace,
.pro-module-page,
.department-page,
.holiday-calendar-page,
.dashboard-home-page {
    max-width: none;
}

.topbar-copy .eyebrow:empty {
    display: none;
}

.employee-profile-full-grid,
.asset-dashboard-grid,
.asset-requests-grid {
    grid-template-columns: minmax(0, 1fr) !important;
}

.employee-profile-full-grid .employee-dashboard-main,
.asset-dashboard-grid .employee-dashboard-main,
.asset-requests-grid .employee-dashboard-main,
.asset-requests-grid .employee-dashboard-side {
    max-width: none;
}

.asset-requests-grid .employee-inline-performance-form {
    grid-template-columns: minmax(0, 1fr) !important;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Keep document delete as a compact action, not a checkbox input panel. */
.employee-form-layout-v4 .employee-document-form-row .document-delete-field {
    grid-column: 1 / -1;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.employee-form-layout-v4 .employee-document-form-row .document-remove-action {
    width: fit-content !important;
    margin: 0 !important;
}

@media (max-width: 1180px) {
    .main-panel,
    body.sidebar-collapsed .main-panel {
        margin-left: 0;
        width: 100%;
    }
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    overflow-wrap: anywhere;
}

.message::before {
    content: '';
    width: 0.62rem;
    height: 0.62rem;
    flex: 0 0 auto;
    margin-top: 0.42rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

form.is-submitting {
    opacity: 0.82;
}

button[aria-busy='true'] {
    cursor: wait;
}

button[disabled],
.button[disabled] {
    opacity: 0.68;
    pointer-events: none;
}

.import-error-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

.import-error-list p {
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(217, 91, 106, 0.2);
    border-radius: 10px;
    background: var(--red-soft);
    color: #8a2431;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.attendance-device-panel {
    margin-top: 1.25rem;
}

/* Final department workspace action placement */
body:has(.department-page) .department-page .department-title-row {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 1.25rem !important;
}

body:has(.department-page) .department-page .department-title-row h2 {
    flex: 1 1 auto;
    min-width: 0;
}

body:has(.department-page) .department-page .department-actions {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.65rem !important;
    min-width: 11.5rem;
    margin-top: 0.15rem;
}

body:has(.department-page) .department-page .department-actions form {
    display: contents;
    margin: 0 !important;
}

body:has(.department-page) .department-page .department-actions .button,
body:has(.department-page) .department-page .department-actions button.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 5.15rem;
    min-height: 2.45rem !important;
    border: 1px solid #d7e3ec !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 0 1rem !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    transform: none !important;
}

body:has(.department-page) .department-page .department-actions .button.secondary {
    background: #ffffff !important;
    color: #172033 !important;
}

body:has(.department-page) .department-page .department-actions button.button.danger {
    border-color: #efb7b7 !important;
    background: #fff4f4 !important;
    color: #b42318 !important;
}

body:has(.department-page) .department-page .department-actions button.button.danger:hover,
body:has(.department-page) .department-page .department-actions button.button.danger:focus-visible {
    border-color: #e08f8f !important;
    background: #ffe8e8 !important;
    color: #8f1b13 !important;
}

@media (max-width: 760px) {
    body:has(.department-page) .department-page .department-title-row {
        flex-direction: column !important;
    }

    body:has(.department-page) .department-page .department-actions {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        min-width: 0;
    }
}
.leave-employee-selector-field {
    display: grid !important;
    gap: 0.85rem !important;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    padding: 1rem;
    background: #fbfdff;
}

.leave-dual-select {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    gap: 1rem;
    align-items: stretch;
}

.leave-select-box,
.leave-selected-box {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.leave-select-box,
.leave-selected-box {
    padding: 0.85rem;
    border: 1px solid #d8e4ee;
    border-radius: 10px;
    background: #ffffff;
}

.leave-box-title {
    color: #607089;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leave-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.leave-box-header small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #eef7f1;
    color: #12733d;
    font-size: 0.78rem;
    font-weight: 800;
}

.leave-select-box select {
    min-height: 18rem;
    border-radius: 8px;
}

.leave-selected-box {
    align-content: start;
}

.leave-selected-box .leave-selected-employees {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.45rem;
    min-height: 18rem;
    max-height: 18rem;
    overflow: auto;
    padding: 0.65rem;
    border: 1px solid #d8e4ee;
    border-radius: 8px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
}

.leave-selected-box .leave-selected-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #ccebd8;
    border-radius: 8px;
    background: #f0fbf4;
    color: #145c33;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

.leave-selected-box .leave-selected-chip > span {
    min-width: 0;
    flex: 1 1 auto;
}

.leave-selected-remove {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    margin: 0;
    padding: 0;
    border: 1px solid #b9dec7 !important;
    border-radius: 999px;
    background: #ffffff !important;
    color: #15713e !important;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
    text-transform: none;
}

.leave-selected-remove:hover {
    border-color: #d95b6a !important;
    background: #fff1f3 !important;
    color: #b42335 !important;
}

.leave-policy-page {
    display: grid;
    gap: 1rem;
}

.leave-policy-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.34fr);
    gap: 1.25rem;
    align-items: center;
    border: 1px solid #d9e7f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f3fbf7 100%);
}

.leave-policy-hero h3 {
    margin: 0.25rem 0 0.6rem;
    color: #0f172a;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    font-weight: 900;
    line-height: 1.1;
}

.leave-policy-hero p {
    max-width: 72ch;
    color: #52657a;
    line-height: 1.65;
}

.leave-policy-metric {
    padding: 1.15rem;
    border: 1px solid #ccebd8;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(31, 47, 65, 0.07);
}

.leave-policy-metric span,
.leave-policy-metric small {
    display: block;
    color: #607089;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.leave-policy-metric strong {
    display: block;
    margin: 0.45rem 0;
    color: #176b3b;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 900;
    line-height: 1;
}

.leave-policy-note {
    border: 1px solid #f2d59c;
    border-radius: 12px;
    background: #fffaf0;
}

.leave-policy-note p {
    color: #755a18;
    font-weight: 750;
    line-height: 1.7;
}

.leave-policy-page .table-wrap {
    border: 1px solid #dbe7f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
}

.leave-policy-page table th {
    background: #f6f9fc;
    color: #607089;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.leave-policy-page table td {
    border-top: 1px solid #e5edf4;
    color: #26354a;
}

.leave-balance-summary-panel .table-wrap {
    overflow-x: auto;
}

.leave-balance-summary-panel table {
    min-width: 980px;
}

.leave-balance-summary-panel th,
.leave-balance-summary-panel td {
    white-space: nowrap;
}

.leave-balance-summary-panel tbody tr:nth-child(even) {
    background: #f8fafc;
}

.leave-balance-summary-panel tbody td:first-child {
    color: #172033;
    font-weight: 850;
}

.leave-application-card {
    overflow: hidden;
    padding: 0;
    border: 1px solid #b9deed;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 47, 65, 0.08);
}

.leave-application-title {
    padding: 0.48rem 0.78rem;
    border-bottom: 1px solid #b9deed;
    background: #d9f1fb;
    color: #176987;
    font-size: 1.28rem;
    font-weight: 750;
    line-height: 1.2;
}

.leave-application-form {
    display: grid;
    grid-template-columns: 13.5rem minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 2.25rem;
    align-items: center;
    padding: 1.15rem 1.25rem 1.45rem;
}

.leave-application-form .field-group {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr);
    grid-column: span 1;
    align-items: center;
    gap: 0.8rem;
    margin: 0;
}

.leave-application-form .field-group.full-width,
.leave-application-form .leave-form-errors.full-width {
    grid-column: 1 / -1;
}

.leave-application-form .field-group.full-width {
    grid-template-columns: 10.5rem minmax(0, 1fr);
}

.leave-application-form .field-group label {
    color: #111827;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
}

.leave-application-form .form-control,
.leave-application-form .form-select,
.leave-application-form input[type="file"] {
    width: 100%;
    min-height: 2.65rem;
    border: 1px solid #c8d1dc;
    border-radius: 4px;
    background: #ffffff;
    color: #1f2937;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.leave-application-form textarea.form-control {
    min-height: 4.2rem;
    resize: vertical;
}

.leave-application-form .leave-readonly,
.leave-application-form input[readonly] {
    background: #eeeeee;
    color: #334155;
}

.leave-inline-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 1rem;
    min-height: 2.65rem;
}

.leave-radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.leave-radio-option input {
    width: 0.92rem;
    height: 0.92rem;
    margin: 0;
    accent-color: #06a8b5;
}

.leave-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.25rem;
    align-items: center;
}

.leave-form-actions .button {
    width: 100%;
    min-height: 2.65rem;
    border-radius: 4px;
    font-size: 1rem;
    text-transform: none;
}

.leave-save-button {
    background: #59b957;
    box-shadow: none;
}

.leave-save-button:hover {
    background: #43a543;
}

.leave-reset-button {
    border: 1px solid #c8d1dc;
    background: #ffffff;
    color: #111827;
    box-shadow: none;
}

@media (max-width: 1180px) {
    .leave-application-form {
        grid-template-columns: 1fr 1fr;
    }

    .leave-application-form .field-group {
        grid-template-columns: 9.5rem minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .leave-application-form {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .leave-application-form .field-group,
    .leave-application-form .field-group.full-width {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .leave-inline-options,
    .leave-form-actions {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
}

.leave-request-dashboard {
    display: grid;
    gap: 1rem;
    max-width: 1040px;
    color: #233173;
}

.leave-request-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.leave-greeting {
    display: grid;
    gap: 0.15rem;
}

.leave-greeting span {
    color: #273b94;
    font-size: 1.15rem;
    font-weight: 600;
}

.leave-greeting strong {
    color: #263795;
    font-size: clamp(1.55rem, 2.4vw, 2.05rem);
    font-weight: 900;
    line-height: 1;
}

.leave-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.leave-mini-icon,
.leave-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid #8da0df;
    background: #ffffff;
    color: #273b94;
    font-weight: 900;
}

.leave-avatar {
    border-color: #e0d0bf;
    background: #f6dbc8;
    color: #6b341c;
}

.leave-request-top {
    display: grid;
    grid-template-columns: 18.5rem minmax(10rem, 1fr) minmax(10rem, 1fr);
    gap: 1.35rem;
    align-items: end;
}

.leave-upcoming-card {
    position: relative;
    display: grid;
    gap: 0.6rem;
    min-height: 9.7rem;
    padding: 1.05rem 1.25rem;
    border: 2px solid #8091d4;
    border-radius: 8px;
    background: #ffffff;
}

.leave-upcoming-card h3,
.leave-request-panel h3,
.leave-announcement-panel h3 {
    color: #263795;
    font-size: 1.15rem;
    font-weight: 900;
}

.leave-upcoming-card strong {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 900;
}

.leave-upcoming-card span,
.leave-upcoming-card small {
    color: #111827;
    font-size: 0.8rem;
    font-weight: 650;
}

.leave-upcoming-card em {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #3cbf95;
    color: #ffffff;
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 900;
}

.leave-balance-illustration {
    display: grid;
    justify-items: center;
    gap: 0.62rem;
    min-height: 8.7rem;
    align-content: center;
}

.leave-balance-paper {
    position: relative;
    display: inline-grid;
    place-items: center;
    min-width: 8.8rem;
    min-height: 4.35rem;
    padding: 0.95rem 1.25rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
    box-shadow: inset 0 0 0 1px rgba(128, 145, 212, 0.26), 0 10px 22px rgba(39, 59, 148, 0.1);
}

.leave-balance-paper::before {
    content: "";
    position: absolute;
    top: 0.62rem;
    width: 1.75rem;
    height: 0.18rem;
    border-radius: 999px;
    background: rgba(38, 55, 149, 0.42);
}

.calendar-paper::before {
    width: 1.75rem;
    height: 0.18rem;
    top: 0.62rem;
    background: rgba(38, 55, 149, 0.42);
}

.leave-balance-paper strong {
    color: #263795;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
}

.leave-balance-illustration span {
    color: #263795;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.leave-request-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.leave-request-panel,
.leave-announcement-panel {
    border: 2px solid #8091d4;
    border-radius: 8px;
    background: #ffffff;
}

.leave-modern-form {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.05rem;
}

.leave-request-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.leave-request-panel-head span {
    color: #273b94;
    font-weight: 850;
}

.leave-request-content {
    display: grid;
    grid-template-columns: minmax(17rem, 0.95fr) minmax(20rem, 1.05fr);
    gap: 1rem;
    align-items: start;
}

.leave-request-fields,
.leave-calendar-panel,
.leave-date-inputs,
.leave-modern-footer,
.leave-request-meta {
    display: grid;
    gap: 0.8rem;
}

.leave-request-fields .field-group,
.leave-calendar-panel .field-group {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}

.leave-request-fields label,
.leave-calendar-panel label,
.leave-request-meta label,
.leave-day-summary label {
    color: #4b5675;
    font-size: 0.78rem;
    font-weight: 750;
}

.leave-request-dashboard .form-control,
.leave-request-dashboard .form-select,
.leave-request-dashboard textarea,
.leave-request-dashboard input[type="file"],
.leave-day-summary input {
    width: 100%;
    min-height: 2.45rem;
    border: 1px solid #aeb5c6;
    border-radius: 2px;
    background: #ffffff;
    color: #111827;
    font-size: 0.95rem;
    box-shadow: none;
}

.leave-request-dashboard textarea {
    min-height: 8.3rem;
    resize: vertical;
}

.leave-compact-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.leave-compact-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.65rem;
    border: 1px solid #cfd5e5;
    border-radius: 6px;
    background: #f9fbff;
    color: #263795;
    font-weight: 850;
}

.leave-compact-options input {
    accent-color: #263795;
}

.leave-calendar-widget {
    border: 1px solid #b7bdcc;
    border-radius: 2px;
    background: #ffffff;
}

.leave-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #d5d9e5;
}

.leave-calendar-head button {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font-size: 1.35rem;
}

.leave-calendar-head button:hover {
    border-color: #cbd3ef;
    background: #f4f6ff;
    color: #263795;
}

.leave-calendar-head strong {
    color: #263795;
}

.leave-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem 0.25rem;
    padding: 0.8rem;
    text-align: center;
}

.leave-calendar-grid span {
    color: #5d657d;
    font-size: 0.65rem;
    font-weight: 850;
}

.leave-calendar-grid b {
    display: grid;
    place-items: center;
    min-height: 1.85rem;
    border-radius: 999px;
    color: #404862;
    font-size: 0.82rem;
    font-weight: 750;
}

.leave-calendar-grid b.in-range {
    border-radius: 0;
    background: #c9d2f7;
    color: #263795;
}

.leave-calendar-grid b.is-muted {
    color: #a1a8bd;
}

.leave-calendar-grid b.is-selected {
    background: #334aa0;
    color: #ffffff;
}

.leave-modern-footer {
    grid-template-columns: minmax(0, 1fr);
}

.leave-request-meta {
    grid-template-columns: 6rem minmax(0, 1fr) 5rem minmax(0, 1fr);
    align-items: center;
}

.leave-day-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
}

.leave-day-summary label {
    display: grid;
    gap: 0.3rem;
}

.leave-day-summary input,
.leave-day-summary input[readonly] {
    background: #f3f5fb;
    color: #263795;
    font-weight: 850;
}

.leave-modern-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.leave-modern-actions .button {
    min-height: 2.45rem;
    border-radius: 4px;
    box-shadow: none;
}

.leave-modern-actions .button:not(.secondary) {
    background: #263795;
}

.leave-announcement-panel {
    padding: 1rem 1.05rem;
}

.leave-announcement-panel ul {
    display: grid;
    gap: 0;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.leave-announcement-panel li {
    position: relative;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0 0.75rem 1.1rem;
    border-bottom: 1px solid #d8dce8;
}

.leave-announcement-panel li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: #111827;
}

.leave-announcement-panel li:last-child {
    border-bottom: 0;
}

.leave-announcement-panel strong {
    color: #111827;
    font-size: 0.8rem;
}

.leave-announcement-panel span {
    color: #4b5675;
    font-size: 0.72rem;
    line-height: 1.35;
}

.leave-announcement-panel time {
    color: #8b93aa;
    font-size: 0.68rem;
    text-align: right;
}

@media (max-width: 1080px) {
    .leave-request-top,
    .leave-request-main-grid,
    .leave-request-content {
        grid-template-columns: 1fr;
    }

    .leave-request-top {
        align-items: stretch;
    }
}

@media (max-width: 700px) {
    .leave-request-meta,
    .leave-day-summary {
        grid-template-columns: 1fr;
    }

    .leave-request-panel-head,
    .leave-modern-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .leave-modern-actions .button {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .leave-policy-hero {
        grid-template-columns: 1fr;
    }
}

.sidebar-nav a[data-subnav-trigger] {
    position: relative;
    padding-right: 2.15rem;
}

.sidebar-nav a[data-subnav-trigger]::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.62;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 160ms ease, opacity 160ms ease;
}

.sidebar-nav a[data-subnav-trigger].has-open-subnav::after {
    opacity: 0.9;
    transform: translateY(-35%) rotate(225deg);
}

.sidebar-nav a[data-subnav-trigger].has-open-subnav {
    border-color: #cfeadd;
    background: #eefdf4;
    color: #111827;
}

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

.sidebar-subnav {
    padding-top: 0.2rem;
    padding-bottom: 0.35rem;
}

.sidebar-subnav a {
    position: relative;
}

.sidebar-subnav a::before {
    content: "";
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.35;
}

body.sidebar-collapsed .sidebar-nav a[data-subnav-trigger] {
    padding-right: 0;
}

body.sidebar-collapsed .sidebar-nav a[data-subnav-trigger]::after {
    display: none;
}

.leave-selected-box .leave-picker-empty {
    display: grid;
    min-height: 100%;
    place-items: center;
    padding: 1rem;
    border: 1px dashed #c7d7e6;
    border-radius: 8px;
    color: #6b7a90;
    text-align: center;
}

@media (max-width: 900px) {
    .leave-dual-select {
        grid-template-columns: 1fr;
    }
}

.leave-employee-picker-field {
    display: grid !important;
    gap: 0.85rem !important;
    border: 1px solid #dbe5ec;
    border-radius: 10px;
    padding: 1rem;
    background: #fbfdff;
}

.leave-picker-heading,
.leave-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.leave-picker-heading strong {
    padding: 0.45rem 0.7rem;
    border: 1px solid #dbe5ec;
    border-radius: 999px;
    background: #ffffff;
    color: #172033;
    font-size: 0.85rem;
    white-space: nowrap;
}

.leave-picker-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.leave-picker-toolbar input {
    flex: 1 1 18rem;
}

.leave-selected-employees {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.65rem;
    border: 1px dashed #c7d7e6;
    border-radius: 8px;
    background: #ffffff;
}

.leave-picker-empty {
    color: #6b7a90;
    font-size: 0.9rem;
}

.leave-selected-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.38rem 0.58rem;
    border-radius: 999px;
    background: #eaf7ef;
    color: #126335;
    font-size: 0.86rem;
    font-weight: 700;
}

.leave-employee-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.5rem;
    max-height: 20rem;
    overflow: auto;
    padding: 0.65rem;
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #ffffff;
}

.leave-employee-option,
.field-group .leave-employee-option:has(input[type="checkbox"]) {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.55rem 0.65rem !important;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #172033;
    cursor: pointer;
}

.leave-employee-option:hover {
    border-color: #c7d7e6;
    background: #f4f8fb;
}

.leave-employee-option input {
    flex: 0 0 auto;
}

.leave-employee-option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.leave-employee-option:has(input:checked) {
    border-color: #31a85c;
    background: #edf9f1;
}

.leave-employee-picker-field.is-muted .leave-picker-toolbar,
.leave-employee-picker-field.is-muted .leave-employee-checklist {
    opacity: 0.55;
}

@media (max-width: 760px) {
    .leave-picker-heading,
    .leave-picker-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .leave-picker-toolbar .button,
    .leave-picker-toolbar input {
        width: 100%;
    }

    .leave-employee-checklist {
        grid-template-columns: 1fr;
        max-height: 17rem;
    }
}

/* New leave request live summary and calendar */
.leave-request-dashboard .leave-upcoming-card,
.leave-request-dashboard .leave-balance-illustration,
.leave-request-dashboard .leave-request-panel {
    box-shadow: 0 14px 34px rgba(31, 47, 65, 0.06);
}

.leave-date-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.leave-calendar-widget {
    overflow: hidden;
}

.leave-calendar-grid {
    min-height: 18.6rem;
}

.leave-calendar-grid span,
.leave-calendar-grid b {
    user-select: none;
}

.leave-calendar-grid b {
    position: relative;
    min-width: 2rem;
    aspect-ratio: 1;
}

.leave-calendar-grid b.is-today:not(.is-selected)::after {
    content: "";
    position: absolute;
    right: 0.35rem;
    bottom: 0.3rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #263795;
}

.leave-calendar-grid b.in-range {
    background: #e5ebff;
}

.leave-calendar-grid b.is-selected {
    border-radius: 999px;
    background: #263795;
    color: #ffffff;
}

.leave-day-summary input.is-negative {
    color: #b42318;
    border-color: #f3b8b1;
    background: #fff4f2;
}

.leave-day-summary input[readonly] {
    cursor: default;
}

.leave-request-panel-head span,
#leave-upcoming-range {
    overflow-wrap: anywhere;
}

.leave-request-fields .leave-date-range-label {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 700px) {
    .leave-date-inputs {
        grid-template-columns: 1fr;
    }

    .leave-calendar-grid {
        gap: 0.25rem;
        min-height: 16rem;
        padding: 0.65rem;
    }

    .leave-calendar-grid b {
        min-width: 0;
        min-height: 1.7rem;
        font-size: 0.78rem;
    }
}

/* Final New Leave Request polish: compact BS calendar and balanced layout. */
.leave-request-dashboard {
    gap: 1.1rem;
    max-width: 1180px;
}

.leave-request-top {
    grid-template-columns: minmax(16rem, 0.85fr) minmax(13rem, 1fr) minmax(13rem, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.leave-upcoming-card,
.leave-balance-illustration {
    min-height: 8.2rem;
}

.leave-balance-illustration {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
}

.leave-request-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
}

.leave-request-fields > .leave-calendar-panel {
    margin-top: 0.2rem;
}

.leave-calendar-widget {
    border-radius: 8px;
    overflow: hidden;
}

.leave-calendar-grid {
    min-height: 0;
    gap: 0.22rem;
    padding: 0.7rem;
}

.leave-calendar-grid span,
.leave-calendar-grid b,
.leave-calendar-grid button {
    user-select: none;
}

.leave-calendar-grid button {
    appearance: none;
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 2rem;
    aspect-ratio: 1;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #404862;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.leave-calendar-grid button:hover {
    background: #eef2ff;
    color: #263795;
}

.leave-calendar-grid button.is-muted {
    color: #a1a8bd;
    cursor: default;
}

.leave-calendar-grid button.in-range {
    border-radius: 0;
    background: #e5ebff;
    color: #263795;
}

.leave-calendar-grid button.is-selected {
    border-radius: 999px;
    background: #263795;
    color: #ffffff;
}

.leave-calendar-grid button.is-today:not(.is-selected)::after {
    content: "";
    position: absolute;
    right: 0.35rem;
    bottom: 0.3rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #263795;
}

.leave-calendar-grid button:disabled {
    pointer-events: none;
}

.leave-request-dashboard .leave-option-set {
    display: grid;
    gap: 0.7rem;
    max-width: 35rem;
}

.leave-request-dashboard .leave-option-set + .leave-option-set {
    margin-top: 0.35rem;
}

.leave-request-dashboard .leave-option-set-title {
    display: block;
    color: #52657a;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.leave-request-dashboard .leave-compact-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0 0 0.15rem;
}

.leave-request-dashboard #leave-payment-period-set .leave-compact-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leave-request-dashboard .leave-compact-options label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    min-height: 3.25rem;
    padding: 0.72rem 1rem;
    border: 1px solid #d6e4f0;
    border-radius: 13px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.1;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.leave-request-dashboard .leave-compact-options label:hover {
    border-color: #bfdbfe;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
    transform: translateY(-1px);
}

.leave-request-dashboard .leave-compact-options label:has(input:checked) {
    border-color: #86efac;
    background: #f0fdf4;
    color: #14532d;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.08);
}

.leave-request-dashboard .leave-compact-options input {
    appearance: none;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.08rem;
    height: 1.08rem;
    min-width: 1.08rem;
    min-height: 1.08rem;
    aspect-ratio: 1;
    padding: 0;
    margin: 0;
    border: 1.25px solid #a9b8cc;
    border-radius: 999px;
    background: #ffffff;
    box-sizing: border-box;
    cursor: pointer;
    line-height: 1;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.leave-request-dashboard .leave-compact-options input[type="radio"] {
    border-radius: 999px;
}

.leave-request-dashboard .leave-compact-options input:checked {
    border-color: #16a34a;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.leave-request-dashboard .leave-compact-options input[type="radio"]:checked::after {
    content: "";
    display: block;
    width: 0.4rem;
    height: 0.4rem;
    aspect-ratio: 1;
    border-radius: 999px;
    background: #16a34a;
}

.leave-request-dashboard .leave-compact-options span {
    display: inline-block;
    min-width: 0;
    line-height: 1.2;
}

.leave-request-dashboard select:disabled {
    border-color: #d5dcec;
    background: #f7f9fd;
    color: #4b5b7f;
    cursor: not-allowed;
    opacity: 1;
}

/* Leave request form: compact, consistent control layout. */
.leave-request-dashboard {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
}

.leave-request-panel {
    border: 1px solid #cbd5e1;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.leave-modern-form {
    gap: 0.9rem;
    padding: 1rem;
}

.leave-request-fields {
    gap: 1rem;
}

.leave-manager-type-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.leave-request-dashboard .form-control,
.leave-request-dashboard .form-select,
.leave-request-dashboard textarea,
.leave-request-dashboard input[type="file"],
.leave-day-summary input {
    min-height: 2.75rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    font-size: 0.9rem;
    line-height: 1.25;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.leave-request-dashboard .form-control:focus,
.leave-request-dashboard .form-select:focus,
.leave-request-dashboard textarea:focus,
.leave-request-dashboard input[type="file"]:focus,
.leave-day-summary input:focus {
    border-color: #7286d3;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(38, 55, 149, 0.1);
}

.leave-request-dashboard textarea {
    min-height: 6.25rem;
    resize: vertical;
}

.leave-request-fields > .leave-calendar-panel {
    width: 100%;
    max-width: none;
    gap: 0.65rem;
    margin-top: 0;
}

.leave-date-inputs {
    gap: 0.75rem;
}

.leave-calendar-widget {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

.leave-calendar-head {
    min-height: 2.9rem;
    padding: 0.45rem 0.7rem;
    border-bottom-color: #e2e8f0;
}

.leave-calendar-head button {
    width: 2rem;
    height: 2rem;
    font-size: 1.15rem;
}

.leave-calendar-grid {
    grid-template-rows: 1.5rem repeat(6, 2.75rem);
    grid-auto-rows: 2.75rem;
    gap: 0.15rem 0.25rem;
    min-height: 0;
    padding: 0.55rem 0.65rem 0.7rem;
    align-items: center;
}

.leave-calendar-grid span {
    display: grid;
    height: 1.5rem;
    place-items: center;
    font-size: 0.68rem;
}

.leave-calendar-grid button {
    justify-self: center;
    width: 2.625rem;
    height: 2.625rem;
    min-width: 2.625rem;
    min-height: 2.625rem;
    max-width: 2.625rem;
    max-height: 2.625rem;
    aspect-ratio: auto;
    border-radius: 999px;
    font-size: 0.8rem;
}

.leave-calendar-grid button.in-range {
    border-radius: 999px;
    background: #e8edff;
}

.leave-calendar-grid button.is-selected {
    border-radius: 999px;
    background: #263795;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(38, 55, 149, 0.12);
}

.leave-calendar-grid button.is-today:not(.is-selected)::after {
    display: none;
}

/* Leave review page */
.leave-review-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.82fr);
    gap: 1.25rem;
    align-items: start;
}

.leave-review-page .panel {
    border: 1px solid #d7e1ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.leave-review-page .panel-header {
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: 0;
}

.leave-review-page .eyebrow {
    margin-bottom: 0.45rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.leave-review-page .panel-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.2rem;
    line-height: 1.25;
}

.leave-review-page .pill {
    min-height: 1.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 850;
}

.leave-review-page .pill.approved {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.leave-review-page .pill.pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.leave-review-page .pill.rejected,
.leave-review-page .pill.cancelled {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.leave-review-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.leave-review-detail-grid > div {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    min-height: 5.4rem;
    padding: 1rem 1.1rem;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #fbfdff;
}

.leave-review-detail-grid > div.full-span {
    grid-column: 1 / -1;
    min-height: 5.1rem;
}

.leave-review-detail-grid span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.leave-review-detail-grid strong {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.leave-review-detail-grid > div:not(.full-span) strong {
    font-size: 1.18rem;
}

.leave-review-form {
    display: grid;
    gap: 1.05rem;
}

.leave-review-form .field-group {
    gap: 0.5rem;
    margin: 0 !important;
}

.leave-review-form .field-group label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.leave-review-form select,
.leave-review-form input,
.leave-review-form textarea {
    min-height: 2.9rem;
    border: 1px solid #d7e1ec;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: none;
}

.leave-review-form textarea {
    min-height: 7.5rem;
    resize: vertical;
}

.leave-review-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem !important;
    padding-top: 1.1rem;
    border-top: 1px solid #e2e8f0;
}

.leave-review-form .button {
    min-height: 2.75rem;
    padding-inline: 1.2rem;
    border-radius: 8px;
}

.leave-review-form .button[type="submit"] {
    background: #16a34a;
    color: #ffffff;
}

/* Contracts & Probation page */
.contract-probation-page {
    display: grid;
    gap: 1rem;
}

.contract-probation-page .panel {
    border: 1px solid #d7e1ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}

.contract-probation-page .panel-header {
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: 0;
}

.contract-probation-page .eyebrow {
    margin-bottom: 0.4rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contract-probation-page .panel-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.16rem;
    line-height: 1.25;
}

.contract-review-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.contract-review-form .field-group {
    min-width: 0;
    gap: 0.45rem;
    margin: 0 !important;
}

.contract-review-form .field-group.full-width,
.contract-review-form .form-actions.full-width {
    grid-column: 1 / -1;
}

.contract-review-form .field-group label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contract-review-form input:not([type="checkbox"]):not([type="radio"]),
.contract-review-form select,
.contract-review-form textarea {
    min-height: 2.75rem;
    border: 1px solid #d7e1ec;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: none;
}

.contract-review-form textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.contract-review-form .form-actions {
    justify-content: flex-start;
    margin-top: 0.35rem !important;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.contract-review-form .button {
    min-height: 2.75rem;
    border-radius: 8px;
    background: #16a34a;
    color: #ffffff;
}

.contract-probation-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(14rem, 22rem));
    gap: 0.9rem;
}

.contract-probation-stats .stat-card {
    min-height: 7rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #d7e1ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.contract-probation-stats .stat-card span {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 750;
}

.contract-probation-stats .stat-card strong {
    color: #0f172a;
    font-size: 2rem;
    line-height: 1;
}

.contract-probation-stats .stat-card small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
}

.contract-probation-table-panel .table-wrap {
    margin: 0;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    overflow: hidden;
}

.contract-probation-table-panel table {
    margin: 0;
}

.contract-probation-table-panel th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contract-probation-table-panel td {
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 750;
    vertical-align: middle;
}

.contract-probation-table-panel .empty-cell {
    padding: 1.35rem;
    color: #64748b;
    font-weight: 850;
    text-align: center;
}

@media (max-width: 900px) {
    .contract-review-form,
    .contract-probation-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .leave-review-page,
    .leave-review-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Keep leave request fields in straight rows. */
.leave-modern-form .leave-request-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.75rem;
    align-items: start;
}

.leave-modern-form .leave-request-fields > .field-group {
    grid-column: 1 / -1;
}

.leave-modern-form .leave-manager-type-row,
.leave-modern-form .leave-date-inputs {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.leave-modern-form .leave-manager-type-row .field-group,
.leave-modern-form .leave-date-inputs .field-group {
    min-width: 0;
    margin: 0 !important;
    margin-top: 0 !important;
    align-self: start;
}

.leave-modern-form .leave-calendar-panel {
    grid-column: 1 / -1;
}

.leave-modern-form .leave-request-fields .field-group label,
.leave-modern-form .leave-calendar-panel .field-group label {
    min-height: 0.95rem;
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 700px) {
    .leave-modern-form .leave-request-fields,
    .leave-modern-form .leave-manager-type-row,
    .leave-modern-form .leave-date-inputs {
        grid-template-columns: 1fr;
    }
}

.leave-request-dashboard .leave-option-set {
    width: 100%;
    max-width: none;
    gap: 0.55rem;
}

.leave-request-dashboard .leave-compact-options {
    gap: 0.65rem;
}

.leave-request-dashboard .leave-compact-options label {
    min-height: 2.9rem;
    padding: 0.65rem 0.8rem;
    border-color: #cbd5e1;
    border-radius: 8px;
    box-shadow: none;
}

.leave-request-dashboard .leave-compact-options label:hover {
    border-color: #aebdde;
    box-shadow: none;
    transform: none;
}

.leave-request-dashboard .leave-compact-options label:has(input:checked) {
    border-color: #72c68d;
    background: #edf9f1;
    color: #14532d;
    box-shadow: none;
}

.leave-request-dashboard .leave-compact-options input {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
}

.leave-request-dashboard .leave-option-set.is-disabled {
    opacity: 0.55;
}

.leave-request-dashboard .leave-option-set.is-disabled label {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.leave-request-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.leave-meta-field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.leave-request-meta select,
.leave-request-meta input[type="file"] {
    width: 100%;
    height: 2.75rem;
    min-height: 2.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
}

.leave-request-meta input[type="file"] {
    padding: 0.3rem 0.45rem;
}

.leave-request-meta input[type="file"]::file-selector-button {
    height: 2rem;
    margin: -0.05rem 0.6rem -0.05rem -0.1rem;
    padding: 0 0.7rem;
    border: 0;
    border-radius: 6px;
    background: #eef2f7;
    color: #334155;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.leave-modern-footer {
    gap: 0.9rem;
    padding-top: 0.15rem;
}

.leave-day-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.leave-day-summary input,
.leave-day-summary input[readonly] {
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0.65rem 0.75rem;
    border-color: #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.9rem;
}

.leave-modern-actions {
    gap: 0.65rem;
}

.leave-modern-actions .button {
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
}

.leave-modern-actions .button.secondary {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
}

@media (max-width: 700px) {
    .leave-modern-form {
        padding: 0.8rem;
    }

    .leave-request-fields > .leave-calendar-panel,
    .leave-request-dashboard .leave-option-set {
        max-width: 100%;
    }

    .leave-calendar-grid {
        grid-template-rows: 1.4rem repeat(6, 2.45rem);
        grid-auto-rows: 2.45rem;
        gap: 0.1rem;
        padding: 0.45rem;
    }

    .leave-calendar-grid button {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
        max-width: 2.25rem;
        max-height: 2.25rem;
    }

    .leave-calendar-grid {
        touch-action: pan-y;
    }

    .leave-request-meta,
    .leave-day-summary,
    .leave-manager-type-row,
    .leave-request-dashboard .leave-compact-options,
    .leave-request-dashboard #leave-payment-period-set .leave-compact-options {
        grid-template-columns: 1fr;
    }

    .leave-modern-actions {
        width: 100%;
    }
}

.leave-row-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.leave-row-actions form {
    margin: 0;
}

.leave-row-actions button.table-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

/* Current day marker for the leave request BS calendar. */
.leave-calendar-grid button.is-today:not(.is-selected) {
    position: relative;
    border: 2px solid #16a34a;
    background: #f0fdf4;
    color: #14532d;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.leave-calendar-grid button.is-today:not(.is-selected)::after {
    display: none;
}

.table-link.danger {
    color: #b42318;
}

.leave-analytics-page {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
}

.leave-analytics-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.leave-analytics-stats article {
    display: grid;
    gap: 0.35rem;
    min-height: 6rem;
    align-content: center;
    padding: 1rem;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.leave-analytics-stats span,
.leave-month-bar span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.leave-analytics-stats strong {
    color: #263795;
    font-size: 1.6rem;
}

.leave-month-bars {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    min-height: 14rem;
    align-items: end;
    padding: 0.5rem 1rem 1rem;
}

.leave-month-bar {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    min-width: 0;
}

.leave-month-bar-track {
    position: relative;
    width: min(3.5rem, 70%);
    height: 9rem;
    overflow: hidden;
    border-radius: 6px 6px 2px 2px;
    background: #eef2f7;
}

.leave-month-bar-track i {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 3px;
    background: #5269bd;
}

.leave-month-bar strong {
    color: #263795;
    font-size: 0.82rem;
}

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

@media (max-width: 800px) {
    .leave-analytics-stats,
    .leave-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-month-bars {
        gap: 0.3rem;
        padding-inline: 0.4rem;
    }
}

@media (max-width: 560px) {
    .leave-analytics-stats,
    .leave-analytics-grid {
        grid-template-columns: 1fr;
    }

    .leave-month-bar-track {
        width: 70%;
        height: 7rem;
    }

    .leave-month-bar span {
        font-size: 0.62rem;
        text-align: center;
    }
}

/* Sidebar state clarity: selected page is not the same thing as an expanded group. */
.sidebar-nav a {
    border: 1px solid transparent;
}

.sidebar-nav a.active:not([data-subnav-trigger]),
.sidebar-subnav a.active {
    border-color: #b7efcb;
    background: #ecfdf3;
    color: #14532d;
}

.sidebar-nav a[data-subnav-trigger].has-open-subnav,
.sidebar-nav a[data-subnav-trigger].has-open-subnav.active {
    border-color: #dbe5ef;
    background: #ffffff;
    color: #0f172a;
}

.sidebar-nav a[data-subnav-trigger].has-open-subnav:hover,
.sidebar-nav a[data-subnav-trigger].has-open-subnav.active:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
    color: #0f172a;
}

.sidebar-nav a[data-subnav-trigger].active:not(.has-open-subnav) {
    border-color: #b7efcb;
    background: #ecfdf3;
    color: #14532d;
}

.sidebar-subnav a {
    border-radius: 10px;
}

.employee-add-document-button {
    justify-self: start;
    margin-top: 0.2rem;
}

.employee-document-form-row[hidden] {
    display: none !important;
}

.employee-profile-name h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    overflow: visible;
    padding-right: 0.35rem;
}

.employee-status-dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
    flex: 0 0 auto;
    display: inline-block;
    margin-left: 0.05rem;
}

.employee-status-dot.employee-status-active {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.employee-status-dot.employee-status-on_leave {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.employee-status-dot.employee-status-resigned {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Sidebar final polish: clean HR/admin navigation rhythm. */
:root {
    --sidebar-width: 292px;
}

.sidebar {
    width: var(--sidebar-width);
    padding: 1.05rem;
    border: 1px solid #dbe7ef;
    border-radius: 20px;
    background: #fbfdff;
    box-shadow: 0 14px 34px rgba(31, 47, 65, 0.075);
}

.main-panel {
    margin-left: calc(var(--sidebar-width) + var(--shell-gap) + 20px);
}

.sidebar-head {
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 0.1rem 0.65rem;
}

.brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.85rem;
    padding: 0.45rem 0.35rem;
}

.brand-mark {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 12px;
    background: #f4fbf8;
    border: 1px solid #d8e9e1;
    color: #27645d;
    box-shadow: none;
}

.brand-copy {
    min-width: 0;
    gap: 0.18rem;
}

.brand-copy strong {
    max-width: none;
    color: #142033;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.brand-copy small {
    max-width: none;
    overflow: visible;
    color: #617089;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}

.sidebar-toggle-inline {
    align-self: center;
    flex: 0 0 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    background: #ffffff;
    border-color: #dbe7ef;
}

.sidebar-group {
    margin-top: 1.05rem;
}

.sidebar-group + .sidebar-group {
    margin-top: 1.25rem;
}

.sidebar-label {
    padding: 0 0.55rem;
    margin: 0 0 0.55rem;
    color: #6e7c92;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sidebar-nav {
    gap: 0.38rem;
}

.sidebar-nav a,
.sidebar-logout-link {
    display: flex;
    align-items: center;
    min-height: 3.05rem;
    gap: 0.8rem;
    padding: 0.48rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #273449;
    font-size: 0.91rem;
    font-weight: 650;
    line-height: 1.2;
}

.nav-icon {
    flex: 0 0 2.15rem;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 11px;
    border: 1px solid #dbe7ef;
    background: #ffffff;
    color: #526278;
}

.nav-icon svg {
    width: 1.02rem;
    height: 1.02rem;
}

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav a:hover,
.sidebar-logout-link:hover,
.sidebar-logout-link:focus-visible {
    border-color: #dbe7ef;
    background: #f4f8fb;
    color: #142033;
}

.sidebar-nav a.active:not([data-subnav-trigger]),
.sidebar-nav a[data-subnav-trigger].active:not(.has-open-subnav),
.sidebar-subnav a.active {
    border-color: #b9e8c9;
    background: #edf9f1;
    color: #14532d;
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon,
.sidebar-logout-link:hover .nav-icon,
.sidebar-logout-link:focus-visible .nav-icon {
    border-color: #b9e8c9;
    background: #ffffff;
    color: #166534;
}

.sidebar-nav a[data-subnav-trigger] {
    padding-right: 2.35rem;
}

.sidebar-nav a[data-subnav-trigger]::after {
    right: 0.95rem;
    width: 0.42rem;
    height: 0.42rem;
    opacity: 0.55;
}

.sidebar-nav a[data-subnav-trigger].has-open-subnav,
.sidebar-nav a[data-subnav-trigger].has-open-subnav.active {
    border-color: #dbe7ef;
    background: #ffffff;
    color: #142033;
}

.sidebar-subnav {
    display: grid;
    gap: 0.35rem;
    margin: 0.15rem 0 0.6rem 2.35rem;
    padding: 0.2rem 0 0.25rem 0.85rem;
    border-left: 1px solid #e4edf4;
}

.sidebar-subnav a {
    min-height: 2rem;
    gap: 0.5rem;
    padding: 0.34rem 0.55rem;
    border-radius: 9px;
    color: #59697f;
    font-size: 0.77rem;
    font-weight: 600;
}

.sidebar-subnav a::before {
    flex: 0 0 0.22rem;
    width: 0.22rem;
    height: 0.22rem;
    opacity: 0.28;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding-inline: 0.82rem;
}

body.sidebar-collapsed .main-panel {
    margin-left: calc(var(--sidebar-collapsed-width) + var(--shell-gap) + 20px);
}

body.sidebar-collapsed .brand,
body.sidebar-collapsed .sidebar-head,
body.sidebar-collapsed .sidebar-nav a,
body.sidebar-collapsed .sidebar-logout-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-head {
    flex-direction: column;
    gap: 0.55rem;
    padding-bottom: 0.9rem;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-subnav,
body.sidebar-collapsed .sidebar-nav a[data-subnav-trigger]::after {
    display: none !important;
}

body.sidebar-collapsed .sidebar-toggle-inline {
    display: inline-flex;
    width: 2.45rem;
    height: 2.45rem;
    margin: 0 auto;
}

body.sidebar-collapsed .sidebar-nav a,
body.sidebar-collapsed .sidebar-logout-link {
    min-height: 3rem;
    padding-inline: 0;
}

/* Employee completeness dashboard */
body:has(.employee-completeness-page) .main-panel {
    max-width: none;
}

body:has(.employee-completeness-page) .main-panel > .employee-completeness-page,
body:has(.employee-completeness-page) .messages {
    max-width: 1180px;
    margin-inline: auto;
}

body:has(.employee-completeness-page) .topbar {
    max-width: 1180px;
    margin-inline: auto;
}

body:has(.employee-completeness-page) .search-shell {
    width: clamp(16rem, 22vw, 23rem);
    min-width: 15rem;
}

.employee-completeness-page {
    display: grid;
    gap: 1.1rem;
    padding: 0 0 2rem;
}

.completeness-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.completeness-hero h2 {
    margin-top: 0.25rem;
    color: #111827;
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    letter-spacing: -0.03em;
}

.completeness-hero p:not(.eyebrow),
.completeness-section-head p {
    max-width: 42rem;
    margin-top: 0.35rem;
    color: #667085;
    line-height: 1.6;
}

.completeness-kpi-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 24rem);
}

.completeness-kpi-card {
    display: grid;
    gap: 0.55rem;
    padding: 1.15rem;
    border: 1px solid #dce8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.completeness-kpi-card span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.completeness-kpi-card strong {
    color: #14532d;
    font-size: 2.35rem;
    letter-spacing: -0.04em;
}

.completeness-kpi-card small {
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.45;
}

.completeness-progress,
.completeness-mini-progress {
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef4;
}

.completeness-progress {
    height: 0.5rem;
    margin: 0.1rem 0;
}

.completeness-progress i,
.completeness-mini-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #22c55e);
}

.completeness-table-card {
    padding: 1.2rem;
    border-color: #dce8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.completeness-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.completeness-section-head h3 {
    margin-top: 0.25rem;
    color: #111827;
    font-size: 1.18rem;
}

.completeness-filters {
    display: grid;
    grid-template-columns: minmax(12rem, 1.25fr) repeat(3, minmax(10rem, 1fr)) auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1.05rem;
    padding: 0.85rem;
    border: 1px solid #e4ebf2;
    border-radius: 16px;
    background: #f8fafc;
}

.completeness-filters label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.completeness-filters label span {
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.completeness-filters .form-control,
.completeness-filters .form-select {
    width: 100%;
    min-height: 2.65rem;
    border: 1px solid #d7e1ea;
    border-radius: 10px;
    background: #ffffff;
}

.completeness-filter-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.completeness-filter-actions .button {
    min-height: 2.65rem;
    padding: 0.7rem 0.95rem;
    border-radius: 10px;
    white-space: nowrap;
}

.completeness-table-wrap {
    overflow-x: auto;
    border: 1px solid #e4ebf2;
    border-radius: 16px;
    background: #ffffff;
}

.completeness-table {
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
}

.completeness-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #dce8f0;
    background: #f6f8fb;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.completeness-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #eef2f6;
    color: #344054;
    vertical-align: middle;
}

.completeness-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.completeness-table tbody tr:hover td {
    background: #f7fbff;
}

.completeness-employee-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.15rem;
    color: inherit;
    text-decoration: none;
}

.completeness-avatar {
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #e9f5ef;
    color: #166534;
    font-size: 0.72rem;
    font-weight: 850;
}

.completeness-employee-link strong {
    display: block;
    color: #172033;
    font-size: 0.92rem;
    font-weight: 750;
}

.completeness-employee-link small {
    display: block;
    margin-top: 0.12rem;
    color: #7b8798;
    font-size: 0.76rem;
}

.completeness-department {
    color: #475467;
    font-size: 0.9rem;
}

.completeness-score-cell {
    display: grid;
    gap: 0.4rem;
    width: 6.5rem;
}

.completeness-score-badge {
    display: inline-flex;
    justify-content: center;
    width: fit-content;
    min-width: 4.3rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 850;
}

.completeness-score-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.completeness-score-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.completeness-score-badge.success {
    background: #dcfce7;
    color: #166534;
}

.completeness-mini-progress {
    height: 0.32rem;
}

.completeness-mini-progress.danger i {
    background: #ef4444;
}

.completeness-mini-progress.warning i {
    background: #f59e0b;
}

.completeness-mini-progress.success i {
    background: #22c55e;
}

.missing-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-width: 36rem;
}

.missing-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.28rem 0.58rem;
    border: 1px solid #dde6ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #475467;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.1;
}

.missing-chip.more {
    border-color: #cbd5e1;
    background: #eef2f7;
    color: #334155;
}

.missing-chip.complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

@media (max-width: 1180px) {
    .completeness-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .completeness-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    body:has(.employee-completeness-page) .search-shell {
        width: 100%;
    }

    .completeness-kpi-grid,
    .completeness-filters {
        grid-template-columns: 1fr;
    }

    .completeness-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .completeness-table-card {
        padding: 0.9rem;
    }
}

/* Employee profile header polish */
body:has(.employee-dashboard) .topbar,
body:has(.employee-dashboard) .employee-dashboard {
    max-width: 1180px;
    margin-inline: auto;
}

body:has(.employee-dashboard) .search-shell {
    width: clamp(16rem, 22vw, 24rem);
    min-width: 15rem;
}

.employee-profile-topbar {
    display: grid;
    grid-template-columns: minmax(20rem, 1fr) minmax(17rem, auto);
    align-items: center;
    gap: 1.35rem;
    padding: 1.25rem 1.35rem;
    overflow: visible;
}

.employee-profile-identity {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.employee-profile-avatar {
    width: 3.45rem;
    height: 3.45rem;
}

.employee-profile-name {
    min-width: 0;
    overflow: visible;
}

.employee-profile-name h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    margin: 0;
    overflow: visible;
    color: #0f172a;
    font-size: clamp(1.25rem, 1.7vw, 1.65rem);
    font-weight: 800;
    line-height: 1.18;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.employee-status-dot {
    flex: 0 0 auto;
    margin-left: 0;
}

.employee-profile-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(6.2rem, 1fr));
    align-items: stretch;
    gap: 0;
    min-width: 0;
}

.employee-profile-facts article {
    display: grid;
    align-content: center;
    gap: 0.32rem;
    min-width: 0;
    padding: 0.15rem 1rem;
    border-left: 1px solid #e2e8f0;
}

.employee-profile-facts article:first-child {
    border-left: 0;
    padding-left: 0;
}

.employee-profile-facts span {
    margin: 0;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.employee-profile-facts strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-profile-actions {
    display: grid;
    gap: 0.7rem;
    justify-items: end;
    min-width: 0;
}

.employee-profile-nav-actions,
.employee-profile-primary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    min-width: 0;
}

.employee-profile-nav-actions .employee-icon-button {
    width: 2.25rem;
    height: 2.25rem;
    border-color: #d9e4ee;
    background: #f8fafc;
    color: #526173;
}

.employee-count {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.employee-edit-link,
.employee-send-button {
    min-height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0 0.95rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.employee-edit-link {
    border: 1px solid #d7e2ec;
    background: #ffffff;
    color: #334155;
}

.employee-send-button {
    border: 1px solid #2f6b65;
    background: #2f6b65;
    color: #ffffff;
}

.employee-edit-link svg,
.employee-send-button svg {
    width: 1rem;
    height: 1rem;
}

.employee-dashboard-tabs {
    gap: 0.4rem;
    margin-top: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.employee-dashboard-tabs::-webkit-scrollbar {
    display: none;
}

body:has(.employee-dashboard) .employee-dashboard-tabs a,
body:has(.employee-dashboard) .employee-dashboard-tabs a.active,
body:has(.employee-dashboard) .employee-dashboard-tabs a:hover,
body:has(.employee-dashboard) .employee-dashboard-tabs a:focus-visible {
    display: inline-flex;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.56rem 0.85rem;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .employee-profile-topbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

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

    .employee-profile-actions {
        justify-items: start;
    }

    .employee-profile-nav-actions,
    .employee-profile-primary-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    body:has(.employee-dashboard) .search-shell {
        width: 100%;
    }

    .employee-profile-topbar {
        padding: 1rem;
        gap: 1rem;
    }

    .employee-profile-identity {
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: 0.7rem;
    }

    .employee-profile-avatar {
        width: 3rem;
        height: 3rem;
    }

    .employee-profile-name h2 {
        font-size: 1.18rem;
    }

    .employee-profile-facts {
        grid-template-columns: 1fr;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }

    .employee-profile-facts article,
    .employee-profile-facts article:first-child {
        padding: 0.75rem 0;
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .employee-profile-facts article:first-child {
        border-top: 0;
    }

    .employee-profile-primary-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .employee-edit-link,
    .employee-send-button {
        width: 100%;
    }

    .employee-dashboard-tabs {
        position: static;
        margin-inline: -0.15rem;
        padding: 0.45rem;
    }
}

/* Full employee profile compact dashboard polish */
body:has(.employee-dashboard) .main-panel {
    padding-bottom: 2rem;
}

.employee-dashboard {
    gap: 0.95rem;
}

.employee-profile-topbar,
.employee-dashboard-tabs,
.employee-dashboard-card,
.employee-side-card,
.employee-evaluation-card,
.employee-yearly-evaluation-card,
.employee-career-list article,
.employee-stat-grid article,
.employee-document-card-v3,
.employee-tag-box {
    border-color: #dce6ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.employee-dashboard-card,
.employee-side-card {
    padding: 1.1rem;
    overflow: hidden;
    scroll-margin-top: 5.5rem;
}

.employee-dashboard-grid,
.employee-profile-full-grid {
    gap: 1rem;
}

.employee-dashboard-main,
.employee-dashboard-side {
    display: grid;
    gap: 1rem;
}

.employee-dashboard-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.employee-dashboard-card-head h3 {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
}

.employee-dashboard-card-head small {
    display: block;
    margin-top: 0.2rem;
    color: #667085;
    font-size: 0.8rem;
    line-height: 1.45;
}

.employee-detail-table,
.employee-side-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    border-top: 0;
}

.employee-detail-table article,
.employee-detail-table article:nth-child(2n),
.employee-address-block article,
.employee-side-info-grid article {
    min-width: 0;
    padding: 0.72rem 0.78rem;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    background: #fbfcfe;
}

.employee-detail-table article.employee-detail-wide {
    grid-column: 1 / -1;
}

.employee-detail-table span,
.employee-address-block span,
.employee-side-info-grid span,
.employee-notes-block > span,
.employee-stat-grid span,
.employee-evaluation-table span,
.employee-yearly-evaluation-grid span,
.employee-career-list small {
    display: block;
    margin-bottom: 0.28rem;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    line-height: 1.25;
    text-transform: uppercase;
}

.employee-detail-table strong,
.employee-address-block strong,
.employee-side-info-grid strong,
.employee-notes-block strong,
.employee-stat-grid strong,
.employee-evaluation-table strong {
    color: #182230;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.45;
}

.employee-address-block {
    display: grid;
    gap: 0.6rem;
}

.employee-tag-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 0;
    padding: 0.75rem;
    box-shadow: none;
}

.employee-tag-box span {
    min-height: 1.7rem;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.62rem;
    border: 1px solid #cfe3f5;
    border-radius: 999px;
    background: #f0f7ff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 750;
}

.employee-side-link,
.employee-section-action {
    min-height: 2.1rem;
    padding: 0 0.72rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.employee-dashboard .button:not(.secondary):not(.button-secondary),
.employee-dashboard button.button:not(.secondary):not(.button-secondary) {
    background: #2f6b65;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(47, 107, 101, 0.16);
}

.employee-dashboard .button.secondary,
.employee-dashboard .button.button-secondary,
.timeline-filter-row .button.button-secondary {
    border: 1px solid #d8e5ef;
    background: #f8fbfd;
    color: #334155;
    box-shadow: none;
}

.employee-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.employee-stat-grid article {
    min-height: 5.4rem;
    display: grid;
    align-content: center;
    gap: 0.25rem;
    padding: 0.85rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.employee-stat-grid strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.employee-evaluation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: stretch;
}

.employee-evaluation-card {
    display: grid;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.95rem;
    box-shadow: none;
}

.employee-evaluation-card h4,
.employee-evaluation-card h5 {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 800;
}

.employee-evaluation-table {
    display: grid;
    gap: 0.55rem;
}

.employee-evaluation-table.supervisor,
.employee-evaluation-table.self {
    grid-template-columns: 1fr;
}

.employee-evaluation-table article,
.employee-evaluation-table article:last-child {
    min-height: 0;
    padding: 0.72rem;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    background: #fbfcfe;
}

.employee-yearly-evaluation-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #edf2f7;
}

.employee-yearly-evaluation-list,
.employee-career-list {
    display: grid;
    gap: 0.65rem;
}

.employee-career-list article {
    padding: 0.78rem;
    background: #fbfcfe;
    box-shadow: none;
}

.employee-inline-performance-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.employee-inline-performance-form .field-group,
.employee-performance-form-grid .field-group {
    gap: 0.35rem;
}

.employee-inline-performance-form input,
.employee-inline-performance-form select,
.employee-inline-performance-form textarea,
.employee-performance-form-grid input,
.employee-performance-form-grid select,
.employee-performance-form-grid textarea {
    min-height: 2.5rem;
    border-radius: 10px;
}

.employee-inline-performance-form textarea,
.employee-performance-form-grid textarea {
    min-height: 5.25rem;
}

.employee-inline-performance-form .form-actions,
.employee-performance-form-grid .form-actions {
    align-self: end;
    justify-content: flex-end;
}

.salary-history-timeline {
    position: relative;
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-left: 1.35rem;
}

.salary-history-timeline::before {
    content: "";
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.28rem;
    width: 1px;
    background: #dce6ef;
}

.salary-history-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 0.75rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    max-width: calc(42rem + 1.55rem);
    min-width: 0;
}

.salary-history-timeline-marker {
    position: relative;
    z-index: 1;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 1rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #64748b;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.salary-history-timeline .salary-history-entry {
    width: 100%;
    max-width: 42rem;
    min-width: 0;
}

#timeline .timeline-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.75rem 0;
}

#timeline .timeline-filter-row .button {
    min-height: 2rem;
    padding: 0 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
}

#timeline .timeline-filter-row .button.active {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

#timeline .timeline-filter-row .button,
#timeline .timeline-filter-row .button.button-secondary {
    min-height: 2rem;
    padding: 0 0.76rem;
    border: 1px solid #d8e5ef;
    border-radius: 999px;
    background: #f8fbfd;
    color: #475569;
    box-shadow: none;
    font-size: 0.74rem;
    font-weight: 750;
}

#timeline .timeline-filter-row .button.active,
#timeline .timeline-filter-row .button.button-secondary.active {
    border-color: #b9e8c9;
    background: #edf9f1;
    color: #14532d;
    box-shadow: none;
}

.employee-timeline-list {
    position: relative;
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-left: 1.25rem;
}

.employee-timeline-event-form {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #f8fbfd;
}

.employee-effective-record-form {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    background: #f8fbfd;
}

.employee-timeline-event-form .form-actions {
    margin-top: 0;
}

.employee-effective-record-form .form-actions {
    margin-top: 0;
}

.employee-timeline-list::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0.34rem;
    width: 1px;
    background: #dbe7ef;
}

.employee-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

.employee-timeline-item[hidden] {
    display: none !important;
}

.employee-timeline-item.is-filter-hidden {
    display: none !important;
}

.employee-timeline-dot {
    position: absolute;
    top: 1rem;
    left: -1.08rem;
    z-index: 1;
    width: 0.5rem;
    height: 0.5rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #6b8fb3;
    box-shadow: 0 0 0 1px #cbd8e5;
}

.employee-timeline-card {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
    padding: 0.82rem 0.95rem;
    border: 1px solid #e3ebf2;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.employee-timeline-badge {
    width: fit-content;
    max-width: 100%;
    padding: 0.26rem 0.55rem;
    border: 1px solid #dbe7ef;
    border-radius: 999px;
    background: #f6f9fc;
    color: #526173;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.employee-timeline-card strong {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.employee-timeline-card p {
    color: #475467;
    font-size: 0.86rem;
    line-height: 1.5;
}

.employee-timeline-empty-filter {
    padding: 0.8rem 0.95rem;
    border: 1px dashed #d7e2ec;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 650;
}

#timeline .salary-history-timeline-item small {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 750;
}

#timeline .salary-history-timeline-item strong {
    display: block;
    margin-top: 0.22rem;
    color: #0f172a;
    font-size: 0.92rem;
}

#timeline .salary-history-timeline-item p {
    margin-top: 0.28rem;
    color: #475467;
    line-height: 1.45;
}

.employee-document-grid-v3,
.employee-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.65rem;
}

.employee-document-card-v3 {
    display: grid;
    gap: 0.25rem;
    min-height: 0;
    padding: 0.78rem;
    text-decoration: none;
    box-shadow: none;
}

.employee-document-card-v3 span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.employee-document-card-v3 strong {
    color: #0f172a;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.employee-document-card-v3 small {
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.35;
}

.sensitive-data-item strong {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.sensitive-eye-button {
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
}

.empty-state {
    color: #667085;
}

@media (max-width: 980px) {
    .employee-detail-table,
    .employee-side-info-grid,
    .employee-evaluation-grid,
    .employee-inline-performance-form,
    .employee-performance-form-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .employee-dashboard-card,
    .employee-side-card {
        padding: 0.9rem;
    }

    .employee-stat-grid {
        grid-template-columns: 1fr;
    }

    .employee-dashboard-card-head {
        display: grid;
    }

    .employee-dashboard-card-head .employee-section-action,
    .employee-dashboard-card-head .button {
        width: 100%;
    }
}

/* Topbar notification menu */
.notification-menu {
    position: relative;
    z-index: 60;
}

.topbar-actions:empty {
    display: none;
}

.notification-menu-button {
    position: relative;
    width: 2.45rem;
    height: 2.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: #ffffff;
    color: #263244;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

.notification-menu-button:hover,
.notification-menu-button:focus-visible,
.notification-menu.is-open .notification-menu-button {
    border-color: #cfd9e6;
    background: #f8fafc;
    color: #111827;
    outline: none;
}

.notification-menu-button svg {
    width: 1.1rem;
    height: 1.1rem;
}

.notification-menu-button > svg {
    display: none;
}

.notification-menu-button::before {
    content: "";
    width: 1.12rem;
    height: 1.12rem;
    display: block;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a2.4 2.4 0 0 0 2.28-1.65H9.72A2.4 2.4 0 0 0 12 22Zm7-6.2V11a7 7 0 0 0-5.25-6.78V3a1.75 1.75 0 0 0-3.5 0v1.22A7 7 0 0 0 5 11v4.8l-1.45 1.45A1 1 0 0 0 4.25 19h15.5a1 1 0 0 0 .7-1.75L19 15.8ZM7 17v-6a5 5 0 0 1 10 0v6H7Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 22a2.4 2.4 0 0 0 2.28-1.65H9.72A2.4 2.4 0 0 0 12 22Zm7-6.2V11a7 7 0 0 0-5.25-6.78V3a1.75 1.75 0 0 0-3.5 0v1.22A7 7 0 0 0 5 11v4.8l-1.45 1.45A1 1 0 0 0 4.25 19h15.5a1 1 0 0 0 .7-1.75L19 15.8ZM7 17v-6a5 5 0 0 1 10 0v6H7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-status-dot {
    position: absolute;
    right: -0.1rem;
    bottom: -0.1rem;
    width: 0.62rem;
    height: 0.62rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #19c37d;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 0.72rem);
    right: 0;
    width: min(23.5rem, calc(100vw - 2rem));
    max-height: min(42rem, calc(100vh - 6rem));
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #dde4ed;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.notification-popover::before {
    content: "";
    position: absolute;
    top: -0.46rem;
    right: 1rem;
    width: 0.9rem;
    height: 0.9rem;
    border-top: 1px solid #dde4ed;
    border-left: 1px solid #dde4ed;
    background: #ffffff;
    transform: rotate(45deg);
}

.notification-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.notification-popover-head h2 {
    margin: 0;
    color: #111827;
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0;
}

.notification-head-actions {
    display: flex;
    align-items: center;
    gap: 0.38rem;
}

.notification-head-actions a {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
}

.notification-head-actions a:hover,
.notification-head-actions a:focus-visible {
    background: #f3f6fa;
    color: #111827;
}

.notification-head-actions svg {
    width: 0.95rem;
    height: 0.95rem;
}

.notification-tabs {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 0.92rem;
    padding: 0.16rem;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #f8fafc;
}

.notification-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 1.8rem;
    padding: 0.35rem 0.64rem;
    border-radius: 7px;
    color: #596272;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.notification-tabs a.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.notification-tabs span {
    color: #7b8494;
    font-size: 0.68rem;
    font-weight: 800;
}

.notification-list {
    display: grid;
}

.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.72rem;
    padding: 0.9rem 0;
    border-top: 1px dashed #d6dee8;
}

.notification-item.unread::after {
    content: "";
    position: absolute;
    top: 1rem;
    right: 0.05rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #19c37d;
}

.notification-avatar {
    position: relative;
    width: 2.32rem;
    height: 2.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e4e8ef;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.notification-avatar::after {
    content: "";
    position: absolute;
    right: -0.05rem;
    bottom: -0.02rem;
    width: 0.58rem;
    height: 0.58rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #17b26a;
}

.notification-avatar-photo {
    background: #6c8c7b;
}

.notification-avatar-warm {
    background: #9b6549;
}

.notification-avatar-teal {
    background: #155e63;
}

.notification-avatar-dark {
    background: #151515;
}

.notification-body {
    min-width: 0;
    padding-right: 0.85rem;
}

.notification-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    color: #4b5563;
    font-size: 0.82rem;
    line-height: 1.35;
}

.notification-line strong {
    color: #111827;
    font-weight: 800;
}

.notification-project {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.42rem;
    border: 1px solid #dde4ed;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

.notification-project::before {
    content: "";
    width: 0.66rem;
    height: 0.66rem;
    border: 2px solid #3b82f6;
    border-radius: 2px;
    box-shadow: inset 3px 0 0 rgba(59, 130, 246, 0.26);
}

.notification-project.green::before {
    border-color: #10b981;
    box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.28);
}

.notification-project.pink::before {
    border-color: #ec4899;
    box-shadow: inset 3px 0 0 rgba(236, 72, 153, 0.26);
    transform: rotate(45deg);
}

.notification-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.22rem;
    color: #6b7280;
    font-size: 0.74rem;
}

.notification-meta a {
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

.notification-meta a:hover {
    text-decoration: underline;
}

.notification-comment {
    margin: 0.62rem 0 0;
    padding: 0.72rem 0.82rem;
    border: 1px solid #e2e7ef;
    border-radius: 9px;
    background: #f7f8fa;
    color: #111827;
    font-size: 0.82rem;
    line-height: 1.4;
}

.notification-choice-row {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    margin-top: 0.7rem;
}

.notification-choice-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.38rem 0.72rem;
    border: 1px solid #d6dee8;
    border-radius: 7px;
    background: #ffffff;
    color: #111827;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.notification-choice-row a.accept {
    border-color: #1f232b;
    background: #1f232b;
    color: #ffffff;
}

.notification-file-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.62rem;
    padding: 0.62rem;
    border: 1px solid #e2e7ef;
    border-radius: 9px;
    background: #f7f8fa;
    color: #111827;
    text-decoration: none;
}

.notification-file-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 0.62rem;
    font-weight: 900;
}

.notification-file-card strong,
.notification-file-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-file-card strong {
    font-size: 0.82rem;
}

.notification-file-card small {
    margin-top: 0.1rem;
    color: #6b7280;
    font-size: 0.74rem;
}

.notification-file-card svg {
    width: 1rem;
    height: 1rem;
    color: #7b8494;
}

@media (max-width: 760px) {
    .notification-menu {
        margin-left: auto;
    }

    .notification-popover {
        position: fixed;
        top: 4.25rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-height: calc(100vh - 5.25rem);
    }

    .notification-popover::before {
        right: 1.15rem;
    }
}

/* Keep sticky/top menu surfaces solid; no gradients here. */
.topbar,
.notification-menu,
.notification-menu-button,
.notification-popover,
.notification-tabs,
.notification-tabs a,
.notification-tabs a.active,
.notification-comment,
.notification-file-card,
.notification-file-icon,
.notification-project,
.notification-choice-row a {
    background-image: none !important;
}

.topbar {
    background-color: transparent !important;
}

.notification-menu-button,
.notification-popover,
.notification-tabs a.active,
.notification-comment,
.notification-file-card,
.notification-project,
.notification-choice-row a {
    background-color: #ffffff !important;
}

.notification-tabs,
.notification-file-icon {
    background-color: #f8fafc !important;
}

/* Stable topbar columns: search, page actions, notification. */
.topbar .topbar-tools,
body:has(.dashboard-home-page) .topbar .topbar-tools,
body:has(.employee-dashboard) .topbar .topbar-tools {
    width: auto !important;
    max-width: min(100%, 52rem) !important;
    display: grid !important;
    grid-template-columns: minmax(16rem, 24rem) minmax(0, auto) 3rem !important;
    align-items: center !important;
    justify-content: end !important;
    gap: 0.75rem !important;
    flex: 0 1 auto !important;
    margin-left: auto !important;
}

.topbar .search-shell,
body:has(.dashboard-home-page) .topbar .search-shell,
body:has(.employee-dashboard) .topbar .search-shell {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
}

.topbar .topbar-actions {
    grid-column: 2 !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: end !important;
    flex-wrap: wrap !important;
    gap: 0.65rem !important;
}

.topbar .topbar-actions:empty {
    display: block !important;
}

.topbar .topbar-actions .button,
.topbar .topbar-actions .inline-form,
.topbar .topbar-actions .inline-form .button {
    width: auto !important;
    white-space: nowrap !important;
}

.topbar .notification-menu {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    margin-left: 0 !important;
}

@media (max-width: 900px) {
    .topbar .topbar-tools,
    body:has(.dashboard-home-page) .topbar .topbar-tools,
    body:has(.employee-dashboard) .topbar .topbar-tools {
        width: 100% !important;
        max-width: none !important;
        grid-template-columns: minmax(0, 1fr) 3rem !important;
        justify-content: stretch !important;
    }

    .topbar .search-shell,
    body:has(.dashboard-home-page) .topbar .search-shell,
    body:has(.employee-dashboard) .topbar .search-shell {
        grid-column: 1 !important;
    }

    .topbar .topbar-actions {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        justify-content: stretch !important;
    }

    .topbar .topbar-actions:empty {
        display: none !important;
    }

    .topbar .topbar-actions .button,
    .topbar .topbar-actions .inline-form,
    .topbar .topbar-actions .inline-form .button {
        width: 100% !important;
    }

    .topbar .notification-menu {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }
}

/* Flat notification center */
.notification-center-page {
    color: #0b0f19 !important;
}

.notification-center-page .notification-center-stats {
    grid-template-columns: repeat(4, minmax(220px, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 48px !important;
}

.notification-center-page .metric-card,
.notification-center-page .dashboard-stats .metric-card:first-child,
.notification-center-page .metric-card.highlight {
    min-height: 124px !important;
    padding: 20px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #0b0f19 !important;
}

.notification-center-page .metric-card::after,
.notification-center-page .dashboard-stats .metric-card:first-child::after,
.notification-center-page .notification-section-card::before {
    display: none !important;
}

.notification-center-page .metric-card p,
.notification-center-page .dashboard-stats .metric-card:first-child p {
    margin: 0 0 8px !important;
    color: #64748b !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.notification-center-page .metric-card strong,
.notification-center-page .dashboard-stats .metric-card:first-child strong {
    display: block !important;
    color: #0b0f19 !important;
    font-size: clamp(1.8rem, 2.2vw, 2.2rem) !important;
    line-height: 1.05 !important;
}

.notification-center-page .metric-card small,
.notification-center-page .dashboard-stats .metric-card:first-child small {
    display: block !important;
    margin-top: 10px !important;
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
}

.notification-center-page .notification-center-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr)) !important;
    gap: 16px !important;
}

.notification-center-page .notification-section-card {
    min-height: 330px !important;
    padding: 20px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
}

.notification-center-page .panel-header {
    align-items: start !important;
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

.notification-center-page .panel-header .eyebrow {
    color: #64748b !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
}

.notification-center-page .panel-header h3 {
    margin-top: 4px !important;
    color: #0b0f19 !important;
    font-size: clamp(1.25rem, 1.8vw, 1.65rem) !important;
    line-height: 1.1 !important;
}

.notification-center-page .pill,
.notification-center-page .pill-soft {
    min-width: 34px !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    border: 1px solid #0b0f19 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #0b0f19 !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
}

.notification-center-page .side-list {
    gap: 12px !important;
}

.notification-center-page .side-list-item {
    min-height: 70px !important;
    padding: 14px 16px !important;
    border: 1px solid #0b0f19 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #0b0f19 !important;
    text-decoration: none !important;
}

.notification-center-page .side-list-item:hover,
.notification-center-page .side-list-item:focus {
    background: #f4f6f9 !important;
}

.notification-center-page .side-list-item strong {
    color: #0b0f19 !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    text-decoration: underline !important;
    text-underline-offset: 0.12em !important;
}

.notification-center-page .side-list-item small {
    margin-top: 5px !important;
    color: #525a66 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

.notification-center-page .empty-state {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #64748b !important;
    font-size: 0.94rem !important;
    font-weight: 700 !important;
}

@media (max-width: 1200px) {
    .notification-center-page .notification-center-stats,
    .notification-center-page .notification-center-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .notification-center-page .notification-center-stats,
    .notification-center-page .notification-center-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Advanced reports page */
body:has(.reports-page),
body:has(.reports-page) .main-panel,
body:has(.reports-page) .topbar,
.reports-page {
    background: #f4f6f9 !important;
    background-image: none !important;
    box-shadow: none !important;
}

body:has(.reports-page) .topbar h1 {
    color: #0b0f19 !important;
}

body:has(.reports-page) .topbar .eyebrow,
body:has(.reports-page) .search-shell span,
body:has(.reports-page) .search-shell input::placeholder {
    color: #64748b !important;
}

body:has(.reports-page) .search-shell,
body:has(.reports-page) .notification-menu-button,
.reports-page .panel,
.reports-page .metric-card,
.reports-page .metric-card:first-child,
.reports-page .table-wrap,
.reports-page .side-list-item {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
}

.reports-page {
    display: grid !important;
    gap: 24px !important;
    color: #0b0f19 !important;
}

.reports-page .panel,
.reports-page .table-panel {
    padding: 20px !important;
}

.reports-page .panel-header {
    align-items: center !important;
    margin-bottom: 16px !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

.reports-page .eyebrow,
.reports-page .metric-card p,
.reports-page .metric-card:first-child p,
.reports-page table th {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
}

.reports-page .panel-header h3 {
    margin-top: 4px !important;
    color: #0b0f19 !important;
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
}

.reports-export-panel {
    display: grid !important;
    gap: 4px !important;
}

.reports-export-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.reports-export-actions .button.secondary {
    min-height: 40px !important;
    padding: 0 14px !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #0f2942 !important;
    box-shadow: none !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.reports-export-actions .button.secondary:hover,
.reports-export-actions .button.secondary:focus-visible {
    border-color: #b9c9da !important;
    background: #f8fafc !important;
    color: #0b0f19 !important;
}

.reports-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 14px !important;
    margin: 0 !important;
}

.reports-page .metric-card,
.reports-page .metric-card:first-child {
    display: grid !important;
    min-height: 112px !important;
    padding: 18px 20px !important;
    color: #0b0f19 !important;
}

.reports-page .metric-card::after,
.reports-page .metric-card:first-child::after {
    display: none !important;
}

.reports-page .metric-card strong,
.reports-page .metric-card:first-child strong {
    display: block !important;
    margin: 0 !important;
    color: #0b0f19 !important;
    font-size: clamp(1.55rem, 2.2vw, 2rem) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
}

.reports-page .metric-card small,
.reports-page .metric-card:first-child small {
    display: block !important;
    margin-top: 8px !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.reports-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr) !important;
    gap: 14px !important;
}

.reports-page .table-wrap {
    overflow: hidden !important;
}

.reports-page table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
}

.reports-page thead th {
    padding: 12px 14px !important;
    border-bottom: 1px solid #d8e2ed !important;
    text-align: left !important;
}

.reports-page tbody td {
    padding: 13px 14px !important;
    border-bottom: 1px solid #edf1f5 !important;
    color: #334155 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
}

.reports-page tbody tr:last-child td {
    border-bottom: 0 !important;
}

.reports-page tbody tr:hover td {
    background: #f8fafc !important;
}

.reports-signals-panel .side-list {
    display: grid !important;
    gap: 10px !important;
}

.reports-page .side-list-item {
    min-height: 58px !important;
    padding: 13px 14px !important;
    color: #0b0f19 !important;
}

.reports-page .side-list-item strong {
    color: #0b0f19 !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
}

.reports-page .pill,
.reports-page .pill-soft {
    min-width: 34px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    color: #0f2942 !important;
    box-shadow: none !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
}

.reports-page .empty-cell {
    padding: 24px !important;
    color: #64748b !important;
    font-weight: 700 !important;
    text-align: center !important;
}

@media (max-width: 1180px) {
    .reports-stats {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }

    .reports-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    .reports-page {
        gap: 16px !important;
    }

    .reports-page .panel,
    .reports-page .table-panel,
    .reports-page .metric-card,
    .reports-page .metric-card:first-child {
        padding: 16px !important;
    }

    .reports-stats {
        grid-template-columns: 1fr !important;
    }

    .reports-export-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .reports-export-actions .button.secondary {
        width: 100% !important;
    }

    .reports-page .table-wrap {
        margin-inline: -16px !important;
        width: calc(100% + 32px) !important;
        overflow-x: auto !important;
        border-right: 0 !important;
        border-left: 0 !important;
        border-radius: 0 !important;
    }

    .reports-page table {
        min-width: 620px !important;
    }
}

/* Shared polish for remaining HRIS workspace pages */
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) {
    background: #f4f6f9 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .main-panel,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .topbar {
    background: #f4f6f9 !important;
    background-image: none !important;
    box-shadow: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .topbar {
    border-bottom: 1px solid #e2e8f0 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .topbar h1 {
    color: #0b0f19 !important;
    letter-spacing: 0 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .topbar .eyebrow,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .search-shell span,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .search-shell input::placeholder {
    color: #64748b !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .search-shell,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .notification-menu-button {
    min-height: 44px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .search-shell input {
    color: #0b0f19 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-module-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-grid,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .department-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-directory-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .department-directory-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-profile-form-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .leave-request-dashboard,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .org-chart-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .org-final-structure {
    color: #0b0f19 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-module-page,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-grid {
    gap: 18px !important;
}


body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .table-wrap,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list-item,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-list-card,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-directory-table-wrap,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .completeness-table-wrap {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card {
    padding: 20px !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel::before,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel::after,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card::after,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card::after,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card::before,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card::after {
    display: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel-header,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card-head,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .page-toolbar {
    align-items: center !important;
    margin-bottom: 16px !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel-header h2,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel-header h3,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card-head h2,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card-head h3,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .page-toolbar h2,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .page-toolbar h3 {
    margin-top: 4px !important;
    color: #0b0f19 !important;
    font-size: 1.12rem !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .eyebrow,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel .eyebrow,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card p,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card p,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) table th,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group label {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stats-grid,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .dashboard-stats {
    gap: 14px !important;
    margin: 0 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card {
    min-height: 112px !important;
    padding: 18px 20px !important;
    color: #0b0f19 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card strong,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card strong {
    display: block !important;
    color: #0b0f19 !important;
    font-size: clamp(1.45rem, 2vw, 1.95rem) !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card small,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card small,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .muted-note,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list-item small,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-list-card p,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-list-card small {
    color: #64748b !important;
    font-weight: 700 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .table-wrap,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-directory-table-wrap,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .completeness-table-wrap {
    overflow: hidden !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) thead th {
    padding: 12px 14px !important;
    border-bottom: 1px solid #d8e2ed !important;
    text-align: left !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) tbody td {
    padding: 13px 14px !important;
    border-bottom: 1px solid #edf1f5 !important;
    color: #334155 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) tbody tr:last-child td {
    border-bottom: 0 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) tbody tr:hover td,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list-item:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list-item:focus {
    background: #f8fafc !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list {
    display: grid !important;
    gap: 10px !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list-item {
    min-height: 58px !important;
    padding: 13px 14px !important;
    color: #0b0f19 !important;
    text-decoration: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .side-list-item strong,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-list-card h4 {
    color: #0b0f19 !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pill,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pill-soft,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .status-pill {
    min-height: 28px !important;
    padding: 0 10px !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    background-image: none !important;
    color: #0f2942 !important;
    box-shadow: none !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.secondary,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.ghost,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .ghost-button,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-section-action {
    min-height: 40px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.secondary,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.ghost,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .ghost-button,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-section-action {
    border: 1px solid #d7e1ec !important;
    background: #ffffff !important;
    color: #0f2942 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.secondary:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.secondary:focus-visible,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.ghost:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .button.ghost:focus-visible,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .ghost-button:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .ghost-button:focus-visible,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-section-action:hover,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-section-action:focus-visible {
    border-color: #b9c9da !important;
    background: #f8fafc !important;
    color: #0b0f19 !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group input:not([type="checkbox"]):not([type="radio"]),
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group select,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group textarea {
    min-height: 42px !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #0b0f19 !important;
    box-shadow: none !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group input:not([type="checkbox"]):not([type="radio"]):focus,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group select:focus,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .field-group textarea:focus {
    border-color: #94a3b8 !important;
    outline: 3px solid rgba(148, 163, 184, 0.22) !important;
}

body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .empty-state,
body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .empty-cell {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #64748b !important;
    font-weight: 700 !important;
    text-align: center !important;
}

@media (max-width: 1180px) {
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .pro-two-column,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-grid,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .department-grid {
        grid-template-columns: 1fr !important;
    }

    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stats-grid,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .dashboard-stats {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stat-card,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .metric-card {
        padding: 16px !important;
    }

    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .panel-header,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-dashboard-card-head,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .page-toolbar {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .stats-grid,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .dashboard-stats {
        grid-template-columns: 1fr !important;
    }

    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .table-wrap,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .employee-directory-table-wrap,
    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) .completeness-table-wrap {
        margin-inline: -16px !important;
        width: calc(100% + 32px) !important;
        overflow-x: auto !important;
        border-right: 0 !important;
        border-left: 0 !important;
        border-radius: 0 !important;
    }

    body:not(:has(.dashboard-home-page)):not(:has(.employee-dashboard)) table {
        min-width: 620px !important;
    }
}

.helpdesk-page {
    display: grid !important;
    gap: 28px !important;
    max-width: 1280px !important;
    margin-inline: auto !important;
}

.helpdesk-summary {
    display: grid !important;
    grid-template-columns: minmax(280px, 360px) !important;
}

.helpdesk-stat-card {
    min-height: 132px !important;
    padding: 28px 30px !important;
}

.helpdesk-request-panel,
.helpdesk-tickets-panel {
    padding: 34px !important;
}

.helpdesk-request-panel .panel-header,
.helpdesk-tickets-panel .panel-header {
    margin-bottom: 28px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid #e4edf5 !important;
}

.helpdesk-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px 32px !important;
}

.helpdesk-field-subject,
.helpdesk-field-description,
.helpdesk-form-actions {
    grid-column: 1 / -1 !important;
}

.helpdesk-field-subject {
    max-width: calc(50% - 16px) !important;
}

.helpdesk-form input,
.helpdesk-form select,
.helpdesk-form textarea {
    min-height: 52px !important;
    padding-inline: 18px !important;
}

.helpdesk-form textarea {
    min-height: 180px !important;
    padding-block: 16px !important;
    resize: vertical;
}

.helpdesk-form-actions {
    margin-top: 8px !important;
    padding-top: 8px !important;
}

.helpdesk-form-actions .button {
    min-width: 172px !important;
    min-height: 50px !important;
}

.helpdesk-tickets-panel .table-wrap {
    margin-top: 0 !important;
    border-radius: 10px !important;
}

.helpdesk-tickets-panel table th,
.helpdesk-tickets-panel table td {
    padding: 18px 20px !important;
}

@media (max-width: 760px) {
    .helpdesk-page {
        max-width: none !important;
        gap: 18px !important;
    }

    .helpdesk-summary,
    .helpdesk-form {
        grid-template-columns: 1fr !important;
    }

    .helpdesk-field-subject {
        max-width: none !important;
    }

    .helpdesk-request-panel,
    .helpdesk-tickets-panel {
        padding: 22px !important;
    }
}

.celebrations-page {
    display: grid !important;
    gap: 16px !important;
    width: min(100%, 72rem) !important;
    max-width: 72rem !important;
    margin-inline: auto !important;
}

.celebrations-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.8rem !important;
    width: 100% !important;
    margin: 0 !important;
}

.celebrations-stats .metric-card,
.celebrations-stats .metric-card:first-child {
    min-height: 7rem !important;
    padding: 1rem 1.15rem !important;
    border-radius: 8px !important;
}

.celebrations-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.05rem !important;
    align-items: stretch !important;
    width: 100% !important;
}

.celebrations-panel {
    min-height: 21.5rem !important;
    padding: 1.15rem !important;
    border-radius: 8px !important;
}

.celebrations-panel .panel-header {
    margin-bottom: 0.9rem !important;
    padding-bottom: 0.85rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.celebrations-panel .side-list {
    display: grid !important;
    gap: 0.65rem !important;
}

.celebrations-panel .side-list-item {
    display: flex !important;
    align-items: center !important;
    min-height: 4.5rem !important;
    padding: 0.85rem 0.95rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
}

.celebrations-panel .side-list-item strong {
    display: block !important;
    margin-bottom: 0.45rem !important;
    text-decoration: none !important;
}

.celebrations-panel .side-list-item small {
    line-height: 1.35 !important;
    white-space: normal !important;
    text-decoration: none !important;
}

@media (max-width: 900px) {
    .celebrations-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    .celebrations-page {
        max-width: none !important;
        gap: 18px !important;
    }

    .celebrations-stats {
        grid-template-columns: 1fr !important;
    }

    .celebrations-panel {
        min-height: 0 !important;
        padding: 22px !important;
    }
}

.identity-security-page {
    gap: 20px;
}

.identity-security-page .identity-security-stats {
    grid-template-columns: repeat(2, minmax(260px, 356px));
    align-items: stretch;
    justify-content: start;
    gap: 14px;
}

.identity-security-page .identity-security-metric {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 118px;
    padding: 20px;
}

.identity-security-icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f6f9fc;
    color: #15324d;
    font-size: 0.68rem;
    font-weight: 900;
}

.identity-security-page .identity-security-layout {
    grid-template-columns: minmax(520px, 0.9fr) minmax(360px, 1.1fr);
    align-items: start;
    gap: 16px;
}

.identity-security-form-panel,
.identity-security-providers-panel {
    padding: 20px;
}

.identity-security-note {
    margin: 6px 0 18px;
    padding: 12px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #536b87;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
}

.identity-security-form {
    gap: 18px 16px;
}

.identity-security-form .field-group label {
    color: #536b87;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.identity-security-form .field-group input:not([type="checkbox"]),
.identity-security-form .field-group select,
.identity-security-form .field-group textarea {
    min-height: 44px;
    border-radius: 8px;
}

.identity-security-form .field-group textarea {
    min-height: 84px;
    resize: vertical;
}

.identity-security-form .identity-security-check {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.identity-security-form .identity-security-check label {
    grid-column: 2;
    grid-row: 1;
    line-height: 1.2;
}

.identity-security-form .identity-security-check input[type="checkbox"] {
    grid-column: 1;
    grid-row: 1;
    width: 16px;
    height: 16px;
    accent-color: #16a34a;
}

.identity-security-actions {
    justify-content: start;
    padding-top: 8px;
}

.identity-security-actions .button {
    min-height: 40px;
    border-radius: 8px;
    box-shadow: none;
}

.identity-security-provider-list {
    gap: 10px;
}

.identity-security-provider {
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: center;
    min-height: 54px;
    padding: 13px 14px;
    border-radius: 8px;
}

.identity-security-status {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #94a3b8;
}

.identity-security-status.is-active {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.identity-security-empty {
    display: grid;
    min-height: 74px;
    place-items: center;
    margin: 0;
    border-style: dashed;
    color: #536b87;
    font-weight: 800;
}

@media (max-width: 960px) {
    .identity-security-page .identity-security-stats,
    .identity-security-page .identity-security-layout {
        grid-template-columns: 1fr;
    }
}

/* Shared layout stability layer.
   Keep this last so page-specific additions cannot reintroduce clipped content. */
.page-shell,
.main-panel,
.main-panel > *,
.topbar,
.topbar-copy,
.topbar-tools,
.panel,
.panel-header,
.page-toolbar,
.form-grid,
.pro-form-grid,
.field-group,
.table-wrap {
    min-width: 0;
}

.main-panel {
    width: auto !important;
    margin-left: calc(var(--sidebar-width) + var(--shell-gap) + 20px) !important;
}

body.sidebar-collapsed .main-panel {
    width: auto !important;
    margin-left: calc(var(--sidebar-collapsed-width) + var(--shell-gap) + 20px) !important;
}

.main-panel > *,
.pro-module-page,
.employee-dashboard,
.employee-dashboard-grid,
.department-page,
.employee-directory-page,
.dashboard-home-page {
    width: 100%;
    max-width: 100%;
}

.panel-header,
.page-toolbar,
.form-actions,
.toolbar,
.hero-actions {
    flex-wrap: wrap;
}

.panel-header > *,
.page-toolbar > *,
.form-actions > *,
.toolbar > * {
    min-width: 0;
}

.field-group input:not([type="checkbox"]):not([type="radio"]),
.field-group select,
.field-group textarea,
.form-control,
.form-select {
    max-width: 100%;
}

.table-wrap,
.responsive-table,
.employee-directory-table-wrap,
.completeness-table-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table,
.responsive-table table,
.employee-directory-table-wrap table,
.completeness-table-wrap table {
    width: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

@media (max-width: 1180px) {
    .main-panel,
    body.sidebar-collapsed .main-panel {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .topbar {
        width: 100% !important;
        max-width: none !important;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: 100%;
        padding: 14px;
    }

    .main-panel {
        padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 18px) !important;
    }

    .topbar {
        gap: 14px;
        padding-bottom: 14px !important;
    }

    .topbar-copy,
    .topbar-tools,
    .search-shell,
    .topbar-actions,
    .topbar-actions .inline-form {
        width: 100% !important;
        max-width: none !important;
    }

    .panel-header,
    .page-toolbar {
        align-items: flex-start !important;
    }

    .form-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
    }

    .form-actions .button,
    .form-actions .inline-form,
    .form-actions .inline-form .button {
        width: 100% !important;
    }
}

@media (max-width: 520px) {
    .form-actions {
        grid-template-columns: 1fr !important;
    }
}

/* Final celebrations layout override. Keep after the global stability layer. */
body:has(.celebrations-page) .main-panel > .celebrations-page {
    display: grid !important;
    gap: 1rem !important;
    width: min(100%, 72rem) !important;
    max-width: 72rem !important;
    margin-inline: auto !important;
}

body:has(.celebrations-page) .celebrations-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body:has(.celebrations-page) .celebrations-stats .metric-card,
body:has(.celebrations-page) .celebrations-stats .metric-card:first-child {
    min-height: 6.9rem !important;
    padding: 1rem 1.15rem !important;
    border-radius: 8px !important;
}

body:has(.celebrations-page) .celebrations-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body:has(.celebrations-page) .celebrations-panel {
    min-height: 21rem !important;
    padding: 1.15rem !important;
    border-radius: 8px !important;
}

body:has(.celebrations-page) .celebrations-panel .panel-header {
    margin-bottom: 0.9rem !important;
    padding-bottom: 0.8rem !important;
}

body:has(.celebrations-page) .celebrations-panel .side-list {
    display: grid !important;
    gap: 0.65rem !important;
}

body:has(.celebrations-page) .celebrations-panel .side-list-item {
    display: flex !important;
    align-items: center !important;
    min-height: 4.45rem !important;
    padding: 0.8rem 0.95rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
}

body:has(.celebrations-page) .celebrations-panel .side-list-item *,
body:has(.celebrations-page) .celebrations-panel .side-list-item strong,
body:has(.celebrations-page) .celebrations-panel .side-list-item small,
body:has(.celebrations-page) .celebrations-panel .side-list-item:hover *,
body:has(.celebrations-page) .celebrations-panel .side-list-item:focus * {
    text-decoration: none !important;
}

body:has(.celebrations-page) .celebrations-panel .side-list-item strong {
    margin-bottom: 0.45rem !important;
}

@media (max-width: 900px) {
    body:has(.celebrations-page) .celebrations-grid,
    body:has(.celebrations-page) .celebrations-stats {
        grid-template-columns: 1fr !important;
    }
}

/* Final notification center layout override. Keep after global/page legacy blocks. */
body:has(.notification-center-page) .main-panel > .notification-center-page {
    display: grid !important;
    gap: 1rem !important;
    width: min(100%, 82rem) !important;
    max-width: 82rem !important;
    margin-inline: auto !important;
}

body:has(.notification-center-page) .notification-center-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body:has(.notification-center-page) .notification-center-stats .metric-card,
body:has(.notification-center-page) .notification-center-stats .metric-card:first-child {
    min-height: 5.6rem !important;
    padding: 0.9rem 1rem !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 8px !important;
}

body:has(.notification-center-page) .notification-center-stats .metric-card strong,
body:has(.notification-center-page) .notification-center-stats .metric-card:first-child strong {
    font-size: 1.45rem !important;
}

body:has(.notification-center-page) .notification-center-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.8rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

body:has(.notification-center-page) .notification-section-card {
    min-height: 12.5rem !important;
    padding: 0.95rem !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 8px !important;
}

body:has(.notification-center-page) .notification-section-card .panel-header {
    align-items: start !important;
    margin-bottom: 0.7rem !important;
    padding-bottom: 0.65rem !important;
    border-bottom: 1px solid #eef2f7 !important;
}

body:has(.notification-center-page) .notification-section-card .panel-header h3 {
    margin-top: 0.2rem !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
}

body:has(.notification-center-page) .notification-section-card .pill,
body:has(.notification-center-page) .notification-section-card .pill-soft {
    min-width: 1.7rem !important;
    min-height: 1.55rem !important;
    padding: 0 0.45rem !important;
    border-radius: 999px !important;
    border-color: #dbe5ef !important;
    color: #536b87 !important;
}

body:has(.notification-center-page) .notification-section-card .side-list {
    display: grid !important;
    gap: 0.45rem !important;
}

body:has(.notification-center-page) .notification-section-card .side-list-item {
    display: flex !important;
    align-items: center !important;
    min-height: 3.05rem !important;
    padding: 0.65rem 0.75rem !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 8px !important;
    text-decoration: none !important;
}

body:has(.notification-center-page) .notification-section-card .side-list-item *,
body:has(.notification-center-page) .notification-section-card .side-list-item strong,
body:has(.notification-center-page) .notification-section-card .side-list-item small,
body:has(.notification-center-page) .notification-section-card .side-list-item:hover *,
body:has(.notification-center-page) .notification-section-card .side-list-item:focus * {
    text-decoration: none !important;
}

body:has(.notification-center-page) .notification-section-card .side-list-item strong {
    color: #111827 !important;
    font-size: 0.78rem !important;
}

body:has(.notification-center-page) .notification-section-card .side-list-item small {
    margin-top: 0.25rem !important;
    color: #536b87 !important;
    font-size: 0.66rem !important;
    letter-spacing: 0.06em !important;
}

body:has(.notification-center-page) .notification-section-card .empty-state {
    display: grid !important;
    min-height: 1.45rem !important;
    place-items: center !important;
    padding: 0.2rem 0.5rem !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    color: #536b87 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
}

@media (max-width: 1180px) {
    body:has(.notification-center-page) .notification-center-stats,
    body:has(.notification-center-page) .notification-center-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    body:has(.notification-center-page) .notification-center-stats,
    body:has(.notification-center-page) .notification-center-grid {
        grid-template-columns: 1fr !important;
    }
}
.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Company social feed: readable column and bounded image previews. */
.social-feed-page {
    width: min(100%, 960px);
    margin-inline: auto;
}

.social-feed-list {
    display: grid;
    gap: 1rem;
}

.social-post-card {
    min-width: 0;
    overflow: visible;
}

.social-post-card > p {
    max-width: 72ch;
    overflow-wrap: anywhere;
}

.social-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    margin-block: 0.85rem;
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 12px;
    background: #eef3f8;
}

.social-photo-grid-1 {
    grid-template-columns: minmax(0, 1fr);
}

.social-photo-grid a {
    display: block;
    min-width: 0;
    overflow: hidden;
    background: #e7edf4;
}

.social-photo-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.social-photo-grid-1 img {
    aspect-ratio: 16 / 9;
    max-height: 440px;
}

.social-gallery-detail img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    background: #eef3f8;
}

@media (max-width: 640px) {
    .social-photo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .social-photo-grid img,
    .social-photo-grid-1 img {
        aspect-ratio: 4 / 3;
        max-height: 300px;
    }
}

/* Facebook-inspired social reactions */
.social-engagement-summary { display:flex;align-items:center;justify-content:space-between;min-height:2.6rem;margin-top:.8rem;color:#65676b;font-size:.9rem; }
.social-engagement-summary a { color:inherit;text-decoration:none; }
.social-engagement-summary a:hover { text-decoration:underline; }
.social-reaction-summary,.social-reaction-stack { display:flex;align-items:center; }
.social-reaction-summary { gap:.45rem; }
.social-reaction-stack span { display:grid;width:1.45rem;height:1.45rem;margin-left:-.3rem;place-items:center;border:2px solid #fff;border-radius:50%;background:#fff;font-size:1rem;line-height:1; }
.social-reaction-stack span:first-child { margin-left:0; }
.social-facebook-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem;padding:.25rem 0;border-top:1px solid #ced0d4;border-bottom:1px solid #ced0d4; }
.social-like-control { position:relative;min-width:0; }
.social-like-control>form,.social-reaction-picker form { margin:0; }
.social-like-control>form,.social-like-control>form .social-action-button { width:100%; }
.social-action-button { display:flex;align-items:center;justify-content:center;gap:.5rem;min-height:2.45rem;padding:.45rem .75rem;border:0;border-radius:6px;background:transparent;color:#65676b;font:inherit;font-weight:700;text-decoration:none;cursor:pointer; }
.social-action-button:hover,.social-action-button:focus-visible { background:#f0f2f5;color:#4b4f56;outline:none; }
.social-action-button svg { width:1.45rem;height:1.45rem;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8; }
.social-action-emoji { font-size:1.35rem;line-height:1; }
.social-action-button.is-reacted { color:#0866ff; }
.social-action-button.reaction-love,.social-action-button.reaction-care,.social-action-button.reaction-angry { color:#e41e3f; }
.social-action-button.reaction-haha,.social-action-button.reaction-wow,.social-action-button.reaction-sad { color:#e7a326; }
.social-reaction-picker { position:absolute;z-index:30;left:.4rem;bottom:calc(100% + .5rem);display:flex;align-items:center;gap:.15rem;padding:.35rem;border:1px solid #d8dade;border-radius:999px;background:#fff;box-shadow:0 3px 12px rgba(0,0,0,.2);opacity:0;visibility:hidden;transform:translateY(.45rem) scale(.96);transform-origin:bottom left;transition:opacity 140ms ease,transform 140ms ease,visibility 140ms; }
.social-like-control:hover .social-reaction-picker,.social-like-control:focus-within .social-reaction-picker { opacity:1;visibility:visible;transform:translateY(0) scale(1); }
.social-reaction-option { display:grid;width:2.65rem;height:2.65rem;padding:0;place-items:center;border:0;border-radius:50%;background:transparent;font-size:1.85rem;line-height:1;cursor:pointer;transition:transform 120ms ease,background-color 120ms ease; }
.social-reaction-option:hover,.social-reaction-option:focus-visible { background:#f0f2f5;outline:none;transform:translateY(-.3rem) scale(1.18); }
.social-post-admin-actions { display:flex;justify-content:flex-end;margin-top:.6rem; }
.social-post-admin-actions form { margin:0; }
.social-actions-region.is-updating { opacity:.82;transition:opacity 120ms ease; }
.social-actions-region.is-updating .social-reaction-picker { opacity:0!important;visibility:hidden!important;transform:translateY(.35rem) scale(.96)!important; }
@media(max-width:560px) {
    .social-reaction-picker { left:0;gap:0;max-width:calc(100vw - 2.5rem); }
    .social-reaction-option { width:2.35rem;height:2.35rem;font-size:1.55rem; }
}

/* Shared sidebar/content alignment.
   Direct page content starts at the same edge on every desktop page. */
@media (min-width: 1181px) {
    body:has(.sidebar) .main-panel {
        box-sizing: border-box !important;
        margin-left: calc(var(--sidebar-width) + var(--shell-gap)) !important;
        padding-top: 0 !important;
        padding-right: clamp(1.25rem, 2vw, 2rem) !important;
    }

    body.sidebar-collapsed:has(.sidebar) .main-panel {
        margin-left: calc(var(--sidebar-collapsed-width) + var(--shell-gap)) !important;
    }

    body:has(.sidebar) .main-panel > .topbar,
    body:has(.sidebar) .main-panel > .messages,
    body:has(.sidebar) .main-panel > :not(.topbar):not(.messages) {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body:has(.sidebar) .main-panel > .topbar .topbar-copy {
        margin-left: 0 !important;
        padding-left: 0 !important;
        transform: none !important;
    }

    body:has(.sidebar) .main-panel > .topbar {
        padding-top: 0 !important;
    }

    /* Keep focused reading surfaces bounded inside the full-width app shell. */
    body:has(.sidebar) .main-panel > .social-feed-page {
        width: min(100%, 960px) !important;
        max-width: 960px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Shared WCAG AA navigation refinements. */
.sidebar-label {
    color: #52657a;
}

.sidebar-logout-link:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.32) !important;
    outline-offset: 2px !important;
}

/* Shared action-control alignment.
   Keep labels centered even when legacy page rules change height or line-height. */
:is(
    a.button,
    button.button,
    input[type="submit"],
    input[type="button"],
    a.text-link,
    a.ghost-button,
    a.employee-section-action
) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-block: 0;
    line-height: 1.2;
    text-align: center;
    vertical-align: middle;
}

:is(
    a.button,
    button.button,
    a.text-link,
    a.ghost-button,
    a.employee-section-action
) {
    text-decoration: none;
}

/* Manual punch queue: aligned columns and contained row actions. */
.manual-punch-page .panel-header {
    gap: 1rem;
}

.manual-punch-page .button-row {
    justify-content: flex-end;
}

.manual-punch-table th:last-child,
.manual-punch-table td:last-child {
    text-align: right;
}

.manual-punch-status {
    display: grid;
    justify-items: start;
    gap: 0.3rem;
}

.manual-punch-time {
    display: grid;
    justify-items: start;
    gap: 0.2rem;
}

.manual-punch-time-note {
    color: #52657a;
    font-size: 0.78rem;
    font-weight: 650;
}

.manual-punch-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.manual-punch-actions form {
    margin: 0;
}

@media (max-width: 760px) {
    .manual-punch-page .panel-header,
    .manual-punch-page .button-row {
        align-items: stretch;
    }

    .manual-punch-page .button-row,
    .manual-punch-page .button-row .button {
        width: 100%;
    }

    .manual-punch-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .manual-punch-table,
    .manual-punch-table tbody,
    .manual-punch-table tr,
    .manual-punch-table td {
        display: block;
        width: 100%;
    }

    .manual-punch-table tbody {
        display: grid;
        gap: 0.75rem;
    }

    .manual-punch-table tbody tr {
        padding: 0.35rem 0.85rem;
        border: 1px solid var(--design-line);
        border-radius: 12px;
        background: #ffffff;
    }

    .manual-punch-table tbody td {
        display: grid;
        grid-template-columns: minmax(5.5rem, 0.42fr) minmax(0, 1fr);
        align-items: start;
        gap: 0.75rem;
        padding: 0.7rem 0;
        border: 0;
        border-bottom: 1px solid #e7edf4;
        text-align: left;
    }

    .manual-punch-table tbody td::before {
        content: attr(data-label);
        color: #52657a;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .manual-punch-table tbody td:last-child {
        border-bottom: 0;
    }

    .manual-punch-actions {
        justify-content: flex-start;
    }

    .manual-punch-table .empty-cell {
        display: block;
        text-align: center;
    }

    .manual-punch-table .empty-cell::before {
        content: none;
    }
}
