/* Self-hosted Outfit (avoids Google Fonts CSP violations). */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/outfit-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/outfit-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Apple-inspired design tokens ── */
:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-secondary: rgba(255, 255, 255, 0.78);
  --surface-muted: #f4f5f8;
  --surface-hover: #eaeaef;
  --surface-inset: #ececf1;
  --table-header: #f7f7fa;
  --input-bg: #f7f7fa;
  --on-accent: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #141418;
  --text-secondary: #5c5c66;
  --text-tertiary: #767680;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 28px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 44px rgba(15, 23, 42, 0.1);
  --shadow-surface: var(--shadow-sm);
  --shadow-elevated: var(--shadow-md);
  --blur: saturate(180%) blur(20px);
  --kontor: #34c759;
  --kontor-soft: rgba(52, 199, 89, 0.14);
  --remote: #007aff;
  --remote-soft: rgba(0, 122, 255, 0.14);
  --fri: #ff9500;
  --fri-soft: rgba(255, 149, 0, 0.14);
  --syg: #ff375f;
  --syg-soft: rgba(255, 55, 95, 0.14);
  --udafhuset: #af52de;
  --udafhuset-soft: rgba(175, 82, 222, 0.14);
  --extern: #5856d6;
  --extern-soft: rgba(88, 86, 214, 0.14);
  --kursus: #ffcc00;
  --kursus-soft: rgba(255, 204, 0, 0.2);
  --barsel: #f472b6;
  --barsel-soft: rgba(244, 114, 182, 0.16);
  --orlov: #64748b;
  --orlov-soft: rgba(100, 116, 139, 0.16);
  --status-kontor-text: #248a3d;
  --status-remote-text: #0066cc;
  --status-fri-text: #c93400;
  --status-syg-text: #d70040;
  --status-udafhuset-text: #8944ab;
  --status-extern-text: #4b49b6;
  --status-kursus-text: #a67c00;
  --status-barsel-text: #be185d;
  --status-orlov-text: #475569;
  --today-ring: rgba(0, 113, 227, 0.18);
  --today-header: linear-gradient(180deg, rgba(0, 113, 227, 0.08) 0%, var(--table-header) 100%);
  --thursday-header: linear-gradient(180deg, rgba(255, 149, 0, 0.1) 0%, var(--table-header) 100%);
  --morgenmad-card-bg: linear-gradient(145deg, #ffffff 0%, #fff9f0 100%);
  --morgenmad-border: rgba(255, 149, 0, 0.18);
  --popover-bg: rgba(255, 255, 255, 0.97);
  --overlay-hover: rgba(15, 23, 42, 0.05);
  --row-hover: rgba(15, 23, 42, 0.025);
  --sticky-shadow: rgba(15, 23, 42, 0.05);
  --accent-soft: rgba(0, 113, 227, 0.1);
  --picker-backdrop: rgba(15, 23, 42, 0.38);
  --schedule-col-alt: rgba(15, 23, 42, 0.04);
  --schedule-weekend-bg: rgba(15, 23, 42, 0.025);
  --schedule-weekend-alt-bg: rgba(15, 23, 42, 0.055);
  --schedule-today-col: rgba(0, 113, 227, 0.08);
  --schedule-row-odd-bg: var(--surface);
  --schedule-row-even-bg: #f7f7fa;
  --schedule-row-hover: rgba(0, 113, 227, 0.06);
  --schedule-row-border: rgba(15, 23, 42, 0.11);
  --schedule-note-active: #ff3b30;
  --schedule-note-active-hover: #e6352b;
  --theme-meta-color: #f2f2f7;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  --font-display: "Outfit", var(--font);
  --text-caption: 0.75rem;
  --text-footnote: 0.8125rem;
  --text-body: 0.9375rem;
  --text-headline: 1.0625rem;
  --text-title-3: 1.25rem;
  --text-title-2: 1.375rem;
  --text-large-title: 2rem;
  --transition: 0.22s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-spring: 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  --layout-max: 1120px;
  --layout-gutter: 24px;
  --wide-schedule-gutter: clamp(16px, 2.5vw, 40px);
  --layout-vspace: 40px;
  --mobile-tab-clearance: calc(88px + env(safe-area-inset-bottom, 0px));
  --holger-crowd-overlay: linear-gradient(
    180deg,
    rgba(238, 240, 244, 0.15) 0%,
    rgba(238, 240, 244, 0.32) 55%,
    rgba(238, 240, 244, 0.42) 100%
  );
  --holger-crowd-image: url("/images/holger-crowd-bg.svg");
  --holger-mark-image: url("/images/holger-mark.svg");
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1a1a1f;
  --surface-secondary: rgba(26, 26, 31, 0.9);
  --surface-muted: #24242b;
  --surface-hover: #32323a;
  --surface-inset: #24242b;
  --table-header: #24242b;
  --input-bg: #24242b;
  --on-accent: #ffffff;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f7;
  --text-secondary: #b8b8be;
  --text-tertiary: #8e8e96;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 6px 28px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.65);
  --kontor-soft: rgba(50, 215, 75, 0.22);
  --remote-soft: rgba(100, 210, 255, 0.2);
  --fri-soft: rgba(255, 159, 10, 0.22);
  --syg-soft: rgba(255, 55, 95, 0.22);
  --udafhuset-soft: rgba(191, 90, 242, 0.22);
  --extern-soft: rgba(125, 122, 255, 0.22);
  --kursus-soft: rgba(255, 214, 10, 0.24);
  --barsel-soft: rgba(255, 133, 179, 0.24);
  --orlov-soft: rgba(142, 142, 147, 0.24);
  --status-kontor-text: #32d74b;
  --status-remote-text: #64d2ff;
  --status-fri-text: #ff9f0a;
  --status-syg-text: #ff375f;
  --status-udafhuset-text: #bf5af2;
  --status-extern-text: #7d7aff;
  --status-kursus-text: #ffd60a;
  --status-barsel-text: #ff85b3;
  --status-orlov-text: #aeaeb2;
  --today-ring: rgba(10, 132, 255, 0.28);
  --today-header: linear-gradient(180deg, rgba(10, 132, 255, 0.16) 0%, var(--table-header) 100%);
  --thursday-header: linear-gradient(180deg, rgba(255, 159, 10, 0.16) 0%, var(--table-header) 100%);
  --morgenmad-card-bg: linear-gradient(145deg, #1a1a1f 0%, #2a2218 100%);
  --morgenmad-border: rgba(255, 159, 10, 0.24);
  --popover-bg: rgba(36, 36, 43, 0.97);
  --overlay-hover: rgba(255, 255, 255, 0.07);
  --row-hover: rgba(255, 255, 255, 0.05);
  --sticky-shadow: rgba(0, 0, 0, 0.4);
  --accent-soft: rgba(10, 132, 255, 0.2);
  --picker-backdrop: rgba(0, 0, 0, 0.68);
  --schedule-col-alt: rgba(255, 255, 255, 0.05);
  --schedule-weekend-bg: rgba(255, 255, 255, 0.03);
  --schedule-weekend-alt-bg: rgba(255, 255, 255, 0.07);
  --schedule-today-col: rgba(10, 132, 255, 0.14);
  --schedule-row-odd-bg: #1a1a1f;
  --schedule-row-even-bg: #222229;
  --schedule-row-hover: rgba(10, 132, 255, 0.1);
  --schedule-row-border: rgba(255, 255, 255, 0.14);
  --schedule-note-active: #ff453a;
  --schedule-note-active-hover: #ff6961;
  --theme-meta-color: #000000;
  --holger-crowd-overlay: linear-gradient(
    180deg,
    rgba(9, 9, 11, 0.12) 0%,
    rgba(9, 9, 11, 0.28) 55%,
    rgba(9, 9, 11, 0.42) 100%
  );
  --holger-crowd-image: url("/images/holger-crowd-bg-dark.svg");
  --holger-mark-image: url("/images/holger-mark-dark.svg");
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  isolation: isolate;
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--holger-crowd-image) center 72% / cover no-repeat;
}

html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--holger-crowd-overlay);
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  z-index: 2;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.47;
  letter-spacing: -0.01em;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px max(20px, env(safe-area-inset-right)) 6px max(20px, env(safe-area-inset-left));
  padding-top: max(6px, env(safe-area-inset-top));
  background: var(--surface-secondary);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 0.5px solid var(--border);
}

.top-bar-main {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.top-bar-brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.top-bar-main.has-team-nav {
  overflow-x: auto;
  scrollbar-width: none;
}

.top-bar-main.has-team-nav .top-bar-brand-cluster {
  flex-wrap: nowrap;
}

.top-bar-main.has-team-nav::-webkit-scrollbar {
  display: none;
}

.top-bar-spacer {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
  text-decoration: none;
  color: var(--text);
  transition: opacity var(--transition);
}

.brand:hover {
  opacity: 0.75;
}

.brand-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--holger-mark-image) center / cover no-repeat;
  box-shadow: 0 2px 10px rgba(20, 163, 163, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .brand-mark {
  box-shadow: 0 2px 12px rgba(30, 196, 196, 0.34);
  border-color: rgba(255, 255, 255, 0.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar-actions {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.language-switcher {
  position: relative;
  flex-shrink: 0;
}

.language-switcher-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.language-switcher-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.language-switcher-toggle:active {
  opacity: 0.72;
  transform: scale(0.96);
}

.language-switcher-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.language-switcher-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-soft);
}

.language-switcher-icon {
  display: block;
}

.language-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md, 0 12px 28px rgba(15, 23, 42, 0.14));
}

.language-switcher-menu[hidden] {
  display: none;
}

.language-switcher-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.language-switcher-option:hover {
  background: var(--overlay-hover, var(--surface-hover));
}

.language-switcher-option.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.language-switcher-flag {
  flex-shrink: 0;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 70%, transparent);
}

.theme-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.theme-toggle:active {
  opacity: 0.72;
  transform: scale(0.96);
}

.theme-toggle[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.push-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
}

.push-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.push-toggle:active {
  opacity: 0.72;
  transform: scale(0.96);
}

.push-toggle.is-enabled {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.push-toggle.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.push-icon {
  display: block;
}

.push-toggle .push-icon-on {
  display: none;
}

.push-toggle.is-enabled .push-icon-off {
  display: none;
}

.push-toggle.is-enabled .push-icon-on {
  display: block;
}

.missed-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
}

.missed-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: scale(1.04);
}

.missed-toggle.has-unread {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.missed-toggle[hidden] {
  display: none !important;
}

.missed-icon {
  display: block;
}

.missed-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3b30;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 59, 48, 0.35);
}

.missed-badge[hidden] {
  display: none !important;
}

.missed-badge.has-count {
  top: -3px;
  right: -3px;
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.push-menu-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, #ff3b30 12%, var(--surface-muted));
  border: 1px solid color-mix(in srgb, #ff3b30 28%, var(--border));
  color: #c41e16;
  font-size: 0.84rem;
  line-height: 1.4;
}

.push-menu-error[hidden] {
  display: none !important;
}

.picker-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2300;
  background: var(--picker-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-spring);
}

.picker-sheet-backdrop.is-visible {
  opacity: 1;
}

.picker-sheet-backdrop[hidden] {
  display: none !important;
}

.status-menu.is-bottom-sheet,
.note-popover.is-bottom-sheet {
  position: fixed;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2310;
  width: 100%;
  max-height: min(78vh, 520px);
  margin: 0;
  padding: 0 0 max(12px, env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--surface);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
  overflow: auto;
  transform: translateY(100%) !important;
  transition: transform var(--transition-spring);
}

.status-menu.is-bottom-sheet.is-sheet-visible,
.note-popover.is-bottom-sheet.is-sheet-visible {
  transform: translateY(0) !important;
}

.picker-sheet-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.picker-sheet-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.status-menu.is-bottom-sheet .status-option-form {
  border-bottom: 1px solid var(--border);
}

.status-menu.is-bottom-sheet .status-option-form:last-child {
  border-bottom: none;
}

.status-menu.is-bottom-sheet .status-option {
  width: 100%;
  border-radius: 0;
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.78rem;
  gap: 8px;
}

.status-menu.is-bottom-sheet .status-dot {
  width: 6px;
  height: 6px;
}

.status-menu.is-bottom-sheet .picker-sheet-header {
  padding: 10px 14px 8px;
}

.status-menu.is-bottom-sheet .picker-sheet-title {
  font-size: 0.84rem;
}

.status-menu.is-bottom-sheet {
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: min(52vh, 360px) !important;
  transform: none !important;
  padding: 0 0 max(8px, env(safe-area-inset-bottom));
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.note-popover.is-bottom-sheet {
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  transform: none !important;
  padding: 0 16px 12px;
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.note-popover.is-bottom-sheet .note-label {
  display: none;
}

.note-popover.is-bottom-sheet .note-form {
  padding-top: 12px;
}

body.picker-sheet-open .schedule-board .day-note .note-btn,
body.picker-sheet-open .schedule-board .note-preview,
body.picker-sheet-open .schedule-board .day-note-snippet {
  visibility: hidden;
  pointer-events: none;
}

.schedule-board:has(.note-picker.is-open) .note-picker:not(.is-open) .note-btn,
.schedule-board:has(.note-picker.is-preview-open) .note-picker:not(.is-preview-open) .note-btn {
  visibility: hidden;
  pointer-events: none;
}

.schedule-board:has(.note-picker.is-open) .note-picker:not(.is-open) .note-preview,
.schedule-board:has(.note-picker.is-preview-open) .note-picker:not(.is-preview-open) .note-preview {
  display: none;
}

.schedule-board .td-day:has(.note-picker.is-open),
.schedule-board .td-day:has(.note-picker.is-preview-open) {
  z-index: 80;
}

.me-toggle {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
}

.me-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.me-toggle:active {
  opacity: 0.72;
  transform: scale(0.96);
}

.me-toggle.is-selected {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.me-icon {
  display: block;
}

.me-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  border: 2px solid var(--surface);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

.me-badge[hidden] {
  display: none !important;
}

.me-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(50vh, 320px);
  overflow: auto;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  background: var(--surface-muted);
}

.me-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 0.5px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.me-option:last-child {
  border-bottom: none;
}

.me-option:hover {
  background: var(--surface-hover);
}

.me-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-muted));
  color: var(--accent);
}

.me-option-check {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.me-menu-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.me-menu-clear {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.84rem;
  cursor: pointer;
}

.me-menu-clear:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.me-menu-clear[hidden] {
  display: none !important;
}

.me-pin-step[hidden],
.me-menu [data-me-step][hidden] {
  display: none !important;
}

.me-pin-form {
  display: grid;
  gap: 12px;
}

.me-pin-field {
  display: block;
}

.me-pin-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-align: center;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.me-pin-input:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
  background: var(--surface);
}

.me-pin-input.is-invalid {
  border-color: color-mix(in srgb, #e5484d 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, #e5484d 18%, transparent);
}

.me-pin-error {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e5484d;
  text-align: center;
}

.me-pin-error[hidden] {
  display: none !important;
}

.me-pin-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.me-pin-submit {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.me-pin-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.schedule-table tbody .person-row.is-me:nth-child(odd) .td-person,
.schedule-table tbody .person-row.is-me:nth-child(odd) .td-day,
.today-strip-item.is-me {
  background: color-mix(in srgb, var(--accent) 7%, var(--schedule-row-odd-bg));
}

.schedule-table tbody .person-row.is-me:nth-child(even) .td-person,
.schedule-table tbody .person-row.is-me:nth-child(even) .td-day {
  background: color-mix(in srgb, var(--accent) 7%, var(--schedule-row-even-bg));
}

.person-row.is-me .person-cell {
  box-shadow: inset 3px 0 0 var(--accent);
}

.person-row.is-me .person-name,
.today-strip-item.is-me .today-strip-name {
  font-weight: 700;
  color: var(--accent);
}

.today-strip {
  display: none;
}

.mobile-tab-nav {
  display: none;
}

.missed-menu {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--picker-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-spring);
  pointer-events: none;
}

.missed-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.missed-menu[hidden] {
  display: none !important;
}

.missed-menu-panel {
  width: min(100%, 400px);
  max-height: min(88vh, 560px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  min-width: 0;
  transform: scale(0.96) translateY(10px);
  opacity: 0;
  transition:
    transform var(--transition-spring),
    opacity var(--transition-spring);
}

.missed-menu.is-visible .missed-menu-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.missed-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.missed-menu-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.missed-menu-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.missed-menu-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.missed-menu-body {
  margin-bottom: 14px;
  min-width: 0;
}

.missed-menu-actions {
  display: flex;
  justify-content: flex-end;
}

.missed-menu-dismiss {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.missed-menu-dismiss:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.push-menu {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--picker-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-spring);
  pointer-events: none;
}

.push-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.push-menu-unsupported {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-muted));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.4;
}

