:root {
  color-scheme: light;
  --ink: #15132b;
  --forest: #5b39d6;
  --forest-dark: #4223ab;
  --muted: #5c5572;
  --canvas: #f5f2ff;
  --paper: #ffffff;
  --wash: #efebff;
  --line: #ddd6ef;
  --mint: #def680;
  --focus: #6545e8;
  --error: #882d25;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2 { font-weight: 700; }
h1 { font-size: clamp(2rem, 4.25vw, 3.3rem); line-height: 1.06; letter-spacing: -.045em; }
h2 { font-size: 1.5rem; line-height: 1.14; letter-spacing: -.025em; }
.primary, .secondary, .danger, .tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.primary { border-color: var(--forest); color: white; background: var(--forest); }
.primary:hover:not(:disabled) { background: var(--forest-dark); }
.secondary:hover:not(:disabled), .tab-button:hover:not(:disabled) { background: var(--wash); }
.danger { border-color: #d9aea9; color: var(--error); background: #fff8f7; }
.danger:hover:not(:disabled) { background: #f7e7e3; }
.site-header { border-bottom: 1px solid #322b53; background: #201b3a; color: white; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 1480px); margin: 0 auto; padding: 14px clamp(16px, 3.2vw, 44px); }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.identity strong { display: block; font-size: 1.14rem; font-weight: 750; line-height: 1.16; white-space: nowrap; }
.identity div > span { display: block; margin-top: 2px; color: #cfc8e7; font-size: .77rem; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border-radius: 10px; background: var(--mint); color: var(--ink); font-size: .91rem; font-weight: 750; }
.session-tools { display: flex; align-items: center; gap: 12px; min-width: 0; }
.session-tools .secondary { color: white; border-color: #6b608c; background: transparent; }
.session-tools .secondary:hover:not(:disabled) { background: #302749; }
.viewer-name { overflow-wrap: anywhere; font-weight: 650; }
.workspace { width: min(100%, 1480px); margin: 0 auto; padding: clamp(20px, 3.5vw, 48px) clamp(14px, 3.2vw, 44px); }
.auth-card { max-width: 440px; margin: clamp(10px, 6dvh, 58px) auto 0; padding: clamp(21px, 5vw, 32px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.auth-card h1 { margin-bottom: 20px; font-size: clamp(2rem, 8vw, 2.55rem); }
.auth-card#auth { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); max-width: 825px; padding: 0; border-radius: 25px; box-shadow: 0 20px 70px #25165518; overflow: hidden; }
.auth-intro { display: grid; align-content: center; justify-items: start; gap: 17px; padding: clamp(26px, 5vw, 52px); background: linear-gradient(145deg, #201b3a 15%, #3a2779); color: white; }
.auth-intro::before { content: ""; width: 52px; height: 5px; border-radius: 5px; background: var(--mint); }
.auth-intro h1 { margin: 0; font-size: clamp(2.4rem, 4vw, 3.5rem); }
.auth-intro h1:focus-visible { outline-offset: 5px; }
.auth-intro p { max-width: 24ch; color: #e4ddfb; }
.auth-panel { min-width: 0; padding: clamp(18px, 4vw, 35px); }
.auth-direction { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 18px; }
.auth-panel .stack { margin-top: 0; }
.auth-panel .stack > h2 { margin-bottom: 5px; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.auth-panel .form-error { margin: 0 0 14px; }
.auth-panel .form-action { margin-top: 8px; }
.auth-hint { color: var(--muted); }
.auth-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 14px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 9px; }
#first-access-option { display: grid; justify-items: start; gap: 3px; }
.auth-link { display: inline-flex; min-height: 44px; align-items: center; padding: 4px 0; border: 0; background: transparent; color: var(--forest-dark); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.auth-forgot { justify-self: end; }
.auth-link:hover:not(:disabled) { color: var(--ink); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--wash); }
.tab-button { border-color: transparent; background: transparent; font-size: .94rem; }
.tab-button[aria-pressed="true"] { border-color: var(--line); background: var(--paper); color: var(--forest-dark); }
.auth-card .segmented { display: flex; }
.workspace-tabs { margin-bottom: 18px; }

.team-heading { align-items: center; margin-bottom: 12px; }
.team-heading .date-field { gap: 8px; }
.team-heading input { width: auto; }
.team-queues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-card { min-width: 0; }
.team-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-bottom: 6px; }
.team-card-heading h2 { margin: 0; font-size: 1.15rem; }
.team-card-heading button { margin-left: auto; }
.team-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--forest-dark);
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.team-card > button { margin-top: 9px; }
.team-list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.team-list li { min-width: 0; padding: 6px 0; overflow-wrap: anywhere; }
.team-list li + li { border-top: 1px solid var(--line); }
.team-list strong { display: block; line-height: 1.3; }
.combo-leave-list > li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.combo-leave-list button { flex: 0 0 auto; padding-inline: 8px; font-size: .85rem; }
.team-row-meta, .team-more { display: block; font-size: .85rem; color: var(--muted); }
.team-service-list li { display: flex; align-items: baseline; gap: 9px; }
.team-service-hours { flex: 0 0 auto; white-space: nowrap; color: var(--forest-dark); font-size: .88rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.team-service-list li > div { min-width: 0; }
@media (max-width: 490px) {
  .team-heading .date-field { font-size: .84rem; }
  .team-queues { gap: 8px; }
  .team-card { padding: 10px; margin-bottom: 10px; }
  .team-card-heading { gap: 4px 6px; }
  .team-card-heading h2 { font-size: 1rem; }
  .team-card button { padding-inline: 8px; font-size: .82rem; }
  .team-card > button { width: 100%; }
  .team-list { font-size: .88rem; }
}
.stack { display: grid; gap: 6px; margin-top: 18px; }
.stack label:not(:first-child) { margin-top: 6px; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.password-toggle { min-width: 82px; padding-inline: 10px; }
label { color: var(--ink); font-size: .9rem; font-weight: 650; }
input, select { width: 100%; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid #bfb5d7; border-radius: 7px; color: var(--ink); background: var(--paper); }
small, .status { color: var(--muted); }
.form-action { margin-top: 12px; }
.form-error { margin-top: 10px; color: var(--error); font-weight: 600; }
.notice { margin-bottom: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--wash); }
.notice.is-error { border-color: #d9aea9; background: #fff1ee; color: var(--error); }
.page-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.week-heading { margin-top: 6px; color: var(--muted); }
.week-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.week-controls { display: flex; align-items: center; gap: 6px; }
.employee-preview { margin: 0 0 14px; }
.employee-preview summary {
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--forest-dark);
  cursor: pointer;
  font-weight: 700;
}
.employee-preview .status { margin: 8px 0; }
.employee-preview .week-controls, .employee-preview .date-field { flex-wrap: wrap; }
.employee-preview select { max-width: 100%; }
.icon-button { width: 42px; padding: 0; font-size: 1.65rem; }
.date-field { display: flex; align-items: center; gap: 8px; }
.date-field input { width: auto; }
.person-field, .period-field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.person-field select { width: min(234px, 100%); }
.period-field select { width: auto; }
#week-status { margin-bottom: 10px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.planning-layout-options { margin-bottom: 12px; }
.week-matrix {
  max-width: 100%;
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.week-matrix:empty { display: none; }
.employee-week {
  --person-width: 158px;
  width: 100%;
  min-width: 1090px;
  table-layout: fixed;
  border-spacing: 0;
}
.employee-week th, .employee-week td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
.employee-week tr > :last-child { border-right: 0; }
.employee-week tbody tr:last-child > * { border-bottom: 0; }
.employee-week thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  background: var(--wash);
}
.employee-week .employee-week-person {
  position: sticky;
  left: 0;
  z-index: 1;
  width: var(--person-width);
  padding: 10px;
  background: #f8f5ff;
  overflow-wrap: anywhere;
}
.employee-week thead th.employee-week-person { z-index: 3; background: var(--wash); }
.employee-week-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; }
.employee-week-date time { color: var(--muted); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.employee-week thead .employee-week-today { background: #ecf8c2; }
.employee-week tbody .employee-week-today { background: #f8fbea; }
.employee-week td { padding: 5px; }
.employee-week td .service-period { padding: 0; border: 0; }
.employee-week td .service-period + .service-period { margin-top: 7px; }
.employee-week td .day-absences { padding: 0; border: 0; margin-top: 5px; font-size: .85rem; }
.employee-week td .shift { min-height: 0; font-size: .88rem; }
.employee-week td .shift-time { white-space: nowrap; }
.employee-week-add {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  margin: 4px 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--forest);
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
}
.employee-week-add:hover, .employee-week-add:focus-visible { border-color: var(--line); background: var(--wash); }
.employee-week-empty { display: block; padding: 4px; color: var(--muted); text-align: center; }
.employee-week .employee-week-no-people { padding: 14px; color: var(--muted); }
@media (max-width: 490px) {
  .employee-week { --person-width: 105px; min-width: 1060px; }
  .employee-week .employee-week-person { padding-inline: 8px; font-size: .86rem; }
  .employee-week-add { width: 44px; min-height: 44px; }
}
.day { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.day.today { border-color: #8a9b53; }
.day-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--wash); }
.day.today .day-heading { background: #ecf8c2; }
.day-heading h2 { font: 650 .93rem/1.25 "Segoe UI", system-ui, sans-serif; letter-spacing: 0; }
.day-heading time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.day-absences { display: grid; gap: 6px; align-content: start; }
.day-absences:not(:empty) { padding: 7px; border-top: 1px solid var(--line); }
.day-empty { padding: 10px 9px; color: var(--muted); font-size: .83rem; }
.service-period {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 7px;
  border-top: 1px solid var(--line);
  --period-ink: #69440b;
  --period-wash: #fff0d8;
  --period-accent: #ad762e;
}
.service-period[data-period="afternoon"] {
  --period-ink: #165c51;
  --period-wash: #e2f2ea;
  --period-accent: #488679;
}
.service-period[data-period="evening"] {
  --period-ink: #33416c;
  --period-wash: #eaedf8;
  --period-accent: #687cab;
}
.service-period-name {
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--period-ink);
  background: var(--period-wash);
  font-size: .78rem;
  font-weight: 750;
}
.service-period-empty { display: none; }

@supports (grid-template-rows: subgrid) {
  @media (min-width: 1121px) {
    .day { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-self: stretch; }
    .service-period-empty { display: grid; }
  }
}

.shift {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 53px;
  padding: 7px 7px 7px 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--period-accent, #8a6bc7);
  border-radius: 7px;
  color: var(--ink);
  background: #faf8ff;
  text-align: left;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
button.shift:hover { background: var(--wash); }
button.shift:focus-visible { outline-offset: -2px; }
.shift-time { display: block; margin-bottom: 2px; color: var(--period-ink, var(--forest-dark)); font-weight: 750; font-variant-numeric: tabular-nums; }
.shift-name { display: block; font-weight: 650; }
.shift-position { display: block; color: var(--muted); font-size: .84rem; }
.shift-label {
  display: inline-block; max-width: 100%; margin-top: 4px; padding: 1px 7px;
  border-radius: 6px; background: #e8eef1; color: #253b4a; font-size: .78rem;
  font-weight: 600; overflow-wrap: anywhere;
}
.shift-label[data-color="green"] { background: #d9eee3; color: #164e35; }
.shift-label[data-color="blue"] { background: #e0edfb; color: #164777; }
.shift-label[data-color="purple"] { background: #eee5fa; color: #533078; }
.shift-label[data-color="amber"] { background: #f9ebc8; color: #694500; }
.shift-label[data-color="rose"] { background: #f8e3eb; color: #742e4d; }
.shift-tasks { display: block; margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--line); font-size: .8rem; }
.shift-tasks-heading { color: var(--muted); font-weight: 700; }
.shift-task { display: list-item; margin-left: 1.1em; }
.planning-absence { padding: 7px 8px; border: 1px solid #c8c0dd; border-left: 3px solid #7455a5; border-radius: 7px; background: #f2edf9; overflow-wrap: anywhere; }
.planning-absence.unavailable { background: #f4f0e4; border-color: #dfd0aa; border-left-color: #9c730d; }
.absence-kind { display: block; color: #443069; font-weight: 700; }
.unavailable .absence-kind { color: #674a0a; }
.shift.shift-conflict { border-left-color: #b96b15; }
.absence-conflict { display: block; margin-top: 2px; color: #773a08; font-size: .8rem; font-weight: 700; }
.card { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.card h2 { margin-bottom: 12px; }
.invite-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 10px; }
.invite-form input, .invite-form select, .shift-fields input, .shift-fields select { display: block; margin-top: 4px; }
.activation-result { border-color: #cdc2f3; background: var(--wash); }
dl { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0 0 10px; }
dt { color: var(--muted); font-size: .83rem; }
dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
dd code { font-size: 1rem; }
.account-list { display: grid; }
.disabled-tablets { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.disabled-tablets summary { cursor: pointer; width: fit-content; padding: 8px 0; font-weight: 650; }
.account-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.account-row:last-child { border-bottom: 0; }
.account-meta { display: block; color: var(--muted); font-size: .85rem; }
.clock-status { margin: 8px 0; }
.clock-description { color: var(--muted); }
.clock-terminal-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0; }
.clock-terminal-form label { flex: 0 1 270px; }
.clock-terminal-form input { display: block; margin-top: 4px; }
.clock-secret { margin: 9px 0; font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.badge-table-wrap { overflow-x: auto; }
.badge-table { width: 100%; min-width: 580px; border-collapse: collapse; text-align: left; }
.badge-table th, .badge-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge-table th { background: var(--wash); color: var(--forest-dark); }
.badge-table tbody tr:last-child td { border-bottom: 0; }
.badge-table time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-attention { color: var(--error); }
.annual-status { margin-bottom: 12px; }
.annual-table-wrap { overflow-x: auto; }
.annual-table { width: 100%; min-width: 580px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.annual-table th, .annual-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.annual-table thead { background: var(--wash); color: var(--forest-dark); }
.annual-table tbody tr:last-child > * { border-bottom: 0; }
.annual-table td { min-width: 83px; }
.annual-cell-title { display: none; }
.annual-cell-note { display: block; margin-top: 2px; font-size: .81rem; }
.annual-amount { white-space: nowrap; font-weight: 650; }
.annual-negative { color: var(--error); }
.annual-positive { color: var(--forest); }
.annual-missing { color: var(--muted); font-weight: 400; }
.annual-person { padding: 3px 0; border: 0; background: transparent; color: var(--forest-dark); font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.annual-person:hover { color: var(--amber); }
.annual-source { margin-top: 10px; font-size: .86rem; }
.annual-detail-header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.annual-detail-header h2 { margin: 0; }
.annual-detail-header p { margin-top: 4px; }
@media (max-width: 710px) {
  .annual-card { padding: 12px; }
  .annual-staff-table { display: block; min-width: 0; }
  .annual-staff-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .annual-staff-table tbody { display: grid; gap: 9px; }
  .annual-staff-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
  .annual-staff-table tbody tr > * { min-width: 0; padding: 0; border: 0; }
  .annual-staff-table tbody th { grid-column: 1 / -1; }
  .annual-staff-table .annual-cell-title { display: block; color: var(--muted); font-size: .77rem; }
  .annual-staff-table .annual-amount { white-space: normal; }
  .annual-person { min-height: 42px; }
}
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
dialog { width: min(530px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #15132ba6; }
.edit-form { padding: clamp(14px, 4vw, 22px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shift-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.edit-shift-label {
  min-width: 0; margin: 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 8px;
}
.edit-shift-label legend { padding: 0 4px; font-weight: 600; }
.edit-shift-tasks { min-width: 0; margin: 12px 0 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 8px; }
.edit-shift-tasks legend { padding: 0 4px; font-weight: 600; }
.shift-task-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 4px 8px; }
.shift-task-option { display: flex; min-height: 40px; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 7px; background: var(--wash); overflow-wrap: anywhere; cursor: pointer; }
.shift-task-option input { flex: 0 0 17px; width: 17px; min-height: 17px; margin: 0; padding: 0; accent-color: var(--forest); }
.shift-task-option:focus-within { outline: 2px solid var(--forest); outline-offset: 1px; }
.shift-task-create { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 8px; margin-top: 8px; }
.shift-task-create label { flex: 1 1 160px; }
.shift-task-create input { display: block; margin-top: 4px; }
.shift-task-feedback:not(:empty) { margin-top: 6px; }
.request-form { display: grid; justify-items: start; gap: 10px; max-width: 580px; }
#leave-counter-periods, .leave-counter-period dd { margin: 0; }
.leave-counter-period dd { color: var(--forest-dark); font-weight: 700; }
.request-form fieldset { display: grid; gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; width: 100%; }
.request-form select { display: block; margin-top: 4px; }
.request-timed-label { display: flex; gap: 8px; align-items: center; width: fit-content; }
.request-timed-label input { width: 17px; min-height: 17px; margin: 0; accent-color: var(--forest); }
.request-row { align-items: flex-start; }
.request-row-main { display: grid; gap: 3px; overflow-wrap: anywhere; }
.request-row-actions { display: flex; align-items: center; gap: 8px; }
.request-status { border-radius: 6px; padding: 4px 8px; font-size: .83rem; font-weight: 650; background: var(--wash); }
.request-status.approved { background: #ddecda; color: #245632; }
.request-status.declined { background: #fff1ee; color: var(--error); }
.request-decision > p { margin-top: 12px; overflow-wrap: anywhere; }
.request-leave-qualification, .request-leave-preview { margin-top: 12px; }
.request-leave-qualification fieldset { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.request-leave-qualification legend { padding: 0 4px; font-weight: 650; }
.request-leave-qualification input { display: block; width: 100%; margin-top: 4px; }
.request-leave-qualification button { justify-self: start; }
.request-leave-preview { padding: 10px 12px; border-radius: 8px; background: var(--wash); }
.request-leave-preview ul { margin: 5px 0 0; padding-left: 20px; }
.full-width { grid-column: 1 / -1; }
.confirmation { margin-top: 13px; padding: 12px; border: 1px solid #d9aea9; border-radius: 8px; background: #fff5f1; }
#overnight, #account-action-text, #clock-action-text { margin-top: 9px; }

@media (max-width: 1120px) {
  .week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .auth-card#auth { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-top: 0; }
  .auth-intro { gap: 4px; padding: 17px 20px; }
  .auth-intro::before { display: none; }
  .auth-intro h1 { font-size: 1.65rem; }
  .auth-intro p { max-width: none; }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 490px) {
  .header-inner { align-items: flex-start; }
  .session-tools { flex-direction: column; align-items: end; gap: 3px; }
  .session-tools .secondary { color: white; border-color: #6b608c; background: transparent; }
.session-tools .secondary:hover:not(:disabled) { background: #302749; }
.viewer-name { max-width: 42vw; font-size: .8rem; text-align: right; }
  .session-tools .secondary { min-height: 36px; padding: 6px 9px; font-size: .8rem; }
  .week-grid, .invite-form { grid-template-columns: minmax(0, 1fr); }
  .day-heading { padding: 8px 10px; }
  .date-field { justify-content: space-between; width: 100%; }
  .person-field { justify-content: space-between; width: 100%; }
  .account-row .actions { margin-top: 0; }
  #request-leave-periods { grid-template-columns: minmax(0, 1fr); }
}


.publication-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.badge-review { margin: 16px 0; }
.badge-review h2 { margin: 0; }
#badge-combo-today h2, #badge-combo-leaves h2 { margin-bottom: 4px; font-size: 1.15rem; }
.badge-review .account-meta { display: block; }
.badge-absence { display: block; color: #285620; font-weight: 650; }
#badge-review-status { scroll-margin-block: 20px; }
#badge-review-follow-up { margin-top: 8px; color: #285620; }
#badge-edit-person { margin-top: 8px; font-weight: 650; }
.badge-edit-evidence { margin: 8px 0 12px; }
.badge-edit-evidence ul { margin: 6px 0; padding-left: 22px; }
#badge-edit-decision { overflow-wrap: anywhere; }
#badge-review-form > label { display: grid; gap: 4px; margin-bottom: 10px; }
#badge-correction { margin-bottom: 10px; }

.planning-costs { min-width: 0; margin: 12px 0; }
.planning-costs-heading { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 10px 16px; }
.planning-costs-heading h2 { margin: 0; font-size: clamp(1.18rem, 2.8vw, 1.5rem); }
.planning-costs-caption { margin-top: 4px; font-size: .9rem; }
.planning-costs-modes { margin-top: 9px; }
.planning-costs-status { margin-top: 9px; font-size: .9rem; }
.planning-costs-scroll { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.planning-costs-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 790px; font-size: .88rem; font-variant-numeric: tabular-nums; }
.planning-costs-table th, .planning-costs-table td { padding: 8px 10px; text-align: right; white-space: nowrap; }
.planning-costs-table th { font-weight: 650; }
.planning-costs-table thead th { color: var(--ink); background: var(--wash); }
.planning-costs-table tbody > tr + tr > * { border-top: 1px solid var(--line); }
.planning-costs-table tr > :first-child { position: sticky; left: 0; width: 1%; text-align: left; border-right: 1px solid var(--line); }
.planning-costs-table tbody th:first-child { background: var(--paper); }
.planning-costs-table tr > :nth-child(2) { color: var(--forest-dark); background: var(--wash); font-weight: 700; }
.planning-costs-table .cost-unavailable { color: var(--muted); font-weight: 400; }
@media (max-width: 490px) {
  .planning-costs { padding: 12px; }
  .planning-costs-heading .secondary { width: 100%; }
  .planning-costs-table th, .planning-costs-table td { padding: 7px 8px; }
  .planning-costs-table tr > :first-child { max-width: 118px; white-space: normal; }
}

.planning-costs-table .cost-partial { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; }

#accounts-panel .card > .account-help { color: var(--muted); margin: 6px 0 12px; }
.account-search { display: grid; gap: 4px; max-width: 360px; margin-bottom: 12px; }
#add-planning-person { scroll-margin-top: 12px; }
#add-planning-person form ~ .account-help { margin-top: 12px; }
#result-copy-text { display: block; width: 100%; margin-top: 8px; padding: 8px; font: inherit; }
#result-copy-status { margin: 8px 0; }
#result-instructions { margin-bottom: 10px; }
#result-link { overflow-wrap: anywhere; }
