@font-face {
    font-family: "Ubuntu";
    src: url("Ubuntu-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Audiowide";
    src: url("Audiowide-Regular.ttf") format("truetype");
    font-display: swap;
}

:root {
    --ink: #211711;
    --muted: #776b61;
    --line: #eadfd3;
    --panel: #fffdf9;
    --bg: #f7f0e8;
    --blue: #d8481f;
    --blue-dark: #b70d0d;
    --green: #2e8a58;
    --red: #b60000;
    --amber: #f59a00;
    --brand-red: #b60000;
    --brand-orange: #d8481f;
    --brand-amber: #f59a00;
    --brand-gold: #f6bb59;
    --brand-black: #080705;
    --focus: rgba(245, 154, 0, .34);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(135deg, #fffaf3 0%, var(--bg) 58%, #f0dfcd 100%);
    font-family: "Ubuntu", Arial, Helvetica, sans-serif;
    font-size: 16px;
}

a {
    color: var(--blue);
    text-decoration: none;
}

h1 {
    margin: 0 0 22px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
    letter-spacing: 0;
}

h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.public-shell {
    grid-template-columns: 1fr;
    place-items: center;
    padding: clamp(18px, 5vw, 48px);
}

.public-shell .main {
    display: grid;
    width: 100%;
    min-height: calc(100vh - clamp(36px, 10vw, 96px));
    place-items: center;
    padding: 0;
}

.sidebar {
    background: linear-gradient(180deg, var(--brand-black) 0%, #24130d 100%);
    color: #fff;
    padding: 28px 18px;
    border-right: 4px solid var(--brand-orange);
}

.brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    margin-bottom: 28px;
}

.brand small {
    display: block;
    color: #f3c386;
    margin-top: 2px;
}

.brand strong,
.login-brand h1 {
    font-family: "Audiowide", "Ubuntu", Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 0;
}

.brand-logo {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
    border: 0;
    padding: 0;
}

nav {
    display: grid;
    gap: 6px;
}

nav a,
nav span {
    border-radius: 8px;
    padding: 11px 12px;
}

.global-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(246, 187, 89, .22);
}

.global-search input {
    min-width: 0;
    border-color: rgba(246, 187, 89, .35);
    background: rgba(255, 255, 255, .96);
}

.global-search-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.search-summary {
    margin: 0 0 14px;
    color: var(--muted);
}

.search-results {
    margin-bottom: 18px;
}

.search-result {
    display: grid;
    gap: 5px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.search-result:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.search-result a {
    font-size: 17px;
    font-weight: 800;
}

.search-result p {
    margin: 3px 0 0;
    color: var(--muted);
}

.search-empty p {
    margin: 0;
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

nav a {
    color: #fff5e6;
}

nav a:hover {
    background: rgba(216, 72, 31, .2);
}

.nav-badge {
    float: right;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--brand-amber);
    color: var(--brand-black);
    font-size: 12px;
    text-align: center;
}

nav span {
    margin-top: 16px;
    color: #f6bb59;
    font-size: 13px;
    text-transform: uppercase;
}

.main {
    padding: 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    gap: 16px;
}

.topbar small {
    display: block;
    color: var(--muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff7ec;
    color: var(--brand-orange);
    font-size: 24px;
    line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: var(--brand-orange);
    color: #fff;
}

.mode-switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    min-width: 270px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff7ec;
}

.mode-switch a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--ink);
    font-weight: 700;
    text-align: center;
}

.mode-switch a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
    box-shadow: 0 8px 18px rgba(183, 13, 13, .18);
}

.panel,
.metric,
.login-card,
.notice,
.success {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(57, 31, 17, .09);
}

.panel {
    padding: 22px;
    margin-bottom: 22px;
}

.login-card {
    width: min(560px, calc(100vw - 30px));
    margin: 0 auto;
    padding: 30px;
    border-top: 5px solid var(--brand-orange);
}

.login-brand {
    align-items: center;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px;
    text-align: center;
}

.login-brand .brand-logo {
    width: min(280px, 72vw);
    height: auto;
    max-height: 160px;
}

.login-brand p {
    margin: 8px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 18px;
}

.cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.metric {
    padding: 22px;
}

.metric span,
.read-list span,
small {
    color: var(--muted);
}

.metric strong {
    display: block;
    margin-top: 12px;
    font-size: 34px;
}

.split {
    display: grid;
    grid-template-columns: minmax(260px, 390px) 1fr;
    gap: 28px;
    align-items: start;
}