.push-menu-ios-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, #ff9f0a 12%, var(--surface-muted));
  border: 1px solid color-mix(in srgb, #ff9f0a 28%, var(--border));
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.push-menu-device-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-muted));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.push-menu-device-hint-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.88rem;
}

.push-menu-device-hint-text {
  margin: 0;
}

.push-menu-ios-hint-title {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.88rem;
}

.push-menu-ios-hint-steps {
  margin: 0;
}

.push-menu-unsupported[hidden],
.push-menu-ios-hint[hidden],
.push-menu-device-hint[hidden],
.push-menu-options.is-disabled {
  display: none !important;
}

.push-menu[hidden] {
  display: none !important;
}

.push-menu-panel {
  width: min(100%, 380px);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(10px);
  opacity: 0;
  transition:
    transform var(--transition-spring),
    opacity var(--transition-spring);
}

.push-menu.is-visible .push-menu-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.push-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.push-menu-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.push-menu-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}

.push-menu-close:active {
  opacity: 0.72;
}

.push-menu-intro {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.push-menu-options {
  display: grid;
  gap: 0;
  padding: 0;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  background: var(--surface-muted);
  overflow: hidden;
}

.push-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 0;
  border: none;
  border-bottom: 0.5px solid var(--border);
  background: transparent;
  cursor: pointer;
}

.push-option[hidden],
.push-option-select[hidden],
[data-push-status-people-wrap][hidden],
[data-push-employee-wrap][hidden],
[data-push-personal-wrap][hidden],
[data-push-reminder-wrap][hidden] {
  display: none !important;
}

.push-option:last-child {
  border-bottom: none;
}

.push-option-select {
  grid-template-columns: 1fr;
  cursor: default;
}

.push-option input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

.push-option-text {
  display: grid;
  gap: 4px;
}

.push-option-text strong {
  font-size: 0.9rem;
}

.push-option-text small {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}

.push-employee-select {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.push-reminder-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.push-status-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
}

.push-status-people-empty {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.push-status-people-empty[hidden] {
  display: none !important;
}

.push-morgenmad-options[hidden] {
  display: none !important;
}

.push-status-people-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.push-status-people-actions[hidden] {
  display: none !important;
}

.push-status-people-action {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.push-status-people-action:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.push-status-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  cursor: pointer;
}

.push-status-person input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.push-reminder-day {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  cursor: pointer;
}

.push-reminder-day.is-breakfast-day {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.push-reminder-day input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.push-menu-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.push-option-select.is-highlight {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.push-menu-save,
.push-menu-disable {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.push-menu-save[hidden],
.push-menu-disable[hidden] {
  display: none !important;
}

[data-dirty-save][hidden] {
  display: none !important;
}

.push-menu-disable {
  background: transparent;
  color: var(--text-secondary);
}

.push-employee-select option[data-is-breakfast-day="true"] {
  font-weight: 700;
}

.theme-icon {
  display: none;
}

.theme-icon-moon {
  display: block;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.main-content {
  width: min(var(--layout-max), calc(100% - 2 * var(--layout-gutter)));
  max-width: 100%;
  margin: 0 auto;
  padding: var(--layout-vspace) var(--layout-gutter) calc(var(--layout-vspace) + 24px);
}

.main-content:has(.live-page--wide-schedule) {
  width: 100%;
  max-width: none;
  padding-left: max(var(--wide-schedule-gutter), env(safe-area-inset-left));
  padding-right: max(var(--wide-schedule-gutter), env(safe-area-inset-right));
}

.live-page--wide-schedule .page-hero-compact {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.live-page--wide-schedule .team-footnote {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.missed-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-muted);
  min-width: 0;
}

.missed-notifications-item {
  min-width: 0;
}

.missed-notifications-item + .missed-notifications-item {
  border-top: 1px solid var(--border);
}

.missed-notifications-link,
.missed-notifications-static {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.missed-notifications-link:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.missed-notifications-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

.missed-notifications-item-line {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.missed-notifications-item-line + .missed-notifications-item-line {
  font-weight: 500;
  color: var(--text-secondary);
}

.missed-notifications-item-title {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.missed-notifications-item-body {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.missed-notifications-item-time {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.35;
  white-space: normal;
}

/* ── Home / team picker ── */
.home-page {
  max-width: 720px;
  margin: 0 auto;
}

.home-header {
  text-align: center;
  margin-bottom: 32px;
}

.home-welcome {
  max-width: 420px;
  margin: 48px auto 0;
  padding: 36px 28px;
  text-align: center;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}

.home-welcome-icon {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--holger-mark-image) center / cover no-repeat;
  box-shadow: 0 4px 16px rgba(20, 163, 163, 0.22);
}

[data-theme="dark"] .home-welcome-icon {
  box-shadow: 0 4px 18px rgba(30, 196, 196, 0.28);
}

.home-welcome-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.home-welcome-text {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

.home-welcome-hint {
  margin: 16px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.team-access-gate {
  display: flex;
  justify-content: center;
  padding: 32px 0 16px;
}

.team-access-card {
  width: min(100%, 420px);
  padding: 32px 28px;
  text-align: center;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}

.team-access-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}

.team-access-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.team-access-intro {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.team-access-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, #ff3b30 12%, var(--surface-muted));
  border: 1px solid color-mix(in srgb, #ff3b30 28%, var(--border));
  color: #c41e16;
  font-size: 0.875rem;
}

.team-access-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.team-access-field {
  display: grid;
  gap: 6px;
}

.team-access-field span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.team-access-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.team-access-submit {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.team-access-submit:active {
  opacity: 0.85;
}

.team-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.team-picker-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.team-picker-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.team-picker-card:active {
  transform: scale(0.98);
}

.team-picker-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.team-picker-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.team-picker-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.team-picker-day {
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.team-picker-day-muted {
  color: var(--text-tertiary);
}

.team-picker-url {
  margin-top: 8px;
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-tertiary);
}

.app-nav-link-muted {
  color: var(--text-tertiary);
}

.app-nav-link-muted.is-active {
  color: var(--text);
}

/* ── Team switcher ── */
.team-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.team-switcher-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.team-switcher-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.team-switcher-link.is-active {
  color: var(--text);
  background: var(--surface-muted);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ── App navigation ── */
.app-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.app-nav--header {
  margin: 0;
  flex-shrink: 0;
  padding: 3px;
}

.app-nav--header .app-nav-link {
  padding: 6px 12px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.has-team-nav .brand-name {
  font-size: 0.875rem;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.app-nav-link:hover {
  color: var(--text);
  background: var(--overlay-hover);
}

.app-nav-link.is-active {
  color: var(--text);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--border);
}

.app-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.app-nav-link .morgenmad-mark-xs {
  margin-top: 0;
}

/* ── Shared overview layout ── */
.page-header {
  text-align: center;
  margin-bottom: 24px;
}

.page-hero {
  margin-bottom: 20px;
  padding: 28px 24px 24px;
  background: var(--surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-surface);
  isolation: isolate;
}

.page-hero-morgenmad {
  position: relative;
  overflow: hidden;
}

.page-hero-team {
  position: relative;
  overflow: hidden;
}

.page-hero-compact {
  margin-bottom: 16px;
  padding: 16px 20px 14px;
}

.page-hero-compact .page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
}

.page-hero-compact .page-hero-icon,
.page-hero-compact .morgenmad-mark-md {
  flex-shrink: 0;
  align-self: center;
}

.page-hero-compact .page-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
}

.page-hero-compact .page-subtitle {
  font-size: 0.875rem;
}

.page-hero-morgenmad::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9500, #ff6b00);
}

.page-hero-team::before {
  display: none;
}

.page-hero-icon {
  display: block;
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1;
}

.page-title {
  margin: 0 0 6px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.page-subtitle {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.page-week {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 0;
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.overview-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.overview-stack .overview-panel,
.overview-stack .overview-panel + .overview-card,
.overview-stack .overview-panel + .overview-panel {
  margin-top: 0;
  margin-bottom: 0;
}

.overview-panel {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-surface);
}

.overview-panel:last-child {
  margin-bottom: 0;
}

.overview-card {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-surface);
  overflow: hidden;
  isolation: isolate;
}

.overview-card + .overview-card,
.overview-panel + .overview-card {
  margin-top: 20px;
}

.overview-section-title {
  margin: 0 0 8px;
  font-size: var(--text-headline);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text);
}

.overview-inner-panel {
  padding: 18px 20px;
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.overview-highlight {
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.week-picker-panel {
  margin-bottom: 20px;
}

.panel-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-section-intro {
  min-width: 0;
}

.panel-section-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-transform: capitalize;
}

.week-nav-panel {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
}

.week-nav-panel .week-picker {
  margin-bottom: 0;
}

.team-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 12px;
}

.team-toolbar-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-toolbar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.team-toolbar-heading-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-toolbar-toggle {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.team-toolbar-toggle:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--border) 70%, var(--text-tertiary));
}

.team-toolbar-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.team-toolbar.is-stats-collapsed .team-toolbar-stats-body {
  display: none;
}

.team-toolbar.is-stats-collapsed {
  padding-bottom: 10px;
}

.team-toolbar-heading .overview-section-title {
  margin: 0;
  font-size: 0.875rem;
}

.team-toolbar-date {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: capitalize;
  white-space: nowrap;
}

.team-toolbar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.team-toolbar-week {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.team-toolbar:has(.team-toolbar-stats) .team-toolbar-nav {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.team-toolbar:not(:has(.team-toolbar-stats)) {
  padding: 10px 14px;
}

.morgenmad-overview .team-toolbar:not(:has(.team-toolbar-stats)) {
  padding: 8px 12px;
}

.team-toolbar-nav .week-picker {
  margin-bottom: 0;
  box-shadow: none;
  border: none;
  background: transparent;
  padding: 0;
}

.team-toolbar-nav .picker-btn {
  box-shadow: none;
}

.team-overview .stats-strip-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
}

.team-overview .stats-strip-compact .stat-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  min-width: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.team-overview .stats-strip-compact .stat-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-strong);
}

.team-overview .stats-strip-compact .stat-value {
  font-size: 1.375rem;
}

.team-overview .stats-strip-compact .stat-label {
  font-size: 0.6875rem;
  line-height: 1.25;
}

.stat-card.is-zero {
  opacity: 0.38;
}

.stat-card.is-zero:hover {
  transform: none;
  box-shadow: none;
}

.team-footnote {
  margin-top: 0;
}

/* ── Today stats ── */
.stats-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stats-strip::-webkit-scrollbar {
  display: none;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background-clip: padding-box;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  flex: 0 0 auto;
  min-width: 118px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-kontor {
  background: var(--kontor-soft);
  border-color: rgba(52, 199, 89, 0.18);
}

.stat-remote {
  background: var(--remote-soft);
  border-color: rgba(0, 122, 255, 0.18);
}

.stat-fri {
  background: var(--fri-soft);
  border-color: rgba(255, 149, 0, 0.18);
}

.stat-syg {
  background: var(--syg-soft);
  border-color: rgba(255, 55, 95, 0.18);
}

.stat-udafhuset {
  background: var(--udafhuset-soft);
  border-color: rgba(175, 82, 222, 0.18);
}

.stat-extern {
  background: var(--extern-soft);
  border-color: rgba(88, 86, 214, 0.18);
}

.stat-kursus {
  background: var(--kursus-soft);
  border-color: rgba(255, 204, 0, 0.28);
}

.stat-barsel {
  background: var(--barsel-soft);
  border-color: rgba(244, 114, 182, 0.22);
}

.stat-orlov {
  background: var(--orlov-soft);
  border-color: rgba(100, 116, 139, 0.22);
}

.stat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-kontor .stat-dot { background: var(--kontor); box-shadow: 0 0 0 4px var(--kontor-soft); }
.stat-remote .stat-dot { background: var(--remote); box-shadow: 0 0 0 4px var(--remote-soft); }
.stat-fri .stat-dot { background: var(--fri); box-shadow: 0 0 0 4px var(--fri-soft); }
.stat-syg .stat-dot { background: var(--syg); box-shadow: 0 0 0 4px var(--syg-soft); }
.stat-udafhuset .stat-dot { background: var(--udafhuset); box-shadow: 0 0 0 4px var(--udafhuset-soft); }
.stat-extern .stat-dot { background: var(--extern); box-shadow: 0 0 0 4px var(--extern-soft); }
.stat-kursus .stat-dot { background: var(--kursus); box-shadow: 0 0 0 4px var(--kursus-soft); }
.stat-barsel .stat-dot { background: var(--barsel); box-shadow: 0 0 0 4px var(--barsel-soft); }
.stat-orlov .stat-dot { background: var(--orlov); box-shadow: 0 0 0 4px var(--orlov-soft); }

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Workplace stats (office vs home) ── */
.workplace-stats-panel {
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.workplace-stats-header {
  margin-bottom: 16px;
}

.workplace-stats-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.workplace-stats-block + .workplace-stats-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.workplace-stats-block-header {
  margin-bottom: 12px;
}

.workplace-stats-block-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.workplace-stats-block-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.workplace-stats-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.workplace-stats-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-secondary);
}

.workplace-stats-segment {
  min-width: 4px;
  transition: width 0.35s ease;
}

.workplace-stats-segment.workplace-stats-kontor { background: var(--kontor); }
.workplace-stats-segment.workplace-stats-remote { background: var(--remote); }
.workplace-stats-segment.workplace-stats-fri { background: var(--fri); }
.workplace-stats-segment.workplace-stats-syg { background: var(--syg); }
.workplace-stats-segment.workplace-stats-udafhuset { background: var(--udafhuset); }
.workplace-stats-segment.workplace-stats-extern { background: var(--extern); }
.workplace-stats-segment.workplace-stats-kursus { background: var(--kursus); }
.workplace-stats-segment.workplace-stats-barsel { background: var(--barsel); }
.workplace-stats-segment.workplace-stats-orlov { background: var(--orlov); }

.workplace-stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.workplace-stats-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.workplace-stats-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.workplace-stats-legend-item.workplace-stats-kontor .workplace-stats-dot {
  background: var(--kontor);
  box-shadow: 0 0 0 3px var(--kontor-soft);
}

.workplace-stats-legend-item.workplace-stats-remote .workplace-stats-dot {
  background: var(--remote);
  box-shadow: 0 0 0 3px var(--remote-soft);
}

.workplace-stats-legend-item.workplace-stats-fri .workplace-stats-dot {
  background: var(--fri);
  box-shadow: 0 0 0 3px var(--fri-soft);
}

.workplace-stats-legend-item.workplace-stats-syg .workplace-stats-dot {
  background: var(--syg);
  box-shadow: 0 0 0 3px var(--syg-soft);
}

.workplace-stats-legend-item.workplace-stats-udafhuset .workplace-stats-dot {
  background: var(--udafhuset);
  box-shadow: 0 0 0 3px var(--udafhuset-soft);
}

.workplace-stats-legend-item.workplace-stats-extern .workplace-stats-dot {
  background: var(--extern);
  box-shadow: 0 0 0 3px var(--extern-soft);
}

.workplace-stats-legend-item.workplace-stats-kursus .workplace-stats-dot {
  background: var(--kursus);
  box-shadow: 0 0 0 3px var(--kursus-soft);
}

.workplace-stats-legend-item.workplace-stats-barsel .workplace-stats-dot {
  background: var(--barsel);
  box-shadow: 0 0 0 3px var(--barsel-soft);
}

.workplace-stats-legend-item.workplace-stats-orlov .workplace-stats-dot {
  background: var(--orlov);
  box-shadow: 0 0 0 3px var(--orlov-soft);
}

.workplace-stats-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.workplace-stats-empty[hidden] {
  display: none;
}

/* ── Week picker ── */
.week-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 12px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.picker-btn:hover {
  background: var(--surface-muted);
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

.picker-btn:active {
  transform: scale(0.96);
}

.picker-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 160px;
  padding: 0 8px;
}

.picker-week {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.picker-today {
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

button.picker-today {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.picker-today:hover {
  opacity: 0.7;
}

.picker-today-active {
  color: var(--text-tertiary);
  cursor: default;
}

/* ── Schedule card ── */
.schedule-card {
  /* inherits .overview-card */
}

.schedule-card.overview-card {
  padding: 0;
}

.schedule-card.overview-card::before {
  display: none;
}

.live-page--wide-schedule .schedule-card.overview-card {
  border-radius: 16px;
  overflow: visible;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.06);
}

.live-page--wide-schedule .schedule-card.overview-card::before {
  height: 2px;
  opacity: 0.85;
}

.schedule-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.live-page--wide-schedule .schedule-card-header {
  padding: 12px 16px;
  background: var(--surface);
}

.schedule-eyebrow {
  margin: 0 0 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.schedule-card-header-text {
  flex: 1 1 160px;
  min-width: 0;
}

.schedule-card-header-nav {
  flex: 0 1 auto;
  min-width: 0;
}

.schedule-title-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.schedule-title-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  font-size: 1.125rem;
  line-height: 1;
}

.schedule-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.schedule-subtitle {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.schedule-meta {
  display: none;
}

.schedule-week-nav {
  align-items: flex-end;
}

.schedule-week-nav-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-week-nav .team-toolbar-week {
  text-align: right;
  margin: 0;
}

.schedule-week-nav .week-picker {
  margin-bottom: 0;
}

.schedule-card.hide-weekends .th-day.is-weekend,
.schedule-card.hide-weekends .td-day.is-weekend,
.schedule-board.hide-weekends .th-day.is-weekend,
.schedule-board.hide-weekends .td-day.is-weekend {
  display: none;
}

.team-toolbar-stats-only {
  padding: 14px 16px 12px;
}

.team-toolbar-stats-only .team-toolbar-stats {
  gap: 10px;
}

/* Sticky offsets: top bar → gap → Status → gap → Ugeplan (same stack spacing). */
.live-page--wide-schedule {
  --app-sticky-top: max(52px, calc(env(safe-area-inset-top, 0px) + 46px));
  --schedule-sticky-gap: 10px;
  --status-sticky-top: calc(var(--app-sticky-top) + var(--schedule-sticky-gap));
  --schedule-sticky-top: var(--status-sticky-top);
}

/* Keep "Status i dag" visible while scrolling the colleague list. */
#week-toolbar:has([data-stats-today-panel]) {
  position: sticky;
  top: var(--status-sticky-top);
  z-index: 47;
  background: var(--bg);
}

/* Fill sticky gaps with page bg so list rows cannot peek through. */
#week-toolbar:has([data-stats-today-panel])::before,
#week-toolbar:has([data-stats-today-panel])::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--schedule-sticky-gap);
  background: var(--bg);
  pointer-events: none;
}

#week-toolbar:has([data-stats-today-panel])::before {
  bottom: 100%;
}

#week-toolbar:has([data-stats-today-panel])::after {
  top: 100%;
}

#week-toolbar:has([data-stats-today-panel]) .team-toolbar-stats-only {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

/* Sticky shell fills corner wedges with page bg when stuck (avoids green crowd bleed). */
.live-page--wide-schedule .schedule-sticky-shell {
  position: sticky;
  top: var(--schedule-sticky-top);
  z-index: 30;
  background: transparent;
}

.live-page--wide-schedule .schedule-sticky-shell.is-stuck {
  background: var(--bg);
}

.live-page--wide-schedule .schedule-sticky-chrome {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.live-page--wide-schedule .schedule-sticky-chrome .schedule-card-header {
  position: relative;
  z-index: auto;
  box-shadow: none;
  border-radius: 0;
  background: var(--surface);
}

.live-page--wide-schedule .schedule-day-head {
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}

.schedule-meta-chip {
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

.schedule-board {
  padding: 10px 8px;
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
}

.live-page--wide-schedule .schedule-board {
  position: relative;
  z-index: 0;
  padding: 0;
  background: var(--surface);
}

.live-page--wide-schedule .schedule-scroll {
  position: relative;
  z-index: 1;
  padding: 0;
}

.schedule-head-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.schedule-head-scroll::-webkit-scrollbar {
  display: none;
}

.schedule-table thead th {
  background: var(--surface);
}

.schedule-table thead .th-person {
  z-index: 7;
}

.schedule-table thead tr {
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.schedule-table-head {
  margin: 0;
}

.schedule-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
  position: relative;
  touch-action: pan-x pan-y;
}

.schedule-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(270deg, var(--surface-muted) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.schedule-scroll.can-scroll-right::after {
  opacity: 1;
}

.schedule-scroll.is-scrolled .th-person,
.schedule-scroll.is-scrolled .td-person,
.schedule-head-scroll.is-scrolled .th-person {
  box-shadow: 4px 0 10px var(--sticky-shadow);
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 0;
  table-layout: fixed;
}

.schedule-table tbody .person-row {
  border-bottom: 1px solid var(--schedule-row-border);
}

.schedule-table tbody .person-row:nth-child(odd) .td-person,
.schedule-table tbody .person-row:nth-child(odd) .td-day {
  background-color: var(--schedule-row-odd-bg);
}

.schedule-table tbody .person-row:nth-child(even) .td-person,
.schedule-table tbody .person-row:nth-child(even) .td-day {
  background-color: var(--schedule-row-even-bg);
}

.schedule-table tbody .person-row .person-cell {
  background: transparent;
}

.schedule-table th,
.schedule-table td {
  padding: 0;
  vertical-align: middle;
}

.schedule-table thead tr {
  border-bottom: 1px solid var(--schedule-row-border);
}

.th-person {
  padding: 10px 10px 10px 12px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  background: var(--schedule-row-odd-bg);
  position: sticky;
  left: 0;
  z-index: 3;
  vertical-align: bottom;
  border-right: 1px solid var(--border);
  width: 17%;
}

.th-day {
  padding: 0;
  text-align: center;
  background: var(--schedule-row-odd-bg);
  min-width: 0;
  vertical-align: bottom;
  width: calc(83% / 7);
}

.day-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 4px 10px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.day-header.is-today {
  border-radius: 10px 10px 0 0;
  border: none;
  border-bottom: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.day-header.is-morgenmad-day {
  padding-top: 8px;
}

.day-header-name {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.day-header.is-today .day-header-name {
  color: var(--accent);
  font-weight: 800;
}

.day-header-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: 8px;
  line-height: 1;
}

.is-today-date {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  min-width: 28px;
  height: 28px;
}

/* Body rows */
.person-row {
  transition: transform var(--transition);
}

.td-person {
  padding: 0 6px 0 4px;
  position: sticky;
  left: 0;
  background: var(--schedule-row-odd-bg);
  z-index: 2;
  box-shadow: none;
  border-right: 1px solid var(--schedule-row-border);
  vertical-align: middle;
  width: 17%;
}

.day-header-morgenmad {
  position: absolute;
  top: 4px;
  right: 4px;
  margin: 0;
  text-decoration: none;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 8px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: background var(--transition);
}

.person-meta {
  flex: 1;
  min-width: 0;
}

.team-overview .avatar {
  width: 34px;
  height: 34px;
  font-size: 0.6875rem;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--border) 80%, transparent);
}

.person-row:hover .person-cell {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.schedule-table tbody .person-row.is-me .person-cell {
  border: none;
  box-shadow: inset 3px 0 0 var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.schedule-table tbody .person-row:nth-child(odd):hover .td-person,
.schedule-table tbody .person-row:nth-child(odd):hover .td-day {
  background-color: color-mix(in srgb, var(--schedule-row-hover) 65%, var(--schedule-row-odd-bg) 35%);
}

.schedule-table tbody .person-row:nth-child(even):hover .td-person,
.schedule-table tbody .person-row:nth-child(even):hover .td-day {
  background-color: color-mix(in srgb, var(--schedule-row-hover) 65%, var(--schedule-row-even-bg) 35%);
}

.schedule-board .td-day {
  padding: 0;
}

.td-day {
  padding: 0;
  text-align: center;
  vertical-align: middle;
  position: relative;
  transition: background-color var(--transition);
  width: calc(83% / 7);
  min-width: 0;
}

.schedule-table thead .th-day.is-alt-col {
  background: color-mix(in srgb, var(--schedule-col-alt) 100%, var(--schedule-row-odd-bg));
}

.schedule-table tbody .td-day.is-alt-col,
.schedule-table tbody .person-row:nth-child(odd) .td-day.is-alt-col {
  background-color: var(--schedule-row-odd-bg);
}

.schedule-table tbody .person-row:nth-child(even) .td-day.is-alt-col {
  background-color: var(--schedule-row-even-bg);
}

.schedule-table tbody .person-row:nth-child(odd) .td-day.is-weekend {
  background-color: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-odd-bg));
}

.schedule-table tbody .person-row:nth-child(even) .td-day.is-weekend {
  background-color: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-even-bg));
}

.schedule-table tbody .person-row:nth-child(odd) .td-day.is-weekend.is-alt-col {
  background-color: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-odd-bg));
}

.schedule-table tbody .person-row:nth-child(even) .td-day.is-weekend.is-alt-col {
  background-color: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-even-bg));
}

.schedule-table thead .th-day.is-weekend,
.schedule-table thead .th-day.is-weekend.is-alt-col {
  background: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-odd-bg));
}

