/* ── Apple-inspired design tokens ── */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-secondary: rgba(255, 255, 255, 0.72);
  --surface-muted: #fafafa;
  --surface-hover: #f1f1f3;
  --surface-inset: #f0f0f2;
  --table-header: #fafafa;
  --input-bg: #fafafa;
  --on-accent: #ffffff;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --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(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-surface: var(--shadow-sm);
  --shadow-elevated: var(--shadow-md);
  --blur: saturate(180%) blur(20px);
  --kontor: #34c759;
  --kontor-soft: rgba(52, 199, 89, 0.12);
  --remote: #007aff;
  --remote-soft: rgba(0, 122, 255, 0.12);
  --fri: #ff9500;
  --fri-soft: rgba(255, 149, 0, 0.12);
  --syg: #ff375f;
  --syg-soft: rgba(255, 55, 95, 0.12);
  --udafhuset: #af52de;
  --udafhuset-soft: rgba(175, 82, 222, 0.12);
  --extern: #5856d6;
  --extern-soft: rgba(88, 86, 214, 0.12);
  --basel: #14a3a3;
  --basel-soft: rgba(20, 163, 163, 0.12);
  --kursus: #ffcc00;
  --kursus-soft: rgba(255, 204, 0, 0.18);
  --today-ring: rgba(0, 113, 227, 0.15);
  --today-header: linear-gradient(180deg, rgba(0, 113, 227, 0.06) 0%, var(--table-header) 100%);
  --thursday-header: linear-gradient(180deg, rgba(255, 149, 0, 0.08) 0%, var(--table-header) 100%);
  --morgenmad-card-bg: linear-gradient(145deg, #ffffff 0%, #fffbf5 100%);
  --morgenmad-border: rgba(255, 149, 0, 0.15);
  --popover-bg: rgba(255, 255, 255, 0.96);
  --overlay-hover: rgba(0, 0, 0, 0.04);
  --row-hover: rgba(0, 0, 0, 0.015);
  --sticky-shadow: rgba(0, 0, 0, 0.03);
  --accent-soft: rgba(0, 113, 227, 0.08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  --transition: 0.22s cubic-bezier(0.25, 0.1, 0.25, 1);
  --layout-max: 1120px;
  --layout-gutter: 24px;
  --layout-vspace: 40px;
  --holger-crowd-overlay: linear-gradient(
    180deg,
    rgba(245, 245, 247, 0.2) 0%,
    rgba(245, 245, 247, 0.35) 55%,
    rgba(245, 245, 247, 0.45) 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: #1c1c1e;
  --surface-secondary: rgba(28, 28, 30, 0.88);
  --surface-muted: #2c2c2e;
  --surface-hover: #3a3a3c;
  --surface-inset: #2c2c2e;
  --table-header: #2c2c2e;
  --input-bg: #2c2c2e;
  --on-accent: #ffffff;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --text-secondary: #aeaeb2;
  --text-tertiary: #636366;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --kontor-soft: rgba(52, 199, 89, 0.2);
  --remote-soft: rgba(0, 122, 255, 0.2);
  --fri-soft: rgba(255, 149, 0, 0.2);
  --syg-soft: rgba(255, 55, 95, 0.2);
  --udafhuset-soft: rgba(175, 82, 222, 0.2);
  --extern-soft: rgba(88, 86, 214, 0.2);
  --basel-soft: rgba(20, 163, 163, 0.2);
  --kursus-soft: rgba(255, 204, 0, 0.22);
  --today-ring: rgba(10, 132, 255, 0.25);
  --today-header: linear-gradient(180deg, rgba(10, 132, 255, 0.14) 0%, var(--table-header) 100%);
  --thursday-header: linear-gradient(180deg, rgba(255, 149, 0, 0.14) 0%, var(--table-header) 100%);
  --morgenmad-card-bg: linear-gradient(145deg, #1c1c1e 0%, #2a2218 100%);
  --morgenmad-border: rgba(255, 149, 0, 0.22);
  --popover-bg: rgba(44, 44, 46, 0.96);
  --overlay-hover: rgba(255, 255, 255, 0.06);
  --row-hover: rgba(255, 255, 255, 0.04);
  --sticky-shadow: rgba(0, 0, 0, 0.35);
  --accent-soft: rgba(10, 132, 255, 0.18);
  --holger-crowd-overlay: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.22) 55%,
    rgba(0, 0, 0, 0.35) 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.5;
  transition: color var(--transition);
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 52px;
  padding: 0 20px;
  background: var(--surface-secondary);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
}

.top-bar-spacer {
  min-width: 0;
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: opacity var(--transition);
}

.brand:hover {
  opacity: 0.75;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--holger-mark-image) center / cover no-repeat;
  box-shadow: 0 2px 8px rgba(20, 163, 163, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .brand-mark {
  box-shadow: 0 2px 10px rgba(30, 196, 196, 0.32);
  border-color: rgba(255, 255, 255, 0.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

.theme-toggle {
  justify-self: end;
  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);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: scale(1.04);
}

.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);
}

/* ── 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: 40px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-md);
}

.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-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-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-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-secondary);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-surface);
}

.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 {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0071e3, #005bb5);
}

.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;
}

.overview-card + .overview-card,
.overview-panel + .overview-card {
  margin-top: 20px;
}

.overview-section-title {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  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 .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-basel {
  background: var(--basel-soft);
  border-color: rgba(255, 45, 85, 0.18);
}

.stat-kursus {
  background: var(--kursus-soft);
  border-color: rgba(255, 204, 0, 0.28);
}

.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-basel .stat-dot { background: var(--basel); box-shadow: 0 0 0 4px var(--basel-soft); }
.stat-kursus .stat-dot { background: var(--kursus); box-shadow: 0 0 0 4px var(--kursus-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-basel { background: var(--basel); }
.workplace-stats-segment.workplace-stats-kursus { background: var(--kursus); }

.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-basel .workplace-stats-dot {
  background: var(--basel);
  box-shadow: 0 0 0 3px var(--basel-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-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 {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #0071e3, #005bb5);
}

.schedule-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.schedule-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.schedule-subtitle {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.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: 12px;
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
}

.schedule-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px 6px;
  min-width: 680px;
}

.schedule-table th,
.schedule-table td {
  padding: 0;
  vertical-align: middle;
}

.schedule-table thead tr {
  border-bottom: none;
}

.th-person {
  padding: 0 8px 0 4px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  background: var(--surface-muted);
  position: sticky;
  left: 0;
  z-index: 3;
  vertical-align: bottom;
  border-right: 1px solid var(--border);
}

.th-day {
  padding: 0 2px;
  text-align: center;
  background: transparent;
  min-width: 0;
  vertical-align: bottom;
}

.day-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 64px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.day-header.is-today {
  border-color: rgba(0, 113, 227, 0.22);
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.1) 0%, var(--surface) 100%);
}

.day-header.is-morgenmad-day {
  border-color: rgba(255, 149, 0, 0.22);
  background: linear-gradient(180deg, rgba(255, 149, 0, 0.1) 0%, var(--surface) 100%);
}

.day-header.is-today.is-morgenmad-day {
  background: linear-gradient(180deg, rgba(0, 113, 227, 0.08) 0%, rgba(255, 149, 0, 0.08) 100%), var(--surface);
}

.day-header-name {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.day-header.is-today .day-header-name {
  color: var(--accent);
}

.day-header.is-morgenmad-day .day-header-name {
  color: #c93400;
}

.day-header-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  border-radius: 999px;
}

.day-header-morgenmad {
  position: absolute;
  top: 6px;
  right: 6px;
  margin: 0;
  text-decoration: none;
}

.day-header.is-morgenmad-day {
  padding-top: 10px;
}

.is-today-date {
  background: var(--accent);
  color: var(--on-accent);
}

/* Body rows */
.person-row {
  transition: transform var(--transition);
}

.td-person {
  padding: 0 8px 0 4px;
  position: sticky;
  left: 0;
  background: var(--surface-muted);
  z-index: 2;
  box-shadow: none;
  border-right: 1px solid var(--border);
  vertical-align: middle;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color var(--transition);
}

.person-meta {
  flex: 1;
  min-width: 0;
}

.team-overview .avatar {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  box-shadow: none;
}

.person-row:hover .person-cell {
  border-color: var(--border-strong);
}

.td-day {
  padding: 0 2px;
  text-align: center;
  vertical-align: middle;
}

.schedule-table .td-day.is-today,
.schedule-table .th-day.is-today {
  box-shadow: inset 2px 0 0 var(--accent);
  border-radius: var(--radius-md);
}

.schedule-table .td-day.is-morgenmad-day,
.schedule-table .th-day.is-morgenmad-day {
  box-shadow: inset 2px 0 0 #ff9500;
  border-radius: var(--radius-md);
}

.schedule-table .td-day.is-today.is-morgenmad-day,
.schedule-table .th-day.is-today.is-morgenmad-day {
  box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 #ff9500;
}

.person-row:nth-child(even) .person-cell {
  background: var(--surface-muted);
}

.day-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 4px;
}

.day-status {
  position: relative;
  width: 100%;
  max-width: 112px;
}

.day-status .status-picker,
.day-slot .status-picker {
  width: 100%;
}

.day-status .status-pill,
.day-slot .status-pill {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  font-size: 0.6875rem;
  border-radius: var(--radius-md);
  box-shadow: none;
  gap: 4px;
}

.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 {
  opacity: 0.55;
}

.day-note {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 1;
}

.day-note .note-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  font-size: 0.5rem;
  opacity: 0;
  border-color: transparent;
  background: var(--surface);
  transition: opacity var(--transition), border-color var(--transition);
}

