:root {
  color-scheme: light;
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-soft: #f2f3f5;
  --ink: #18191b;
  --ink-soft: #30343a;
  --muted: #5e646d;
  --subtle: #7a8089;
  --line: #dfe2e6;
  --brand: #d91c2b;
  --brand-dark: #9f101b;
  --accent: #161616;
  --blue: #355f86;
  --yellow: #8a5a12;
  --danger: #c81727;
  --ok: #26734a;
  --shadow: 0 14px 32px rgba(18, 18, 18, 0.1);
  --shadow-soft: 0 2px 8px rgba(18, 18, 18, 0.045);
  --radius: 7px;
  font-family:
    "Segoe UI Variable Text", "Segoe UI", Aptos, ui-sans-serif, system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
strong {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: "Segoe UI Variable Display", "Segoe UI", Aptos, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(217, 28, 43, 0.22);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.92), rgba(165, 13, 25, 0.86)),
    url("assets/office-pattern.svg");
  background-size: cover;
  color: #fff;
}

.login-visual h1 {
  max-width: 680px;
  margin: 0;
  font-size: 4.3rem;
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.login-visual p {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.login-caption {
  max-width: 430px !important;
  font-size: 0.94rem !important;
}

.login-panel {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 36px;
  background: var(--surface);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -12px 0 36px rgba(18, 18, 18, 0.08);
}

.login-form {
  width: 100%;
}

.eyebrow {
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0;
}

.login-form h2,
.page-title h1 {
  margin: 8px 0 8px;
  letter-spacing: 0;
}

.page-title h1 {
  font-size: 2.05rem;
  line-height: 1.12;
}

.login-form p,
.page-title p {
  color: var(--muted);
  margin: 0 0 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding: 10px clamp(16px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 180px;
}

.brand-wordmark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 156px;
  aspect-ratio: 971 / 319;
  overflow: hidden;
}

.brand-wordmark img {
  position: absolute;
  top: -42.95%;
  left: -73.74%;
  display: block;
  width: 247.17%;
  max-width: none;
  height: auto;
}

.header-wordmark {
  width: 156px;
}

.login-wordmark {
  width: min(270px, 100%);
  margin-bottom: 26px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.nav-tab {
  position: relative;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.nav-tab:hover {
  color: var(--ink);
}

.nav-tab.active {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 -3px var(--brand);
}

.user-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 220px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffe5e8;
  color: var(--brand-dark);
  font-weight: 850;
}

.user-menu span {
  display: block;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu small {
  color: var(--muted);
  font-size: 0.78rem;
}

.user-menu small b {
  margin: 0 4px;
  color: var(--brand);
}

.page {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 36px) 56px;
}

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 22px;
}

.grid {
  display: grid;
  gap: 22px;
  align-items: start;
}

.grid.two {
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

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

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  letter-spacing: 0;
  font-size: 1.16rem;
  line-height: 1.25;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-body {
  padding: 20px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat {
  min-height: 78px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.65rem;
  line-height: 1;
}

.branch-policy-card {
  display: block;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
}

.branch-policy-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 78px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}

.branch-policy-card summary::-webkit-details-marker {
  display: none;
}

.branch-policy-card summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.branch-policy-card summary > div > strong {
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.branch-policy-card summary b {
  padding: 0 5px;
  color: #b7bbc1;
}

.branch-policy-action {
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 750;
  white-space: nowrap;
}

.branch-policy-action .when-open {
  display: none;
}

.branch-policy-card[open] .branch-policy-action {
  color: var(--muted);
}

.branch-policy-card[open] .branch-policy-action .when-closed {
  display: none;
}

.branch-policy-card[open] .branch-policy-action .when-open {
  display: inline;
}

.branch-policy-details {
  border-top: 1px solid var(--line);
}

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

.policy-grid div {
  min-height: 82px;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.policy-grid span {
  display: block;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.policy-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  line-height: 1.4;
  font-size: 0.9rem;
  font-weight: 650;
}

.policy-grid div:nth-child(3n) {
  border-right: 0;
}

.policy-grid div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.policy-grid div:last-child {
  border-right: 0;
}

.branch-assignment-alert {
  display: flex;
  align-items: center;
  min-height: 124px;
  margin-bottom: 20px;
  padding: 22px 24px;
  border-left: 5px solid var(--brand);
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.branch-assignment-alert h2,
.branch-assignment-alert p {
  margin: 0;
}

.branch-assignment-alert h2 {
  margin-top: 5px;
  font-size: 1.3rem;
}

.branch-assignment-alert p {
  max-width: 760px;
  margin-top: 6px;
  color: #d1d3d6;
}

.balance-summary-list {
  border-top: 1px solid var(--line);
}

.leave-eligibility-note {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border-left: 4px solid #5d626a;
  background: #f2f3f4;
}

.leave-eligibility-note > span {
  color: #5d626a;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leave-eligibility-note strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.leave-eligibility-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.leave-eligibility-note.is-probation {
  border-left-color: var(--brand);
  background: #fff0f1;
}

.leave-eligibility-note.is-probation > span {
  color: var(--brand-dark);
}

.leave-eligibility-note.is-eligible {
  border-left-color: #2f704b;
  background: #edf6f0;
}

.leave-eligibility-note.is-eligible > span {
  color: #2f704b;
}

.balance-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 66px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}

.balance-summary-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.balance-summary-name > div {
  min-width: 0;
}

.balance-summary-name h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.25;
}

.balance-summary-name span:not(.color-dot) {
  display: block;
  margin-top: 3px;
  color: var(--subtle);
  font-size: 0.76rem;
  line-height: 1.3;
}

.balance-summary-name span strong {
  color: var(--muted);
  font-size: inherit;
}

.balance-summary-amount {
  display: grid;
  justify-items: end;
  min-width: 62px;
}

.balance-summary-amount strong {
  font-size: 1.55rem;
  line-height: 1;
}

.balance-summary-amount span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.comp-off-summary {
  display: grid;
  gap: 12px;
}

.comp-off-summary h3,
.comp-off-summary p {
  margin: 0;
}

.comp-off-summary p {
  color: var(--muted);
}

.credit-list {
  display: grid;
  gap: 8px;
}

.credit-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
}

.credit-item span {
  color: var(--muted);
}

.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
}

.request-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.request-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.request-item.deep-link-target {
  margin-inline: -8px;
  padding-inline: 10px;
  border-color: rgba(217, 28, 43, 0.42);
  background: #fff5f6;
  box-shadow: inset 3px 0 0 var(--brand);
  scroll-margin-top: 120px;
}

.request-item.deep-link-target:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.request-item h4 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.35;
}

.request-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.request-item .request-summary {
  color: var(--ink-soft);
  font-weight: 650;
}

.request-item .request-detail {
  max-width: 760px;
  margin-top: 5px;
}

.request-item .request-meta {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 0.78rem;
}

.request-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}

