:root {
  --bg: #080b10;
  --surface: #111720;
  --surface-raised: #17202b;
  --surface-soft: #1d2734;
  --surface-hover: #273548;
  --line: #324154;
  --line-strong: #53677f;
  --text: #f8fafc;
  --muted: #c2cad7;
  --soft: #8e9aab;
  --primary: #22d3ee;
  --primary-dark: #0891b2;
  --primary-ink: #031217;
  --amber: #fbbf24;
  --danger: #ff5d62;
  --weekend: #202b38;
  --holiday: #3c4658;
  --school: #725013;
  --fixfree: #47576d;
  --wish: #fffaa3;
  --vac-pending: #fffaa3;
  --vac-approved: #05b85f;
  --glz: #fff200;
  --service: #00484d;
  --weekend-service: #baffbf;
  --selected: #b8f4ff;
  --table-bg: #090d13;
  --table-head: #151d27;
  --table-head-strong: #0f151d;
  --table-line: #2b3543;
  --duty-note-row: rgba(15, 23, 42, 0.68);
  --duty-note-input-bg: #17202b;
  --duty-note-input-border: #53677f;
  --duty-note-input-text: #f8fafc;
  --topbar: #0b0f15;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.46);
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

:root[data-theme="light"] {
  --bg: #edf2f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #e8eef5;
  --surface-hover: #dbe5ef;
  --line: #b2c1d2;
  --line-strong: #748aa3;
  --text: #102033;
  --muted: #475569;
  --soft: #64748b;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-ink: #f8fbff;
  --amber: #b7791f;
  --danger: #dc2626;
  --weekend: #cfe1f7;
  --holiday: #b7c7d9;
  --school: #f7d85b;
  --fixfree: #aebdf8;
  --wish: #fffaa3;
  --vac-pending: #fffaa3;
  --vac-approved: #05b85f;
  --glz: #fff200;
  --service: #00484d;
  --weekend-service: #baffbf;
  --selected: #075985;
  --table-bg: #f7fbff;
  --table-head: #dce6f1;
  --table-head-strong: #c7d5e5;
  --table-line: #879bb1;
  --duty-note-row: rgba(226, 232, 240, 0.62);
  --duty-note-input-bg: rgba(255, 255, 255, 0.78);
  --duty-note-input-border: #879bb1;
  --duty-note-input-text: #111827;
  --topbar: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-width: 1040px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

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

button, .file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 8px 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease;
}

button:hover, .file-button:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}

button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .file-button:focus-within {
  outline: 2px solid rgba(34, 211, 238, 0.78);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
  font-weight: 850;
}

button.primary:hover {
  background: #67e8f9;
  border-color: #67e8f9;
}

button.danger {
  background: #45181e;
  border-color: #8a3039;
  color: #ffe2e3;
}

button.danger:hover {
  background: #64212a;
  border-color: #c2414d;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 7, 18, 0.44);
  backdrop-filter: blur(3px);
}

.busy-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: min(360px, calc(100vw - 44px));
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 850;
}

.busy-spinner {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(148, 163, 184, 0.32);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: busy-spin 0.78s linear infinite;
}

.busy-message {
  min-width: 0;
  line-height: 1.35;
}

@keyframes busy-spin {
  to { transform: rotate(360deg); }
}

.icon-button {
  width: 34px;
  padding: 0;
}

input, select, textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

select {
  padding-right: 30px;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--line-strong);
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(8, 11, 16, 0.34), rgba(8, 11, 16, 0.62)),
    url("BG.png"),
    url("BG");
  background-color: var(--bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.login-card {
  position: relative;
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 42px 30px 15px;
  border: 1px solid rgba(125, 205, 232, 0.48);
  border-radius: 18px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.07) inset,
    0 0 22px rgba(34, 211, 238, 0.18),
    0 18px 55px rgba(0, 0, 0, 0.46);
}

.login-card h1 {
  font-size: 30px;
  font-weight: 750;
}

.login-card .eyebrow {
  font-size: 15px;
  line-height: 1.15;
}

.login-heading {
  min-height: 62px;
  display: grid;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.login-heading .eyebrow {
  margin: 0;
  color: #f8fafc;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.login-heading .eyebrow span:last-child {
  color: var(--primary);
  font-weight: 650;
}

.login-mobile-badge {
  display: none;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.login-field-control {
  position: relative;
  display: block;
}

.login-field-control input,
.login-field-control select {
  min-height: 44px;
  padding-left: 44px;
}

.login-password-control input {
  padding-right: 46px;
}

.login-field-icon,
.login-password-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--soft);
  pointer-events: none;
  transform: translateY(-50%);
}

.login-select-control select {
  appearance: none;
  padding-right: 42px;
}

.login-select-control::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
  transform: translateY(-64%) rotate(45deg);
}

.login-password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transform: translateY(-50%);
}

.login-password-toggle:hover {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}

.login-password-toggle:active {
  transform: translateY(calc(-50% + 1px));
}

.login-password-toggle svg {
  width: 21px;
  height: 21px;
}

.login-card > button.primary[type="submit"] {
  margin-top: 15px;
}

.login-warning-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border: 2px solid var(--danger);
  border-radius: 8px;
  background: rgba(255, 93, 98, 0.12);
  color: var(--text);
}

.login-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.login-warning-box strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 14px;
}

.login-warning-box p {
  margin: 0;
  color: #ffe5e7;
  font-size: 13px;
  line-height: 1.45;
}

:root[data-theme="light"] .login-warning-box {
  background: #fff1f2;
  color: #7f1d1d;
}

:root[data-theme="light"] .login-warning-box strong {
  color: #7f1d1d;
}

:root[data-theme="light"] .login-warning-box p {
  color: #991b1b;
}

.startup-error-card {
  align-content: start;
}

.error-text {
  color: #ffe1e3;
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 {
  color: #d8dee8;
  font-size: 15px;
  font-weight: 800;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: inherit;
  font-weight: inherit;
  box-shadow: none;
}

.brand-home:hover {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
}

.brand-home:active {
  transform: none;
}

.brand-logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

.brand:has(.brand-logo:not([hidden])) .brand-home::before {
  display: none;
}

.brand-home::before {
  content: "";
  width: 30px;
  height: 30px;
  border: 1px solid rgba(34, 211, 238, 0.52);
  border-radius: 8px;
  background:
    radial-gradient(circle at 9px 21px, var(--primary) 0 2px, transparent 2px),
    radial-gradient(circle at 16px 21px, rgba(248, 250, 252, 0.72) 0 2px, transparent 2px),
    radial-gradient(circle at 23px 21px, rgba(248, 250, 252, 0.72) 0 2px, transparent 2px),
    linear-gradient(var(--primary) 0 9px, transparent 9px),
    linear-gradient(90deg, transparent 8px, rgba(255, 255, 255, 0.14) 8px 9px, transparent 9px 15px, rgba(255, 255, 255, 0.14) 15px 16px, transparent 16px 22px, rgba(255, 255, 255, 0.14) 22px 23px, transparent 23px),
    var(--surface-soft);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.18), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.info-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid rgba(56, 189, 248, 0.82);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

.topbar .info-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
}

.info-button:hover {
  border-color: rgba(125, 211, 252, 0.96);
  background: rgba(14, 165, 233, 0.24);
  color: #e0f2fe;
}

.topbar-spacer { flex: 1; }

.theme-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 4px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.theme-control select {
  width: auto;
  min-height: 24px;
  padding: 2px 22px 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.duty-freshness-chip {
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.1);
  color: var(--text);
  font-weight: 850;
}

.duty-freshness-chip.stale {
  border-color: #ef4444;
  background: #7f1d1d;
  color: #ffffff;
}

.topbar .file-button,
.topbar button {
  min-height: 34px;
  padding: 7px 10px;
}

.balance-bar {
  display: grid;
  grid-template-columns: minmax(800px, 1.75fr) 1px minmax(180px, 0.7fr) 1px minmax(180px, 0.7fr) max-content;
  align-items: center;
  gap: 10px;
  margin: 10px 18px 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.balance-bar[hidden] {
  display: none;
}

.admin-balance-bar {
  grid-template-columns: minmax(0, max-content) minmax(12px, 1fr) max-content;
  justify-content: stretch;
  column-gap: 12px;
}

.balance-actions {
  grid-column: -2 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  justify-self: end;
}

.balance-actions .icon-button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
}

.admin-balance-bar .balance-actions {
  grid-column: 3;
  justify-self: end;
}

.approval-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.approval-mode-control select {
  min-width: 136px;
  min-height: 34px;
  padding: 6px 28px 6px 9px;
}

.calendar-notice-stack {
  grid-column: 1;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.admin-balance-bar .calendar-notice-stack {
  max-width: 620px;
}

.calendar-notice-stack:empty {
  display: none;
}

.calendar-announcement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: min(720px, 100%);
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid rgba(14, 165, 233, 0.68);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.13);
  color: #dff6ff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.07), 0 0 14px rgba(14, 165, 233, 0.12);
}

.calendar-announcement::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 9px rgba(56, 189, 248, 0.62);
}

.calendar-announcement strong,
.calendar-announcement span,
.calendar-announcement p {
  display: block;
}

.calendar-announcement strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.calendar-announcement span {
  margin-top: 2px;
  color: rgba(223, 246, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.calendar-announcement p {
  margin: 4px 0 0;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
}

.announcement-message-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}

.calendar-announcement .announcement-message-line strong,
.calendar-announcement .announcement-message-line span {
  display: inline;
  margin: 0;
}

.calendar-announcement .announcement-message-line span {
  color: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
}

.calendar-announcement.announcement-warning {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(245, 158, 11, 0.15);
  color: #ffedd5;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08), 0 0 14px rgba(245, 158, 11, 0.14);
}

.calendar-announcement.announcement-warning::before {
  background: #f59e0b;
  box-shadow: 0 0 9px rgba(245, 158, 11, 0.62);
}

.calendar-announcement.announcement-important {
  border-color: rgba(255, 93, 98, 0.76);
  background: rgba(255, 93, 98, 0.15);
  color: #ffe1e3;
  box-shadow: 0 0 0 1px rgba(255, 93, 98, 0.08), 0 0 14px rgba(255, 93, 98, 0.14);
}

.calendar-announcement.announcement-important::before {
  background: #ff5d62;
  box-shadow: 0 0 9px rgba(255, 93, 98, 0.62);
}

.calendar-announcement.course-range-notice {
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: min(720px, 100%);
  border-color: rgba(139, 92, 246, 0.78);
  background: rgba(124, 58, 237, 0.18);
  color: #ede9fe;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.1), 0 0 14px rgba(124, 58, 237, 0.16);
}

.calendar-announcement.course-range-notice::before {
  background: #a78bfa;
  box-shadow: 0 0 9px rgba(167, 139, 250, 0.62);
}

.calendar-announcement.course-range-notice:hover {
  background: rgba(124, 58, 237, 0.24);
}

.course-range-notice-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}

.calendar-announcement.course-range-notice .course-range-notice-line strong,
.calendar-announcement.course-range-notice .course-range-notice-line span {
  display: inline;
  margin: 0;
}

.calendar-announcement.course-range-notice .course-range-notice-line strong {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 950;
}