.schedule-table .th-day.is-weekend-start,
.schedule-table .td-day.is-weekend-start {
  box-shadow: inset 2px 0 0 var(--border-strong);
}

.schedule-table .th-day.is-weekend .day-header-name {
  color: var(--text-tertiary);
}

.schedule-table .th-day.is-today,
.schedule-table .td-day.is-today {
  background: var(--schedule-today-col);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.schedule-table tbody .person-row:nth-child(odd) .td-day.is-today {
  background: color-mix(in srgb, var(--schedule-today-col) 85%, var(--schedule-row-odd-bg) 15%);
}

.schedule-table tbody .person-row:nth-child(even) .td-day.is-today {
  background: color-mix(in srgb, var(--schedule-today-col) 85%, var(--schedule-row-even-bg) 15%);
}

.schedule-table .th-day.is-weekend-start.is-today,
.schedule-table .td-day.is-weekend-start.is-today {
  box-shadow: inset 2px 0 0 var(--border-strong), inset 0 -2px 0 var(--accent);
}

.schedule-table tbody .person-row:nth-child(odd):hover .td-day.is-today {
  background-color: color-mix(in srgb, var(--schedule-row-hover) 45%, color-mix(in srgb, var(--schedule-today-col) 85%, var(--schedule-row-odd-bg) 15%) 55%);
}

.schedule-table tbody .person-row:nth-child(even):hover .td-day.is-today {
  background-color: color-mix(in srgb, var(--schedule-row-hover) 45%, color-mix(in srgb, var(--schedule-today-col) 85%, var(--schedule-row-even-bg) 15%) 55%);
}

.schedule-table tbody .person-row:nth-child(odd):hover .td-day.is-weekend {
  background-color: color-mix(in srgb, var(--schedule-row-hover) 55%, color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-odd-bg)) 45%);
}

.schedule-table tbody .person-row:nth-child(even):hover .td-day.is-weekend {
  background-color: color-mix(in srgb, var(--schedule-row-hover) 55%, color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-even-bg)) 45%);
}

.day-slot {
  position: relative;
  width: 100%;
  min-height: 50px;
  padding: 0;
  box-sizing: border-box;
}

.schedule-board .day-slot {
  --schedule-cell-gap: 4px;
  --schedule-note-size: 24px;
  --schedule-note-gap: 4px;
  --schedule-status-height: auto;
}

.schedule-board .day-slot.has-note-content {
  --schedule-status-height: 24px;
  min-height: 54px;
}

.schedule-board .day-slot.has-note-content .status-picker {
  align-items: flex-start;
  padding-top: var(--schedule-cell-gap);
}

.schedule-board .day-slot.has-note-content .status-pill {
  height: var(--schedule-status-height);
  min-height: var(--schedule-status-height);
}

.schedule-board .day-note-snippet {
  position: absolute;
  top: calc(var(--schedule-cell-gap) + var(--schedule-status-height) + 3px);
  left: var(--schedule-cell-gap);
  right: calc(var(--schedule-cell-gap) + var(--schedule-note-size) + var(--schedule-note-gap));
  bottom: var(--schedule-cell-gap);
  padding: 2px 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--schedule-note-active) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--schedule-note-active) 22%, var(--border));
  color: color-mix(in srgb, var(--schedule-note-active) 88%, var(--text));
  font-size: 0.5625rem;
  line-height: 1.3;
  font-weight: 500;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: left;
  word-break: break-word;
  pointer-events: none;
}

.schedule-board .td-day.has-note-cell {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--schedule-note-active) 40%, transparent);
}

.schedule-board .day-status {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0;
}

.schedule-board .status-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding-right: calc(var(--schedule-note-size) + var(--schedule-note-gap));
  box-sizing: border-box;
}

.schedule-board .day-slot .status-pill {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: max-content;
  max-width: 100%;
  height: 26px;
  min-width: 0;
  min-height: 26px;
  margin: 0;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px 0 12px;
  font-size: 0.625rem;
  border-radius: 7px;
  box-shadow: none;
  gap: 0;
  box-sizing: border-box;
}

.schedule-board .day-note {
  position: absolute;
  top: var(--schedule-cell-gap);
  right: var(--schedule-cell-gap);
  z-index: 3;
  width: var(--schedule-note-size);
  height: var(--schedule-note-size);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  pointer-events: none;
}

.schedule-board .day-note .note-btn svg {
  width: 14px;
  height: 14px;
}

.schedule-board .status-pill {
  border-radius: 8px;
  min-height: 0;
  min-width: 0;
  padding: 0 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: none;
  line-height: 1.2;
  box-sizing: border-box;
}

.schedule-board .status-pill:hover,
.schedule-board .status-picker.is-open .status-pill {
  box-shadow: none;
  filter: brightness(0.98);
  border-color: color-mix(in srgb, currentColor 20%, var(--border));
}

.schedule-board .day-slot .status-pill:active {
  transform: scale(0.98);
}

.schedule-board .status-dot {
  width: 6px;
  height: 6px;
}

.schedule-board .status-label {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-board .day-slot .status-dot {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
}

.schedule-board .day-slot .status-chevron {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
  opacity: 0;
  width: 5px;
  transition: opacity var(--transition);
}

.schedule-board .day-slot:hover .status-chevron,
.schedule-board .day-slot .status-picker.is-open .status-chevron,
html[data-coarse-pointer="true"] .schedule-board .day-slot .status-chevron {
  opacity: 0.55;
}

.day-status .status-chevron,
.day-slot .status-chevron {
  opacity: 0;
  width: 6px;
  margin-left: auto;
  transition: opacity var(--transition);
}

.day-status:hover .status-chevron,
.day-status.status-picker.is-open .status-chevron,
.day-slot:hover .status-chevron,
.day-slot .status-picker.is-open .status-chevron,
html[data-coarse-pointer="true"] .status-chevron {
  opacity: 0.55;
}

.day-note {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
}

.day-note .note-btn {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  opacity: 0;
  border-radius: 8px;
  border-color: transparent;
  background: var(--surface);
  transition: opacity var(--transition), border-color var(--transition), background var(--transition);
}

.day-note .note-btn svg {
  width: 14px;
  height: 14px;
}

html[data-coarse-pointer="true"] .day-note .note-btn {
  opacity: 0.9;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
}

.day-status:hover .day-note .note-btn,
.day-status .day-note .note-btn.has-note,
.day-status .day-note.is-open .note-btn {
  opacity: 1;
  border-color: var(--border);
}

.day-note .note-btn.has-note {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  opacity: 1;
}

.schedule-board .day-note .note-btn {
  pointer-events: auto;
  opacity: 1;
  width: var(--schedule-note-size);
  height: var(--schedule-note-size);
  min-width: var(--schedule-note-size);
  min-height: var(--schedule-note-size);
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text-tertiary) 35%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-tertiary) 8%, var(--surface));
  color: var(--text-tertiary);
}

