: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;
  --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;
  --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;
}

.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 30px;
  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-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-logo {
  display: inline-block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

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

.brand::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;
}

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

.balance-bar {
  display: grid;
  grid-template-columns: minmax(760px, 1.65fr) 1px minmax(190px, 0.75fr) 1px minmax(190px, 0.75fr) max-content;
  align-items: center;
  gap: 12px;
  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;
}

.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;
}

.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: 720px;
}

.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: 13px;
  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);
}

.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-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;
}

#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: 30px;
  height: 22px;
  font-size: 12px;
}

.legend-toggle {
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

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

.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 {
  grid-column: 1 / -1;
  grid-row: 5;
  justify-self: center;
  align-self: end;
  margin-top: 0;
  margin-left: 0;
}

.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 4;
  min-width: min(520px, 100%);
  padding-left: 16px;
  border-left: 1px solid rgba(194, 202, 215, 0.28);
}

.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 3;
  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;
}

.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;
}

@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,
  .vacation-warning-settings,
  .vacation-carryover-settings {
    grid-column: auto;
    grid-row: auto;
  }

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

  .absence-limit-type-settings,
  .vacation-recall-settings,
  .vacation-warning-settings,
  .vacation-carryover-settings {
    grid-column: 1 / -1;
  }
}

.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 {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 93, 98, 0.72);
  border-radius: 8px;
  background: rgba(255, 93, 98, 0.16);
  color: #ffe1e3;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  animation: wishPulse 1.2s ease-in-out infinite;
}

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

.vacation-planning-warning {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(245, 158, 11, 0.72);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.16);
  color: #ffedd5;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.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;
}

.admin-course-range-form {
  margin-top: 6px;
}

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

.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-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: 560px;
}

.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) 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-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: 42px;
  --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: 38px;
  --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: 32px;
  --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: 50px;
  --planner-row-height: 38px;
  --planner-group-height: 30px;
  --planner-day-head-height: 56px;
  --planner-day-font: 14px;
  --planner-name-font: 13px;
}

.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-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 {
  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 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-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: #07111f; }
.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: #07111f; }

: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"] .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"] .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-carryover-settings {
  border-top-color: #94a3b8;
}

:root[data-theme="light"] .absence-limit-settings,
:root[data-theme="light"] .absence-limit-type-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-glz,
: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"] .bg-tday,
:root[data-theme="light"] .bg-tday-var {
  color: #07111f;
}

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

: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-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;
}

.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;
}

.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-schedule-import .table-wrap {
  max-height: min(62vh, 620px);
  overflow: auto;
}

.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;
}

.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);
}

.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;
  }
}

.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;
}

.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: #76e24f;
}

.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-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-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-logout {
    width: 100%;
  }
}

.admin-year-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  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;
}