.calendar-announcement.course-range-notice .course-range-notice-line span {
  color: rgba(237, 233, 254, 0.82);
  font-size: 14px;
  font-weight: 750;
}

.calendar-announcement.course-range-notice .course-range-notice-info {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-announcement.course-range-notice .course-range-notice-window {
  flex: 0 0 auto;
}

.calendar-announcement.course-range-notice .announcement-dismiss {
  width: 22px;
  min-height: 22px;
  border-radius: 5px;
  font-size: 15px;
}

.announcement-dismiss {
  width: 28px;
  min-height: 28px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
}

.topbar-menu {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.topbar-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 190px;
  height: 8px;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 138px;
  justify-content: flex-start;
  font-weight: 850;
}

.menu-bars {
  display: inline-grid;
  gap: 3px;
  width: 15px;
}

.menu-bars span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topbar-menu:hover .menu-popover,
.topbar-menu:focus-within .menu-popover,
.menu-popover:hover {
  display: grid;
  gap: 4px;
}

.balance-user {
  display: grid;
  grid-template-columns: max-content minmax(0, max-content);
  grid-template-rows: auto auto;
  column-gap: 28px;
  align-items: center;
  min-width: 0;
}

.balance-headline {
  display: contents;
}

.balance-title {
  grid-column: 1;
  grid-row: 1;
  color: #d7deea;
  font-size: 12px;
  font-weight: 750;
}

.booking-info {
  align-self: center;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid rgba(34, 197, 94, 0.66);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #dcfce7;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08), 0 0 14px rgba(34, 197, 94, 0.16);
}

.booking-info::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 9px rgba(34, 197, 94, 0.62);
}

.booking-info.message-notice {
  border-color: rgba(14, 165, 233, 0.72);
  background: rgba(14, 165, 233, 0.16);
  color: #dff6ff;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.08), 0 0 14px rgba(14, 165, 233, 0.16);
}

.carryover-reminder {
  align-self: center;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid rgba(56, 189, 248, 0.68);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #dff6ff;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.08), 0 0 14px rgba(14, 165, 233, 0.14);
}

.carryover-reminder::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 9px rgba(56, 189, 248, 0.62);
}

.booking-info.message-notice::before {
  background: #38bdf8;
  box-shadow: 0 0 9px rgba(56, 189, 248, 0.62);
}

button.booking-info.message-notice:hover {
  border-color: rgba(14, 165, 233, 0.95);
  background: rgba(14, 165, 233, 0.24);
}

button.booking-info {
  width: fit-content;
  cursor: pointer;
}

button.booking-info:hover {
  border-color: rgba(34, 197, 94, 0.92);
  background: rgba(34, 197, 94, 0.24);
}

.balance-user strong {
  grid-column: 1;
  grid-row: 2;
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-calendar-status {
  grid-column: 1 / -2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: start;
  min-width: 0;
}

.admin-balance-bar .admin-calendar-status {
  grid-column: 1;
  display: grid;
  grid-template-columns: max-content repeat(3, max-content);
  align-items: center;
  row-gap: 6px;
  max-width: none;
}

.admin-balance-bar .admin-calendar-status-title {
  grid-row: 1 / span 2;
  align-self: center;
}

.admin-calendar-status-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(34, 179, 108, 0.52);
  border-radius: 999px;
  background: rgba(34, 179, 108, 0.12);
  color: #b9f6d3;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

button.admin-status-pill {
  min-height: 30px;
  line-height: 1;
  box-shadow: none;
}

button.admin-status-pill:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.12);
  color: #cffafe;
}

button.admin-status-pill.open:hover {
  border-color: rgba(245, 158, 11, 0.86);
  background: rgba(245, 158, 11, 0.22);
  color: #ffedd5;
}

.admin-status-pill strong {
  font-size: 15px;
  line-height: 1;
}

.admin-status-pill.open {
  border-color: rgba(245, 158, 11, 0.62);
  background: rgba(245, 158, 11, 0.15);
  color: #fed7aa;
}

.balance-box {
  display: grid;
  grid-template-columns: minmax(150px, max-content) max-content;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.balance-main {
  min-width: 0;
}

.balance-value {
  display: inline-block;
  margin-top: 2px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
}

.balance-subline {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.balance-breakdown {
  display: grid;
  gap: 2px;
  min-width: 118px;
  padding: 5px 9px;
  border: 1px solid rgba(245, 158, 11, 0.72);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.balance-breakdown strong {
  color: #ffd998;
}

.balance-breakdown-title {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pending-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.54);
  background: rgba(245, 158, 11, 0.14);
  color: #ffd998;
  font-size: 12px;
  font-weight: 850;
}

.divider {
  width: 1px;
  height: 34px;
  background: var(--line);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 18px 0;
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1017;
}

.tab-button {
  min-width: 96px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.tab-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.tab-button[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
  font-weight: 900;
}

.menu-popover .tab-button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.menu-popover .tab-button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.menu-popover .tab-button[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-ink);
}

.view {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px 18px 18px;
}

.toolbar {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 8px;
  row-gap: 8px;
  flex-wrap: wrap;
}

.view > .toolbar {
  min-height: 0;
  height: auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.view > .toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.view > .toolbar select,
.view > .toolbar input {
  width: auto;
  min-width: 82px;
}

.view > .toolbar .calendar-year-control,
.view > .toolbar .calendar-month-control {
  min-width: 82px;
}

.view > .toolbar .calendar-week-control,
.view > .toolbar .calendar-weeks-control {
  min-width: 64px;
}

.calendar-import-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.calendar-import-toggle input {
  margin: 0;
  min-width: 0;
}

.duty-planner-toolbar > :not(#toggle-duty-planner-mode):not(.duty-planner-mode-label):not(.duty-planner-month-control):not(.duty-planner-test-warning):not(.grow):not(#duty-planner-settings-shortcut) {
  display: none;
}

.duty-planner-mode-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-weight: 700;
}

.duty-planner-month-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  white-space: nowrap;
}

.view > .toolbar .duty-planner-month-control select {
  min-width: 250px;
}

.duty-planner-test-warning {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.admin-mode-duty > section:not([data-admin-mode="duty"]),
.admin-mode-vacation > section[data-admin-mode="duty"] {
  display: none;
}

#year-select {
  width: 78px;
  min-width: 78px;
}

#month-select {
  width: 116px;
  min-width: 116px;
}

#week-select {
  width: 64px;
  min-width: 64px;
}

#weeks-input {
  width: 58px;
  min-width: 58px;
}

.view > .toolbar button {
  min-height: 34px;
  padding: 7px 10px;
}

.toolbar label {
  width: auto;
  min-width: 92px;
}

.toolbar select,
.toolbar input {
  min-width: 90px;
}

.toolbar .grow { flex: 1; }

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

.admin-holiday-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.admin-holiday-actions select {
  min-width: 92px;
}

.summary-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.32);
}

.summary-filter.has-warning {
  border-color: rgba(255, 93, 98, 0.78);
  box-shadow: 0 0 0 2px rgba(255, 93, 98, 0.12);
}

.summary-filter legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-filter label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.summary-filter label:has(input:checked) {
  background: var(--primary);
  color: var(--primary-ink);
}

.summary-filter label.has-warning {
  border: 1px solid rgba(255, 93, 98, 0.46);
}

.summary-filter-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  margin-left: 3px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.summary-detail-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.summary-detail-user-name {
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.summary-filter input {
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.summary-year-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-left: 4px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

select.has-warning {
  border-color: rgba(255, 93, 98, 0.75);
  box-shadow: 0 0 0 2px rgba(255, 93, 98, 0.12);
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px;
  color: #d3dae5;
  font-size: 13px;
}

.legend-primary,
.legend-extra {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.legend-item {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

.legend .badge {
  width: auto;
  min-width: 30px;
  height: 22px;
  padding: 0 5px;
  font-size: 12px;
}

.legend-toggle {
  display: inline-grid;
  place-items: center;
  width: 26px;
  min-width: 26px;
  min-height: 24px;
  padding: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.legend-toggle span {
  transform: translateY(-1px);
}

.admin-card-content {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.055);
}

.email-notification-settings {
  display: grid;
  gap: 14px;
}

.email-notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(194, 202, 215, 0.18);
}

.email-notification-title-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.email-notification-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 8px 10px;
  border: 1px solid rgba(194, 202, 215, 0.22);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.24);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.email-notification-toggle input,
.email-event-option input {
  width: auto;
  min-width: 16px;
  min-height: 16px;
}

.email-recipient-field {
  display: grid;
  gap: 7px;
  max-width: 860px;
}

.email-recipient-hint {
  max-width: none;
  white-space: nowrap;
}

.email-delivery-grid {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(140px, 170px) minmax(150px, 190px) minmax(190px, 225px) minmax(190px, 210px) minmax(610px, 1fr);
  gap: 10px;
  align-items: end;
  justify-content: start;
}

.email-delivery-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.email-delivery-grid label.is-disabled {
  opacity: 0.48;
}

.email-delivery-grid .inline-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#email-notification-debounce-minutes {
  width: 92px;
}

#email-notification-digest-scope {
  width: 100%;
}

.email-delivery-notes {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.email-digest-scope-info {
  align-self: end;
}

.email-delivery-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.email-delivery-info-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(34, 211, 238, 0.6);
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.12);
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
}

.email-event-title {
  margin-bottom: -4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.email-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.email-event-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(194, 202, 215, 0.2);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.32);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.email-notification-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.email-notification-note {
  padding: 9px 10px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.075);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.email-notification-note code {
  color: var(--text);
  font-weight: 950;
}

@media (max-width: 920px) {
  .email-notification-head,
  .email-notification-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .email-notification-title-row {
    flex-direction: column;
  }

  .email-delivery-grid {
    grid-template-columns: 1fr;
  }

  .email-delivery-info {
    justify-self: start;
  }
}

.admin-collapsible {
  overflow: hidden;
}

.admin-collapsible-header {
  min-height: 42px;
  padding: 2px 0;
}

.admin-collapsible-header h3 {
  flex: 1 1 auto;
}

.admin-collapsible-extra {
  display: contents;
}

.admin-collapsible-body {
  display: grid;
  gap: 12px;
}

.admin-collapsible.collapsed .admin-collapsible-extra,
.admin-collapsible.collapsed .admin-collapsible-body {
  display: none;
}

.admin-collapsible-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin: 0;
  font-size: 17px;
  cursor: pointer;
  user-select: none;
}

.admin-collapsible-title::before {
  content: "▾";
  display: inline-block;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.admin-collapsible.collapsed .admin-collapsible-title::before {
  content: "▸";
}

.admin-collapsible-title:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.78);
  outline-offset: 3px;
  border-radius: 6px;
}

.settings-strip {
  display: grid;
  grid-template-columns: minmax(280px, max-content) minmax(250px, max-content) minmax(300px, max-content) minmax(420px, 1fr);
  align-items: flex-start;
  gap: 14px;
}

.settings-group {
  display: grid;
  gap: 7px;
  align-content: start;
}