.status.pending {
  background: #fff3d6;
  color: #75500f;
}

.status.approved {
  background: #eaf4ee;
  color: var(--ok);
}

.status.rejected {
  background: #f8dddd;
  color: var(--danger);
}

.status.canceled {
  background: #eeeeee;
  color: #686868;
}

.status.mapping {
  background: #eaf0f5;
  color: var(--blue);
}

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

.admin-form-section + .admin-form-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-form-heading h3,
.admin-form-heading p {
  margin: 0;
}

.admin-form-heading h3 {
  font-size: 1rem;
}

.admin-form-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.action-field {
  align-content: end;
}

.action-field .btn {
  justify-self: start;
}

.approval-note {
  margin-top: 7px !important;
  color: #252525 !important;
  font-size: 0.82rem;
  font-weight: 750;
}

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

.routing-config-section {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

.routing-config-section:last-child {
  padding-right: 0;
  border-right: 0;
}

.routing-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 62px;
}

.routing-section-heading h3,
.routing-section-heading p,
.routing-summary-heading h3,
.routing-summary-heading p {
  margin: 0;
}

.routing-section-heading h3,
.routing-summary-heading h3 {
  font-size: 1rem;
}

.routing-section-heading p,
.routing-summary-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.routing-step {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.routing-config-section > .btn {
  justify-self: start;
}

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

.routing-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.routing-summary-heading > span {
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.route-summary-list {
  display: grid;
  gap: 8px;
}

.route-summary-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
}

.route-summary-item > div:first-child {
  display: grid;
  gap: 3px;
}

.route-summary-item > div:first-child span {
  color: var(--muted);
  font-size: 0.8rem;
}

.route-flow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  font-size: 0.86rem;
}