.schedule-board .day-note .note-btn.has-note {
  background: var(--schedule-note-active);
  border-color: var(--schedule-note-active);
  color: #fff;
  opacity: 1;
}

.schedule-board .day-note .note-btn:not(.has-note):hover,
.schedule-board .day-note.is-open .note-btn:not(.has-note) {
  border-color: color-mix(in srgb, var(--text-tertiary) 55%, var(--border));
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--text-tertiary) 12%, var(--surface));
}

.schedule-board .day-note .note-btn.has-note:hover,
.schedule-board .day-note .note-btn.has-note:focus-visible,
.schedule-board .day-note.is-open .note-btn.has-note {
  background: var(--schedule-note-active-hover);
  border-color: var(--schedule-note-active-hover);
  color: #fff;
}

.schedule-summary-row .td-summary {
  padding-top: 4px;
  vertical-align: top;
}

.schedule-summary-label {
  display: block;
  padding: 6px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
}

.schedule-summary-row {
  border-top: 2px solid var(--schedule-row-border);
}

.schedule-summary-row .td-person,
.schedule-summary-row .td-day {
  background: color-mix(in srgb, var(--surface-muted) 70%, var(--surface));
  padding-top: 6px;
  padding-bottom: 8px;
}

.day-summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.day-summary-chip.has-count {
  color: #248a3d;
  background: var(--kontor-soft);
  border-color: rgba(52, 199, 89, 0.22);
}

[data-schedule-cell].is-remote-updated {
  animation: remote-update-flash 1.2s ease;
}

@keyframes remote-update-flash {
  0% { background: rgba(0, 113, 227, 0.18); }
  100% { background: transparent; }
}

.schedule-table .td-summary.is-today .day-summary-chip.has-count {
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.15);
}

.avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--on-accent);
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.625rem;
}

.live-page--wide-schedule .page-hero-compact {
  margin-bottom: 10px;
  padding: 12px 16px 10px;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.live-page--wide-schedule .overview-stack {
  gap: 10px;
}

.live-page--wide-schedule .th-person,
.live-page--wide-schedule .td-person {
  background: var(--surface);
}

.live-page--wide-schedule .th-person {
  padding: 10px 10px 10px 12px;
}

.live-page--wide-schedule .person-cell {
  padding: 9px 10px 9px 12px;
  gap: 8px;
}

.live-page--wide-schedule .schedule-summary-label {
  padding-left: 12px;
  padding-right: 10px;
}

.live-page--wide-schedule .schedule-scroll.is-scrolled .td-person {
  box-shadow: 6px 0 16px rgba(0, 0, 0, 0.06);
}

.person-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.person-name--compact {
  display: none;
}

.person-dept {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .person-dept {
    display: none;
  }
}

.person-name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.person-name-row .person-name {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Morgenmad icon mark ── */
.morgenmad-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 149, 0, 0.12);
  border: 1px solid rgba(255, 149, 0, 0.22);
  color: inherit;
  text-decoration: none;
  line-height: 1;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.morgenmad-mark > span {
  display: block;
  line-height: 1;
}

.morgenmad-mark-xs {
  width: 20px;
  height: 20px;
  font-size: 0.625rem;
  border-radius: 6px;
}

.morgenmad-mark-sm {
  width: 24px;
  height: 24px;
  font-size: 0.6875rem;
  border-radius: 50%;
}

.morgenmad-mark-md {
  width: 30px;
  height: 30px;
  font-size: 0.9375rem;
  border-radius: 8px;
}

.morgenmad-mark-lg {
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  border-radius: 12px;
}

.morgenmad-mark.is-swap,
.person-morgenmad-badge.is-swap {
  background: rgba(175, 82, 222, 0.12);
  border-color: rgba(175, 82, 222, 0.28);
}

a.morgenmad-mark:hover,
.person-morgenmad-badge:hover {
  transform: scale(1.06);
  background: rgba(255, 149, 0, 0.2);
}

a.morgenmad-mark.is-swap:hover,
.person-morgenmad-badge.is-swap:hover {
  background: rgba(175, 82, 222, 0.2);
}

.person-morgenmad-badge {
  flex-shrink: 0;
  margin-left: auto;
}

.note-picker {
  position: relative;
}

.note-btn {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-tertiary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.6875rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--transition);
}

.note-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}

.note-btn.has-note {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.note-preview {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 55;
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--popover-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-family: var(--font);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

.note-preview::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border);
}

.note-btn.has-note:hover + .note-preview,
.note-btn.has-note:focus-visible + .note-preview,
.note-picker.is-preview-open .note-preview {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (hover: none), (pointer: coarse) {
  .note-btn.has-note:hover + .note-preview {
    opacity: 0;
    visibility: hidden;
  }

  .note-picker.is-preview-open .note-preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .note-preview::before {
    display: block;
    margin-bottom: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-tertiary);
  }

  html[lang="da"] .note-preview::before {
    content: "Tryk igen for at redigere";
  }

  html[lang="en"] .note-preview::before {
    content: "Tap again to edit";
  }
}

.note-picker.is-open .note-preview {
  opacity: 0;
  visibility: hidden;
}

.note-picker.is-open .note-btn {
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.note-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: min(260px, calc(100vw - 24px));
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.note-popover.is-floating {
  position: fixed;
  z-index: 1300;
}

.note-form {
  margin: 0;
}

.note-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.note-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8125rem;
  resize: vertical;
  min-height: 60px;
  line-height: 1.4;
}

.note-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.note-mention-menu {
  position: fixed;
  z-index: 1200;
  max-height: min(240px, 40vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--popover-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg);
}

.note-mention-menu[hidden] {
  display: none !important;
}

.note-mention-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.note-mention-option:hover,
.note-mention-option.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-muted));
}

.note-mention-name {
  font-weight: 600;
}

.note-mention-title {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.note-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.note-save-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.note-save-btn:hover {
  background: var(--accent-hover);
}

.note-picker.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.note-btn:focus-visible,
.note-save-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: none), (pointer: coarse) {
  .day-note .note-btn {
    opacity: 0.75;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
  }

  .day-note .note-btn.has-note {
    opacity: 1;
  }
}

@media (hover: none) and (max-width: 640px), (pointer: coarse) and (max-width: 640px) {
  .status-pill {
    min-height: 44px;
    padding: 10px 8px;
  }

  /* Week grid styling lives in @media (max-width: 640px) — avoid tiny dot-only pills here. */
}

/* ── Status picker (popover) ── */
.status-picker {
  position: relative;
  display: inline-block;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background-clip: padding-box;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  white-space: nowrap;
  min-width: 92px;
  justify-content: center;
}

.status-pill:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.status-pill:active {
  opacity: 0.82;
  transform: scale(0.98);
}

.status-picker.is-open .status-pill {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.status-picker.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-kontor .status-dot { background: var(--kontor); }
.status-remote .status-dot { background: var(--remote); }
.status-fri .status-dot { background: var(--fri); }
.status-syg .status-dot { background: var(--syg); }
.status-udafhuset .status-dot { background: var(--udafhuset); }
.status-extern .status-dot { background: var(--extern); }
.status-kursus .status-dot { background: var(--kursus); }
.status-barsel .status-dot { background: var(--barsel); }
.status-orlov .status-dot { background: var(--orlov); }

.status-kontor .status-label { color: var(--status-kontor-text); }
.status-remote .status-label { color: var(--status-remote-text); }
.status-fri .status-label { color: var(--status-fri-text); }
.status-syg .status-label { color: var(--status-syg-text); }
.status-udafhuset .status-label { color: var(--status-udafhuset-text); }
.status-extern .status-label { color: var(--status-extern-text); }
.status-kursus .status-label { color: var(--status-kursus-text); }
.status-barsel .status-label { color: var(--status-barsel-text); }
.status-orlov .status-label { color: var(--status-orlov-text); }

.status-pill.status-kontor {
  background: var(--kontor-soft);
  border-color: rgba(52, 199, 89, 0.22);
}

.status-pill.status-remote {
  background: var(--remote-soft);
  border-color: rgba(0, 122, 255, 0.22);
}

.status-pill.status-fri {
  background: var(--fri-soft);
  border-color: rgba(255, 149, 0, 0.22);
}

.status-pill.status-syg {
  background: var(--syg-soft);
  border-color: rgba(255, 55, 95, 0.22);
}

.status-pill.status-udafhuset {
  background: var(--udafhuset-soft);
  border-color: rgba(175, 82, 222, 0.22);
}

.status-pill.status-extern {
  background: var(--extern-soft);
  border-color: rgba(88, 86, 214, 0.22);
}

.status-pill.status-kursus {
  background: var(--kursus-soft);
  border-color: rgba(255, 204, 0, 0.35);
}

.status-pill.status-barsel {
  background: var(--barsel-soft);
  border-color: rgba(244, 114, 182, 0.24);
}

.status-pill.status-orlov {
  background: var(--orlov-soft);
  border-color: rgba(100, 116, 139, 0.24);
}

.status-pill[style*="--status-accent"] {
  background: var(--status-accent-soft);
  border-color: color-mix(in srgb, var(--status-accent) 28%, transparent);
}

.status-pill[style*="--status-accent"] .status-dot,
.status-option[style*="--status-accent"] .status-dot,
.status-chip[style*="--status-accent"] .status-dot {
  background: var(--status-accent);
}

.status-pill[style*="--status-accent"] .status-label,
.status-option[style*="--status-accent"] .status-label,
.status-chip[style*="--status-accent"] .status-label {
  color: var(--status-accent-text);
}

.status-chip[style*="--status-accent"] {
  background: var(--status-accent-soft);
  border-color: color-mix(in srgb, var(--status-accent) 22%, transparent);
}

.stat-card[style*="--status-accent"] .stat-dot {
  background: var(--status-accent);
  box-shadow: 0 0 0 4px var(--status-accent-soft);
}

.workplace-stats-segment[style*="--status-accent"] {
  background: var(--status-accent);
}

.workplace-stats-legend-item[style*="--status-accent"] .workplace-stats-dot {
  background: var(--status-accent);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  width: fit-content;
  overflow: hidden;
  background-clip: padding-box;
}

.status-chip .status-dot {
  width: 6px;
  height: 6px;
}

.status-chip.status-kontor {
  background: var(--kontor-soft);
  border-color: rgba(52, 199, 89, 0.18);
}

.status-chip.status-remote {
  background: var(--remote-soft);
  border-color: rgba(0, 122, 255, 0.18);
}

.status-chip.status-fri {
  background: var(--fri-soft);
  border-color: rgba(255, 149, 0, 0.18);
}

.status-chip.status-syg {
  background: var(--syg-soft);
  border-color: rgba(255, 55, 95, 0.18);
}

.status-chip.status-udafhuset {
  background: var(--udafhuset-soft);
  border-color: rgba(175, 82, 222, 0.18);
}

.status-chip.status-extern {
  background: var(--extern-soft);
  border-color: rgba(88, 86, 214, 0.18);
}

.status-chip.status-kursus {
  background: var(--kursus-soft);
  border-color: rgba(255, 204, 0, 0.28);
}

.status-chip.status-barsel {
  background: var(--barsel-soft);
  border-color: rgba(244, 114, 182, 0.2);
}

.status-chip.status-orlov {
  background: var(--orlov-soft);
  border-color: rgba(100, 116, 139, 0.2);
}

.status-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.status-picker.is-open .status-chevron {
  transform: rotate(180deg);
}

.status-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  min-width: 168px;
  padding: 8px;
  background: var(--popover-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.status-menu.is-floating {
  position: fixed;
  z-index: 1300;
}

.status-option-form {
  margin: 0;
}

.status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  transition: background var(--transition);
}

.status-option:hover {
  background: var(--overlay-hover);
}

.status-option.is-selected {
  background: var(--accent-soft);
  font-weight: 600;
}

.status-check {
  margin-left: auto;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Morgenmad card ── */
.morgenmad-card {
  margin-bottom: 0;
  padding: 0;
  background: var(--surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
}

.morgenmad-card.overview-card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #ff9500, #ff6b00);
}

.morgenmad-card-header {
  background: linear-gradient(180deg, rgba(255, 149, 0, 0.05) 0%, var(--surface) 100%);
}

.morgenmad-bringer-row {
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.morgenmad-card > :not(.morgenmad-card-header):not(.morgenmad-bringer-row) {
  margin-left: 20px;
  margin-right: 20px;
}

.morgenmad-card > .morgenmad-vote-section,
.morgenmad-card > .rotation-queue-panel,
.morgenmad-card > .morgenmad-grid,
.morgenmad-card > .morgenmad-skip-alert,
.morgenmad-card > .morgenmad-swap-alert,
.morgenmad-card > .morgenmad-skipped-note {
  margin-top: 20px;
}

.morgenmad-card > :last-child {
  margin-bottom: 24px;
}

.morgenmad-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.morgenmad-title-group .morgenmad-mark-lg {
  align-self: flex-start;
  margin-top: 2px;
}

.morgenmad-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.morgenmad-date {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.morgenmad-bringer {
  text-align: right;
  min-width: 160px;
}

.morgenmad-bringer-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.morgenmad-bringer-name {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.morgenmad-bringer-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 149, 0, 0.15);
  color: #c93400;
  font-size: 0.6875rem;
  font-weight: 600;
}

.morgenmad-bringer-tag-vote {
  background: rgba(0, 113, 227, 0.12);
  color: var(--accent);
}

.morgenmad-bringer-tag-swap {
  background: rgba(175, 82, 222, 0.15);
  color: #8944ab;
}

.morgenmad-bringer-tag-warning {
  background: rgba(255, 59, 48, 0.12);
  color: #d70015;
}

.morgenmad-bringer-tag-holiday {
  background: rgba(0, 122, 255, 0.12);
  color: #0066cc;
}

.morgenmad-bringer-tag-summer {
  background: rgba(255, 204, 0, 0.18);
  color: #a66a00;
}

.morgenmad-bringer-skipped {
  color: var(--text-secondary);
}

.morgenmad-skip-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 0;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.18);
}

.morgenmad-skip-alert .skip-alert-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.skip-alert-title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.skip-alert-text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.morgenmad-skipped-note {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px dashed var(--border);
  text-align: center;
}

.morgenmad-skipped-note p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.morgenmad-bringer-missing {
  color: var(--text-tertiary);
  font-style: italic;
}

.morgenmad-swap-alert {
  margin-bottom: 0;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 59, 48, 0.06);
  border: 1px solid rgba(255, 59, 48, 0.15);
}

.morgenmad-swap-alert.has-swap {
  background: rgba(175, 82, 222, 0.06);
  border-color: rgba(175, 82, 222, 0.2);
}

.swap-alert-text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.swap-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.swap-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.swap-select {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 0.8125rem;
}

.swap-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: #ff3b30;
  color: var(--on-accent);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.swap-btn:hover {
  background: #e0352b;
}

.swap-cancel-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.swap-request-form,
.swap-request-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.swap-request-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.swap-request-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.swap-request-select {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
}

.swap-request-btn,
.swap-accept-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.swap-request-btn:hover,
.swap-accept-btn:hover {
  background: var(--accent-hover);
}

.swap-decline-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.swap-request-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swap-request-pending-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.swap-request-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.vote-badge-swap {
  background: rgba(175, 82, 222, 0.15);
  color: #8944ab;
}