.settings-strip label {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

.settings-strip > button,
.settings-save-row {
  grid-column: 1 / -1;
  grid-row: 6;
  justify-self: center;
  align-self: end;
  margin-top: 0;
  margin-left: 0;
}

.settings-save-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.booking-settings {
  grid-column: 1;
  grid-row: 1;
  min-width: 300px;
}

.max-window-settings {
  grid-column: 2;
  grid-row: 1;
}

.absence-limit-settings {
  grid-column: 3;
  grid-row: 1;
  padding-left: 16px;
  border-left: 1px solid rgba(194, 202, 215, 0.28);
}

.vacation-recall-settings {
  grid-column: 1 / span 3;
  grid-row: 2;
  padding-top: 12px;
  border-top: 1px solid rgba(194, 202, 215, 0.2);
  grid-template-columns: max-content max-content 1fr;
  column-gap: 22px;
  row-gap: 7px;
}

.vacation-recall-settings .settings-group-title,
.vacation-recall-settings .settings-hint {
  grid-column: 1 / -1;
}

.vacation-recall-hint {
  white-space: nowrap;
  max-width: none;
}

.vacation-recall-settings label.checkbox-line {
  margin-top: 0;
}

.absence-limit-type-settings {
  grid-column: 4;
  grid-row: 1 / span 3;
  min-width: min(520px, 100%);
  padding-left: 16px;
  border-left: 1px solid rgba(194, 202, 215, 0.28);
}

.glz-request-settings {
  grid-column: 4;
  grid-row: 4 / span 2;
  min-width: min(520px, 100%);
  padding-top: 12px;
  padding-left: 16px;
  border-left: 1px solid rgba(194, 202, 215, 0.28);
  border-top: 1px solid rgba(194, 202, 215, 0.2);
  grid-template-columns: minmax(0, max-content) minmax(0, max-content);
  column-gap: 24px;
  row-gap: 7px;
}

.glz-request-settings label {
  min-width: 0;
}

.glz-request-settings .settings-hint {
  grid-column: 1 / -1;
}

.glz-request-settings .settings-group-title {
  grid-column: 1;
  grid-row: 1;
}

.glz-request-settings .glz-same-line {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  margin-left: 128px;
  margin-top: 0;
  white-space: nowrap;
}

.glz-request-settings label:nth-of-type(2) {
  grid-column: 1;
}

.glz-request-settings label:nth-of-type(3) {
  grid-column: 2;
}

.glz-request-settings label:nth-of-type(4) {
  grid-column: 2;
  grid-row: 3;
}

.glz-request-settings label:nth-of-type(5) {
  grid-column: 1;
  grid-row: 3;
}

.glz-request-settings #glz-request-vacation-days-threshold {
  width: 64px;
}

.glz-request-settings .settings-hint {
  grid-row: 4;
}

.settings-group-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.absence-limit-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 6px 10px;
}

.absence-limit-type-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.absence-limit-type-grid input {
  width: auto;
}

.vacation-carryover-settings {
  grid-column: 1 / span 2;
  grid-row: 4;
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(194, 202, 215, 0.2);
  grid-template-columns: minmax(230px, max-content) 86px max-content max-content max-content 1fr;
  column-gap: 2px;
  row-gap: 7px;
}

.vacation-carryover-settings label.checkbox-line {
  margin-right: 28px;
}

.vacation-carryover-settings label {
  min-width: 0;
}

#vacation-carryover-max-days {
  width: 66px;
}

.vacation-carryover-settings .carryover-warning-line {
  margin: 0 0 0 4px;
  align-self: end;
}

.vacation-carryover-settings .settings-group-title {
  grid-column: 1 / -1;
}

.vacation-carryover-settings .settings-hint {
  grid-column: 1 / -1;
  white-space: nowrap;
}

.vacation-remainder-roundup-settings {
  grid-column: 1 / span 2;
  grid-row: 5;
  min-width: 0;
  padding-top: 12px;
  border-top: 0;
  grid-template-columns: minmax(0, 300px) minmax(0, 260px);
  column-gap: 18px;
  row-gap: 7px;
  position: relative;
  overflow: visible;
}

.vacation-remainder-roundup-settings::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 416px);
  border-top: 1px solid rgba(194, 202, 215, 0.2);
  pointer-events: none;
}

.vacation-remainder-roundup-settings .settings-group-title,
.vacation-remainder-roundup-settings .settings-hint {
  grid-column: 1 / -1;
}

#vacation-remainder-next-year-balance-line {
  position: absolute;
  left: 596px;
  top: 48px;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  z-index: 1;
}

#vacation-remainder-next-year-balance-line span {
  min-width: 0;
}

.vacation-remainder-roundup-hint,
.settings-save-status {
  white-space: nowrap;
}

.settings-save-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
}

.vacation-two-week-settings {
  grid-column: 3;
  grid-row: 4;
  min-width: 280px;
  padding-top: 12px;
  padding-left: 16px;
  border-top: 1px solid rgba(194, 202, 215, 0.2);
  border-left: 1px solid rgba(194, 202, 215, 0.28);
}

.vacation-two-week-settings .settings-hint {
  max-width: 300px;
}

.settings-strip label.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  margin-top: -9px;
}

.checkbox-line input {
  width: auto;
}

.approval-confirm-settings {
  display: grid;
  justify-items: start;
  align-items: start;
  gap: 6px;
  padding-bottom: 10px;
}

.approval-confirm-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  width: auto;
  min-width: 0;
}

.approval-confirm-line input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--primary);
}

.approval-confirm-line span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.approval-confirm-settings .settings-hint,
.approval-confirm-settings .status {
  justify-self: start;
  text-align: left;
}

.approval-confirm-settings .settings-hint {
  max-width: none;
  white-space: nowrap;
}

.approval-confirm-settings .status:empty {
  display: none;
}

.vacation-warning-settings {
  grid-column: 1 / span 3;
  grid-row: 3;
  padding-top: 12px;
  border-top: 1px solid rgba(194, 202, 215, 0.2);
  grid-template-columns: repeat(3, minmax(118px, max-content)) max-content;
  column-gap: 10px;
  row-gap: 7px;
}

.vacation-warning-settings .settings-hint {
  grid-column: 1 / -1;
  max-width: none;
  white-space: nowrap;
}

.vacation-warning-test,
.carryover-warning-test {
  align-self: end;
  width: 76px;
  min-height: 36px;
  padding: 8px 12px;
}

.carryover-warning-test {
  transform: translateY(-2px);
}

.inline-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
}

.settings-strip .inline-control input {
  width: 52px;
}

.duty-preferred-after-settings {
  display: grid;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(194, 202, 215, 0.2);
}

#duty-preferred-after-rules {
  display: grid;
  gap: 6px;
}

.duty-preferred-after-rule {
  display: grid;
  grid-template-columns: max-content minmax(86px, 1fr) max-content minmax(86px, 1fr) 34px;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.duty-preferred-after-rule select {
  min-width: 0;
}

.duty-preferred-after-rule button,
#add-duty-preferred-after-rule {
  min-height: 34px;
  padding: 7px 10px;
}

#add-duty-preferred-after-rule {
  justify-self: start;
}

@media (max-width: 1350px) {
  .settings-strip {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .booking-settings,
  .max-window-settings,
  .absence-limit-settings,
  .vacation-recall-settings,
  .absence-limit-type-settings,
  .glz-request-settings,
  .vacation-two-week-settings,
  .vacation-warning-settings,
  .vacation-carryover-settings,
  .vacation-remainder-roundup-settings {
    grid-column: auto;
    grid-row: auto;
  }

  .settings-strip > button,
  .settings-save-row {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .absence-limit-type-settings,
  .glz-request-settings,
  .vacation-recall-settings,
  .vacation-two-week-settings,
  .vacation-warning-settings,
  .vacation-carryover-settings,
  .vacation-remainder-roundup-settings {
    grid-column: 1 / -1;
  }

  #vacation-remainder-next-year-balance-line {
    position: static;
    grid-column: 1 / -1;
    grid-row: auto;
    white-space: normal;
  }
}

.settings-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  max-width: 330px;
  line-height: 1.35;
}

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

.schedule-upload-box {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 106px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.schedule-upload-box h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

.admin-upload-actions {
  gap: 10px;
}

.admin-upload-actions .file-button,
.admin-upload-actions button {
  min-width: 118px;
  justify-content: center;
  text-align: center;
}

.admin-upload-actions .danger:disabled {
  background: rgba(255, 93, 98, 0.08);
  border-color: rgba(255, 93, 98, 0.28);
  color: rgba(248, 250, 252, 0.52);
}

.schedule-upload-box .status {
  min-height: 0;
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .upload-split-box {
    grid-template-columns: 1fr;
  }
}

.wish-reminder {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  width: fit-content;
  max-width: min(100%, 1820px);
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid rgba(255, 93, 98, 0.72);
  border-radius: 999px;
  background: rgba(255, 93, 98, 0.16);
  color: #ffe1e3;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  animation: wishPulse 1.2s ease-in-out infinite;
}

.wish-reminder span {
  min-width: 0;
}

.wish-reminder::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff5d62;
  box-shadow: 0 0 9px rgba(255, 93, 98, 0.62);
}

.wish-reminder strong {
  color: #ffffff;
  text-decoration: underline;
  white-space: nowrap;
}

.vacation-planning-warning {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid rgba(245, 158, 11, 0.72);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #ffedd5;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.vacation-planning-warning span,
.vacation-planning-warning strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vacation-planning-warning::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 9px rgba(245, 158, 11, 0.62);
}

.vacation-planning-warning strong {
  color: #ffffff;
  white-space: nowrap;
}

@keyframes wishPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 93, 98, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 93, 98, 0.48);
  }
}

.wish-card,
.wish-round-admin {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.wish-card + .wish-card {
  margin-top: 12px;
}

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

.wish-round-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(194, 202, 215, 0.24);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  vertical-align: middle;
}

.wish-round-status.active {
  border-color: rgba(52, 211, 153, 0.45);
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
}

.wish-round-status.pending {
  border-color: rgba(251, 191, 36, 0.42);
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.wish-round-status.closed {
  border-color: rgba(255, 93, 98, 0.42);
  color: #ff8a8d;
  background: rgba(255, 93, 98, 0.08);
}

.wish-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.wish-card-head > div {
  display: grid;
  gap: 4px;
}

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

.wish-card-actions button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.wish-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.wish-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wish-status.done {
  color: #b9f6d3;
  border-color: rgba(34, 179, 108, 0.55);
  background: rgba(34, 179, 108, 0.13);
}

.wish-status.open {
  color: #fed7aa;
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(245, 158, 11, 0.14);
}

.wish-status.rejected {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.12);
}

.wish-summary-items {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wish-decision-form {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(194, 202, 215, 0.18);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.28);
}

.wish-decision-head,
.wish-decision-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wish-decision-head > div,
.wish-decision-user-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wish-decision-head span,
.wish-decision-user-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.wish-decision-users {
  display: grid;
  gap: 9px;
}

.wish-decision-user {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(194, 202, 215, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
}

.wish-decision-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wish-decision-items {
  display: grid;
  gap: 7px;
}

.wish-decision-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(118px, auto) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px;
  border: 1px solid rgba(194, 202, 215, 0.12);
  border-radius: 7px;
  background: rgba(8, 11, 16, 0.26);
}