.route-flow span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-flow strong {
  color: var(--brand);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.apply-shell,
.admin-shell {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.apply-nav,
.admin-nav {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 4px;
  align-self: start;
}

.section-nav-label {
  padding: 0 12px 8px;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.section-nav-item {
  min-height: 42px;
  padding: 0 12px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  text-align: left;
}

.section-nav-item:hover {
  background: #eceef0;
  color: var(--ink);
}

.section-nav-item.active {
  border-left-color: var(--brand);
  background: #f9e9eb;
  color: var(--brand-dark);
}

.field.apply-mobile-picker,
.field.admin-mobile-picker {
  display: none;
  margin-bottom: 16px;
}

.apply-content,
.admin-content {
  min-width: 0;
}

.apply-content .panel,
.admin-content .panel {
  box-shadow: none;
}

.apply-workspace.grid.two {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.apply-workspace.grid.two > .panel:last-child {
  position: sticky;
  top: 92px;
}

.apply-workspace {
  margin-bottom: 18px;
}

.form-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  margin-bottom: 24px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.form-identity div {
  min-width: 0;
  padding: 7px 2px;
  color: var(--ink);
}

.form-identity div:last-child {
  grid-column: 1 / -1;
}

.digital-signature span,
.approval-path span,
.claim-total span {
  display: block;
  margin-bottom: 4px;
  color: #ef9aa1;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form-identity span {
  display: block;
  margin-bottom: 2px;
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 700;
}

.form-identity strong {
  display: block;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.workflow-form {
  display: grid;
  gap: 16px;
}

.workflow-form.form-grid {
  display: grid;
}

.attachment-field {
  position: relative;
  gap: 8px;
}

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

.attachment-heading label {
  margin: 0;
}

.attachment-heading > span {
  color: #6b7078;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attachment-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 11px 13px;
  border: 1px dashed #aeb3ba;
  border-radius: var(--radius);
  background: #fbfbfc;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.attachment-dropzone:hover,
.attachment-dropzone.is-dragging {
  border-color: var(--brand);
  background: #fff5f5;
  box-shadow: inset 4px 0 0 var(--brand);
}

.attachment-dropzone strong {
  color: var(--brand-dark);
  font-size: 0.86rem;
}

.attachment-dropzone span {
  color: #666b73;
  font-size: 0.78rem;
  text-align: right;
}

.attachment-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.attachment-input:focus-visible + .pending-attachment-list,
.attachment-field:focus-within .attachment-dropzone {
  outline: 3px solid rgba(181, 18, 32, 0.18);
  outline-offset: 2px;
}

.pending-attachment-list,
.attachment-file-list {
  display: grid;
  gap: 6px;
}

.pending-attachment-list:empty {
  display: none;
}

.pending-attachment,
.attachment-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.attachment-file {
  width: 100%;
  color: var(--ink);
  text-align: left;
}

.attachment-file:hover:not(:disabled) {
  border-color: #b7bbc1;
  background: #f7f7f8;
}

.attachment-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 25px;
  padding: 0 6px;
  border-radius: 4px;
  background: #202124;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
}

.attachment-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-size {
  color: #737880;
  font-size: 0.76rem;
  white-space: nowrap;
}

.attachment-remove,
.attachment-file-action {
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.attachment-remove {
  padding: 4px 2px;
  background: transparent;
}

.attachment-remove:hover {
  color: var(--brand);
  text-decoration: underline;
}

.submission-attachments {
  display: grid;
  gap: 6px;
  max-width: 620px;
  margin-top: 10px;
}

.submission-attachment-label {
  color: #5d626a;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.compact-fields {
  max-width: 760px;
  align-items: end;
}

.claim-lines {
  display: grid;
  gap: 10px;
}

.claim-line {
  display: grid;
  grid-template-columns: 145px 165px minmax(220px, 1fr) 140px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #fafafa;
}

.claim-line.night-line {
  grid-template-columns: 145px minmax(220px, 1fr) 190px 140px auto;
}

.line-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.line-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.line-field input,
.line-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.line-remove {
  align-self: end;
  color: var(--danger);
}

.claim-total {
  min-height: 67px;
  padding: 10px 12px;
  border-left: 4px solid var(--brand);
  background: #f1f1f1;
}

.claim-total span {
  color: var(--brand-dark);
}

.claim-total strong {
  font-size: 1.25rem;
}

.digital-signature,
.approval-path {
  padding: 11px 0 0 12px;
  border: 0;
  border-left: 3px solid #111;
  border-radius: 0;
  background: transparent;
}

.digital-signature span,
.approval-path span {
  color: var(--brand-dark);
}

.digital-signature strong,
.digital-signature small {
  display: block;
}

.digital-signature small {
  margin-top: 3px;
  color: var(--muted);
}

.policy-notice {
  margin-bottom: 16px;
}

.submissions-panel {
  margin: 24px 0 0 224px;
}

.record-id {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.expense-lines {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.expense-lines span {
  display: block;
}

.field {
  display: grid;
  gap: 7px;
}

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

.field label {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.required-mark {
  color: var(--brand);
  font-size: 1rem;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid #cfd2d7;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.line-field input:hover,
.line-field select:hover {
  border-color: #aeb3ba;
}

.field textarea {
  resize: vertical;
  min-height: 84px;
}

.request-approver-field {
  padding: 2px 0 2px 12px;
  border: 0;
  border-left: 3px solid var(--brand);
  border-radius: 0;
  background: transparent;
}

.request-approver-field label {
  color: var(--brand-dark);
}

.request-approver-field select {
  min-height: 46px;
  border-color: #cfd2d7;
  background: #fff;
}

.helper {
  color: var(--muted);
  font-size: 0.86rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(159, 16, 27, 0.16);
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(159, 16, 27, 0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn.secondary {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(18, 18, 18, 0.14);
}

.btn.secondary:hover:not(:disabled) {
  background: #303030;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.btn.ghost:hover:not(:disabled) {
  background: #e9eaed;
  color: var(--ink);
  box-shadow: none;
}

.btn.danger {
  background: var(--danger);
}

.btn.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.approval-stack {
  display: grid;
  gap: 10px;
}

.approval-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.approval-section summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 60px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  color: var(--ink-soft);
  font-weight: 700;
}

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

.approval-section summary:hover {
  background: #fafafb;
}

.approval-section[open] summary {
  border-bottom: 1px solid var(--line);
}

.approval-count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eceef0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.approval-section[open] .approval-count {
  background: var(--accent);
  color: #fff;
}

.approval-section-body {
  padding: 2px 16px 14px;
}

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

.calendar-toolbar h2 {
  margin: 0;
}

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

.filter-row select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff;
}

.holiday-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

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

.holiday-toolbar h3,
.holiday-list-card h3 {
  margin: 0;
}

.holiday-toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff;
}

.holiday-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.holiday-weekday {
  min-height: 34px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
}

.holiday-day {
  min-height: 86px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.holiday-day:nth-child(7n + 7) {
  border-right: 0;
}

.holiday-day.outside {
  background: #f5f5f5;
  color: #9c9c9c;
}

.holiday-day.has-holiday {
  background: #fff0f1;
  box-shadow: inset 0 0 0 2px var(--brand);
}

.holiday-day span,
.holiday-day strong {
  display: block;
}

.holiday-day span {
  font-weight: 900;
}

.holiday-day strong {
  margin-top: 6px;
  color: var(--brand-dark);
  font-size: 0.76rem;
  line-height: 1.2;
}

.holiday-form,
.holiday-list-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.holiday-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.holiday-list-card p {
  margin: 4px 0 12px;
  color: var(--muted);
}

.holiday-pill-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.holiday-pill {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.holiday-pill span {
  color: var(--muted);
}

.policy-branch-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: #edeff1;
}

.policy-branch-tab {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.policy-branch-tab.active {
  border-color: #1b1b1b;
  background: #1b1b1b;
  color: #fff;
}

.policy-branch-mobile {
  display: none;
}

.policy-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.policy-editor-header h3,
.policy-editor-header p {
  margin: 0;
}

.policy-editor-header h3 {
  font-size: 1.25rem;
}

.policy-editor-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.autosave-label {
  color: var(--subtle);
  font-size: 0.76rem;
  white-space: nowrap;
}

.policy-group {
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.policy-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.policy-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.policy-group > summary.policy-group-title {
  min-height: 64px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}

.policy-group > summary.policy-group-title::-webkit-details-marker {
  display: none;
}

.policy-group > summary.policy-group-title::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 500;
}

.policy-group[open] > summary.policy-group-title::after {
  content: "-";
}

.policy-group-body {
  padding: 0 0 22px 38px;
}

.policy-group-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.dashboard-visibility-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.dashboard-visibility-toggle > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-visibility-toggle strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.dashboard-visibility-toggle small {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.dashboard-visibility-toggle input {
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border: 1px solid #aeb2b7;
  border-radius: 12px;
  appearance: none;
  background: #d9dcdf;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.dashboard-visibility-toggle input::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  content: "";
  transition: transform 150ms ease;
}

.dashboard-visibility-toggle input:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.dashboard-visibility-toggle input:checked::before {
  transform: translateX(18px);
}

.dashboard-visibility-toggle input:focus-visible {
  outline: 3px solid rgba(223, 31, 45, 0.2);
  outline-offset: 2px;
}

.policy-group-body > .policy-toggle {
  justify-content: flex-end;
  margin-bottom: 14px;
}

.policy-group-title span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fae8ea;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.policy-group-title h4 {
  margin: 0;
  font-size: 1rem;
}

.policy-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.compact-policy-grid {
  max-width: 520px;
}

.mini-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.mini-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mini-field input,
.mini-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 9px;
  background: #fbfbfc;
}

.policy-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.policy-toggle span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.policy-toggle select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.policy-disabled-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: #f5f5f5;
  color: var(--muted);
}

.admin-panel .panel-body,
.apply-content .panel-body {
  padding: 24px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.weekday,
.day-cell {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.weekday:nth-child(7n),
.day-cell:nth-child(7n) {
  border-right: 0;
}

.weekday {
  min-height: 38px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.day-cell {
  min-height: 130px;
  padding: 8px;
  background: #fff;
}

.day-cell.outside {
  background: #f8faf8;
  color: #a0aaa2;
}

.day-cell.today {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.day-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 850;
}

.calendar-holidays {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
}

.calendar-holiday {
  min-width: 0;
  padding: 4px 6px;
  border-left: 3px solid var(--brand);
  border-radius: 4px;
  background: #fff1f2;
  color: var(--brand-dark);
}

.calendar-holiday strong,
.calendar-holiday small {
  display: block;
  overflow-wrap: anywhere;
}

.calendar-holiday strong {
  font-size: 0.69rem;
  line-height: 1.18;
}

.calendar-holiday small {
  margin-top: 2px;
  color: #6f3036;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.day-cell.outside .calendar-holiday {
  opacity: 0.58;
}

.leave-chip {
  display: block;
  width: 100%;
  margin: 4px 0;
  padding: 5px 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.76rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-leaves {
  display: grid;
  gap: 0;
}

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

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

.admin-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-table input,
.admin-table select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
}

.notice {
  padding: 11px 12px;
  border: 0;
  border-left: 3px solid #a66b11;
  border-radius: 0;
  background: #fff8e8;
  color: #62430f;
  font-size: 0.84rem;
}

.submit-field {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.submission-feedback {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  background: #eef5fb;
  color: #24445f;
  font-size: 0.86rem;
}

.submission-feedback[hidden] {
  display: none;
}

.submission-feedback strong {
  font-size: 0.8rem;
  font-weight: 850;
}

.submission-feedback.is-success {
  border-left-color: var(--ok);
  background: #edf8f2;
  color: #185636;
}

.submission-feedback.is-error {
  border-left-color: var(--danger);
  background: #fff0f1;
  color: #8d101b;
}

.submission-feedback.is-warning,
.submission-feedback.is-progress {
  border-left-color: var(--yellow);
  background: #fff8e8;
  color: #62430f;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 86px;
  padding: 16px;
  color: var(--subtle);
  font-size: 0.86rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  gap: 2px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border-left: 4px solid #8d939b;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.toast strong {
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
}

.toast span {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
}

.toast-success {
  border-left-color: #58b481;
}

.toast-error {
  border-left-color: #ff5b68;
}

.toast-warning {
  border-left-color: #f2b64d;
}

.auth-note {
  margin-top: 20px;
  padding: 14px;
  border-radius: var(--radius);
  background: #f4f4f4;
  color: var(--muted);
  font-size: 0.9rem;
}

.microsoft-login-button {
  width: 100%;
  min-height: 48px;
}

.auth-error,
.directory-warning {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 4px solid var(--danger);
  background: #fff0f0;
  color: var(--danger);
  font-size: 0.86rem;
}

.demo-access {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.demo-access summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.demo-access[open] summary {
  margin-bottom: 12px;
}

.demo-access .button-row {
  margin-top: 12px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.directory-toolbar,
.directory-toolbar > div {
  display: flex;
  align-items: center;
}

.directory-toolbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.directory-toolbar > div {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.directory-toolbar span,
.directory-warning span {
  color: var(--muted);
  font-size: 0.8rem;
}

.directory-warning {
  margin-bottom: 16px;
}

.directory-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.directory-stats div {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.directory-stats div:last-child {
  border-right: 0;
}

.directory-stats span,
.directory-person > div > span,
.directory-person small {
  color: #676c74;
  font-size: 0.76rem;
}

.directory-stats strong {
  color: var(--ink);
  font-size: 1.45rem;
}

.directory-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.directory-person {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(80px, 0.55fr) minmax(110px, 0.85fr) minmax(120px, 0.9fr) minmax(145px, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: transparent;
}

.directory-person.has-issues {
  border-left-color: var(--brand);
}

.directory-person > div:not(.directory-issue-list) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.directory-person strong,
.directory-person small,
.directory-person span {
  overflow-wrap: anywhere;
}

.directory-person-name span {
  color: #676c74;
  font-size: 0.78rem;
}

.directory-issue-list {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.directory-issue-list span {
  padding: 4px 7px;
  border-radius: var(--radius);
  background: #fff0f0;
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 800;
}

.directory-issue-list span.complete {
  background: #ededed;
  color: var(--ok);
}

@media (max-width: 1040px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 340px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-tabs {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 2px;
  }

  .user-menu {
    min-width: 0;
  }

  .holiday-admin-layout {
    grid-template-columns: 1fr;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .apply-workspace.grid.two {
    grid-template-columns: 1fr;
  }

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

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .apply-shell,
  .admin-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .apply-nav,
  .admin-nav {
    display: none;
  }

  .apply-workspace.grid.two > .panel:last-child {
    position: static;
  }

  .field.apply-mobile-picker,
  .field.admin-mobile-picker,
  .policy-branch-mobile {
    display: grid;
  }

  .policy-branch-tabs {
    display: none;
  }

  .submissions-panel {
    margin-left: 0;
  }

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

  .routing-config-grid {
    grid-template-columns: 1fr;
  }

  .routing-config-section {
    padding: 0 0 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .routing-config-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .line-remove {
    justify-self: start;
  }

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

@media (max-width: 720px) {
  body {
    padding-bottom: 84px;
  }

  .topbar {
    position: static;
    padding: 12px;
    backdrop-filter: none;
  }

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

  .header-wordmark {
    width: 138px;
  }

  .user-menu {
    margin-left: auto;
    gap: 8px;
  }

  .user-menu .avatar,
  .user-menu small {
    display: none;
  }

  .user-menu span {
    max-width: 120px;
    font-size: 0.9rem;
  }

  .nav-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
    padding: 8px;
    overflow-x: auto;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.22);
  }

  .nav-tab {
    min-height: 48px;
    padding: 0 8px;
    color: #fff;
    background: transparent;
    font-size: 0.76rem;
    line-height: 1.1;
    white-space: normal;
  }

  .nav-tab.active {
    color: #fff;
    background: var(--brand);
  }

  .login-visual,
  .login-panel,
  .page {
    padding: 22px;
  }

  .login-visual h1 {
    font-size: 2.55rem;
  }

  .page-title h1 {
    font-size: 1.8rem;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .attachment-dropzone {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-dropzone span {
    text-align: left;
  }

  .pending-attachment,
  .attachment-file {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .pending-attachment .attachment-size,
  .attachment-file .attachment-size {
    grid-column: 2;
  }

  .pending-attachment .attachment-remove,
  .attachment-file .attachment-file-action {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .claim-line,
  .claim-line.night-line {
    grid-template-columns: 1fr;
  }

  .claim-total {
    min-height: auto;
  }

  .workflow-form > .btn,
  .workflow-form .field.full > .btn {
    width: 100%;
  }

  .submit-field,
  .submit-field .btn {
    width: 100%;
  }

  .toast {
    right: 12px;
    bottom: 86px;
    left: 12px;
    max-width: none;
  }

  .apply-balance-panel {
    display: none;
  }

  .request-item {
    grid-template-columns: 1fr;
  }

  .request-actions {
    justify-content: flex-start;
  }

  .routing-section-heading {
    min-height: 0;
  }

  .route-summary-item {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .route-flow {
    justify-content: flex-start;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-row,
  .holiday-toolbar {
    width: 100%;
  }

  .filter-row select,
  .holiday-toolbar select,
  .filter-row .btn,
  .holiday-toolbar .btn {
    flex: 1;
  }

  .holiday-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-panel .panel-body {
    padding: 14px 8px;
  }

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

  .weekday {
    display: grid;
    min-height: 30px;
    font-size: 0.64rem;
  }

  .day-cell,
  .day-cell:nth-child(7n) {
    height: 82px;
    min-height: 82px;
    padding: 4px;
    overflow: hidden;
    border-right: 1px solid var(--line);
  }

  .day-cell:nth-child(7n) {
    border-right: 0;
  }

  .day-cell.outside {
    display: block;
  }

  .day-number {
    margin-bottom: 3px;
    font-size: 0.68rem;
  }

  .calendar-holidays {
    gap: 2px;
    margin-bottom: 3px;
  }

  .calendar-holiday {
    padding: 2px 3px;
    border-left-width: 2px;
  }

  .calendar-holiday strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.52rem;
    line-height: 1.1;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .calendar-holiday small {
    overflow: hidden;
    font-size: 0.46rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-leaves {
    max-height: 48px;
    overflow: hidden;
  }

  .leave-chip {
    margin: 1px 0;
    padding: 3px;
    border-radius: 3px;
    font-size: 0.54rem;
  }

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

  .policy-grid div {
    border-right: 0;
  }

  .policy-grid div:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .policy-grid div:last-child {
    border-bottom: 0;
  }

  .policy-field-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-visibility-grid {
    grid-template-columns: 1fr;
  }

  .policy-editor-header,
  .policy-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .policy-group-heading .policy-group-title {
    margin-bottom: 12px;
  }

  .policy-group-body {
    padding-left: 0;
  }

  .autosave-label {
    white-space: normal;
  }

  .holiday-calendar {
    grid-template-columns: 1fr;
  }

  .holiday-weekday {
    display: none;
  }

  .holiday-day,
  .holiday-day:nth-child(7n + 7) {
    min-height: 54px;
    border-right: 0;
  }

  .holiday-day.outside {
    display: none;
  }

  .holiday-pill-list {
    max-height: none;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

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

  .directory-toolbar .btn {
    width: 100%;
  }

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

  .directory-stats div:nth-child(2) {
    border-right: 0;
  }

  .directory-stats div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .stat-strip {
    gap: 8px;
  }

  .stat {
    min-height: 72px;
    padding: 12px 14px;
  }

  .stat strong {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-visual,
  .login-panel,
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .admin-panel .panel-body,
  .apply-content .panel-body {
    padding: 16px;
  }

  .panel-header {
    padding: 18px 18px 0;
  }

  .panel-body {
    padding: 18px;
  }

  .branch-assignment-alert {
    min-height: 0;
    padding: 18px;
  }

  .branch-policy-card summary {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 14px;
  }

  .branch-policy-action {
    white-space: normal;
  }

  .routing-summary-heading {
    flex-direction: column;
    gap: 6px;
  }

  .route-flow {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .route-flow strong {
    margin-left: 2px;
  }
}

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

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

  .form-identity div:last-child {
    grid-column: auto;
  }

  .balance-summary-row {
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .user-menu > div {
    display: none;
  }

  .nav-tab {
    padding: 0 3px;
    font-size: 0.68rem;
  }

}