.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 .status-pill:hover,
.schedule-board .status-picker.is-open .status-pill {
  box-shadow: none;
  transform: none;
  border-color: var(--border-strong);
}

.schedule-summary-row .td-summary {
  padding-top: 4px;
  vertical-align: top;
}

.schedule-summary-label {
  display: block;
  padding: 8px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.day-summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.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;
}

.person-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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;
}

.person-dept {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.note-picker {
  position: relative;
}

.note-btn {
  position: relative;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  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: 220px;
  padding: 12px;
  background: var(--popover-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.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(--surface-muted);
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--text);
  resize: vertical;
  min-height: 60px;
  line-height: 1.4;
}

.note-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.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.5;
  }

  .day-note .note-btn.has-note {
    opacity: 1;
  }
}

/* ── 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);
  transform: translateY(-1px);
}

.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-basel .status-dot { background: var(--basel); }
.status-kursus .status-dot { background: var(--kursus); }

.status-kontor .status-label { color: #248a3d; }
.status-remote .status-label { color: #0066cc; }
.status-fri .status-label { color: #c93400; }
.status-syg .status-label { color: #d70040; }
.status-udafhuset .status-label { color: #8944ab; }
.status-extern .status-label { color: #4b49b6; }
.status-basel .status-label { color: #0f766e; }
.status-kursus .status-label { color: #a67c00; }

.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-basel {
  background: var(--basel-soft);
  border-color: rgba(255, 45, 85, 0.22);
}

.status-pill.status-kursus {
  background: var(--kursus-soft);
  border-color: rgba(255, 204, 0, 0.35);
}

.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-basel {
  background: var(--basel-soft);
  border-color: rgba(255, 45, 85, 0.18);
}

.status-chip.status-kursus {
  background: var(--kursus-soft);
  border-color: rgba(255, 204, 0, 0.28);
}

.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: 1000;
}

.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-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 149, 0, 0.05) 0%, var(--surface) 100%);
}

.morgenmad-card > :not(.morgenmad-header) {
  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;
}

.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-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-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;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.calendar-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.calendar-holiday-toggle-hint {
  margin: 8px 0 0 26px;
}

.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;
  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;
}

/* ── 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,
.theme-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 {
    width: 44px;
    height: 44px;
  }

  .status-pill {
    min-height: 44px;
    padding: 10px 14px;
  }

  .status-option {
    min-height: 44px;
    padding: 12px 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;
  }

  .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);
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .morgenmad-grid {
    grid-template-columns: 1fr;
  }

  .morgenmad-bringer {
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --layout-gutter: 16px;
    --layout-vspace: 28px;
  }

  .main-content {
    padding: var(--layout-vspace) var(--layout-gutter) calc(var(--layout-vspace) + 20px);
  }

  .stats-strip {
    gap: 8px;
  }

  .stat-card {
    padding: 14px 16px;
    gap: 10px;
  }

  .stat-value {
    font-size: 1.375rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .th-person,
  .td-person {
    padding-left: 16px;
    padding-right: 12px;
  }

  .schedule-table {
    min-width: 600px;
  }

  .th-day,
  .td-day {
    min-width: 100px;
  }

  .status-pill {
    padding: 5px 8px;
    font-size: 0.6875rem;
  }

  .schedule-card-header {
    padding: 12px 14px;
  }

  .schedule-meta-chip {
    width: 100%;
  }

  .schedule-board {
    padding: 10px;
  }

  .team-toolbar-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .team-overview .stats-strip-compact {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }

  .page-hero {
    padding: 22px 18px 20px;
  }

  .schedule-table {
    min-width: 580px;
    border-spacing: 4px 6px;
  }

  .day-slot .status-pill {
    padding: 6px 8px;
  }
}

/* ── 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-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-summary {
  padding: 18px 20px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.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-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: 22px;
}

.admin-stats-card .admin-card-desc {
  margin-top: 4px;
}

.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-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;
}

.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 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: flex-start;
  gap: 10px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.admin-field-checkbox-block {
  margin-top: 4px;
  margin-bottom: 4px;
}

.admin-field-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.admin-field-actions {
  justify-content: flex-end;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
}

.admin-form-grid-team {
  grid-template-columns: 1fr 1fr auto auto;
  align-items: end;
}

.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-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: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition), border-color 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);
}

.admin-team-card-head {
  margin-bottom: 14px;
}

.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-settings {
  margin-bottom: 10px;
}

.admin-team-actions {
  margin-bottom: 4px;
}

.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-members-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.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-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 1fr;
  }

  .admin-form-grid-user {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .admin-grid,
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-form-grid-team,
  .admin-form-grid-user {
    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);
  }

  .schedule-scroll {
    overflow-x: visible;
  }

  .schedule-table {
    min-width: 0;
    table-layout: fixed;
  }

  .th-person,
  .td-person {
    width: 24%;
  }

  .th-day,
  .td-day {
    min-width: 0;
    width: 15.2%;
  }
}

@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 {
    height: 56px;
    padding: 0 var(--layout-gutter);
  }

  .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;
  }

  .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: 12px;
    padding-right: 12px;
  }

  .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;
  }
}