.wish-decision-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wish-decision-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.wish-decision-conflict {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 6px;
  justify-content: center;
  min-width: 112px;
  padding: 5px 8px;
  border: 1px solid rgba(194, 202, 215, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.wish-decision-conflict strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

.wish-decision-options {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.34);
}

.wish-decision-options label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.wish-decision-options label:has(input:checked) {
  background: var(--primary);
  color: var(--primary-ink);
}

.wish-decision-options input {
  position: absolute;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.wish-section {
  display: grid;
  gap: 8px;
}

.wish-section-title,
.wish-round-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

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

.message-item {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.34);
}

.message-item[open] {
  padding-bottom: 14px;
}

.message-item.unread {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.09);
  box-shadow: inset 3px 0 0 var(--primary);
}

.message-summary {
  display: grid;
  grid-template-columns: 14px minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  cursor: pointer;
  list-style: none;
}

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

.message-summary::marker {
  content: "";
}

.message-summary::before {
  content: ">";
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.message-item[open] .message-summary::before {
  transform: rotate(90deg);
}

.message-summary-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.message-summary-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-summary-main strong {
  color: var(--text);
}

.message-thread {
  display: grid;
  gap: 8px;
}

.message-entry {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid rgba(194, 202, 215, 0.18);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.28);
}

.message-entry.sent {
  margin-left: min(34px, 6vw);
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(52, 211, 153, 0.07);
}

.message-entry.received {
  margin-right: min(34px, 6vw);
}

.message-entry.unread {
  border-color: rgba(34, 211, 238, 0.62);
}

.message-head,
.message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-entry .message-actions {
  align-items: flex-end;
  margin-top: 4px;
  padding-top: 6px;
}

.message-thread + .message-actions {
  margin-top: 5px;
}

.message-action-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.message-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.38;
}

.message-warning-line {
  color: #fecaca;
  font-weight: 800;
}

@media (max-width: 720px) {
  .message-summary {
    position: relative;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .message-summary::before {
    position: absolute;
  }

  .message-summary-main {
    padding-left: 18px;
  }
}

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

.wish-check-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.wish-check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(194, 202, 215, 0.18);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.38);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.wish-check-grid input {
  width: auto;
  min-height: 0;
}

.wish-admin-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wish-year-control {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  margin: 0 0 8px 12px;
}

.wish-year-control label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calendar-entry-admin {
  display: grid;
  gap: 12px;
}

.calendar-entry-admin-table {
  max-height: none;
}

.calendar-entry-admin th,
.calendar-entry-admin td {
  text-align: center;
}

.calendar-entry-admin th:first-child,
.calendar-entry-admin td:first-child {
  text-align: left;
}

.calendar-entry-locked-cell {
  opacity: 0.55;
}

.calendar-entry-locked-cell input {
  cursor: not-allowed;
}

.admin-course-range-form {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.course-range-main-form,
.course-range-form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.course-range-main-form {
  align-items: center;
}

.course-range-wish-form,
.course-range-notice-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.course-range-compact-check {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  gap: 5px;
  padding: 2px 0;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  margin: 0;
}

.course-range-compact-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
}

.course-range-compact-check span {
  display: inline;
}