.morgenmad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.morgenmad-panel {
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.morgenmad-panel.overview-inner-panel {
  padding: 18px 20px;
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.morgenmad-panel-title {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.morgenmad-food-summary {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.morgenmad-food-list {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.morgenmad-food-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.morgenmad-grid-food {
  grid-template-columns: 1fr;
  max-width: 480px;
}

.morgenmad-vote-section {
  margin-bottom: 0;
  padding: 18px 20px;
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: none;
}

.morgenmad-vote-section.overview-panel {
  margin-bottom: 0;
  padding: 18px 20px;
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  box-shadow: none;
}

.vote-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.vote-panel-intro {
  min-width: 0;
}

.vote-panel-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.vote-counter {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 149, 0, 0.1);
  border: 1px solid rgba(255, 149, 0, 0.18);
  overflow: hidden;
}

.vote-counter-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #c93400;
  line-height: 1;
}

.vote-counter-total {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.vote-avatar-stack {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-left: 4px;
}

.vote-stack-avatar,
.vote-stack-more {
  width: 32px;
  height: 32px;
  margin-left: -8px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--on-accent);
  flex-shrink: 0;
}

.vote-stack-avatar:first-child {
  margin-left: 0;
}

.vote-stack-more {
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 0.6875rem;
}

.vote-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
  margin-bottom: 8px;
}

.vote-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9500, #ff6b00);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.vote-progress-label {
  margin: 0 0 16px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.vote-progress-label strong {
  color: var(--text);
  font-weight: 600;
}

.vote-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vote-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
  background-clip: padding-box;
  transition:
    border-color var(--transition),
    background var(--transition),
    opacity var(--transition);
}

.vote-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.vote-card.is-yes {
  border-color: rgba(52, 199, 89, 0.28);
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.07) 0%, var(--surface) 28%);
}

.vote-card.is-yes::before {
  background: #34c759;
}

.vote-card.is-no {
  border-color: rgba(142, 142, 147, 0.28);
  background: var(--surface-muted);
}

.vote-card.is-no::before {
  background: #8e8e93;
}

.vote-card.is-pending {
  border-color: rgba(255, 149, 0, 0.4);
  background: rgba(255, 149, 0, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 149, 0, 0.08);
}

.vote-card.is-pending::before {
  background: #ff9500;
  opacity: 0.55;
}

.vote-card.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

.vote-card-body {
  flex: 1;
  min-width: 0;
}

.vote-card-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.vote-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vote-card-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.vote-answer-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.vote-answer-badge.is-yes {
  background: rgba(52, 199, 89, 0.14);
  color: #248a3d;
}

.vote-answer-badge.is-no {
  background: rgba(142, 142, 147, 0.14);
  color: var(--text-secondary);
}

.vote-answer-badge.is-pending {
  background: rgba(255, 149, 0, 0.12);
  color: #c93400;
  text-transform: none;
  font-weight: 600;
}

.vote-answer-badge.is-rotation-skip {
  background: rgba(175, 82, 222, 0.12);
  color: #8944ab;
  text-transform: none;
  font-weight: 600;
}

.vote-card-actions {
  display: flex;
  flex-shrink: 0;
}

.vote-toggle-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.vote-action-form {
  margin: 0;
}

.vote-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.vote-toggle-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.vote-toggle-btn:active {
  transform: scale(0.97);
}

.vote-toggle-btn,
.vote-toggle-label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vote-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  background: var(--surface-muted);
  color: var(--text-tertiary);
}

.vote-toggle-btn.is-selected.vote-toggle-yes {
  background: #34c759;
  color: #fff;
  box-shadow: 0 1px 4px rgba(52, 199, 89, 0.35);
}

.vote-toggle-btn.is-selected.vote-toggle-yes .vote-toggle-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.vote-toggle-btn.is-selected.vote-toggle-no {
  background: var(--surface-muted);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.vote-toggle-btn.is-selected.vote-toggle-no .vote-toggle-icon {
  background: rgba(142, 142, 147, 0.18);
  color: var(--text-secondary);
}

.vote-card-avatar {
  width: 40px;
  height: 40px;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.vote-card-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voter-select-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.voter-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.voter-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--text);
}

.rotation-queue-panel {
  margin-bottom: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  overflow: hidden;
}

.rotation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}

.rotation-summary::-webkit-details-marker {
  display: none;
}

.rotation-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.rotation-queue-panel[open] .rotation-summary::after {
  transform: rotate(-135deg);
}

.rotation-summary:hover {
  background: var(--overlay-hover);
}

.rotation-summary-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.rotation-summary-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: auto;
  margin-right: 8px;
}

.rotation-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rotation-past-panel {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 70%, var(--surface));
}

.rotation-past-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.rotation-past-summary::-webkit-details-marker {
  display: none;
}

.rotation-past-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.rotation-past-panel[open] .rotation-past-summary::after {
  transform: rotate(-135deg);
}

.rotation-past-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.rotation-past-count {
  margin-left: auto;
  margin-right: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.rotation-list-past {
  padding-top: 0;
}

.rotation-item-past {
  opacity: 0.82;
  background: var(--surface);
}

.rotation-item-past.is-former .rotation-status {
  color: var(--text-tertiary);
  font-style: italic;
}

.avatar-former {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 700;
}

.rotation-item-past .rotation-order {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.rotation-past-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.rotation-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition), opacity var(--transition);
}

.rotation-item[draggable="true"] {
  cursor: grab;
}

.rotation-item[draggable="true"]:active {
  cursor: grabbing;
}

.rotation-item.is-dragging {
  opacity: 0.45;
}

.rotation-item.is-drop-target {
  border-color: var(--accent);
  background: rgba(0, 122, 255, 0.08);
}

.rotation-item.is-current {
  border-color: rgba(255, 149, 0, 0.35);
  background: rgba(255, 149, 0, 0.08);
}

.rotation-item.is-next {
  border-color: rgba(255, 149, 0, 0.25);
  background: rgba(255, 149, 0, 0.06);
}

.rotation-item.is-available .rotation-status {
  color: #248a3d;
}

.rotation-drag-handle {
  flex-shrink: 0;
  width: 14px;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: -0.08em;
  color: var(--text-tertiary);
  user-select: none;
  opacity: 0.55;
}

.rotation-item:hover .rotation-drag-handle {
  opacity: 1;
}

.rotation-person-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.rotation-person-text {
  min-width: 0;
}

.rotation-order {
  width: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
  flex-shrink: 0;
}

.rotation-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.rotation-schedule {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.rotation-status {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

.rotation-next-badge,
.rotation-current-badge,
.rotation-swap-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.rotation-swap-badge {
  background: rgba(0, 122, 255, 0.14);
  color: var(--accent);
}

.rotation-item.is-swapped-in {
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(0, 122, 255, 0.08);
}

.rotation-next-badge {
  background: rgba(255, 149, 0, 0.15);
  color: #c93400;
}

.rotation-current-badge {
  background: rgba(255, 149, 0, 0.22);
  color: #c93400;
}

.rotation-action-form {
  display: none;
}

.rotation-item-skipped {
  cursor: default;
  opacity: 0.88;
}

.rotation-item-skipped.is-holiday {
  border-color: rgba(0, 122, 255, 0.22);
  background: rgba(0, 122, 255, 0.06);
}

.rotation-item-skipped.is-summer {
  border-color: rgba(255, 204, 0, 0.28);
  background: rgba(255, 204, 0, 0.08);
}

.rotation-skip-icon {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 1rem;
}

.calendar-manage {
  margin: 0 12px 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.calendar-manage-title {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-holiday-toggle {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.calendar-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  border: 0.5px solid var(--border);
}

.calendar-toggle-label input[type="checkbox"],
.admin-field-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 51px;
  height: 31px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--surface-inset);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--transition);
  order: 2;
}

.calendar-toggle-label input[type="checkbox"]::before,
.admin-field-checkbox input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-spring);
}

.calendar-toggle-label input[type="checkbox"]:checked,
.admin-field-checkbox input[type="checkbox"]:checked {
  background: var(--kontor);
}

.calendar-toggle-label input[type="checkbox"]:checked::before,
.admin-field-checkbox input[type="checkbox"]:checked::before {
  transform: translateX(20px);
}

.calendar-holiday-toggle-hint {
  margin: 8px 0 0;
}

.calendar-holidays-skips.is-disabled {
  border-color: var(--border);
  background: var(--surface);
  opacity: 0.92;
}

.calendar-holiday-badge-info {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.calendar-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.calendar-hint {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.calendar-holidays-skips {
  margin-bottom: 20px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 149, 0, 0.22);
  background: rgba(255, 149, 0, 0.06);
}

.calendar-holidays-other {
  margin-bottom: 20px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.calendar-holidays-other .calendar-holiday-item {
  opacity: 0.92;
}

.calendar-holidays {
  margin-bottom: 16px;
}

.calendar-holiday-list,
.calendar-period-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-holiday-list li,
.calendar-period-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8125rem;
}

.calendar-holiday-item-skip {
  border: 1px solid rgba(255, 149, 0, 0.18);
}

.calendar-holiday-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #c93400;
  background: rgba(255, 149, 0, 0.14);
  white-space: nowrap;
}