.stack {
    display: grid;
    gap: 14px;
}

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

label {
    display: grid;
    gap: 7px;
    color: #3b2a20;
    font-weight: 700;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-row input {
    width: auto;
}

.form-note {
    color: var(--muted);
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #dccfbe;
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-amber);
    box-shadow: 0 0 0 3px var(--focus);
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.primary {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
    color: #fff;
}

.primary:hover {
    background: var(--blue-dark);
}

.ghost {
    border-color: var(--line);
    color: var(--ink);
    background: #fff;
}

.ghost:hover {
    border-color: var(--brand-orange);
    color: var(--brand-red);
}

.small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 14px;
}

.notice,
.success {
    margin-bottom: 18px;
    padding: 13px 16px;
}

.success {
    border-color: rgba(36, 136, 97, .35);
    color: var(--green);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

td small {
    display: block;
    margin-top: 4px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 16px;
}

.inline-action,
.panel-action {
    margin: 0;
}

.panel-action {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.bulk-upload {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.item {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.item-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

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

.directory-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.directory-card strong,
.directory-card small {
    display: block;
}

.directory-card small {
    margin-top: 5px;
}

.directory-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.read-list p {
    display: grid;
    gap: 5px;
    margin: 0 0 14px;
}

.request-list {
    display: grid;
    gap: 14px;
}

.request-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.request-card p {
    margin: 12px 0 0;
}

.request-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.request-head strong {
    display: block;
    margin-bottom: 4px;
}

.status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    min-width: 190px;
}

.request-update {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.pending-panel h3,
.calendar-summary h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.pending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.pending-grid p {
    display: grid;
    gap: 4px;
    margin: 0 0 14px;
}

.quick-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.quick-actions h2 {
    margin-bottom: 4px;
}

.quick-actions p {
    margin: 0;
    color: var(--muted);
}

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 22px;
    padding: 24px 28px;
    border-left: 5px solid var(--accent);
    background: linear-gradient(110deg, #fff8ee 0%, #fff 70%);
}

.dashboard-welcome h1 {
    margin: 6px 0 4px;
}

.dashboard-welcome p {
    margin: 0;
    color: var(--muted);
}

.dashboard-welcome-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    white-space: nowrap;
}

.dashboard-shortcuts {
    margin-top: 22px;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.shortcut-card {
    display: grid;
    gap: 7px;
    min-height: 92px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.shortcut-card:hover,
.shortcut-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(48, 33, 24, .08);
    transform: translateY(-1px);
}

.shortcut-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

.shortcut-card strong {
    display: block;
    line-height: 1.2;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto auto;
    gap: 12px;
    align-items: end;
}

.knowledge-grid,
.knowledge-list {
    display: grid;
    gap: 14px;
}

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

.knowledge-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.knowledge-card p {
    margin: 12px 0 0;
    line-height: 1.65;
}

.knowledge-card small {
    display: block;
    margin-top: 5px;
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.attachment-list > strong {
    font-size: 14px;
}

.attachment-link {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffaf4;
    color: var(--ink);
    text-decoration: none;
}

.attachment-link:hover {
    border-color: var(--brand-orange);
}

.attachment-link span {
    font-weight: 700;
}

.attachment-link small {
    color: var(--muted);
}

.request-guidance {
    display: grid;
    gap: 8px;
}

.request-template {
    display: none;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-orange);
    border-radius: 8px;
    background: #fffaf4;
    padding: 12px 14px;
}

.request-template.active {
    display: block;
}

.training-list,
.signature-list {
    display: grid;
    gap: 14px;
}

.training-card,
.signature-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.training-card p,
.signature-card p {
    margin: 12px 0 0;
    line-height: 1.55;
}

.training-card small,
.signature-card small {
    display: block;
    margin-top: 8px;
}

.training-materials {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.training-materials a {
    color: var(--brand-red);
    font-weight: 700;
}

.training-card .table-actions,
td.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.training-card.is-overdue {
    border-color: #d9a04b;
    box-shadow: inset 4px 0 0 #d9a04b;
}

.training-overdue-note {
    color: #8a4f00;
    font-weight: 700;
}

.training-actions,
.training-completion {
    display: grid;
    gap: 12px;
}

.training-attestation {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffaf4;
    font-weight: 700;
    line-height: 1.4;
}

.training-attestation input {
    width: 20px;
    height: 20px;
    margin: 0;
}

.span-2 {
    grid-column: 1 / -1;
}

.request-template p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.push-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.push-panel h2 {
    margin-bottom: 4px;
}

.push-panel p {
    margin: 0;
    color: var(--muted);
}

.toolbar-panel {
    display: flex;
    justify-content: flex-end;
    padding: 14px 18px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin-bottom: 4px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.empty-state {
    margin: 0;
    color: var(--muted);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    font-size: 14px;
    color: var(--muted);
}

.year-picker {
    margin-left: auto;
}

.year-picker label {
    min-width: 130px;
    color: var(--muted);
    font-size: 14px;
}

.year-picker select {
    min-height: 40px;
    padding: 8px 36px 8px 12px;
    font-weight: 800;
}

.calendar-heading {
    align-items: center;
}

.calendar-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.legend-dot.approved {
    background: var(--green);
}

.legend-dot.pending {
    background: var(--amber);
}

.legend-dot.permission {
    background: #7f4bc4;
}

.legend-dot.holiday {
    background: var(--brand-red);
}

.year-calendar {
    margin-top: 22px;
}

.year-calendar + .year-calendar {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.year-calendar h3 {
    margin: 0 0 14px;
    font-family: "Audiowide", "Ubuntu", Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
}

.calendar-summary {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.calendar-summary h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
}

.focused-calendar {
    margin-top: 20px;
}

.large-month {
    padding: 18px;
}

.large-month h3 {
    margin: 0 0 14px;
    font-family: "Audiowide", "Ubuntu", Arial, sans-serif;
    font-weight: 400;
}

.large-day {
    min-height: 82px;
    align-content: start;
    justify-items: start;
    padding: 8px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 12px;
}

.week-day {
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.week-day h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.week-day h3 small {
    display: block;
    margin-top: 4px;
}

.week-day p {
    display: grid;
    gap: 6px;
    margin: 0 0 12px;
}

.month-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.month-card h4 {
    margin: 0 0 10px;
    color: var(--brand-red);
    font-size: 16px;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.calendar-weekdays {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.day-cell {
    position: relative;
    display: grid;
    min-height: 36px;
    place-items: center;
    border: 1px solid #f0e4d6;
    border-radius: 6px;
    background: #fffdf9;
    color: var(--ink);
    font-size: 13px;
    line-height: 1;
    overflow: hidden;
}

.day-cell.empty {
    border-color: transparent;
    background: transparent;
}

.day-cell.has-approved {
    border-color: rgba(46, 138, 88, .45);
    background: #e8f6ef;
}

.day-cell.has-pending {
    border-color: rgba(245, 154, 0, .45);
    background: #fff3df;
}

.day-cell.has-permission {
    border-color: rgba(127, 75, 196, .4);
    background: #f1ecfb;
}

.day-cell.has-holiday {
    border-color: rgba(182, 0, 0, .35);
    background: #feeceb;
}

.day-cell strong {
    font-size: 13px;
    font-weight: 800;
}

.day-cell em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-top: 3px;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.day-cell em.approved {
    background: var(--green);
}

.day-cell em.permission {
    background: #7f4bc4;
}

.day-cell em.holiday {
    background: var(--brand-red);
}

.day-cell em.pending,
.day-cell em.more {
    background: var(--amber);
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 800;
    background: #f3eadf;
}

.approved {
    color: var(--green);
    background: #e8f6ef;
}

.rejected,
.cancelled {
    color: var(--red);
    background: #feeceb;
}

.archived {
    color: var(--muted);
    background: #f3eadf;
}

.draft {
    color: var(--muted);
    background: #f3eadf;
}

.published {
    color: var(--green);
    background: #e8f6ef;
}

.pending {
    color: var(--amber);
    background: #fff3df;
}

.open,
.in_progress {
    color: var(--amber);
    background: #fff3df;
}

.resolved {
    color: var(--green);
    background: #e8f6ef;
}

.priority-high {
    color: var(--red);
    background: #feeceb;
}

.priority-normal {
    color: #8a4b00;
    background: #fff3df;
}

.priority-low {
    color: var(--muted);
    background: #f3eadf;
}

.inline-form {
    display: grid;
    grid-template-columns: 120px minmax(120px, 1fr) auto;
    gap: 8px;
}

@media (max-width: 900px) {
    .app-shell,
    .split,
    .cards,
    .pending-grid,
    .directory-grid,
    .knowledge-grid,
    .filter-bar,
    .calendar-filters,
    .week-grid,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        padding: 18px 14px 16px;
        border-right: 0;
        border-bottom: 4px solid var(--brand-orange);
    }

    .brand {
        justify-content: center;
        margin-bottom: 16px;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(246, 187, 89, .22);
    }

    .brand-logo {
        width: 52px;
        height: 52px;
    }

    .brand strong {
        font-size: 20px;
    }

    .brand small {
        font-size: 14px;
    }

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

    nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 10px 8px;
        border: 1px solid rgba(246, 187, 89, .16);
        background: rgba(255, 245, 230, .06);
        font-size: 15px;
        font-weight: 700;
        line-height: 1.15;
        text-align: center;
    }

    nav a:hover {
        background: rgba(216, 72, 31, .24);
    }

    nav span {
        grid-column: 1 / -1;
        margin: 10px 0 0;
        padding: 8px 4px 2px;
        font-size: 12px;
        text-align: center;
        letter-spacing: .04em;
    }

    .nav-badge {
        float: none;
        margin-left: 6px;
    }

    .main {
        padding: 18px;
    }

    .topbar,
    .directory-card,
    .quick-actions,
    .dashboard-welcome,
    .dashboard-welcome-meta,
    .push-panel,
    .inline-form,
    .request-head,
    .section-heading {
        grid-template-columns: 1fr;
        display: grid;
        gap: 12px;
    }

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

    .topbar-actions {
        display: grid;
        grid-template-columns: auto 1fr auto;
        width: 100%;
        gap: 10px;
    }

    .assistant-link {
        justify-self: start;
    }

    .global-search-page {
        grid-template-columns: 1fr;
    }

    .mode-switch {
        min-width: 0;
        width: 100%;
    }

    .status-stack {
        justify-content: flex-start;
        min-width: 0;
    }

    .legend {
        justify-content: flex-start;
    }

    .year-picker {
        margin-left: 0;
    }

    .months-grid {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}
/* Mandatory document recipient alignment */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.checkbox-grid label:first-child {
    grid-column: 1 / -1;
    background: #fff8ef;
}

.checkbox-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--brand-orange);
}

.checkbox-grid input[type="checkbox"]:focus {
    box-shadow: none;
}

.checkbox-grid input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}
/* Mandatory document acceptance alignment */
.mandatory-document-item .item-heading > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mandatory-document-item .item-heading small {
    display: block;
    color: var(--muted);
    line-height: 1.4;
}

.mandatory-document-item code {
    overflow-wrap: anywhere;
}

.mandatory-document-item .table-actions {
    align-items: flex-start;
}

.mandatory-acceptance {
    display: grid;
    flex: 1 1 420px;
    gap: 10px;
    min-width: 280px;
    max-width: 760px;
}

.mandatory-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
    cursor: pointer;
}

.mandatory-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--brand-orange);
}

.mandatory-acceptance input[type="checkbox"]:focus {
    box-shadow: none;
}

.mandatory-acceptance input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.mandatory-acceptance .button {
    justify-self: start;
}

@media (max-width: 700px) {
    .mandatory-document-item .item-heading {
        align-items: flex-start;
    }

    .mandatory-acceptance {
        flex-basis: 100%;
        min-width: 100%;
        max-width: none;
    }
}

/* Employee dashboard 2026 */
.employee-dashboard {
    display: grid;
    gap: 24px;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
    padding: 8px 0 24px;
    border-bottom: 1px solid var(--line);
}

.dashboard-hero h1 {
    margin: 6px 0 8px;
}

.dashboard-hero p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-section {
    min-width: 0;
}

.dashboard-section > .section-heading {
    margin-bottom: 14px;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.attention-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
    min-height: 136px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.attention-card:hover,
.attention-card:focus-visible {
    border-color: var(--brand-orange);
    box-shadow: 0 8px 22px rgba(33, 23, 17, .08);
    transform: translateY(-1px);
}

.attention-card.important {
    border-left: 4px solid var(--brand-red);
}

.attention-label {
    align-self: center;
    font-weight: 800;
}

.attention-card > strong {
    grid-row: span 2;
    align-self: start;
    font-size: 34px;
    line-height: 1;
    color: var(--brand-red);
}

.attention-card small {
    color: var(--muted);
    line-height: 1.4;
}

.attention-link {
    align-self: end;
    color: var(--brand-orange);
    font-weight: 800;
    font-size: 14px;
}

.dashboard-all-clear {
    grid-column: 1 / -1;
    display: grid;
    gap: 4px;
    padding: 18px 20px;
    border-left: 4px solid var(--green);
    background: #f3faf6;
}

.dashboard-all-clear span {
    color: var(--muted);
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 18px;
    align-items: stretch;
}

.dashboard-overview {
    margin: 0;
}

.vacation-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 8px;
    color: #fff;
    background: #211711;
}

.vacation-balance span {
    font-weight: 700;
}

.vacation-balance strong {
    font-size: 36px;
    line-height: 1;
    color: var(--brand-gold);
}

.dashboard-events {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-event {
    display: grid;
    gap: 5px;
    padding: 4px 0 16px;
    border-bottom: 1px solid var(--line);
}

.dashboard-event span,
.dashboard-event small {
    color: var(--muted);
}

.dashboard-event span {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-event strong {
    line-height: 1.35;
}

.dashboard-tracking {
    margin-top: 18px;
}

.dashboard-tracking h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.dashboard-tracking a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.dashboard-tracking a strong {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    background: var(--brand-orange);
}

.dashboard-document-list {
    display: grid;
}

.dashboard-document {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.dashboard-document:first-child {
    border-top: 0;
    padding-top: 2px;
}

.dashboard-document > span:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-document strong {
    overflow-wrap: anywhere;
}

.dashboard-document small {
    color: var(--muted);
}

.dashboard-row-action {
    flex: 0 0 auto;
    color: var(--brand-orange);
    font-weight: 800;
    font-size: 14px;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-action-grid a {
    display: grid;
    gap: 5px;
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}

.dashboard-action-grid a:hover,
.dashboard-action-grid a:focus-visible {
    border-color: var(--brand-orange);
}

.dashboard-action-grid span {
    color: var(--muted);
    font-size: 14px;
}

#dashboard-announcements {
    scroll-margin-top: 18px;
}

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

@media (max-width: 760px) {
    .employee-dashboard {
        gap: 20px;
    }

    .dashboard-hero {
        display: grid;
        align-items: start;
        padding-top: 0;
    }

    .dashboard-hero-actions {
        justify-content: flex-start;
    }

    .dashboard-hero-actions .button {
        flex: 1 1 180px;
    }

    .attention-grid,
    .dashboard-columns,
    .dashboard-action-grid,
    .dashboard-events {
        grid-template-columns: 1fr;
    }

    .attention-card {
        min-height: 116px;
    }

    .vacation-balance {
        padding: 16px;
    }
}

/* Employee mobile navigation */
.mobile-app-nav { display: none; }

@media (max-width: 900px) {
    body:has(.mobile-app-nav) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .app-shell:has(.mobile-app-nav) { display: block; min-height: 100vh; }
    .employee-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        padding: 14px 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
    .employee-sidebar .sidebar-user,
    .employee-sidebar nav,
    .employee-sidebar .sidebar-search,
    .employee-sidebar .sidebar-footer { display: none !important; }
    .employee-sidebar .brand { margin: 0; min-height: 44px; display: flex; align-items: center; }
    .employee-sidebar + .content-shell { margin-left: 0; width: 100%; }
    .mobile-app-nav {
        position: fixed;
        z-index: 1000;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: calc(68px + env(safe-area-inset-bottom));
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
        background: rgba(22, 14, 10, .98);
        border-top: 1px solid rgba(255,255,255,.16);
        box-shadow: 0 -10px 28px rgba(19, 11, 7, .18);
    }
    .mobile-app-nav > a,
    .mobile-more-menu > summary {
        position: relative;
        min-width: 0;
        min-height: 58px;
        padding: 5px 2px;
        border: 0;
        border-radius: 6px;
        color: #f7f1eb;
        background: transparent;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 11px;
        line-height: 1.15;
        text-align: center;
        cursor: pointer;
        list-style: none;
    }
    .mobile-more-menu > summary::-webkit-details-marker { display: none; }
    .mobile-app-nav > a.active { color: #ffb28f; background: rgba(191, 52, 31, .2); }
    .mobile-nav-icon { height: 25px; display: grid; place-items: center; font-size: 24px; line-height: 1; font-weight: 700; }
    .mobile-nav-badge {
        position: absolute;
        top: 3px;
        right: calc(50% - 25px);
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 9px;
        background: #d7a12a;
        color: #1b120d;
        font-size: 11px;
        line-height: 18px;
    }
    .mobile-more-menu { position: static; min-width: 0; }
    .mobile-more-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        max-height: min(68vh, 560px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 10px;
        border: 1px solid #ddd0c4;
        border-radius: 8px;
        background: #fffdf9;
        box-shadow: 0 18px 50px rgba(18, 11, 7, .28);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .mobile-more-menu:not([open]) .mobile-more-panel { display: none; }
    .mobile-more-heading { grid-column: 1 / -1; padding: 8px 10px 12px; border-bottom: 1px solid #eadfd6; display: flex; flex-direction: column; }
    .mobile-more-heading strong { color: #201712; }
    .mobile-more-heading small { color: #705f54; margin-top: 2px; }
    .mobile-more-panel > a {
        min-height: 46px;
        padding: 10px 12px;
        border-radius: 6px;
        color: #241913;
        background: #f8f2ec;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-size: 14px;
        line-height: 1.25;
    }
    .mobile-more-panel > a:active { background: #eee0d4; }
}

@media (max-width: 430px) {
    .mobile-app-nav > a,
    .mobile-more-menu > summary { font-size: 10px; }
    .mobile-more-panel { grid-template-columns: 1fr; }
}

/* Employee document hub 2026 */
.doc-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 8px 0 22px;
}
.doc-hub-header h1 { margin: 5px 0 7px; }
.doc-hub-header p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.5; }
.doc-hub-eyebrow { color: var(--brand-orange); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.doc-hub-summary { flex: 0 0 auto; min-width: 128px; padding: 13px 16px; border-radius: 8px; text-align: center; font-weight: 800; }
.doc-hub-summary strong { display: block; font-size: 25px; line-height: 1; }
.doc-hub-summary.pending { color: #8a4b00; background: #fff3df; border: 1px solid rgba(245,154,0,.35); }
.doc-hub-summary.clear { color: var(--green); background: #e8f6ef; border: 1px solid rgba(46,138,88,.25); }
.doc-hub-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff7ec;
    scrollbar-width: thin;
}
.doc-hub-tabs a { flex: 1 0 auto; min-height: 44px; padding: 11px 16px; border-radius: 6px; color: var(--ink); font-weight: 800; text-align: center; }
.doc-hub-tabs a:hover { background: #f3e7dc; }
.doc-hub-tabs a.active { color: #fff; background: linear-gradient(135deg,var(--brand-orange),var(--brand-red)); }
.doc-filter-panel { padding: 16px 18px; }
.doc-filters { display: grid; grid-template-columns: minmax(220px,1fr) minmax(160px,220px) minmax(160px,220px) auto auto; gap: 10px; align-items: end; }
.doc-card-list { display: grid; gap: 12px; }
.doc-card {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr) auto;
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(57,31,17,.06);
}
.doc-file-mark { display: grid; place-items: center; width: 52px; height: 58px; border-radius: 6px; color: #fff; background: var(--brand-red); font-size: 12px; font-weight: 800; }
.doc-file-mark.payroll { background: #2d6a4f; }
.doc-file-mark.mandatory { background: #9a5b00; }
.doc-file-mark.signature { background: #6b3fa0; }
.doc-card-main { display: grid; gap: 11px; min-width: 0; }
.doc-card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.doc-card-title > div { display: grid; gap: 4px; min-width: 0; }
.doc-card-title strong { overflow-wrap: anywhere; font-size: 17px; }
.doc-card-title span:not(.status) { color: var(--muted); font-size: 14px; line-height: 1.4; }
.doc-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.doc-card-actions form { margin: 0; }
.doc-card-description { margin: 0; line-height: 1.55; }
.doc-evidence { border-top: 1px solid var(--line); padding-top: 10px; }
.doc-evidence summary { color: var(--brand-orange); font-weight: 800; cursor: pointer; }
.doc-evidence dl { display: grid; gap: 8px; margin: 12px 0 0; padding: 12px; border-radius: 6px; background: #faf6f1; }
.doc-evidence dl > div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; }
.doc-evidence dt { color: var(--muted); font-weight: 700; }
.doc-evidence dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.doc-evidence code { font-size: 12px; overflow-wrap: anywhere; }
.doc-card .mandatory-acceptance { max-width: none; min-width: 0; padding-top: 2px; }
.doc-card .mandatory-acceptance label { padding: 12px; border-radius: 6px; background: #fff8ef; }
.doc-empty { margin: 0; text-align: center; }
.doc-empty p { margin: 7px 0 0; color: var(--muted); }
@media (max-width: 1050px) {
    .doc-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .doc-filters label:first-of-type { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .doc-hub-header { display: grid; align-items: start; }
    .doc-hub-summary { justify-self: start; min-width: 120px; }
    .doc-hub-tabs { margin-left: -2px; margin-right: -2px; }
    .doc-hub-tabs a { min-width: 118px; padding: 10px 12px; }
    .doc-filters { grid-template-columns: 1fr; }
    .doc-filters label:first-of-type { grid-column: auto; }
    .doc-card { grid-template-columns: 46px minmax(0,1fr); align-items: start; padding: 15px; gap: 12px; }
    .doc-file-mark { width: 44px; height: 50px; }
    .doc-card-actions { grid-column: 1 / -1; justify-content: stretch; }
    .doc-card-actions .button, .doc-card-actions form, .doc-card-actions form .button { width: 100%; }
    .doc-card-title { display: grid; }
    .doc-card-title .status { justify-self: start; }
    .doc-evidence dl > div { grid-template-columns: 1fr; gap: 3px; }
}

/* Employee management hub 2026 */
.management-header { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; padding:8px 0 22px; }
.management-header h1 { margin:5px 0 7px; }
.management-header p { max-width:680px; margin:0; color:var(--muted); line-height:1.5; }
.management-eyebrow { color:var(--brand-orange); font-size:13px; font-weight:800; text-transform:uppercase; }
.management-summary-badge { flex:0 0 auto; min-width:128px; padding:13px 16px; border-radius:8px; text-align:center; font-weight:800; }
.management-summary-badge strong { display:block; font-size:25px; line-height:1; }
.management-summary-badge.pending { color:#8a4b00; background:#fff3df; border:1px solid rgba(245,154,0,.35); }
.management-summary-badge.clear { color:var(--green); background:#e8f6ef; border:1px solid rgba(46,138,88,.25); }
.management-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin-bottom:20px; padding:4px; border:1px solid var(--line); border-radius:8px; background:#fff7ec; }
.management-tabs a { min-height:44px; padding:11px 16px; border-radius:6px; color:var(--ink); font-weight:800; text-align:center; }
.management-tabs a:hover { background:#f3e7dc; }
.management-tabs a.active { color:#fff; background:linear-gradient(135deg,var(--brand-orange),var(--brand-red)); }
.management-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.management-metrics.request-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.management-metrics article { display:grid; grid-template-columns:1fr auto; gap:5px 10px; min-height:92px; padding:16px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.management-metrics span { color:var(--muted); }
.management-metrics strong { grid-row:span 2; font-size:30px; line-height:1; }
.management-metrics small { color:var(--muted); }
.management-layout { display:grid; grid-template-columns:minmax(320px,.85fr) minmax(0,1.15fr); gap:18px; align-items:start; }
.management-layout > .panel { margin:0; }
.management-form-panel > summary { list-style:none; cursor:pointer; margin:-4px 0 18px; padding:4px 0 14px; border-bottom:1px solid var(--line); }
.management-form-panel > summary::-webkit-details-marker { display:none; }
.management-form-panel > summary span { display:grid; gap:4px; }
.management-form-panel > summary strong { font-size:20px; }
.management-form-panel > summary small { color:var(--muted); }
.management-date-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.permission-fields[hidden] { display:none; }
.management-history { min-width:0; }
.management-request-list { display:grid; gap:10px; }
.management-request-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 14px; padding:14px 0; border-top:1px solid var(--line); }
.management-request-card:first-child { border-top:0; padding-top:0; }
.management-request-card > div { display:grid; gap:4px; }
.management-request-card > div span { color:var(--muted); font-size:14px; }
.management-request-card p,.management-request-card small { grid-column:1 / -1; margin:0; color:var(--muted); line-height:1.45; }
.management-empty { padding:20px; border:1px dashed #d9c9bb; border-radius:8px; text-align:center; background:#fffaf4; }
.management-empty p { margin:6px 0 0; color:var(--muted); }
.management-layout .request-card { box-shadow:none; }
@media (max-width:1050px) {
 .management-layout { grid-template-columns:1fr; }
 .management-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:700px) {
 .management-header { display:grid; align-items:start; }
 .management-summary-badge { justify-self:start; min-width:120px; }
 .management-metrics,.management-metrics.request-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .management-date-grid { grid-template-columns:1fr; }
 .management-form-panel { padding:17px; }
 .management-request-card { grid-template-columns:1fr; }
 .management-request-card > .status { justify-self:start; }
}


/* Grouped employee sidebar */
.user-nav {
    display: grid;
    gap: 16px;
}
.user-nav .nav-group {
    display: grid;
    gap: 3px;
}
.user-nav .nav-group + .nav-group {
    padding-top: 12px;
    border-top: 1px solid rgba(246, 187, 89, 0.18);
}
.user-nav .nav-group-label {
    display: block;
    margin: 0 0 3px;
    padding: 0 10px;
    border-radius: 0;
    color: rgba(246, 187, 89, 0.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.user-nav .nav-group a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 14px;
}
.user-nav .nav-group a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}
.user-nav .nav-group a.active {
    background: linear-gradient(90deg, rgba(216, 72, 31, 0.34), rgba(182, 0, 0, 0.12));
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--brand-orange);
}
.user-nav .nav-group .nav-badge {
    margin-left: auto;
}
/* Mobile bottom navigation collision fix */
@media (max-width: 760px) {
  .mobile-app-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    column-gap: 0;
    padding-left: max(4px, env(safe-area-inset-left));
    padding-right: max(4px, env(safe-area-inset-right));
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    min-height: calc(78px + env(safe-area-inset-bottom));
  }
  .mobile-app-nav > a,
  .mobile-app-nav > .mobile-more-menu {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    margin: 0;
  }
  .mobile-app-nav > a,
  .mobile-app-nav > .mobile-more-menu > summary {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    width: 100%;
    padding: 6px 1px;
    text-align: center;
  }
  .mobile-app-nav > .mobile-more-menu > summary { list-style: none; }
  .mobile-app-nav > a > span:last-child,
  .mobile-app-nav > .mobile-more-menu > summary > span:last-child {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    font-size: clamp(9px, 2.55vw, 11px);
    line-height: 1.05;
    letter-spacing: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }
  .mobile-app-nav .mobile-nav-icon { flex: 0 0 auto; line-height: 1; }
  body { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}
/* Calendar export and subscription 20260930 */
.calendar-actions { display:flex; flex-wrap:wrap; gap:8px; margin-left:auto; }
.calendar-subscription { margin-top:18px; }
.calendar-subscription-url { display:grid; gap:10px; margin-top:14px; }
.calendar-subscription-url input { width:100%; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:13px; }
@media (max-width:900px) {
  .calendar-heading,.calendar-actions { align-items:stretch; }
  .calendar-actions { width:100%; margin-left:0; }
  .calendar-actions .button { flex:1 1 150px; }
}
@media print {
    @page annual-calendar {
        size: A4 landscape;
        margin: 0;
    }

    body.printing-calendar {
        background: #fff;
        color: #181310;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.printing-calendar .sidebar,
    body.printing-calendar .topbar,
    body.printing-calendar .mobile-app-nav,
    body.printing-calendar .main > *:not(.calendar-print-area),
    body.printing-calendar .calendar-print-area > *:not(.year-calendar) {
        display: none !important;
    }

    body.printing-calendar .app-shell,
    body.printing-calendar .main {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 !important;
    }

    body.printing-calendar .calendar-print-area {
        page: annual-calendar;
        width: 297mm;
        height: 210mm;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 6mm;
        overflow: hidden;
    }

    body.printing-calendar .year-calendar {
        margin: 0;
    }

    body.printing-calendar .months-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2.5mm;
    }

    body.printing-calendar .month-card {
        height: 62mm;
        border-color: #cabeb1;
        border-radius: 2mm;
        padding: 2mm;
        break-inside: avoid;
    }

    body.printing-calendar .month-card h4 {
        margin: 0 0 1.2mm;
        font-size: 10pt;
        line-height: 1;
    }

    body.printing-calendar .calendar-weekdays,
    body.printing-calendar .calendar-days {
        gap: 0.8mm;
    }

    body.printing-calendar .calendar-weekdays {
        margin-bottom: 0.8mm;
        font-size: 6.5pt;
        line-height: 1;
    }

    body.printing-calendar .day-cell {
        width: auto;
        height: 7mm;
        min-height: 0;
        border-radius: 1mm;
        font-size: 7pt;
    }

    body.printing-calendar .day-cell strong {
        font-size: 7pt;
    }

    body.printing-calendar .day-cell em {
        display: none;
    }
}

/* Employee inventory */
.inventory-item .read-list.compact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 14px 0;
}
.inventory-item .read-list.compact p { margin: 0; }
.inventory-acceptance {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffaf4;
}
.inventory-acceptance .button { justify-self: start; }
.inventory-item details { margin-top: 14px; }
.inventory-item details summary { cursor: pointer; font-weight: 800; color: var(--brand-red); }
.inventory-item .compact-form { margin-top: 14px; }
@media (max-width: 700px) {
    .inventory-item .read-list.compact { grid-template-columns: 1fr; }
    .inventory-item .item-heading { align-items: flex-start; }
}