.course-range-mini-action {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.course-range-form-actions {
  margin-top: 0;
}

.course-range-actions {
  white-space: nowrap;
}

.course-range-actions button + button {
  margin-left: 8px;
}

.course-range-admin {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(194, 202, 215, 0.22);
}

.announcement-admin {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(194, 202, 215, 0.22);
}

.admin-card-content.announcement-admin {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.announcement-form {
  --announcement-editor-field-height: 168px;
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(130px, 1fr)) max-content;
  align-items: stretch;
  gap: 10px;
}

.announcement-checkbox {
  align-self: center;
  min-height: 36px;
}

.announcement-body {
  grid-column: 1 / span 4;
  align-content: start;
  gap: 6px;
}

.announcement-user-select {
  grid-column: 5 / span 2;
  display: grid;
  gap: 6px;
  align-self: stretch;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.announcement-body textarea {
  min-height: var(--announcement-editor-field-height);
  height: var(--announcement-editor-field-height);
  resize: none;
}

.announcement-user-checklist {
  display: grid;
  align-content: start;
  gap: 1px;
  height: var(--announcement-editor-field-height);
  max-height: var(--announcement-editor-field-height);
  min-height: var(--announcement-editor-field-height);
  overflow: auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.announcement-user-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 1px 5px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.announcement-user-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.announcement-user-option input {
  margin: 0;
}

.announcement-user-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-user-select.is-disabled {
  opacity: 0.56;
}

.announcement-form > button {
  align-self: end;
}

.announcement-form-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.announcement-actions {
  white-space: nowrap;
}

.announcement-actions button + button {
  margin-left: 8px;
}

.announcement-form-actions {
  align-self: end;
}

.announcement-preview-wrap {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(194, 202, 215, 0.18);
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.22);
}

.announcement-preview {
  display: grid;
  justify-items: start;
}

.announcement-preview .calendar-announcement {
  width: min(720px, 100%);
}

.pikett-range-settings {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.pikett-range-settings label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.calendar-entry-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-entry-hint {
  display: block;
  white-space: nowrap;
}

.wish-holiday-admin {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wish-holiday-admin-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wish-holiday-admin-head button {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.wish-admin-table-wrap {
  max-height: 340px;
}

.muted-inline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.empty-state {
  padding: 16px;
  border: 1px dashed rgba(194, 202, 215, 0.32);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.018);
}

.account-panel {
  max-width: 980px;
}

.split.account-split {
  align-items: stretch;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.account-password-panel {
  max-width: 360px;
  height: 100%;
}

.account-vacation-panel {
  min-width: 0;
  max-width: none;
  height: 100%;
}

.account-year-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.account-year-control select {
  min-width: 92px;
}

.account-vacation-summary {
  display: grid;
  gap: 14px;
}

.account-booking-info {
  margin: 0;
}

.account-vacation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.account-vacation-metric,
.account-carryover-grid > div,
.account-profile-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.account-vacation-metric span,
.account-carryover-grid span,
.account-profile-grid span,
.account-vacation-metric small,
.account-carryover-grid small,
.account-profile-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.account-vacation-metric strong,
.account-carryover-grid strong,
.account-profile-grid strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.account-vacation-metric.low strong {
  color: #f5c451;
}

.account-vacation-metric.negative strong {
  color: var(--danger);
}

.account-carryover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

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

.account-form {
  display: grid;
  gap: 12px;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  width: 25px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 5px;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.absence-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.absence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 270px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--table-bg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.calendar-context-menu {
  position: fixed;
  z-index: 50;
  display: grid;
  gap: 3px;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.calendar-context-menu button {
  justify-content: flex-start;
  width: 100%;
  min-height: 30px;
  padding: 6px 9px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.calendar-context-menu button:hover:not(:disabled) {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.12);
}

.calendar-context-separator {
  height: 1px;
  margin: 3px 2px;
  background: var(--line);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th, td {
  height: 34px;
  padding: 7px 9px;
  border-right: 1px solid var(--table-line);
  border-bottom: 1px solid var(--table-line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--table-head);
  color: var(--text);
  font-weight: 850;
}

table:not(.planner):not(.mobile-calendar-table) tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.025);
}

.summary-pending-cell {
  font-weight: 700;
  color: #ffd7a8;
  white-space: nowrap;
}

.summary-pending-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--vac-pending);
  box-shadow: 0 0 0 3px rgba(224, 123, 24, 0.18);
  vertical-align: middle;
}

.summary-negative-cell {
  color: #ff5d62;
  font-weight: 900;
}

.summary-two-week-cell {
  text-align: center;
}

.summary-two-week-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.summary-two-week-status.ok {
  color: #032e1c;
  background: #4ade80;
}

.summary-two-week-status.planned {
  color: #3b2300;
  background: #fbbf24;
}

.summary-two-week-status.open {
  color: #3b0508;
  background: #fb7185;
}

.summary-two-week-status.na {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.14);
}

.summary-selected-row td {
  background-color: rgba(34, 211, 238, 0.12);
  box-shadow: inset 3px 0 0 var(--primary);
}

.planner {
  --planner-name-width: 212px;
  --planner-day-width: 53px;
  --planner-row-height: 32px;
  --planner-cell-padding-y: 4px;
  --planner-cell-padding-x: 4px;
  --planner-group-height: 28px;
  --planner-day-head-height: 48px;
  --planner-day-font: 13px;
  --planner-name-font: 13px;
}

.planner-zoom-compact {
  --planner-name-width: 198px;
  --planner-day-width: 48px;
  --planner-row-height: 29px;
  --planner-cell-padding-y: 2px;
  --planner-cell-padding-x: 3px;
  --planner-group-height: 24px;
  --planner-day-head-height: 42px;
  --planner-day-font: 12px;
  --planner-name-font: 12px;
}

.planner-zoom-tight {
  --planner-name-width: 178px;
  --planner-day-width: 40px;
  --planner-row-height: 25px;
  --planner-cell-padding-y: 1px;
  --planner-cell-padding-x: 2px;
  --planner-group-height: 21px;
  --planner-day-head-height: 36px;
  --planner-day-font: 11px;
  --planner-name-font: 11px;
}

.planner-zoom-large {
  --planner-name-width: 240px;
  --planner-day-width: 63px;
  --planner-row-height: 38px;
  --planner-group-height: 30px;
  --planner-day-head-height: 56px;
  --planner-day-font: 14px;
  --planner-name-font: 13px;
}

.planner-wide-view {
  --planner-day-width: 105px;
}

.planner-wide-view.planner-zoom-compact {
  --planner-day-width: 95px;
}

.planner-wide-view.planner-zoom-tight {
  --planner-day-width: 80px;
}

.planner-wide-view.planner-zoom-large {
  --planner-day-width: 125px;
}

.planner-duty-mode td.day {
  outline-offset: -2px;
}

.planner td.duty-plan-draft,
.legend-item .duty-plan-draft {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(17, 24, 39, 0.12) 0,
    rgba(17, 24, 39, 0.12) 4px,
    transparent 4px,
    transparent 8px
  );
}

.duty-planner-cell-input {
  display: block;
  width: 100%;
  height: calc(var(--planner-row-height) - 4px);
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 3px;
  padding: 0 3px;
  background: transparent;
  color: inherit;
  text-align: center;
  font: inherit;
  font-weight: 800;
  line-height: calc(var(--planner-row-height) - 4px);
  outline: none;
  pointer-events: none;
  caret-color: transparent;
}

.duty-planner-cell-input.is-editing {
  pointer-events: auto;
  caret-color: auto;
}

.duty-planner-cell-input.is-editing:focus {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.duty-planner-fill-handle {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: var(--primary);
  cursor: crosshair;
  z-index: 2;
}

.duty-planner-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(var(--planner-row-height) - 6px);
  min-height: calc(var(--planner-row-height) - 6px);
}

.planner-show-rest-days {
  --planner-name-width: 250px;
}

.planner-show-rest-days.planner-zoom-compact,
.planner-show-rest-days.planner-zoom-tight {
  --planner-name-width: 220px;
}

.planner-show-rest-days.planner-zoom-large {
  --planner-name-width: 285px;
}

.planner .planner-corner,
.planner .personal-head,
.planner td:first-child {
  position: sticky;
  left: 0;
  width: var(--planner-name-width);
  min-width: var(--planner-name-width);
  background: var(--table-head);
  border-right-color: var(--line-strong);
}

.planner td:first-child {
  z-index: 5;
}

.planner td:first-child {
  white-space: nowrap;
}

.planner-user-name {
  display: inline-block;
  max-width: calc(100% - 58px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.planner-user-info-button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.planner-user-info-button:hover,
.planner-user-info-button:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.planner-user-popover {
  position: fixed;
  z-index: 120;
  width: min(395px, calc(100vw - 20px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #111c2c;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  color: var(--text);
  font-size: 12px;
}

.planner-user-popover::before,
.planner-user-popover::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}

.planner-user-popover::before {
  left: -7px;
  background: var(--line-strong);
}

.planner-user-popover::after {
  left: -6px;
  background: #111c2c;
}

.planner-user-popover-head {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.planner-user-popover-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.planner-user-popover-head span,
.planner-user-popover small {
  color: var(--muted);
}

.planner-user-popover-section {
  display: grid;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.planner-user-popover-section + .planner-user-popover-section {
  margin-top: 9px;
}

.planner-user-year-card {
  display: grid;
  gap: 6px;
}

.planner-user-year-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.planner-user-year-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.planner-user-year-metrics span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(194, 202, 215, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.planner-user-year-metrics em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-user-year-metrics strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.planner-user-year-metrics small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-user-work-model span {
  color: var(--muted);
  font-weight: 800;
}

.planner-user-year-metrics .low {
  color: #b9f6d3;
}

.planner-user-year-metrics .negative {
  color: #fecaca;
}

.planner-user-carryover strong {
  color: #fed7aa;
}

.planner-user-work-model {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planner-user-work-model div {
  display: grid;
  gap: 2px;
}

.planner-user-work-model strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.planner-rest-days {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 20px;
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid rgba(245, 158, 11, 0.62);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fed7aa;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.planner-rest-days.low {
  border-color: rgba(34, 179, 108, 0.62);
  background: rgba(34, 179, 108, 0.14);
  color: #b9f6d3;
}

.planner-rest-days.negative {
  border-color: rgba(239, 68, 68, 0.68);
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.planner th,
.planner td {
  height: var(--planner-row-height);
  border-right-color: rgba(190, 208, 230, 0.34);
  border-bottom-color: rgba(190, 208, 230, 0.34);
}

.planner thead th {
  border-right-color: rgba(210, 224, 242, 0.4);
  border-bottom-color: rgba(210, 224, 242, 0.4);
}

.planner .planner-corner {
  top: 0;
  z-index: 10;
  background: var(--table-head-strong);
}

.calendar-zoom-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.calendar-zoom-control span {
  min-width: 96px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.calendar-zoom-control .icon-button {
  width: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 16px;
  font-weight: 900;
}

.planner .personal-head {
  top: calc(var(--planner-group-height) * 2);
  z-index: 9;
}

.planner-month-row th {
  top: 0;
  height: var(--planner-group-height);
  padding: 4px 8px;
  background: var(--table-head-strong);
}

.planner-week-row th {
  top: var(--planner-group-height);
  height: var(--planner-group-height);
  padding: 4px 8px;
  background: var(--table-head-strong);
}

.planner-week-row th.vacation-plannable-week {
  background:
    linear-gradient(rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.14)),
    var(--table-head-strong);
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.2);
}

.planner-week-row th.vacation-locked-week {
  background:
    linear-gradient(rgba(239, 68, 68, 0.13), rgba(239, 68, 68, 0.13)),
    var(--table-head-strong);
  color: #fee2e2;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.18);
}

.planner-day-row th {
  top: calc(var(--planner-group-height) * 2);
  height: var(--planner-day-head-height);
}

.planner-day-row th.hovered-day {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.planner .planner-group {
  z-index: 6;
  text-align: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.planner .month-group {
  font-size: 15px;
}

.planner .month-group {
  border-bottom-color: var(--line-strong);
}

.planner .week-group {
  border-bottom: 2px solid var(--line-strong);
}

.planner th.day,
.planner td.day {
  width: var(--planner-day-width);
  min-width: var(--planner-day-width);
  max-width: var(--planner-day-width);
  text-align: center;
  padding: var(--planner-cell-padding-y) var(--planner-cell-padding-x);
  user-select: none;
}

.planner th.day {
  font-size: var(--planner-day-font);
  line-height: 1.23;
}

.planner td.day {
  position: relative;
  font-size: var(--planner-day-font);
  cursor: cell;
  font-weight: 900;
}

.planner tbody td:first-child {
  color: #dce6f3;
  padding: var(--planner-cell-padding-y) 8px;
  font-size: var(--planner-name-font);
  font-weight: 750;
}

.planner .personal-head {
  padding: var(--planner-cell-padding-y) 8px;
  font-size: var(--planner-name-font);
}

.planner-duty-note-row td {
  height: 24px;
  min-height: 24px;
  background: var(--duty-note-row);
  font-size: 11px;
  font-weight: 750;
}

.planner-duty-note-row-start td {
  border-top: 4px solid var(--line-strong);
}

.planner-duty-note-label {
  position: sticky;
  left: 0;
  z-index: 5;
  width: var(--planner-name-width);
  min-width: var(--planner-name-width);
  padding: 2px 8px;
  border-right-color: var(--line-strong);
  background: var(--table-head);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.planner td.duty-day-note-cell {
  padding: 1px 2px;
  cursor: default;
  font-weight: 750;
}

.duty-day-note-input {
  display: block;
  width: 100%;
  height: 21px;
  min-height: 0;
  min-width: 0;
  padding: 0 3px;
  border: 1px solid var(--duty-note-input-border);
  border-radius: 3px;
  background: var(--duty-note-input-bg);
  color: var(--duty-note-input-text);
  font-size: 11px;
  font-weight: 750;
  line-height: 19px;
  outline: none;
}

.duty-day-note-input:focus {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.duty-day-note-text {
  display: block;
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner td.day:hover {
  outline: none;
}

.planner tbody tr:hover td:first-child {
  background: var(--surface-soft);
  color: var(--text);
}

.planner tbody td.hovered-user {
  background: var(--primary) !important;
  color: var(--primary-ink) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.planner .dim { color: var(--soft); }

.planner .selected {
  color: var(--primary-ink);
  outline: 2px solid var(--selected);
  outline-offset: -2px;
  background: var(--selected) !important;
}

.planner tbody td.current-user-name {
  background:
    linear-gradient(rgba(34, 211, 238, 0.12), rgba(34, 211, 238, 0.12)),
    var(--table-head);
  color: var(--text);
  font-weight: 950;
  border-left: 3px solid var(--primary);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.18);
}

.planner tbody td.current-user-name::before {
  content: "●";
  display: inline-block;
  margin-right: 7px;
  color: var(--primary);
  font-size: 9px;
  vertical-align: middle;
}

.planner tbody tr:hover td.current-user-name {
  background:
    linear-gradient(rgba(34, 211, 238, 0.18), rgba(34, 211, 238, 0.18)),
    var(--table-head);
  color: var(--text);
}

.bg-default { background: var(--table-bg); }
.bg-weekend { background: var(--weekend); }
.bg-holiday { background: var(--holiday); }
.bg-holiday-half {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 3px,
      transparent 3px,
      transparent 8px
    ),
    var(--holiday);
}
.bg-school { background: var(--school); }
.bg-fixfree { background: var(--fixfree); }
.bg-wish { background: var(--wish); color: #07111f; }
.bg-vac-pending { background: var(--vac-pending); color: #07111f; }
.bg-vac-exception {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(7, 17, 31, 0.28) 0,
      rgba(7, 17, 31, 0.28) 4px,
      transparent 4px,
      transparent 9px
    ),
    var(--vac-pending);
  color: #07111f;
}
.bg-vac-recall {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.34) 0,
      rgba(255, 255, 255, 0.34) 4px,
      transparent 4px,
      transparent 9px
    ),
    #ef4444;
  color: #ffffff;
}
.bg-vac-approved { background: var(--vac-approved); color: #07111f; }
.bg-komp { background: #fff200; color: #000000; }
.bg-tday { background: #ff7a3d; color: #07111f; }
.bg-tday-var {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(7, 17, 31, 0.38) 0,
      rgba(7, 17, 31, 0.38) 4px,
      transparent 4px,
      transparent 8px
    ),
    #ff7a3d;
  color: #07111f;
}
.bg-glz { background: var(--glz); color: #000000; }
.bg-glz-pending {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(7, 17, 31, 0.2) 0,
      rgba(7, 17, 31, 0.2) 4px,
      transparent 4px,
      transparent 8px
    ),
    var(--glz);
  color: #000000;
}
.bg-service { background: var(--service); color: #ffffff; }
.bg-weekend-service { background: var(--weekend-service); color: #07111f; }
.bg-course { background: #7c3aed; color: #ffffff; }
.bg-course-pending {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.24) 0,
      rgba(255, 255, 255, 0.24) 4px,
      transparent 4px,
      transparent 8px
    ),
    #7c3aed;
  color: #ffffff;
}
.bg-course-range {
  background: rgba(124, 58, 237, 0.34);
  color: var(--text);
}
.bg-pikett { background: var(--weekend-service); color: #07111f; }
.bg-pikett-pending {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(7, 17, 31, 0.18) 0,
      rgba(7, 17, 31, 0.18) 4px,
      transparent 4px,
      transparent 8px
    ),
    var(--weekend-service);
  color: #07111f;
}
.bg-unpaid { background: #6d28d9; color: #f5f3ff; }
.bg-maternity { background: #be185d; color: #fff1f2; }
.bg-paternity { background: #0f766e; color: #ecfeff; }
.bg-moving { background: #3b82a0; color: #f8fbff; }
.bg-wedding { background: #c026d3; color: #fff7ff; }
.bg-accident { background: #ef4444; color: #fff7f7; }
.bg-funeral { background: #64748b; color: #f8fafc; }
.bg-military { background: #e5e7eb; color: #111827; }
.bg-loyalty { background: #f59e0b; color: #000000; }

:root[data-theme="light"] .balance-title {
  color: #334155;
}

:root[data-theme="light"] .booking-info {
  border-color: rgba(22, 163, 74, 0.58);
  background: rgba(34, 197, 94, 0.13);
  color: #166534;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08), 0 0 14px rgba(34, 197, 94, 0.12);
}

:root[data-theme="light"] .booking-info.message-notice {
  border-color: rgba(2, 132, 199, 0.58);
  background: rgba(14, 165, 233, 0.12);
  color: #075985;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.08), 0 0 14px rgba(14, 165, 233, 0.12);
}

:root[data-theme="light"] .carryover-reminder {
  border-color: rgba(2, 132, 199, 0.5);
  background: rgba(14, 165, 233, 0.11);
  color: #075985;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.08), 0 0 14px rgba(14, 165, 233, 0.1);
}

:root[data-theme="light"] .calendar-announcement {
  border-color: rgba(2, 132, 199, 0.58);
  background: rgba(14, 165, 233, 0.12);
  color: #075985;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.08), 0 0 14px rgba(14, 165, 233, 0.12);
}

:root[data-theme="light"] .calendar-announcement strong,
:root[data-theme="light"] .calendar-announcement span {
  color: #075985;
}

:root[data-theme="light"] .calendar-announcement.course-range-notice {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.08), 0 0 14px rgba(124, 58, 237, 0.12);
}

:root[data-theme="light"] .calendar-announcement.course-range-notice .course-range-notice-line strong,
:root[data-theme="light"] .calendar-announcement.course-range-notice .course-range-notice-line span {
  color: #5b21b6;
}

:root[data-theme="light"] .calendar-announcement.announcement-warning {
  border-color: rgba(180, 83, 9, 0.5);
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

:root[data-theme="light"] .calendar-announcement.announcement-warning strong,
:root[data-theme="light"] .calendar-announcement.announcement-warning span {
  color: #92400e;
}

:root[data-theme="light"] .calendar-announcement.announcement-important {
  border-color: rgba(190, 24, 93, 0.48);
  background: #fff1f5;
  color: #831843;
}

:root[data-theme="light"] .calendar-announcement.announcement-important strong,
:root[data-theme="light"] .calendar-announcement.announcement-important span {
  color: #831843;
}

:root[data-theme="light"] .pending-pill {
  border-color: rgba(180, 83, 9, 0.5);
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

:root[data-theme="light"] .planner-rest-days {
  border-color: rgba(180, 83, 9, 0.5);
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

:root[data-theme="light"] .planner-rest-days.low {
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

:root[data-theme="light"] .planner-rest-days.negative {
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(239, 68, 68, 0.13);
  color: #b91c1c;
}

:root[data-theme="light"] .planner-user-popover {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

:root[data-theme="light"] .planner-user-popover::before {
  background: #94a3b8;
}

:root[data-theme="light"] .planner-user-popover::after {
  background: #f8fafc;
}

:root[data-theme="light"] .planner-user-year-metrics span {
  border-color: #d2dce8;
  background: #ffffff;
}

:root[data-theme="light"] .planner-user-year-metrics .low {
  color: #047857;
}

:root[data-theme="light"] .planner-user-year-metrics .negative {
  color: #b91c1c;
}

:root[data-theme="light"] .planner-user-carryover strong {
  color: #b45309;
}

:root[data-theme="light"] .balance-breakdown {
  border-color: rgba(180, 83, 9, 0.54);
  background: rgba(245, 158, 11, 0.13);
  color: #334155;
}

:root[data-theme="light"] .balance-breakdown strong {
  color: #92400e;
}

:root[data-theme="light"] .admin-status-pill {
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}

:root[data-theme="light"] .admin-status-pill.open {
  border-color: rgba(245, 158, 11, 0.56);
  background: rgba(245, 158, 11, 0.16);
  color: #9a3412;
}

:root[data-theme="light"] .wish-reminder {
  border-color: rgba(190, 24, 93, 0.48);
  background: #fff1f5;
  color: #831843;
  box-shadow: 0 0 0 1px rgba(190, 24, 93, 0.08), 0 8px 22px rgba(190, 24, 93, 0.14);
}

:root[data-theme="light"] .wish-reminder strong {
  color: #9f1239;
  text-decoration-color: rgba(159, 18, 57, 0.65);
}

:root[data-theme="light"] .vacation-planning-warning {
  border-color: rgba(180, 83, 9, 0.5);
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  box-shadow: 0 8px 22px rgba(180, 83, 9, 0.12);
}

:root[data-theme="light"] .vacation-planning-warning strong {
  color: #78350f;
}

:root[data-theme="light"] .planner-week-row th.vacation-plannable-week {
  background:
    linear-gradient(rgba(34, 197, 94, 0.13), rgba(34, 197, 94, 0.13)),
    var(--table-head-strong);
  color: #14532d;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.18);
}

:root[data-theme="light"] .planner-week-row th.vacation-locked-week {
  background:
    linear-gradient(rgba(239, 68, 68, 0.11), rgba(239, 68, 68, 0.11)),
    var(--table-head-strong);
  color: #7f1d1d;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.16);
}

:root[data-theme="light"] .legend,
:root[data-theme="light"] .legend-item,
:root[data-theme="light"] .muted,
:root[data-theme="light"] .muted-inline,
:root[data-theme="light"] .status,
:root[data-theme="light"] .settings-hint,
:root[data-theme="light"] .balance-subline {
  color: #334155;
}

:root[data-theme="light"] h3,
:root[data-theme="light"] .wish-round-title,
:root[data-theme="light"] .wish-section-title {
  color: #0f172a;
}

:root[data-theme="light"] .admin-card-content,
:root[data-theme="light"] .wish-card,
:root[data-theme="light"] .wish-round-admin {
  border-color: #a9bdd1;
  background: #effafe;
}

:root[data-theme="light"] .wish-decision-form {
  border-color: #a8b4c2;
  background: #e2e8f0;
}

:root[data-theme="light"] .wish-decision-user {
  border-color: #c0cad6;
  background: #f8fafc;
}

:root[data-theme="light"] .wish-decision-row {
  border-color: #c2ccd8;
  background: #ffffff;
}

:root[data-theme="light"] .vacation-warning-settings,
:root[data-theme="light"] .vacation-recall-settings,
:root[data-theme="light"] .course-range-admin,
:root[data-theme="light"] .vacation-two-week-settings,
:root[data-theme="light"] .vacation-carryover-settings,
:root[data-theme="light"] .vacation-remainder-roundup-settings,
:root[data-theme="light"] .glz-request-settings {
  border-top-color: #94a3b8;
}

:root[data-theme="light"] .vacation-remainder-roundup-settings::before {
  border-top-color: #94a3b8;
}

:root[data-theme="light"] .absence-limit-settings,
:root[data-theme="light"] .vacation-two-week-settings,
:root[data-theme="light"] .absence-limit-type-settings,
:root[data-theme="light"] .glz-request-settings {
  border-left-color: #94a3b8;
}

:root[data-theme="light"] .message-item {
  background: #f8fafc;
}

:root[data-theme="light"] .message-entry {
  border-color: #c2ccd8;
  background: #ffffff;
}

:root[data-theme="light"] .message-entry.sent {
  border-color: #9ed6bd;
  background: #edfdf5;
}

:root[data-theme="light"] .message-warning-line {
  color: #b91c1c;
}

:root[data-theme="light"] .wish-round-status.active {
  color: #047857;
  background: #dcfce7;
}

:root[data-theme="light"] .wish-round-status.pending {
  color: #92400e;
  background: #fef3c7;
}

:root[data-theme="light"] .wish-round-status.closed {
  color: #b91c1c;
  background: #fee2e2;
}

:root[data-theme="light"] .wish-decision-options,
:root[data-theme="light"] .wish-decision-conflict {
  border-color: #b4c0ce;
  background: #eef4fa;
}

:root[data-theme="light"] .wish-card-head span,
:root[data-theme="light"] .wish-decision-head span,
:root[data-theme="light"] .wish-decision-user-head span,
:root[data-theme="light"] .wish-decision-label span,
:root[data-theme="light"] .wish-decision-options label,
:root[data-theme="light"] .wish-decision-conflict {
  color: #334155;
}

:root[data-theme="light"] .wish-status.done {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.14);
}

:root[data-theme="light"] .wish-status.open {
  color: #9a3412;
  border-color: rgba(245, 158, 11, 0.56);
  background: rgba(245, 158, 11, 0.16);
}

:root[data-theme="light"] .wish-status.rejected {
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.46);
  background: rgba(185, 28, 28, 0.1);
}

:root[data-theme="light"] .summary-pending-cell {
  color: #9a3412;
  font-weight: 850;
}

:root[data-theme="light"] .summary-pending-dot {
  background: #c2410c;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.18);
}

:root[data-theme="light"] .planner th,
:root[data-theme="light"] .planner td {
  border-right-color: rgba(100, 116, 139, 0.42);
  border-bottom-color: rgba(100, 116, 139, 0.42);
}

:root[data-theme="light"] .planner thead th {
  border-right-color: rgba(71, 85, 105, 0.48);
  border-bottom-color: rgba(71, 85, 105, 0.48);
}

:root[data-theme="light"] .summary-selected-row td {
  background-color: #dff3ff;
  box-shadow: inset 3px 0 0 #0284c7;
}

:root[data-theme="light"] table:not(.planner) tbody tr.summary-selected-row:hover td {
  background-color: #d5ecfb;
}

:root[data-theme="light"] button:disabled {
  opacity: 0.58;
  background: #eef3f8;
  color: #64748b;
  border-color: #d2dce8;
}

:root[data-theme="light"] .planner th,
:root[data-theme="light"] .planner td,
:root[data-theme="light"] .planner .planner-group,
:root[data-theme="light"] .planner tbody td:first-child {
  color: #07111f;
}

:root[data-theme="light"] .planner .dim {
  color: #475569;
}

:root[data-theme="light"] .badge {
  border-color: rgba(15, 23, 42, 0.26);
  color: #07111f;
}

:root[data-theme="light"] .bg-default,
:root[data-theme="light"] .bg-weekend,
:root[data-theme="light"] .bg-holiday,
:root[data-theme="light"] .bg-holiday-half,
:root[data-theme="light"] .bg-school,
:root[data-theme="light"] .bg-fixfree,
:root[data-theme="light"] .bg-wish,
:root[data-theme="light"] .bg-vac-pending,
:root[data-theme="light"] .bg-vac-exception,
:root[data-theme="light"] .bg-vac-approved,
:root[data-theme="light"] .bg-weekend-service,
:root[data-theme="light"] .bg-course-range,
:root[data-theme="light"] .bg-pikett,
:root[data-theme="light"] .bg-pikett-pending,
:root[data-theme="light"] .bg-komp,
:root[data-theme="light"] .bg-military {
  color: #07111f;
}

:root[data-theme="light"] .bg-vac-recall {
  color: #ffffff;
}

:root[data-theme="light"] .bg-service,
:root[data-theme="light"] .bg-course,
:root[data-theme="light"] .bg-course-pending,
:root[data-theme="light"] .bg-unpaid,
:root[data-theme="light"] .bg-maternity,
:root[data-theme="light"] .bg-paternity,
:root[data-theme="light"] .bg-moving,
:root[data-theme="light"] .bg-wedding,
:root[data-theme="light"] .bg-accident,
:root[data-theme="light"] .bg-funeral {
  color: #ffffff;
}

:root[data-theme="light"] .planner td.bg-service,
:root[data-theme="light"] .legend .badge.bg-service {
  color: #ffffff;
}

:root[data-theme="light"] .bg-tday,
:root[data-theme="light"] .bg-tday-var {
  color: #07111f;
}

:root[data-theme="light"] .bg-tday {
  background: #ff7a3d;
}

:root[data-theme="light"] .bg-komp {
  background: #fff200;
  color: #000000;
}

:root[data-theme="light"] .bg-tday-var {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(7, 17, 31, 0.38) 0,
      rgba(7, 17, 31, 0.38) 4px,
      transparent 4px,
      transparent 8px
    ),
    #ff7a3d;
}

.panel {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.panel > .toolbar {
  align-items: center;
}

.master-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.master-metric {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.055);
}

.master-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.master-metric strong {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

.master-table-wrap {
  max-height: 420px;
}

.master-year-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.master-year-control select {
  width: auto;
  min-width: 86px;
}

.master-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.master-breakdown .admin-card-content {
  display: grid;
  gap: 10px;
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.form-row.two-cols {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.admin-holiday-form {
  grid-template-columns: minmax(170px, 1.2fr) minmax(120px, 0.8fr) minmax(132px, 0.8fr) minmax(132px, 0.8fr) minmax(96px, auto) max-content;
  gap: 8px;
  align-items: end;
}

.admin-holiday-form label {
  min-width: 0;
}

.admin-holiday-form input,
.admin-holiday-form select {
  width: 100%;
  min-width: 0;
}

.holiday-half-control {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  gap: 7px;
  padding-top: 14px;
  white-space: nowrap;
}

.holiday-half-control input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
}

.allowance-input {
  max-width: 96px;
}

#user-table th:nth-child(1),
#user-table td:nth-child(1) {
  width: 132px;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#user-table th:nth-child(2),
#user-table td:nth-child(2) {
  width: 112px;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#user-table th:nth-child(7),
#user-table td:nth-child(7) {
  width: 86px;
  min-width: 86px;
}

#user-table .allowance-tier-select {
  min-width: 62px;
}

.weekday-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekday-checks label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.weekday-checks label:has(input:disabled) {
  opacity: 0.48;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.t-day-rule-table {
  display: grid;
  gap: 8px;
}

.t-day-rule-table label {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.t-day-rule-table select:disabled {
  opacity: 0.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 76px 22px 22px;
  background: rgba(0, 0, 0, 0.68);
  overflow-y: auto;
}

.modal {
  width: min(580px, calc(100vw - 44px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.modal.modal-compact {
  width: min(880px, calc(100vw - 44px));
}

.modal.modal-info {
  width: min(620px, calc(100vw - 44px));
}

.modal.modal-schedule-import {
  width: min(1120px, calc(100vw - 44px));
}

.modal.modal-duty-month-import {
  width: min(1280px, calc(100vw - 44px));
}

.modal.modal-calendar-pdf {
  width: min(940px, calc(100vw - 44px));
}

.modal.modal-schedule-import .table-wrap {
  max-height: min(62vh, 620px);
  overflow: auto;
}

.modal-duty-month-import .duty-month-table-wrap {
  max-height: min(34vh, 360px);
}

.modal-subtitle {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 900;
}

.duty-month-table tr.has-changes {
  background: rgba(245, 158, 11, 0.08);
}

.duty-month-table tr.no-changes {
  background: rgba(34, 197, 94, 0.06);
}

.compact-checkbox {
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.duty-legend-checkbox {
  justify-content: center;
  gap: 0;
}

.import-diff-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.import-diff-pill.clean {
  background: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}

.import-diff-pill.changed,
.import-diff-pill.warning {
  background: rgba(245, 158, 11, 0.24);
  color: #fbbf24;
}

.import-diff-pill.danger {
  background: rgba(255, 93, 98, 0.24);
  color: #fca5a5;
}

:root[data-theme="light"] .import-diff-pill.clean {
  background: #dcfce7;
  color: #166534;
}

:root[data-theme="light"] .import-diff-pill.changed,
:root[data-theme="light"] .import-diff-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

:root[data-theme="light"] .import-diff-pill.danger {
  background: #fee2e2;
  color: #991b1b;
}

.import-mapping-field {
  display: grid;
  gap: 5px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.06);
}

.import-mapping-field select {
  width: 100%;
}

.import-mapping-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.import-match-clear,
.import-match-manual {
  border-color: rgba(34, 197, 94, 0.82);
  background: rgba(34, 197, 94, 0.09);
}

.import-match-ambiguous {
  border-color: rgba(245, 158, 11, 0.86);
  background: rgba(245, 158, 11, 0.10);
}

.import-match-unmatched {
  border-color: rgba(255, 93, 98, 0.82);
  background: rgba(255, 93, 98, 0.10);
}

.duty-config-table input[type="text"],
.duty-config-table input:not([type]) {
  min-width: 84px;
}

.duty-config-table input[type="color"] {
  width: 44px;
  min-width: 44px;
  height: 32px;
  padding: 2px;
}

.duty-config-preview {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 900;
}

.duty-protection-box {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.duty-protection-box legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.duty-protection-box .muted {
  margin: 0;
}

.duty-protection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 12px;
}

.duty-protection-option {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 34px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: normal;
}

.duty-protection-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.duty-protection-option span {
  min-width: 0;
}

.duty-planner-service-settings {
  gap: 12px;
}

.duty-services-hint {
  white-space: nowrap;
}

.duty-competency-hint {
  max-width: none;
  white-space: nowrap;
}

.duty-calendar-entry-hint {
  max-width: none;
  white-space: nowrap;
}

.duty-planner-service-table input[type="text"],
.duty-planner-service-table input:not([type]) {
  width: 100%;
}

.duty-planner-service-table select,
.duty-services-import-table select {
  min-width: 138px;
}

.duty-planner-service-table input[type="color"],
.duty-planner-new-service input[type="color"],
.duty-services-import-table input[type="color"] {
  width: 54px;
  min-width: 54px;
  padding: 2px;
}

.duty-services-import-table input[type="text"],
.duty-services-import-table input:not([type]) {
  min-width: 84px;
}

.duty-allowed-next-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.duty-allowed-next-picker {
  position: relative;
  min-width: 156px;
}

.duty-allowed-next-picker summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.duty-allowed-next-picker[open] summary {
  border-color: var(--line-strong);
}

.duty-allowed-next-options {
  position: absolute;
  z-index: 25;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  gap: 5px;
  min-width: 210px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.duty-allowed-next-options .checkbox-line {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  padding: 4px 6px;
  color: var(--text);
  line-height: 1.2;
}

.duty-allowed-next-options .checkbox-line input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
}

.duty-allowed-next-options .checkbox-line span {
  min-width: 0;
}

.duty-service-delete {
  min-height: 30px;
  padding: 5px 9px;
}

.duty-service-row-deleted {
  opacity: 0.55;
}

.duty-service-row-deleted td {
  text-decoration: line-through;
}

.duty-planner-new-service {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(220px, 1.25fr) 76px 76px minmax(180px, 1.25fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) max-content;
  gap: 12px;
  align-items: end;
}

.duty-color-template-field {
  width: 240px;
  min-width: 240px;
}

.duty-color-template-field select {
  width: 100%;
}

.duty-planner-new-service label:has(input[type="color"]) {
  width: 76px;
}

.duty-planner-new-service label:has(#new-duty-service-preview) {
  align-items: flex-start;
  justify-self: end;
}

#new-duty-service-preview {
  width: fit-content;
  min-width: 48px;
}

@media (max-width: 1500px) {
  .duty-planner-new-service {
    grid-template-columns: repeat(auto-fit, minmax(166px, max-content));
  }

  .duty-planner-new-service label:has(#new-duty-service-preview) {
    justify-self: start;
  }
}

.duty-planner-calendar-entry-settings {
  display: grid;
  gap: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.duty-planner-calendar-entry-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.duty-planner-calendar-entry-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.duty-planner-calendar-entry-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.duty-planner-calendar-entry-option .duty-config-preview {
  min-width: 32px;
}

.duty-competency-settings {
  gap: 12px;
}

.duty-generator-settings {
  gap: 14px;
}

.duty-generator-settings select,
.duty-generator-settings input[type="number"],
.duty-competency-table input[type="number"] {
  min-width: 88px;
}

.duty-competency-table input[type="date"] {
  min-width: 118px;
}

.duty-competency-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.duty-competency-service {
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 800;
}

.duty-competency-service input[type="checkbox"] {
  margin: 0;
}

.duty-competency-service input[type="date"] {
  margin-left: 4px;
}

.duty-email-settings {
  gap: 12px;
}

.duty-email-settings .settings-hint {
  white-space: nowrap;
}

.duty-email-toggle-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
}

.duty-email-toggle-line input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.duty-change-email-dialog {
  display: grid;
  gap: 12px;
}

.duty-change-email-dialog label {
  display: grid;
  gap: 6px;
}

.duty-change-email-dialog .duty-change-email-cc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.duty-change-email-cc-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
}

.duty-change-email-names {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.duty-change-email-preview {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.duty-change-email-preview span {
  font-size: 13px;
  font-weight: 800;
}

.bg-duty {
  background: #e0f2fe;
  color: #111827;
}

.modal header,
.modal footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
}

.modal header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.modal footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.modal-body {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow-x: auto;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-grid .t-day-rule-field,
.modal-grid .user-password-field {
  grid-column: 1 / -1;
}

.roundup-admin-choice {
  display: grid;
  gap: 14px;
}

.roundup-admin-summary {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
  line-height: 1.45;
}

.roundup-admin-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.roundup-admin-options {
  display: grid;
  gap: 10px;
}

.roundup-admin-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.roundup-admin-option:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.roundup-admin-option:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 22%, transparent);
}

.roundup-admin-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.roundup-admin-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.roundup-admin-option span {
  display: block;
  min-width: 0;
}

.roundup-admin-option strong {
  font-weight: 900;
}

.roundup-admin-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.roundup-current-setting {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 7px;
  padding: 2px 8px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.13);
  color: #16a34a;
  font-size: 11px;
  font-weight: 900;
  vertical-align: 1px;
}

:root:not([data-theme="light"]) .roundup-current-setting {
  color: #86efac;
}

.duty-generator-start-dialog {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: start;
  gap: 16px;
}

.duty-generator-picker {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.duty-generator-start-dialog .modal-subtitle {
  margin: 0;
}

.duty-generator-start-dialog .checkbox-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: normal;
}

.duty-generator-start-dialog .checkbox-line input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  justify-self: center;
  accent-color: var(--primary);
  box-shadow: none;
}

.duty-generator-toggle-all {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-weight: 850;
}

.duty-generator-toggle-all strong,
.duty-generator-user-option span,
.duty-generator-week-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duty-generator-check-list {
  display: grid;
  grid-auto-rows: minmax(32px, auto);
  gap: 4px;
  max-height: 340px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.duty-generator-check-list .checkbox-line {
  justify-content: flex-start;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.duty-generator-check-list .checkbox-line:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.duty-generator-service-option .duty-config-preview {
  justify-self: start;
  min-width: 44px;
  text-align: center;
}

.duty-generator-option-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  justify-self: end;
  text-align: right;
}

.duty-generator-check-list small {
  margin-left: 0;
  color: var(--muted);
  font-weight: 700;
  justify-self: end;
}

@media (max-width: 760px) {
  .duty-generator-start-dialog {
    grid-template-columns: 1fr;
  }
}

.summary-export-dialog {
  display: grid;
  gap: 14px;
}

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

.summary-export-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-export-checks legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-export-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.summary-export-check input {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  transform: none;
  accent-color: var(--accent);
}

.calendar-pdf-dialog {
  display: grid;
  gap: 14px;
}

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

.calendar-pdf-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-pdf-grid input,
.calendar-pdf-grid select {
  width: 100%;
}

.calendar-pdf-types {
  align-items: flex-start;
}

.calendar-pdf-mini-action {
  min-height: 30px;
  padding: 5px 10px;
}

.calendar-pdf-option-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-pdf-option-line input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.calendar-pdf-preview {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.calendar-pdf-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-pdf-preview-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-pdf-preview-summary strong {
  color: var(--text);
}

.calendar-pdf-mini-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--table-bg);
}

.calendar-pdf-mini {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-pdf-mini th,
.calendar-pdf-mini td {
  height: 24px;
  padding: 3px 4px;
  border: 1px solid var(--table-line);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-pdf-mini th:first-child,
.calendar-pdf-mini td:first-child {
  width: 150px;
  text-align: left;
  background: var(--table-head);
  color: var(--text);
}

.import-restore-line {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
}

.import-restore-line input[type="checkbox"] {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  transform: none;
  accent-color: var(--accent);
}

@media (max-width: 760px) {
  .summary-export-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .planner-user-year-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-info-list {
  display: grid;
  gap: 10px;
}

.app-info-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.app-info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.app-info-list span,
.app-info-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.app-info-list strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.app-info-course-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-info-course-list li {
  display: grid;
  gap: 3px;
}

.app-info-course-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.app-info-course-line strong {
  font-weight: 950;
}

.app-info-course-line span {
  font-weight: 750;
}

.app-info-course-line em {
  color: var(--muted);
  font-style: italic;
  font-weight: 650;
}

.warning-test {
  display: grid;
  gap: 12px;
}

.warning-test-conditions {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.warning-test-conditions strong {
  color: var(--text);
}

.warning-test-conditions span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.warning-test-scenario {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(14, 165, 233, 0.42);
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.08);
}

.warning-test-scenario strong {
  color: var(--text);
}

.warning-test-scenario span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.warning-test-preview-block {
  display: grid;
  gap: 8px;
}

.warning-test-preview-block > strong {
  color: var(--text);
}

.warning-test-preview {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  white-space: nowrap;
}

.warning-test-preview span,
.warning-test-preview strong {
  white-space: nowrap;
}

.status {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.danger-text {
  color: var(--danger);
}

#admin-status:empty {
  display: none;
}

.mobile-shell {
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
}

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

.mobile-topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 850;
}

.mobile-topbar h1 span:last-of-type {
  color: var(--primary);
}

.mobile-topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-topbar-actions button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

.mobile-notice,
.mobile-card,
.mobile-balance {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mobile-notice {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-switch button {
  min-height: 42px;
  padding: 9px 10px;
  font-weight: 900;
}

.mobile-mode-vacation .mobile-calendar-view,
.mobile-mode-calendar .mobile-balance,
.mobile-mode-calendar .mobile-request-card,
.mobile-mode-calendar > .mobile-card {
  display: none;
}

.mobile-calendar-view {
  display: grid;
  gap: 10px;
}

.mobile-calendar-toolbar {
  display: grid;
  grid-template-columns: 68px 1fr 68px;
  gap: 8px;
}

.mobile-calendar-toolbar button {
  min-height: 40px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-calendar-actions {
  display: grid;
  gap: 8px;
}

.mobile-calendar-mine-toggle {
  min-height: 40px;
  font-weight: 900;
}

.mobile-calendar-freshness,
.mobile-calendar-hint,
.mobile-calendar-range {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 9px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.mobile-calendar-freshness {
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.1);
  color: var(--text);
}

.mobile-calendar-freshness.stale {
  border-color: #ef4444;
  background: #7f1d1d;
  color: #ffffff;
}

.mobile-calendar-range {
  color: var(--text);
  text-align: center;
}

.mobile-calendar-scroll {
  max-height: calc(100vh - 245px);
  min-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.mobile-calendar-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
}

.mobile-calendar-table th,
.mobile-calendar-table td {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 32px;
  padding: 2px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-calendar-duty-view .mobile-calendar-table tbody td {
  height: 27px;
  padding-top: 1px;
  padding-bottom: 1px;
  font-size: 10px;
}

.mobile-calendar-duty-view .mobile-calendar-table th:not(.mobile-calendar-person),
.mobile-calendar-duty-view .mobile-calendar-table td:not(.mobile-calendar-person) {
  width: 53px;
  min-width: 53px;
  max-width: 53px;
}

.mobile-calendar-scroll:focus,
.mobile-calendar-table th:focus,
.mobile-calendar-table td:focus {
  outline: none;
}

.mobile-calendar-table th:active,
.mobile-calendar-table td:active {
  filter: none;
}

.mobile-calendar-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.mobile-calendar-table .mobile-calendar-person {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 78px;
  min-width: 78px;
  max-width: 78px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.mobile-calendar-table thead .mobile-calendar-person {
  z-index: 5;
}

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

.mobile-calendar-day span {
  margin-bottom: 2px;
  font-size: 9px;
}

.mobile-calendar-cell {
  color: var(--text);
}

.mobile-calendar-cell.bg-glz,
.mobile-calendar-cell.bg-glz-pending,
.mobile-calendar-cell.bg-loyalty {
  color: #000000;
}

.mobile-calendar-note-row td {
  background: var(--duty-note-row);
}

.mobile-calendar-note-row-start td {
  border-top: 4px solid var(--line-strong);
}

.mobile-calendar-table .mobile-calendar-note-label {
  color: var(--primary);
  font-size: 10px;
  font-weight: 950;
}

.mobile-calendar-note-cell {
  overflow: hidden;
  color: var(--duty-note-input-text);
  font-size: 10px;
  text-overflow: clip;
  white-space: nowrap;
}

.mobile-calendar-empty {
  padding: 14px;
  color: var(--muted);
  text-align: left;
}

.mobile-balance {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.mobile-balance-title,
.mobile-balance-year span,
.mobile-balance-year small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-balance-title {
  color: var(--text);
  font-weight: 900;
}

.mobile-balance-years {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: stretch;
  gap: 12px;
}

.mobile-balance-years::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  background: var(--line);
}

.mobile-balance-year {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mobile-balance-year:first-child {
  grid-column: 1;
}

.mobile-balance-year:last-child {
  grid-column: 3;
}

.mobile-balance-year strong {
  font-size: 27px;
  line-height: 1.05;
}

.mobile-balance-year.low strong {
  color: var(--amber);
}

.mobile-balance-year.negative strong {
  color: var(--danger);
}

.mobile-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.mobile-request-card {
  gap: 10px;
  padding-bottom: 10px;
}

.mobile-request-card button[type="submit"] {
  min-height: 42px;
}

.mobile-request-card #mobile-status {
  margin: 0;
}

.mobile-request-card #mobile-status:empty {
  display: none;
}

.mobile-card h2 {
  margin: 0;
  font-size: 18px;
}

.mobile-booking-window {
  padding: 8px 10px;
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.mobile-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-date-grid input {
  min-height: 46px;
}

.mobile-range-picker {
  display: grid;
  gap: 10px;
}

.mobile-range-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.mobile-range-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-range-summary strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.mobile-range-calendar {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mobile-range-calendar-head {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
}

.mobile-range-calendar-head strong {
  text-align: center;
  font-size: 16px;
  font-weight: 950;
}

.mobile-range-calendar-head button {
  width: 38px;
  min-height: 36px;
  padding: 0;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.mobile-range-weekdays,
.mobile-range-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mobile-range-weekdays span {
  padding: 3px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.mobile-range-grid {
  row-gap: 5px;
}

.mobile-range-day {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-range-day::before,
.mobile-range-day::after {
  content: "";
  position: absolute;
  inset: 18% 0;
  z-index: -2;
  background: transparent;
}

.mobile-range-day::after {
  inset: 10%;
  z-index: -1;
  border-radius: 999px;
}

.mobile-range-day.in-range::before,
.mobile-range-day.range-start::before,
.mobile-range-day.range-end::before {
  background: rgba(34, 211, 238, 0.18);
}

.mobile-range-day.range-start::before {
  left: 50%;
}

.mobile-range-day.range-end::before {
  right: 50%;
}

.mobile-range-day.single-day::before {
  background: transparent;
}

.mobile-range-day.range-start::after,
.mobile-range-day.range-end::after {
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.28);
}

.mobile-range-day.range-start,
.mobile-range-day.range-end {
  color: #ffffff;
}

.mobile-range-day.today:not(.range-start):not(.range-end)::after {
  border: 1px solid var(--primary);
}

.mobile-range-day.outside-month {
  color: transparent;
  pointer-events: none;
}

.mobile-range-day.unavailable {
  color: var(--muted);
  opacity: 0.35;
}

.mobile-range-day:disabled {
  cursor: not-allowed;
}

.mobile-range-info {
  display: grid;
  gap: 4px;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.mobile-range-info strong {
  color: var(--text);
  font-size: 16px;
}

.mobile-limit-warning {
  margin-top: 3px;
  padding: 8px;
  border: 1px solid #ef4444;
  border-radius: 8px;
  background: #7f1d1d;
  color: #ffffff;
  font-weight: 900;
}

.mobile-card-heading,
.mobile-vacation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-year-select {
  width: auto;
  min-width: 112px;
}

.mobile-year-select select {
  min-height: 36px;
  padding: 6px 28px 6px 9px;
}

.mobile-card-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

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

.mobile-vacation-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.mobile-vacation-item div {
  display: grid;
  gap: 3px;
}

.mobile-vacation-item strong {
  font-size: 13px;
}

.mobile-vacation-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.mobile-vacation-item em {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.mobile-vacation-item em.approved {
  border: 1px solid #16a34a;
  background: #05b85f;
  color: #03140b;
}

.mobile-vacation-item em.pending {
  border: 1px solid #f59e0b;
  background: #fbbf24;
  color: #171008;
}

.mobile-vacation-item em.rejected {
  border: 1px solid #ef4444;
  background: #ff5d62;
  color: #220608;
}

.mobile-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  body { min-width: 0; }
  .topbar, .balance-bar, .view { min-width: 760px; }
  .balance-bar { grid-template-columns: minmax(760px, 1fr) 1px minmax(170px, 0.75fr) 1px minmax(170px, 0.75fr) max-content; }
  .master-breakdown { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { min-width: 0; }
  .login-shell { padding: 14px; }
  .login-card {
    padding: 30px 18px 20px;
    border-radius: 12px;
  }
  .login-heading {
    min-height: 0;
  }
  .login-heading .eyebrow {
    font-size: 29px;
  }
  .login-mobile-badge {
    display: inline-flex;
    justify-self: center;
  }
  .login-field-control input,
  .login-field-control select,
  .mobile-date-grid input,
  .mobile-year-select select {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .mobile-balance-years {
    gap: 8px;
  }
  .mobile-balance-year strong {
    font-size: 23px;
  }
  .mobile-date-grid {
    grid-template-columns: 1fr;
  }
  .mobile-topbar {
    align-items: start;
    flex-direction: column;
  }
  .mobile-topbar-actions {
    width: 100%;
    justify-content: stretch;
  }
  .mobile-topbar-actions button {
    flex: 1;
  }
}

.admin-year-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  margin-right: 6px;
  white-space: nowrap;
}

.admin-year-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-year-control select {
  width: auto;
  min-width: 92px;
}