.calendar-holiday-weekday {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.calendar-holiday-date,
.calendar-period-range {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.calendar-holiday-name,
.calendar-period-label {
  color: var(--text-secondary);
}

.calendar-period-skips {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.calendar-period-item {
  justify-content: space-between;
}

.calendar-period-remove {
  margin: 0;
  flex-shrink: 0;
}

.calendar-remove-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.calendar-remove-btn:hover {
  background: rgba(255, 59, 48, 0.12);
  color: #d70015;
}

.calendar-empty {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.calendar-add-form {
  margin: 0;
}

.calendar-add-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--accent);
  background: var(--accent-soft);
}

.calendar-add-preview.is-muted {
  color: var(--text-tertiary);
  background: var(--surface-muted);
}

.calendar-add-preview.is-error {
  color: #d70015;
  background: rgba(255, 59, 48, 0.1);
}

.calendar-sommerferie-intro {
  margin-bottom: 12px;
}

.calendar-add-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.calendar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.calendar-field-grow {
  flex: 1;
  min-width: 140px;
}

.calendar-field input {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--text);
}

.calendar-add-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.calendar-add-btn:hover {
  background: var(--accent-hover);
}

.rotation-list.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.status-picker.is-loading,
.note-picker.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.vote-card.is-loading {
  pointer-events: none;
}

/* ── Site footer ── */
.site-footer {
  padding: 8px 24px 36px;
  text-align: center;
}

.site-footer-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-footer-credit {
  margin: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.site-footer-label {
  color: var(--text-tertiary);
  font-weight: 500;
}

.site-footer-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer-and {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: lowercase;
}

.site-footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8125rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.site-footer-inner:hover .site-footer-badge {
  transform: scale(1.08);
}

.site-footer-badge-sparkle {
  background: linear-gradient(145deg, rgba(255, 204, 0, 0.2), rgba(255, 149, 0, 0.12));
  border: 1px solid rgba(255, 149, 0, 0.22);
}

.site-footer-badge-heart {
  background: linear-gradient(145deg, rgba(255, 55, 95, 0.18), rgba(255, 55, 95, 0.08));
  border: 1px solid rgba(255, 55, 95, 0.22);
  color: #ff375f;
  font-size: 0.75rem;
}

.site-footer-name {
  font-weight: 600;
  color: var(--text-secondary);
  background: linear-gradient(90deg, var(--text-secondary), var(--text));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-footer-version {
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* ── Footnote ── */
.page-footnote {
  margin: 24px 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ── Focus states ── */
.status-pill:focus-visible,
.status-option:focus-visible,
.picker-btn:focus-visible,
.brand:focus-visible,
.picker-today:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Touch & coarse pointer ── */
html {
  -webkit-text-size-adjust: 100%;
}

button,
a,
[role="button"],
.status-pill,
.note-btn,
.vote-card,
.picker-btn,
.team-switcher-link,
.app-nav-link,
.language-switcher-toggle,
.theme-toggle,
.push-toggle,
.rotation-summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.rotation-list.is-touch-dragging {
  touch-action: none;
}

.rotation-list.is-touch-dragging .rotation-item {
  touch-action: none;
}

@media (hover: none), (pointer: coarse) {
  .theme-toggle,
  .push-toggle,
  .missed-toggle,
  .me-toggle,
  .language-switcher-toggle {
    width: 44px;
    height: 44px;
  }

  .picker-btn {
    width: 48px;
    height: 48px;
  }

  .status-pill {
    min-height: 44px;
    padding: 10px 12px;
  }

  .status-option {
    min-height: 44px;
    padding: 12px 14px;
  }

  .status-menu.is-bottom-sheet .status-option {
    min-height: 36px;
    padding: 7px 14px;
  }

  .team-switcher-link,
  .app-nav-link {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .rotation-drag-handle {
    opacity: 1;
    width: 32px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -8px 4px -8px -8px;
    font-size: 1rem;
  }

  .rotation-item[draggable="true"] {
    touch-action: none;
  }

  .morgenmad-vote-section .vote-card {
    flex-direction: row;
    align-items: center;
    overflow: visible;
  }

  .morgenmad-vote-section .vote-card-body {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .morgenmad-vote-section .vote-card-actions {
    width: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
  }

  .morgenmad-vote-section .vote-toggle-group {
    flex-direction: row;
    width: auto;
    gap: 0;
  }

  .morgenmad-vote-section .vote-action-form {
    flex: 0 0 auto;
  }

  .morgenmad-vote-section .vote-toggle-btn {
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 12px;
    justify-content: center;
  }

  .vote-card {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 14px 14px 16px;
  }

  .vote-card-body {
    width: 100%;
  }

  .vote-card-actions {
    width: 100%;
    justify-content: stretch;
  }

  .vote-toggle-group {
    display: flex;
    width: 100%;
  }

  .vote-action-form {
    flex: 1 1 0;
  }

  .vote-toggle-btn {
    width: 100%;
    justify-content: center;
  }

  .note-popover {
    width: min(280px, calc(100vw - 32px));
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .status-menu {
    min-width: 200px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .status-pill:active,
  .note-btn:active,
  .vote-action-btn:active,
  .vote-toggle-btn:active,
  .picker-btn:active,
  .team-switcher-link:active,
  .app-nav-link:active {
    transform: scale(0.97);
  }

  .schedule-board .day-slot .status-pill:active {
    transform: scale(0.98);
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .morgenmad-grid {
    grid-template-columns: 1fr;
  }

  .morgenmad-bringer {
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --layout-gutter: max(16px, env(safe-area-inset-left));
    --layout-vspace: 24px;
  }

  .top-bar {
    gap: 8px;
    min-height: 48px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
  }

  .brand-name {
    font-size: 0.9375rem;
    max-width: none;
  }

  .brand-tagline {
    max-width: none;
  }

  .top-bar-main.has-team-nav .top-bar-brand-cluster {
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .top-bar-actions {
    gap: 2px;
  }

  .top-bar-actions .theme-toggle,
  .top-bar-actions .push-toggle,
  .top-bar-actions .language-switcher-toggle,
  .top-bar-actions .me-toggle,
  .top-bar-actions .missed-toggle {
    width: 32px;
    height: 32px;
  }

  .app-nav--header .app-nav-link {
    padding: 8px 10px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .app-nav--header .app-nav-icon {
    font-size: 0.875rem;
  }

  .app-nav--header {
    display: none;
  }

  .today-strip {
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .live-page--wide-schedule .today-strip {
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
  }

  .today-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .today-strip-header::-webkit-details-marker {
    display: none;
  }

  .today-strip-summary-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .today-strip-count {
    flex-shrink: 0;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
  }

  .today-strip-chevron {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-tertiary);
    border-bottom: 2px solid var(--text-tertiary);
    transform: rotate(45deg);
    transition: transform var(--transition);
    margin-right: 2px;
  }

  .today-strip[open] .today-strip-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
  }

  .today-strip[open] .today-strip-header {
    margin-bottom: 10px;
  }

  .today-strip-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
  }

  .today-strip-date {
    font-size: 0.78rem;
    color: var(--text-tertiary);
  }

  .today-strip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .today-strip-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface-muted) 50%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    flex-wrap: nowrap;
  }

  .today-strip-item:nth-child(even) {
    background: var(--surface);
  }

  .today-strip-person {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 120px;
  }

  .today-strip-name {
    font-size: 0.86rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .today-strip-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .today-strip-picker.day-status {
    max-width: none;
  }

  .today-strip-picker .status-pill {
    min-width: 88px;
    flex-shrink: 0;
  }

  .today-strip-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
  }

  .today-strip-note .note-btn {
    position: static;
    opacity: 1;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--border);
  }

  .today-strip-note .note-preview {
    flex: 1 0 100%;
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
    pointer-events: auto;
  }

  .today-strip-note .note-preview::after {
    display: none;
  }

  .today-strip-note.is-preview-open .note-preview {
    transform: none;
  }

  .team-overview .stat-card.is-zero {
    display: none;
  }

  body.has-mobile-tabs .main-content {
    padding-bottom: var(--layout-vspace);
  }

  body.has-mobile-tabs .schedule-card {
    margin-bottom: 4px;
  }

  .mobile-tab-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    padding: 6px max(12px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
    gap: 8px;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .mobile-tab-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 6px 8px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
  }

  .mobile-tab-link.is-active {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--accent) 20%, transparent);
  }

  .mobile-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 1;
  }

  .mobile-tab-icon svg {
    display: block;
  }

  .main-content {
    padding: var(--layout-vspace) var(--layout-gutter) calc(var(--layout-vspace) + max(20px, env(safe-area-inset-bottom)));
  }

  .page-hero {
    padding: 18px 14px 16px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 0.875rem;
  }

  .stats-strip {
    gap: 8px;
  }

  .stat-card {
    padding: 12px 14px;
    gap: 8px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.6875rem;
  }

  .team-overview .stats-strip-compact {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 6px;
  }

  .schedule-card-header {
    padding: 12px 14px;
    align-items: stretch;
    gap: 10px;
  }

  .live-page--wide-schedule .schedule-card-header {
    padding: 10px 8px;
  }

  .live-page--wide-schedule .overview-stack {
    gap: 10px;
  }

  .schedule-card-header-text {
    flex-basis: 100%;
  }

  .schedule-card-header-nav {
    width: 100%;
  }

  .schedule-week-nav {
    align-items: center;
    width: 100%;
  }

  .schedule-week-nav-top {
    justify-content: center;
    width: 100%;
  }

  .schedule-week-nav .team-toolbar-week {
    display: none;
  }

  .schedule-week-nav .week-picker {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    padding: 6px 10px;
    margin-bottom: 0;
  }

  .picker-center {
    min-width: 0;
    flex: 1;
  }

  .picker-week {
    font-size: 0.9375rem;
  }

  .schedule-board {
    padding: 6px 2px;
  }

  .schedule-card.overview-card {
    overflow: visible;
  }

  /* Person/day widths + horizontal scroll: see mobile week plan block below. */

  .schedule-table .td-day.is-alt-col,
  .schedule-table .th-day.is-alt-col {
    background: var(--schedule-row-odd-bg);
  }

  .schedule-table tbody .person-row:nth-child(odd) .td-day.is-alt-col {
    background-color: var(--schedule-row-odd-bg);
  }

  .schedule-table tbody .person-row:nth-child(even) .td-day.is-alt-col {
    background-color: var(--schedule-row-even-bg);
  }

  .schedule-table .td-day.is-weekend.is-alt-col,
  .schedule-table tbody .person-row:nth-child(odd) .td-day.is-weekend.is-alt-col {
    background: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-odd-bg));
  }

  .schedule-table tbody .person-row:nth-child(even) .td-day.is-weekend.is-alt-col {
    background: color-mix(in srgb, var(--schedule-weekend-bg) 100%, var(--schedule-row-even-bg));
  }

  .person-cell {
    gap: 6px;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
  }

  .live-page--wide-schedule .person-cell {
    padding: 8px 8px 8px 12px;
    gap: 5px;
  }

  .person-dept {
    display: none;
  }

  .team-overview .avatar {
    width: 28px;
    height: 28px;
    font-size: 0.625rem;
  }

  .live-page--wide-schedule .team-overview .avatar {
    width: 26px;
    height: 26px;
  }

  .person-name {
    font-size: 0.8125rem;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .day-slot {
    min-height: 52px;
    padding: 0;
    overflow: visible;
    box-sizing: border-box;
  }

  .schedule-board .day-slot.has-note-content {
    --schedule-status-height: 40px;
    min-height: 52px;
  }

  .day-status {
    max-width: 100%;
    padding: 0;
  }

  .live-page--wide-schedule .status-chevron {
    display: none;
  }

  .status-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .schedule-board .day-note .note-btn.has-note {
    background: var(--schedule-note-active);
    border-color: var(--schedule-note-active);
    color: #fff;
  }

  button.picker-today {
    min-height: 44px;
    padding: 8px 12px;
  }

  html[data-coarse-pointer="true"] .status-pill {
    min-height: 44px;
    padding: 10px 12px;
  }

  html[data-coarse-pointer="true"] .schedule-board .day-slot .status-pill {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 4px;
  }

  html[data-coarse-pointer="true"] .schedule-board .day-note .note-btn {
    width: var(--schedule-note-size);
    height: var(--schedule-note-size);
    min-width: var(--schedule-note-size);
    min-height: var(--schedule-note-size);
  }

  html[data-coarse-pointer="true"] .day-note .note-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    opacity: 1;
  }

  html[data-coarse-pointer="true"] button.picker-today {
    min-height: 44px;
    padding: 10px 14px;
  }

  .today-strip-note.is-preview-open .note-preview {
    display: block;
  }

  /* Mobile week board: horizontal scroll (see compact block at end of file). */

  .day-header-morgenmad {
    display: none;
  }

  .person-cell {
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .live-page--wide-schedule .person-cell {
    padding: 8px 4px 8px 8px;
  }

  .person-meta {
    min-width: 0;
    flex: 1 1 auto;
  }

  .person-morgenmad-badge {
    flex-shrink: 0;
    margin-top: 0;
  }

  .schedule-board .day-note-snippet {
    display: none;
  }

  .schedule-board .day-slot {
    --schedule-cell-gap: 3px;
    --schedule-note-size: 22px;
    --schedule-note-gap: 2px;
    min-height: 52px;
  }

  .schedule-board .status-picker {
    padding-right: calc(var(--schedule-note-size) + 2px);
  }

  .schedule-board .day-slot .status-pill,
  .live-page--wide-schedule .schedule-board .day-slot .status-pill {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 0 4px;
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 650;
    justify-content: center;
    gap: 4px;
  }

  .live-page--wide-schedule .schedule-board .day-slot .status-pill .status-label {
    position: static;
    width: auto;
    max-width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    clip: auto;
    border: 0;
  }

  .live-page--wide-schedule .status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
  }

  .schedule-board .day-note .note-btn,
  .live-page--wide-schedule .day-note .note-btn {
    width: var(--schedule-note-size);
    height: var(--schedule-note-size);
    min-width: var(--schedule-note-size);
    min-height: var(--schedule-note-size);
    opacity: 0.55;
    pointer-events: auto;
  }

  .schedule-board .day-note .note-btn.has-note,
  .live-page--wide-schedule .day-note .note-btn.has-note {
    opacity: 1;
  }

  .schedule-board .day-note .note-btn svg {
    width: 12px;
    height: 12px;
  }

  .day-header {
    min-height: 48px;
    padding: 6px 2px;
    gap: 3px;
  }

  .day-header-name {
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    text-transform: uppercase;
  }

  .day-header-date {
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    font-size: 0.8125rem;
    font-weight: 700;
  }

  .day-header-date.is-today-date,
  .day-header.is-today .day-header-date {
    background: var(--accent);
    color: var(--on-accent, #fff);
  }

  .schedule-board {
    padding-bottom: 8px;
  }

  .person-name {
    font-size: 0.75rem;
    line-height: 1.2;
    -webkit-line-clamp: 2;
  }

  .live-page--wide-schedule .team-overview .avatar {
    width: 28px;
    height: 28px;
    font-size: 0.625rem;
  }

  .schedule-week-nav-actions {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }

  .schedule-week-nav-actions .team-toolbar-toggle {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .schedule-scroll.can-scroll-right::after {
    width: 36px;
    background: linear-gradient(270deg, var(--surface) 8%, transparent 100%);
  }

  .schedule-summary-label {
    font-size: 0.625rem;
    padding: 6px 8px;
  }

  .team-toolbar-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .morgenmad-card-header {
    padding: 12px 14px;
  }

  .morgenmad-bringer-row {
    padding: 12px 14px;
    justify-content: flex-start;
  }

  .morgenmad-card > :not(.morgenmad-card-header):not(.morgenmad-bringer-row) {
    margin-left: 14px;
    margin-right: 14px;
  }

  .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  /* ── Morgenmad mobile ── */
  body.has-mobile-tabs .morgenmad-overview {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .morgenmad-card .schedule-subtitle {
    display: none;
  }

  .morgenmad-card .schedule-title-group .schedule-title-icon {
    font-size: 1rem;
  }

  .morgenmad-card .schedule-title {
    font-size: 1.05rem;
  }

  .morgenmad-card .schedule-meta {
    margin-top: 2px;
    font-size: 0.75rem;
  }

  .morgenmad-card-header .team-toolbar-week {
    display: none;
  }

  .morgenmad-card-header .schedule-card-header-nav {
    width: 100%;
  }

  .morgenmad-bringer-row {
    padding: 10px 14px;
  }

  .morgenmad-bringer {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .morgenmad-bringer-name {
    font-size: 1rem;
    line-height: 1.25;
  }

  .morgenmad-vote-section {
    padding: 12px;
  }

  .morgenmad-vote-section .vote-panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .morgenmad-vote-section .vote-counter {
    align-self: flex-start;
    padding: 6px 12px;
  }

  .morgenmad-vote-section .vote-counter-value {
    font-size: 1.35rem;
  }

  .morgenmad-vote-section .vote-panel-subtitle {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .morgenmad-vote-section .vote-progress-names {
    display: none;
  }

  .morgenmad-vote-section .vote-progress-label {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .morgenmad-vote-section .vote-avatar-stack {
    margin-bottom: 8px;
  }

  .morgenmad-vote-section .vote-card {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    overflow: visible;
  }

  .morgenmad-vote-section .vote-card-body {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .morgenmad-vote-section .vote-card-person {
    gap: 10px;
  }

  .morgenmad-vote-section .vote-card-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.6875rem;
  }

  .morgenmad-vote-section .vote-card-name {
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .morgenmad-vote-section .vote-answer-badge {
    display: none;
  }

  .morgenmad-vote-section .status-chip {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .morgenmad-vote-section .vote-card-actions {
    width: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
  }

  .morgenmad-vote-section .vote-toggle-group {
    flex-direction: row;
    width: auto;
    gap: 0;
    flex-shrink: 0;
  }

  .morgenmad-vote-section .vote-action-form {
    flex: 0 0 auto;
  }

  .morgenmad-vote-section .vote-toggle-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .morgenmad-vote-section .vote-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .morgenmad-vote-section .vote-toggle-icon {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }

  .morgenmad-card > :not(.morgenmad-card-header):not(.morgenmad-bringer-row) {
    margin-left: 10px;
    margin-right: 10px;
  }

  .morgenmad-card > :last-child {
    margin-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .rotation-summary {
    padding: 12px 10px;
    gap: 6px;
  }

  .rotation-summary-hint {
    display: block;
    width: 100%;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .rotation-item {
    align-items: flex-start;
    padding: 10px 8px;
    gap: 6px;
  }

  .rotation-name {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .rotation-schedule {
    font-size: 0.7rem;
  }

  .rotation-next-badge,
  .rotation-current-badge,
  .rotation-swap-badge,
  .rotation-past-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .morgenmad-grid-food {
    margin-top: 14px;
  }

  .morgenmad-panel {
    padding: 12px;
  }
}

/* ── Admin ── */
.admin-page {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding-bottom: 32px;
}

.admin-stack {
  gap: 16px;
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.admin-hero-main {
  min-width: 0;
}

.page-hero-admin {
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%);
}

.admin-logout-form {
  flex-shrink: 0;
  margin: 0;
}

.admin-login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 560px);
  padding: 24px 0;
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.admin-login-card-wide {
  max-width: 920px;
}

.admin-login-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-login-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.admin-login-panel-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}

.admin-login-panel-desc {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 113, 227, 0.14);
}

.admin-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.admin-login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 1.75rem;
}

.admin-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.admin-subtitle {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.admin-mfa-cancel {
  margin-top: 10px;
}

.admin-mfa-setup {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.admin-mfa-qr {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
}

.admin-mfa-manual code,
.admin-mfa-recovery-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.admin-mfa-recovery-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
}

.admin-summary {
  padding: 18px 20px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.admin-summary-grid-team {
  grid-template-columns: repeat(2, 1fr);
}

.admin-grid-team {
  grid-template-columns: 1fr;
}

.admin-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.admin-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.admin-summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.admin-quick-action:hover {
  background: var(--surface-muted);
  border-color: color-mix(in srgb, var(--border) 70%, var(--text-tertiary));
}

.admin-quick-action:active {
  transform: scale(0.98);
}

.admin-quick-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 1rem;
  line-height: 1;
}

.admin-quick-action-label {
  white-space: nowrap;
}

.admin-quick-action-badge {
  min-width: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.admin-modal {
  width: min(100% - 32px, 440px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
}

.admin-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.admin-modal-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 32px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}

.admin-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-modal-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.admin-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 1.25rem;
}

.admin-modal-title {
  margin: 0 0 4px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.admin-modal-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.45;
}

.admin-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.admin-modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.admin-modal .admin-global-admin-list {
  margin-top: 4px;
}

.admin-modal .admin-global-admin-empty {
  margin: 0;
}

.admin-action-card {
  padding: 20px 22px;
}

.admin-action-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 1.25rem;
}

.admin-action-header .overview-section-title {
  margin: 0 0 4px;
}

.admin-section-head {
  margin-bottom: 18px;
}

.admin-section-head .overview-section-title {
  margin: 0 0 4px;
}

.admin-card-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.45;
}

.admin-stats-card {
  padding: 0;
  overflow: hidden;
}

.admin-stats-card .admin-card-desc {
  margin-top: 4px;
}

.admin-disclosure-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.admin-disclosure-summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure-meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.admin-disclosure-body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.admin-team-stats + .admin-team-stats {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.admin-team-stats-name {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.admin-workplace-stats {
  margin-bottom: 0;
  padding: 16px;
  box-shadow: none;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-teams-card {
  padding: 22px;
}

.admin-team-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.admin-team-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.admin-team-fold-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-team-fold {
  margin: 0;
}

.admin-team-fold-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px;
}

.admin-team-fold-summary::-webkit-details-marker {
  display: none;
}

.admin-team-fold-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}

.admin-team-fold-chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}

.admin-team-fold[open] > .admin-team-fold-summary .admin-team-fold-chevron::before {
  transform: translateY(2px) rotate(225deg);
}

.admin-team-fold-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-team-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-team-card-actions form {
  margin: 0;
}

.admin-team-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
}

.admin-team-jump-link:hover {
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.28);
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--accent);
}

.admin-pill-muted {
  background: var(--surface-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.admin-status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.admin-status-badge.is-on {
  background: rgba(52, 199, 89, 0.15);
  color: #248a3d;
}

.admin-status-badge.is-off {
  background: rgba(142, 142, 147, 0.15);
  color: var(--text-secondary);
}

.admin-alert {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.admin-alert.is-fading {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.admin-alert-success {
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.admin-alert-error {
  background: rgba(255, 59, 48, 0.1);
  color: #d70015;
  border: 1px solid rgba(255, 59, 48, 0.18);
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-field-hint {
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-tertiary);
  line-height: 1.35;
}

.admin-field input,
.admin-field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-field input:focus,
.admin-field select:focus {
  outline: none;
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.admin-field-checkbox {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-transform: none;
  letter-spacing: normal;
  font-size: var(--text-footnote);
  font-weight: 500;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 0.5px solid var(--border);
}

.admin-field-checkbox-block {
  margin-top: 4px;
  margin-bottom: 4px;
}

.admin-field-checkbox input[type="checkbox"] {
  margin-top: 0;
}

.admin-field-actions {
  justify-content: flex-end;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
}

.admin-global-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.admin-global-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.admin-global-admin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-global-admin-empty {
  margin-top: 8px;
}

.admin-admin-users-section {
  display: grid;
  gap: 10px;
}

.admin-admin-users-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-admin-users-source {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.admin-admin-users-locked {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.admin-add-admin-panel {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.admin-add-admin-panel > summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.admin-add-admin-panel > summary::-webkit-details-marker {
  display: none;
}

.admin-add-admin-panel[open] > summary {
  color: var(--text);
}

.admin-modal .admin-global-admin-list {
  margin-top: 0;
}

.admin-form-grid-team {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.admin-form-grid-user {
  grid-template-columns: 1.2fr 1fr 0.9fr auto auto;
  align-items: end;
  flex: 1;
  min-width: 0;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-login-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-login-fields[hidden],
.admin-login-fields.is-hidden {
  display: none !important;
}

.admin-login-hint {
  margin: -4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.admin-login-form .admin-field {
  margin-bottom: 0;
}

.admin-add-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.admin-btn-sm {
  padding: 8px 14px;
  font-size: 0.8125rem;
}

.admin-btn-block {
  width: 100%;
}

.admin-btn:active {
  transform: scale(0.98);
}

.admin-btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.admin-btn-primary:hover {
  background: var(--accent-hover);
}

.admin-btn-secondary {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.admin-btn-secondary:hover {
  background: var(--surface-hover);
}

.admin-btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: #d70015;
  border: 1px solid rgba(255, 59, 48, 0.22);
}

.admin-btn-danger:hover {
  background: rgba(255, 59, 48, 0.16);
}

.admin-btn.is-copied {
  background: rgba(52, 199, 89, 0.14);
  color: #248a3d;
  border-color: rgba(52, 199, 89, 0.25);
}

.admin-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-team-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  scroll-margin-top: 72px;
}

.admin-team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-team-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.admin-team-card-actions form {
  margin: 0;
}

.admin-team-name {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-team-link-panel {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.admin-team-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.admin-team-link-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-team-link {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-inset);
  font-size: 0.8125rem;
  word-break: break-all;
  border: 1px solid var(--border);
}

.admin-team-open-btn {
  text-decoration: none;
}

.admin-team-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.admin-section-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  overflow: hidden;
}

.admin-section-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.admin-section-panel-summary::-webkit-details-marker {
  display: none;
}

.admin-section-panel-lead {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-section-panel-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.admin-section-panel-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.admin-section-panel-chevron {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

.admin-section-panel-chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.18s ease;
}

.admin-section-panel[open] > .admin-section-panel-summary .admin-section-panel-chevron::before {
  transform: rotate(225deg) translate(-1px, -1px);
}

.admin-section-panel-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.admin-team-settings {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-settings-group {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.admin-settings-group-head {
  margin-bottom: 12px;
}

.admin-settings-group-title {
  margin: 0 0 2px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.admin-settings-group-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-tertiary);
}

.admin-settings-span-2 {
  grid-column: 1 / -1;
}

.admin-field-checkbox-card {
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.admin-field-checkbox-card span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-field-checkbox-card strong {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--text);
}

.admin-field-checkbox-card small {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-tertiary);
}

.admin-toolbar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-toolbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-toolbar-chip:hover {
  background: var(--surface-hover);
}

.admin-toolbar-chip:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}

.admin-toolbar-chip input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.admin-toolbar-chip span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.admin-settings-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.admin-invite-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.admin-invite-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-invite-link-panel {
  margin: 10px 0;
}

.admin-inline-hint {
  margin: 8px 0 12px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.admin-toolbar-fieldset {
  display: none;
}

.admin-status-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-status-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.admin-status-row.is-disabled {
  opacity: 0.72;
}

.admin-status-row-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

.admin-status-reorder-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 0 0 0 8px;
}

.admin-status-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: -0.12em;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.admin-status-drag-handle:hover {
  color: var(--text-secondary);
  background: rgba(127, 127, 147, 0.1);
}

.admin-status-drag-handle:active {
  cursor: grabbing;
}

.admin-status-reorder {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-elevated, var(--surface));
}

.admin-status-reorder-btn {
  width: 26px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  line-height: 1;
  cursor: pointer;
}

.admin-status-reorder-btn + .admin-status-reorder-btn {
  border-left: 1px solid var(--border);
}

.admin-status-reorder-btn:hover:not(:disabled) {
  color: var(--text);
  background: rgba(127, 127, 147, 0.1);
}

.admin-status-reorder-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.admin-status-list.is-reordering {
  user-select: none;
}

.admin-status-list.is-saving-order {
  pointer-events: none;
  opacity: 0.78;
}

.admin-status-row.is-dragging {
  opacity: 0.55;
}

.admin-status-row.is-drop-target {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
}

.admin-status-row.is-just-saved {
  box-shadow: 0 0 0 2px color-mix(in srgb, #0f766e 45%, transparent);
  transition: box-shadow 0.25s ease;
}

.admin-status-details {
  margin: 0;
  min-width: 0;
}

.admin-status-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 4px;
}

.admin-status-summary::-webkit-details-marker {
  display: none;
}

.admin-status-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-tertiary);
  box-shadow: 0 0 0 3px rgba(127, 127, 127, 0.12);
}

.admin-status-swatch.status-kontor { background: var(--kontor); }
.admin-status-swatch.status-remote { background: var(--remote); }
.admin-status-swatch.status-fri { background: var(--fri); }
.admin-status-swatch.status-syg { background: var(--syg); }
.admin-status-swatch.status-udafhuset { background: var(--udafhuset); }
.admin-status-swatch.status-extern { background: var(--extern); }
.admin-status-swatch.status-kursus { background: var(--kursus); }
.admin-status-swatch.status-barsel { background: var(--barsel); }
.admin-status-swatch.status-orlov { background: var(--orlov); }

.admin-status-summary-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-status-summary-name {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--text);
}

.admin-status-summary-en {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.admin-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.admin-mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 650;
  color: var(--text-secondary);
  background: rgba(127, 127, 147, 0.12);
}

.admin-mini-chip.is-on {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
}

.admin-mini-chip.is-off {
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
}

.admin-status-edit-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.admin-status-edit {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
}

.admin-status-form {
  margin-top: 12px;
}

.admin-status-edit-actions,
.admin-status-delete-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.admin-form-grid-status {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.admin-add-status-panel {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.admin-add-status-panel > summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--accent);
  list-style: none;
}

.admin-add-status-panel > summary::-webkit-details-marker {
  display: none;
}

.admin-add-status-form,
.admin-reset-statuses-form {
  margin-top: 10px;
}

.admin-team-members {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-team-members-title {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-team-card.is-focused {
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.admin-inline-add-user {
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.admin-inline-add-user-head {
  margin-bottom: 12px;
}

.admin-inline-add-user-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.admin-inline-add-user-desc {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.admin-form-grid-add-user {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
}

.admin-inline-add-user-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  grid-column: 1 / -1;
}

.admin-inline-add-user-options .admin-field-checkbox {
  padding-top: 0;
}

.admin-grid-create-only {
  grid-template-columns: minmax(0, 420px);
}

.admin-grid-create-only.admin-grid-two-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-team-members-empty {
  margin: 0 0 4px;
}

.admin-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-user-card {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.admin-user-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.admin-user-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-bottom: 2px;
}

.admin-user-tag {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8944ab;
  background: rgba(175, 82, 222, 0.12);
  padding: 2px 6px;
  border-radius: 999px;
}

.admin-user-id {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.admin-user-delete-form {
  flex-shrink: 0;
  padding-bottom: 2px;
}

.admin-user-actions {
  display: flex;
  gap: 8px;
}

.admin-back {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.875rem;
}

.admin-back a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.admin-back a:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .admin-form-grid-team {
    grid-template-columns: 1fr;
  }

  .admin-form-grid-user {
    grid-template-columns: 1fr 1fr;
  }

  .admin-settings-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .admin-grid,
  .admin-summary-grid,
  .admin-login-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-team-card-head {
    flex-direction: column;
  }

  .admin-status-summary {
    grid-template-columns: 12px minmax(0, 1fr) auto;
    grid-template-areas:
      "swatch text edit"
      ". chips chips";
  }

  .admin-status-swatch { grid-area: swatch; }
  .admin-status-summary-text { grid-area: text; }
  .admin-status-chips { grid-area: chips; justify-content: flex-start; }
  .admin-status-edit-label { grid-area: edit; }

  .admin-form-grid-team,
  .admin-form-grid-user,
  .admin-form-grid-add-user {
    grid-template-columns: 1fr;
  }

  .admin-grid-two-panels {
    grid-template-columns: 1fr;
  }

  .admin-quick-actions {
    gap: 8px;
  }

  .admin-quick-action {
    padding: 8px 12px;
  }

  .admin-modal {
    width: min(100% - 20px, 440px);
  }

  .admin-modal-panel {
    padding: 16px;
  }

  .admin-grid-create-only {
    grid-template-columns: 1fr;
  }

  .admin-user-card {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-user-form {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-user-identity {
    flex-direction: row;
  }

  .admin-user-delete-form {
    align-self: flex-end;
  }
}

/* ── Large displays: HD laptop → 2K → 4K ── */
@media (min-width: 1280px) {
  :root {
    --layout-gutter: clamp(24px, 2vw, 36px);
    --wide-schedule-gutter: clamp(24px, 3vw, 56px);
  }

  .schedule-scroll {
    overflow-x: visible;
  }

  .live-page--wide-schedule .th-person,
  .live-page--wide-schedule .td-person {
    width: 15%;
  }

  .live-page--wide-schedule .th-day,
  .live-page--wide-schedule .td-day {
    width: calc(85% / 7);
  }

  .live-page--wide-schedule .status-pill {
    font-size: 0.6875rem;
    padding: 8px 6px;
  }

  .live-page--wide-schedule .status-chevron {
    display: inline;
  }
}

@media (min-width: 1440px) {
  :root {
    --layout-max: 1280px;
    --layout-vspace: 44px;
  }

  .overview-panel.stats-panel .stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    overflow: visible;
    gap: 12px;
  }

  .overview-panel.stats-panel .stat-card {
    min-width: 0;
  }

  .team-overview .stats-strip-compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }

  .vote-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }
}

@media (min-width: 1920px) {
  :root {
    --layout-max: 1480px;
    --layout-gutter: 40px;
    --layout-vspace: 48px;
  }

  html {
    font-size: 17px;
  }

  .top-bar {
    min-height: 56px;
    padding: 8px var(--layout-gutter);
  }

  .top-bar-main.has-team-nav {
    gap: 18px;
  }

  .app-nav--header .app-nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  .site-footer {
    padding: 12px var(--layout-gutter) 48px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .page-title {
    font-size: clamp(2.25rem, 3vw, 3rem);
  }

  .avatar {
    width: 40px;
    height: 40px;
    font-size: 0.8125rem;
  }

  .th-person,
  .td-person {
    padding: 16px 24px;
  }

  .td-day {
    padding: 12px 10px;
  }

  .schedule-board .td-day {
    padding: 0;
  }

  .status-pill {
    padding: 7px 12px;
    font-size: 0.8125rem;
  }

  .vote-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 14px;
  }

  .home-page {
    max-width: 800px;
  }

  .home-welcome {
    max-width: 480px;
    padding: 48px 40px;
  }

  .admin-page {
    max-width: 840px;
  }
}

@media (min-width: 2560px) {
  :root {
    --layout-max: 1720px;
    --layout-gutter: 48px;
    --layout-vspace: 56px;
  }

  html {
    font-size: 18px;
  }

  .overview-panel.stats-panel .stats-strip {
    grid-template-columns: repeat(8, 1fr);
  }

  .stat-value {
    font-size: 2rem;
  }

  .workplace-stats-bar {
    height: 14px;
  }

  .morgenmad-grid {
    gap: 24px;
  }

  .vote-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }

  .schedule-table .th-day,
  .schedule-table .td-day {
    padding-left: 0;
    padding-right: 0;
  }

  .schedule-board .schedule-table .td-day {
    padding: 0;
  }

  .admin-page {
    max-width: 960px;
  }
}

@media (min-width: 3200px) {
  :root {
    --layout-max: 1960px;
    --layout-gutter: 56px;
  }

  html {
    font-size: 19px;
  }

  .page-title {
    font-size: 3rem;
  }

  .site-footer-inner {
    max-width: var(--layout-max);
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Apple-style mobile sheets & tab bar ── */
@media (max-width: 640px), (pointer: coarse) {
  .push-menu,
  .missed-menu,
  .me-menu[data-me-menu] {
    align-items: flex-end;
    padding: 0;
  }

  .push-menu-panel,
  .missed-menu-panel,
  .me-menu-panel {
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    max-height: min(92vh, 720px);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateY(100%);
    opacity: 1;
    transition: transform var(--transition-spring);
  }

  .push-menu.is-visible .push-menu-panel,
  .missed-menu.is-visible .missed-menu-panel,
  .me-menu.is-visible .push-menu-panel {
    transform: translateY(0);
  }

  .mobile-tab-nav {
    left: 12px;
    right: 12px;
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 4px;
    gap: 4px;
    border: 0.5px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
  }

  .mobile-tab-link {
    border-radius: 14px;
    min-height: 44px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    position: relative;
  }

  .mobile-tab-link.is-active::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 28px;
    height: 2.5px;
    margin-left: -14px;
    border-radius: 999px;
    background: var(--accent);
    opacity: 0.9;
  }

  .mobile-tab-link:active {
    opacity: 0.72;
  }

  .overview-card {
    border-radius: var(--radius-xl);
    border-width: 0.5px;
  }

  .page-hero {
    border-radius: var(--radius-xl);
    border-width: 0.5px;
  }

  .today-strip {
    border-radius: var(--radius-xl);
    border-width: 0.5px;
  }
}

/* ── Apple polish: team pages ── */
html:has(body.has-mobile-tabs)::before {
  opacity: 0.14;
}

html:has(body.has-mobile-tabs)::after {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg) 92%, transparent) 0%,
    var(--bg) 100%
  );
}

body.has-mobile-tabs .site-footer {
  display: block;
  padding: 12px 16px calc(92px + env(safe-area-inset-bottom));
}

body.has-mobile-tabs .site-footer-inner {
  max-width: 100%;
  padding: 10px 16px;
}

/* Opaque cards — translucent + backdrop-filter flashes the crowd bg over boxes on Safari. */
body.has-mobile-tabs .overview-card,
body.has-mobile-tabs .page-hero,
body.has-mobile-tabs .today-strip {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
  border-width: 0.5px;
}

body.has-mobile-tabs .overview-section-title,
body.has-mobile-tabs .schedule-title,
body.has-mobile-tabs .page-title {
  font-size: var(--text-headline);
  letter-spacing: -0.022em;
}

.live-content-panel {
  transition: opacity 0.2s var(--transition), transform 0.32s var(--transition-spring);
}

.live-content-panel.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.live-content-panel.is-entering {
  animation: live-content-enter 0.34s var(--transition-spring);
}

@keyframes live-content-enter {
  from {
    opacity: 0.82;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-content-panel.is-entering {
    animation: none;
  }
}

/* --- MVP: holidays, tips, edit gate, TV --- */
.th-day.is-holiday,
.td-day.is-holiday {
  background: color-mix(in srgb, var(--accent, #c45c26) 8%, transparent);
}

.day-header-holiday {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0.15rem;
  color: var(--text-muted, #6b7280);
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-week-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.schedule-copy-form {
  display: inline;
  margin: 0;
}

.schedule-edit-gate {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface, #fff) 90%, #f8fafc);
}

.schedule-edit-gate-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.schedule-edit-gate-form input {
  flex: 1 1 10rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border, #d1d5db);
}

.schedule-tip-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.65rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: color-mix(in srgb, #2563eb 10%, transparent);
}

.schedule-tip-banner p {
  margin: 0;
  font-size: 0.92rem;
}

.status-picker.is-readonly .status-chevron {
  display: none;
}

.status-picker.is-readonly .status-pill[disabled] {
  opacity: 0.95;
  cursor: default;
}

.tv-board {
  margin: 0;
  min-height: 100vh;
  padding: 1.5rem 2rem 2.5rem;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #0f172a;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.tv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tv-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #64748b;
}

.tv-title {
  margin: 0.2rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.tv-clock {
  text-align: right;
}

.tv-date {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
}

.tv-week {
  color: #64748b;
}

.tv-today h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.tv-today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.tv-status-block {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.tv-status-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.tv-count {
  margin-left: auto;
  font-weight: 700;
}

.tv-people {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
}

.tv-schedule {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  overflow: hidden;
}

.tv-schedule th,
.tv-schedule td {
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
}

/* TV board — same language as normal schedule, scaled for screens */
body.tv-page {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body.tv-page .tv-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(1rem, 2.2vw, 2rem) clamp(1rem, 2.5vw, 2.4rem) 2.5rem;
}

body.tv-page .tv-overview {
  gap: 1rem;
}

body.tv-page .tv-brand-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0.15rem 0.35rem;
}

body.tv-page .tv-team-name {
  margin: 0.15rem 0 0;
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
}

body.tv-page .tv-brand-meta {
  text-align: right;
}

body.tv-page .tv-meta-date {
  display: block;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 650;
  color: var(--text);
}

body.tv-page .tv-meta-week {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--text-body);
  color: var(--text-secondary);
}

body.tv-page .tv-stats-panel {
  margin: 0;
}

body.tv-page .tv-stats-strip {
  gap: 0.65rem;
}

body.tv-page .tv-stats-strip .stat-card {
  min-width: 7.5rem;
  padding: 0.85rem 1rem;
}

body.tv-page .tv-stats-strip .stat-value {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

body.tv-page .tv-stats-strip .stat-label {
  font-size: 0.9rem;
}

body.tv-page .tv-today-panel {
  padding: 1rem 1.15rem 1.1rem;
}

body.tv-page .tv-today-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

body.tv-page .tv-today-count {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-weight: 650;
  font-size: 0.95rem;
}

body.tv-page .tv-today-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.55rem;
}

body.tv-page .tv-today-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

body.tv-page .tv-today-person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

body.tv-page .tv-today-person .person-meta {
  min-width: 0;
}

body.tv-page .tv-today-person .person-name,
body.tv-page .tv-today-person .person-dept {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tv-page .tv-today-person .person-name {
  font-size: 1.02rem;
  font-weight: 600;
}

body.tv-page .tv-today-person .person-dept {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

body.tv-page .tv-today-item .status-pill {
  flex-shrink: 0;
  pointer-events: none;
}

body.tv-page .tv-today-item .status-chevron {
  display: none;
}

body.tv-page .tv-schedule-card.overview-card {
  margin-top: 0;
}

body.tv-page .tv-schedule-table .status-pill {
  pointer-events: none;
}

body.tv-page .tv-schedule-table .status-chevron {
  display: none;
}

body.tv-page .tv-schedule-table .person-name {
  font-size: 1rem;
}

body.tv-page .tv-schedule-table .day-header-name {
  font-size: 0.95rem;
}

body.tv-page .tv-schedule-table .day-header-date {
  font-size: 0.9rem;
}

body.tv-page .tv-schedule-table .status-label {
  font-size: 0.92rem;
}

body.tv-page .tv-schedule-board .schedule-scroll {
  overflow: auto;
}

/* Hide weekends on TV by default — same as typical office week focus */
body.tv-page .tv-schedule-table .is-weekend {
  display: none;
}

@media (min-width: 1100px) {
  body.tv-page .tv-overview {
    gap: 1.15rem;
  }

  body.tv-page .tv-today-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  body.tv-page .tv-schedule-table .avatar {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 820px) {
  body.tv-page .tv-brand-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  body.tv-page .tv-brand-meta {
    text-align: left;
  }
}

.admin-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-audit-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 0.9rem;
}

.admin-audit-meta {
  display: block;
  color: var(--text-muted, #6b7280);
  font-size: 0.78rem;
}

.admin-backup-card {
  padding: 22px 22px 24px;
}

.admin-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-backup-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.admin-backup-panel-safe {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
}

.admin-backup-panel-danger {
  background: color-mix(in srgb, var(--syg) 7%, var(--surface));
  border-color: color-mix(in srgb, var(--syg) 22%, var(--border));
}

.admin-backup-panel-danger.is-ready {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--syg) 35%, transparent);
}

.admin-backup-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.admin-action-icon-danger {
  background: color-mix(in srgb, var(--syg) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--syg) 28%, var(--border));
}

.admin-backup-panel-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
}

.admin-backup-panel-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.admin-backup-restore-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-backup-file {
  position: relative;
  display: block;
  cursor: pointer;
}

.admin-backup-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-backup-file-ui {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px dashed color-mix(in srgb, var(--syg) 35%, var(--border));
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-backup-panel-danger.has-file .admin-backup-file-ui,
.admin-backup-file:hover .admin-backup-file-ui,
.admin-backup-file:focus-within .admin-backup-file-ui {
  border-style: solid;
  border-color: color-mix(in srgb, var(--syg) 45%, var(--border));
  background: color-mix(in srgb, var(--syg) 5%, var(--surface));
}

.admin-backup-file-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.admin-backup-file-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.admin-backup-restore-form .admin-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .admin-backup-grid {
    grid-template-columns: 1fr;
  }
}

.admin-toolbar-fieldset {
  display: none;
}

.admin-team-qr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.admin-team-qr img {
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.admin-team-qr-meta {
  display: grid;
  gap: 6px;
  align-content: start;
}

.admin-team-qr-name {
  font-size: 0.95rem;
}

.admin-deleted-users {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-user-item-deleted {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  opacity: 0.85;
}

.team-sticky-note {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.team-sticky-note-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.team-sticky-note-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.who-where-cards {
  display: none;
}

.who-where-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.who-where-card:last-child {
  border-bottom: none;
}

.who-where-card.is-me {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.who-where-card-person {
  display: grid;
  gap: 2px;
}

.who-where-card-person strong {
  font-size: 0.95rem;
}

.who-where-card-person span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.who-where-picker {
  flex-shrink: 0;
}

.who-where-picker .status-pill {
  min-height: 36px;
}

.who-where-card-status {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--status-color, var(--accent)) 16%, var(--surface-muted));
  color: var(--text);
}

.note-mention-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.morgenmad-fairness-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.morgenmad-fairness-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  font-size: 0.88rem;
}

.morgenmad-fairness-item.is-me {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-muted));
}

.morgenmad-fairness-item em {
  font-style: normal;
  color: var(--accent);
  margin-left: 6px;
  font-weight: 600;
}

.morgenmad-ics-link {
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.morgenmad-ics-link a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 720px) {
  .who-where-cards {
    display: grid;
    gap: 0;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }

  /* One mobile “today” surface: who-where wins over today-strip */
  .live-page[data-is-current-week="true"] .today-strip {
    display: none !important;
  }

  .who-where-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .who-where-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .who-where-note .note-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    opacity: 1;
  }

  .who-where-picker .status-pill {
    min-height: 44px;
    min-width: 96px;
    padding: 10px 12px;
  }

  .who-where-note .note-preview {
    display: none;
  }
}

/* ── Mobile UX polish ── */
@media (max-width: 640px) {
  :root {
    --blur: none;
  }

  body.has-mobile-tabs .main-content {
    padding-bottom: var(--mobile-tab-clearance);
  }

  body.has-mobile-tabs .schedule-card {
    margin-bottom: 12px;
  }

  .brand-tagline {
    display: none;
  }

  .overview-card,
  .page-hero,
  .today-strip,
  .mobile-tab-nav,
  .status-menu,
  .note-popover,
  .note-mention-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .overview-card,
  .page-hero,
  .today-strip {
    background: var(--surface);
  }

  .mobile-tab-nav {
    background: var(--surface);
  }

  .status-menu.is-floating,
  .note-popover.is-floating,
  .note-mention-menu {
    z-index: 1300;
  }

  .note-save-btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 0.875rem;
  }

  .note-input {
    min-height: 72px;
    font-size: 1rem;
    padding: 10px 12px;
  }

  .status-option {
    min-height: 44px;
    padding: 12px 14px;
  }

  html:has(body.has-mobile-tabs)::before {
    opacity: 0.06;
  }
}

/* ── Mobile week plan: name + 1 day, swipe for the rest ── */
@media (max-width: 640px) {
  .live-page--wide-schedule {
    --schedule-sticky-gap: 6px;
    --schedule-mobile-person: 120px;
    --schedule-mobile-chrome: calc(
      var(--schedule-mobile-person)
      + (2 * max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)))
    );
    --schedule-mobile-day: calc(100vw - var(--schedule-mobile-chrome));
  }

  .live-page--wide-schedule .who-where-cards {
    display: none;
  }

  .live-page--wide-schedule .schedule-card-header-text {
    display: none;
  }

  .live-page--wide-schedule .schedule-card-header {
    padding: 6px 8px 4px;
    gap: 4px;
  }

  .live-page--wide-schedule .schedule-sticky-chrome {
    border-radius: 14px 14px 0 0;
    box-shadow: none;
    border-color: var(--border);
  }

  .live-page--wide-schedule .schedule-board {
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 14px 14px;
  }

  .live-page--wide-schedule .schedule-table tfoot {
    display: none;
  }

  /* Keep only weekend toggle — hide export/copy/TV on phone */
  .live-page--wide-schedule .schedule-week-nav-actions .team-toolbar-toggle:not([data-weekend-toggle]),
  .live-page--wide-schedule .schedule-week-nav-actions .schedule-copy-form {
    display: none;
  }

  .live-page--wide-schedule .schedule-week-nav-actions {
    justify-content: center;
  }

  .live-page--wide-schedule .schedule-weekend-toggle {
    min-height: 32px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
  }

  .live-page--wide-schedule .week-picker {
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-muted) 70%, var(--surface));
    border: 1px solid var(--border);
    padding: 4px 6px;
  }

  /* No container-type here — it breaks position:sticky for names on iOS/Safari. */
  .live-page--wide-schedule .schedule-scroll,
  .live-page--wide-schedule .schedule-head-scroll {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--schedule-mobile-person);
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .live-page--wide-schedule .schedule-scroll::-webkit-scrollbar,
  .live-page--wide-schedule .schedule-head-scroll::-webkit-scrollbar {
    display: none;
  }

  .live-page--wide-schedule .schedule-sticky-chrome {
    overflow: visible;
  }

  .live-page--wide-schedule .schedule-table {
    table-layout: fixed;
    width: max-content;
    min-width: calc(var(--schedule-mobile-person) + (var(--schedule-mobile-day) * 7));
    border-collapse: separate;
    border-spacing: 0;
  }

  .live-page--wide-schedule .schedule-card.hide-weekends .schedule-table {
    min-width: calc(var(--schedule-mobile-person) + (var(--schedule-mobile-day) * 5));
  }

  .live-page--wide-schedule .th-person,
  .live-page--wide-schedule .td-person {
    position: -webkit-sticky !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 6;
    width: var(--schedule-mobile-person);
    min-width: var(--schedule-mobile-person);
    max-width: var(--schedule-mobile-person);
    padding-right: 0;
    border-right: 1px solid var(--border);
    background-clip: padding-box;
    box-shadow: 6px 0 14px rgba(0, 0, 0, 0.12);
  }

  .live-page--wide-schedule .th-person {
    z-index: 8;
    background: var(--surface) !important;
  }

  .live-page--wide-schedule .schedule-table tbody .person-row:nth-child(odd) .td-person {
    background: var(--schedule-row-odd-bg) !important;
  }

  .live-page--wide-schedule .schedule-table tbody .person-row:nth-child(even) .td-person {
    background: var(--schedule-row-even-bg) !important;
  }

  .live-page--wide-schedule .schedule-table tbody .person-row.is-me .td-person {
    background: color-mix(in srgb, var(--accent) 7%, var(--schedule-row-odd-bg)) !important;
  }

  .live-page--wide-schedule .th-day,
  .live-page--wide-schedule .td-day {
    position: relative;
    z-index: 1;
    width: var(--schedule-mobile-day);
    min-width: var(--schedule-mobile-day);
    max-width: var(--schedule-mobile-day);
    scroll-snap-align: start;
    border-left: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  }

  /* Flat / quiet zebra — less visual noise */
  .live-page--wide-schedule .schedule-table .td-day.is-alt-col,
  .live-page--wide-schedule .schedule-table .th-day.is-alt-col,
  .live-page--wide-schedule .schedule-table tbody .person-row:nth-child(odd) .td-day.is-alt-col,
  .live-page--wide-schedule .schedule-table tbody .person-row:nth-child(even) .td-day.is-alt-col {
    background: inherit;
  }

  .live-page--wide-schedule .schedule-scroll.can-scroll-right::after {
    width: 28px;
    opacity: 1;
    background: linear-gradient(270deg, var(--surface) 15%, transparent 100%);
  }

  .live-page--wide-schedule .team-overview .avatar {
    width: 28px;
    height: 28px;
    font-size: 0.5625rem;
    flex-shrink: 0;
  }

  .live-page--wide-schedule .person-cell {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 8px 10px 10px;
    text-align: left;
  }

  .live-page--wide-schedule .person-meta {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .live-page--wide-schedule .person-name--full {
    display: none;
  }

  .live-page--wide-schedule .person-name--compact {
    display: block;
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .live-page--wide-schedule .person-morgenmad-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    transform: scale(0.75);
  }

  .live-page--wide-schedule .th-person {
    font-size: 0;
    padding: 8px 4px;
  }

  .live-page--wide-schedule .day-header {
    min-height: 48px;
    padding: 6px 4px 8px;
    gap: 2px;
  }

  .live-page--wide-schedule .day-header.is-today {
    border-radius: 0;
    border: 0;
    border-bottom: 2px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
  }

  .live-page--wide-schedule .day-header-name {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
  }

  .live-page--wide-schedule .day-header-date {
    min-width: 30px;
    height: 30px;
    font-size: 0.9375rem;
    font-weight: 750;
  }

  .live-page--wide-schedule .day-header-holiday,
  .live-page--wide-schedule .day-header-morgenmad {
    display: none;
  }

  .live-page--wide-schedule .schedule-board .day-slot {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 6px;
    min-height: 52px;
    --schedule-note-size: 18px;
  }

  .live-page--wide-schedule .schedule-board .day-slot.has-note-content {
    min-height: 52px;
  }

  .live-page--wide-schedule .schedule-board .day-status,
  .live-page--wide-schedule .schedule-board .status-picker {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Notes only when they exist — small badge on the status */
  .live-page--wide-schedule .schedule-board .day-note {
    position: absolute;
    top: -2px;
    right: -2px;
    width: auto;
    height: auto;
    margin: 0;
    z-index: 2;
    pointer-events: auto;
  }

  .live-page--wide-schedule .schedule-board .day-note .note-btn:not(.has-note) {
    display: none;
  }

  .live-page--wide-schedule .schedule-board .day-note .note-btn.has-note {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    opacity: 1;
    box-shadow: 0 0 0 2px var(--surface);
  }

  .live-page--wide-schedule .schedule-board .day-note .note-btn svg {
    width: 10px;
    height: 10px;
  }

  .live-page--wide-schedule .schedule-board .day-note-snippet {
    display: none;
  }

  .live-page--wide-schedule .schedule-board .status-chevron,
  .live-page--wide-schedule .status-chevron {
    display: none;
  }

  .live-page--wide-schedule .schedule-board .day-slot .status-pill {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    margin: 0;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 650;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
  }

  .live-page--wide-schedule .schedule-board .day-slot .status-pill .status-label {
    position: static;
    width: auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    clip: auto;
    border: 0;
  }

  .live-page--wide-schedule .schedule-board .status-dot {
    width: 8px;
    height: 8px;
  }

  .live-page--wide-schedule .schedule-board .td-day.is-today {
    background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  }

  .live-page--wide-schedule .schedule-board .td-day.is-today .status-pill {
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent);
  }

  .schedule-scroll-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 10px;
    background: var(--surface);
  }

  .schedule-scroll-dots[hidden] {
    display: none;
  }

  .schedule-scroll-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-tertiary) 45%, transparent);
    cursor: pointer;
    transition: width 0.15s ease, background 0.15s ease;
  }

  .schedule-scroll-dot.is-active {
    width: 16px;
    background: var(--accent);
  }
}

@media (max-width: 640px) and (pointer: coarse) {
  .live-page--wide-schedule .schedule-board .day-slot {
    min-height: 64px;
  }

  .live-page--wide-schedule .schedule-board .day-slot .status-pill {
    min-height: 56px;
    height: 56px;
    font-size: 1rem;
  }
}
