:root {
  --bg: #edf3fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-hover: #f1f5f9;

  --text: #172033;
  --text-strong: #101828;
  --muted: #667085;
  --muted-light: #98a2b3;

  --border: #e4eaf2;
  --border-strong: #cfd7e3;

  --primary: #3478f6;
  --primary-hover: #1d63df;
  --primary-soft: #eff6ff;

  --success: #16a34a;
  --success-soft: #dcfce7;

  --warning: #d97706;
  --warning-soft: #fef3c7;

  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --sidebar: #101828;
  --sidebar-hover: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow: 0 24px 70px rgba(31, 54, 88, 0.11);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

/* =========================================================
   KOMPAKTE HORIZONTALE HAUPTNAVIGATION
   ========================================================= */

.app-shell,
.app-shell.planning-layout,
.app-shell.planning-layout.sidebar-expanded {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar,
.planning-layout .sidebar,
.planning-layout.sidebar-expanded .sidebar {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  height: 72px;
  min-height: 72px;
  padding: 9px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  overflow: visible;
  box-shadow: inset 0 -1px rgba(96, 165, 250, 0.16),
    0 8px 24px rgba(15, 23, 42, 0.14);
}

.sidebar .brand,
.planning-layout .sidebar .brand,
.planning-layout.sidebar-expanded .sidebar .brand {
  width: 54px;
  min-width: 54px;
  height: 54px;
  padding: 0;
  display: flex;
  overflow: hidden;
  border-radius: 15px;
}

.sidebar .brand-mark,
.planning-layout .sidebar .brand-mark {
  width: 54px;
  min-width: 54px;
  height: 54px;
}

.sidebar .brand-copy,
.planning-layout .sidebar .brand-copy,
.planning-layout.sidebar-expanded .sidebar .brand-copy,
.organization-sidebar-brand,
.planning-sidebar-toggle {
  display: none;
}

.sidebar nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: visible;
}

.sidebar nav a,
.sidebar .settings,
.planning-layout .sidebar nav a,
.planning-layout .sidebar .settings,
.planning-layout.sidebar-expanded .sidebar nav a,
.planning-layout.sidebar-expanded .sidebar .settings {
  position: relative;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  min-height: 46px;
  height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 13px;
  transition: max-width 220ms ease, width 220ms ease,
    color 160ms ease, background-color 160ms ease,
    transform 160ms ease;
}

.sidebar nav a:hover,
.sidebar nav a:focus-visible,
.sidebar .settings:hover,
.sidebar .settings:focus-visible {
  width: 190px;
  max-width: 190px;
  transform: translateY(-1px);
}

.sidebar .nav-icon {
  width: 20px;
  min-width: 20px;
  display: inline-grid;
  place-items: center;
  font-size: 1.08rem;
  line-height: 1;
}

.sidebar .nav-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  font-weight: 700;
  transition: max-width 220ms ease, opacity 120ms ease 30ms;
}

.sidebar nav a:hover .nav-label,
.sidebar nav a:focus-visible .nav-label,
.sidebar .settings:hover .nav-label,
.sidebar .settings:focus-visible .nav-label {
  max-width: 145px;
  opacity: 1;
}

.sidebar nav a.active,
.sidebar .settings.active {
  box-shadow: inset 0 -3px #60a5fa;
}

.sidebar nav a[href="/packages"] {
  justify-content: flex-start;
}

.sidebar-notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.65rem;
  transition: right 220ms ease;
}

.sidebar nav a:hover .sidebar-notification-badge,
.sidebar nav a:focus-visible .sidebar-notification-badge {
  right: 7px;
}

.sidebar .settings {
  margin: 0 0 0 auto;
}

.app-shell main {
  flex: 1 1 auto;
}

.planning-layout .page {
  padding-inline: 30px;
}

@media (max-width: 1180px) {
  .sidebar {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .sidebar nav {
    flex: 0 0 auto;
  }

  .sidebar .settings {
    margin-left: 4px;
  }
}

@media (max-width: 760px) {
  .sidebar,
  .planning-layout .sidebar,
  .planning-layout.sidebar-expanded .sidebar {
    display: flex;
    height: 64px;
    min-height: 64px;
    padding: 7px 10px;
  }

  .sidebar .brand,
  .planning-layout .sidebar .brand {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }

  .sidebar .brand-mark,
  .planning-layout .sidebar .brand-mark {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }

  .sidebar nav a,
  .sidebar .settings {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    padding-inline: 12px;
  }
}

.planning-person-heading .professional-title {
  margin-top: 2px;
  color: var(--primary);
  font-weight: 750;
  line-height: 1.25;
}

.role-organization-picker {
  min-width: 280px;
  padding: 14px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.role-organization-picker label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}
.role-organization-picker select { width: 100%; min-height: 42px; }
@media (max-width: 760px) {
  .role-organization-picker { width: 100%; min-width: 0; }
}

/* Lesbares Sonderraster für die umfangreiche Arbeitswochenenden-Regel. */
.rule-card-weekend {
  grid-template-columns: 44px minmax(220px, 1fr) minmax(320px, 1.25fr) 145px;
  align-items: start;
}
.rule-card-weekend .rule-card-icon,
.rule-card-weekend .rule-card-copy,
.rule-card-weekend .weekend-month-limits,
.rule-card-weekend > select { align-self: center; }
.rule-card-weekend .weekend-month-limits {
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 12px;
}
.rule-card-weekend .weekend-month-limits label {
  grid-template-columns: minmax(78px, 1fr) auto;
  gap: 6px 8px;
  font-size: 0.76rem;
}
.rule-card-weekend .weekend-month-limits label > span {
  grid-column: 1 / -1;
  white-space: nowrap;
}
.rule-card-weekend .weekend-month-limits input {
  min-width: 78px;
  min-height: 44px;
}
.rule-card-weekend .weekend-month-limits small {
  font-size: 0.7rem;
}
.rule-card-weekend > select {
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  min-height: 44px;
}
.rule-card-weekend .weekend-consecutive-setting {
  grid-column: 2 / 4;
  grid-row: 2;
  align-self: center;
  margin-top: 4px;
}
.rule-card-weekend .rule-check {
  grid-column: 2 / -1;
  grid-row: 3;
  margin-top: 2px;
  line-height: 1.5;
}

@media (max-width: 1450px) {
  .rule-card-weekend {
    grid-template-columns: 44px minmax(190px, 1fr) minmax(285px, 1.2fr) 135px;
  }
  .rule-card-weekend .weekend-month-limits {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 760px) {
  .rule-card-weekend { grid-template-columns: 42px 1fr; }
  .rule-card-weekend .weekend-month-limits,
  .rule-card-weekend > select,
  .rule-card-weekend .weekend-consecutive-setting,
  .rule-card-weekend .rule-check {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .rule-card-weekend .weekend-month-limits {
    grid-template-columns: repeat(2, minmax(125px, 1fr));
  }
}

/* Persönlicher Dienstplan */
.message-top-button{position:relative;width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--border);border-radius:12px;color:var(--text);background:var(--surface);text-decoration:none;font-size:1.15rem}.message-top-button:hover,.message-top-button.is-active{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}.message-top-button b{position:absolute;top:-6px;right:-6px;min-width:19px;height:19px;padding:0 5px;display:grid;place-items:center;border:2px solid var(--surface);border-radius:999px;color:#fff;background:var(--danger);font-size:.65rem}.employee-plan-actions-main{display:flex;align-items:center;gap:10px}
.message-layout{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(360px,1.2fr);gap:18px}.message-compose form{margin-top:18px;display:grid;gap:14px}.message-compose label{display:grid;gap:6px;font-weight:750}.message-compose input,.message-compose textarea,.message-compose select,.message-reply textarea{width:100%;padding:11px;border:1px solid var(--border);border-radius:11px;color:var(--text);background:var(--surface-soft)}.message-compose textarea,.message-reply textarea{min-height:120px;resize:vertical}.message-compose small{color:var(--muted)}.message-recipient-note{padding:12px;border-radius:12px;color:#1e40af;background:var(--primary-soft)}.message-inbox{align-self:start}.message-thread{padding:14px 4px;display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--border);color:var(--text);text-decoration:none}.message-thread:first-of-type{margin-top:14px}.message-thread span:first-child{min-width:0}.message-thread strong,.message-thread small{display:block}.message-thread small,.message-thread time{margin-top:4px;color:var(--muted);font-size:.76rem}.message-thread>span:last-child{text-align:right}.message-thread b{margin-top:5px;margin-left:auto;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;color:#fff;background:var(--primary);font-size:.7rem}.message-thread.is-unread strong{color:var(--primary)}.conversation{max-width:900px;margin:0 auto}.conversation>header{display:flex;align-items:center;gap:14px}.conversation>header h2{margin:3px 0}.conversation-messages{margin:22px 0;display:grid;gap:12px}.message-bubble{max-width:78%;padding:13px 15px;border-radius:5px 16px 16px 16px;background:var(--surface-soft)}.message-bubble.is-own{margin-left:auto;border-radius:16px 5px 16px 16px;background:var(--primary-soft)}.message-bubble header{display:flex;justify-content:space-between;gap:15px}.message-bubble time{color:var(--muted);font-size:.72rem}.message-bubble p{margin:7px 0 0;line-height:1.55}.message-reply{display:flex;align-items:end;gap:10px}.message-reply textarea{min-height:80px}
.employee-plan-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px}.employee-plan-head h2{margin:4px 0}.employee-plan-head p{margin:0;color:var(--muted)}
.employee-calendar{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:10px}.employee-day{min-height:130px;padding:12px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft)}.employee-day header{display:flex;justify-content:space-between;color:var(--muted)}.employee-day header strong{color:var(--text);font-size:1.15rem}.employee-shift{width:100%;margin-top:16px;padding:11px 8px;display:grid;gap:3px;border:0;border-radius:12px;color:#fff;background:var(--shift-color);box-shadow:0 6px 14px color-mix(in srgb,var(--shift-color) 30%,transparent)}.employee-shift b{font-size:1.05rem}.employee-shift span{font-size:.72rem}.employee-shift:disabled{opacity:.75;cursor:not-allowed}.employee-day-off{display:block;margin-top:28px;color:var(--muted);text-align:center}.request-status{margin-top:8px;font-size:.68rem}
.employee-request-history{margin-top:18px}.employee-request-history>div{padding:13px 0;display:flex;align-items:center;gap:14px;border-top:1px solid var(--border)}.employee-request-history>div>span:first-child{flex:1}.employee-request-history small{display:block;color:var(--muted)}.employee-request-history p{margin:0;color:var(--muted)}
.overtime-dialog{width:min(520px,calc(100vw - 30px));padding:0;border:1px solid var(--border);border-radius:22px;color:var(--text);background:var(--surface);box-shadow:0 30px 80px rgba(15,23,42,.28)}.overtime-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}.overtime-dialog form{padding:24px;display:grid;gap:18px}.overtime-dialog header,.overtime-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.overtime-dialog header h3{margin:3px 0 0}.overtime-dialog header>button{border:0;background:none;color:var(--muted);font-size:1.6rem}.overtime-dialog label{display:grid;gap:7px;font-weight:700}.overtime-dialog input,.overtime-dialog textarea,.request-card textarea{width:100%;padding:11px;border:1px solid var(--border);border-radius:11px;color:var(--text);background:var(--surface-soft)}.overtime-dialog textarea,.request-card textarea{min-height:90px;resize:vertical}.overtime-dialog footer{justify-content:flex-end}
.request-list{display:grid;gap:14px}.request-card{padding:18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.request-card header{display:flex;justify-content:space-between;gap:15px}.request-card header small{display:block;margin-top:4px;color:var(--muted)}.request-facts{margin:14px 0;display:flex;gap:12px}.request-facts span{padding:9px 12px;border-radius:10px;background:var(--primary-soft)}.request-card form{display:grid;gap:10px}.request-card form>div{display:flex;gap:9px}.danger-button{padding:11px 16px;border:0;border-radius:11px;color:#fff;background:var(--danger)}.decision-note{padding:12px;border-radius:11px;background:var(--surface)}
@media(max-width:900px){.employee-calendar{grid-template-columns:repeat(4,minmax(90px,1fr))}.message-layout{grid-template-columns:1fr}}@media(max-width:600px){.employee-calendar{grid-template-columns:repeat(2,minmax(90px,1fr))}.employee-plan-head{align-items:flex-start}.employee-plan-actions-main{align-items:flex-end;flex-direction:column}.request-facts{flex-direction:column}.message-reply{align-items:stretch;flex-direction:column}.message-bubble{max-width:92%}}

/* Planungsregeln */
.rules-heading,
.rules-scope-picker,
.rules-actions,
.rules-inheritance-note {
  display: flex;
  align-items: center;
}

.rules-heading,
.rules-actions {
  justify-content: space-between;
  gap: 20px;
}

.rules-scope-picker {
  align-items: end;
  gap: 12px;
}

.rules-scope-picker label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.rules-scope-picker select {
  min-width: 190px;
  margin-top: 5px;
  display: block;
}

.rules-inheritance-note {
  margin: 16px 0;
  padding: 14px 17px;
  gap: 12px;
  border: 1px solid rgba(52, 120, 246, 0.22);
  border-radius: 16px;
  color: #1d4ed8;
  background: var(--primary-soft);
}

.rules-inheritance-note > span {
  font-size: 1.5rem;
}

.rules-inheritance-note div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rules-inheritance-note small {
  color: var(--muted);
}

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

.rule-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 44px minmax(150px, 1fr) 130px 135px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.rule-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #2563eb;
  background: var(--primary-soft);
  font-size: 0.83rem;
  font-weight: 850;
}

.rule-card-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rule-card-copy small {
  color: var(--muted);
  line-height: 1.4;
}

.rule-value {
  position: relative;
}

.rule-value input {
  width: 100%;
  min-height: 44px;
  padding-right: 48px;
}

.rule-value span {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.rule-card > select {
  min-height: 44px;
}

.rule-card-late-early > select {
  grid-column: 4;
}

.rule-card-late-early .rule-check {
  grid-column: 2 / -1;
  grid-row: 2;
}

.rule-card-night {
  grid-column: 1 / -1;
  grid-template-columns: 44px minmax(210px, 0.8fr) minmax(560px, 2fr) minmax(220px, 0.8fr) 145px;
}

.rule-card-night .night-rule-values {
  grid-column: 3;
}

.rule-card-night .rule-select-setting {
  grid-column: 4;
}

.rule-card-night > select {
  grid-column: 5;
}

.night-rule-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr));
  gap: 10px;
}

.night-rule-values label {
  display: grid;
  gap: 5px;
}

.night-rule-values small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.night-rule-values input {
  width: 100%;
  min-height: 44px;
}

.rule-check {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 700;
}

.rules-actions {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.82rem;
}

.rules-reset-form {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .rules-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1500px) {
  .rule-card-night {
    grid-template-columns: 44px minmax(210px, 1fr) minmax(220px, 0.8fr) 145px;
  }
  .rule-card-night .night-rule-values {
    grid-column: 2 / -1;
    grid-row: 2;
  }
  .rule-card-night .rule-select-setting {
    grid-column: 3;
    grid-row: 1;
  }
  .rule-card-night > select {
    grid-column: 4;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  .rules-heading,
  .rules-scope-picker,
  .rules-actions { align-items: stretch; flex-direction: column; }
  .rule-card { grid-template-columns: 42px 1fr; }
  .rule-value,
  .rule-card > select,
  .rule-check { grid-column: 1 / -1; }
  .rule-card-late-early > select,
  .rule-card-late-early .rule-check,
  .rule-card-night > select,
  .rule-card-night .night-rule-values,
  .rule-card-night .rule-select-setting {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .rule-card-night { grid-template-columns: 42px 1fr; }
  .night-rule-values { grid-template-columns: 1fr; }
}

html[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-soft: #182132;
  --surface-hover: #202b3d;

  --text: #f8fafc;
  --text-strong: #ffffff;
  --muted: #98a2b3;
  --muted-light: #667085;

  --border: #253149;
  --border-strong: #36435c;

  --primary-soft: rgba(37, 99, 235, 0.16);

  --success-soft: rgba(22, 163, 74, 0.15);
  --warning-soft: rgba(217, 119, 6, 0.15);
  --danger-soft: rgba(220, 38, 38, 0.15);

  --sidebar: #070c16;

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.2);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

/* =========================================================
   BASIS
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 7% 7%, rgba(72, 198, 217, 0.13), transparent 25rem),
    radial-gradient(circle at 90% 2%, rgba(52, 120, 246, 0.14), transparent 32rem),
    linear-gradient(145deg, #f7faff 0%, #edf3fb 54%, #f9fbff 100%);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 90% 2%, rgba(52, 120, 246, 0.17), transparent 32rem),
    linear-gradient(145deg, #0b1120 0%, #101827 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

input,
select,
textarea {
  color-scheme: light;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color-scheme: dark;
}

/* =========================================================
   ALLGEMEINE BUTTONS
   ========================================================= */

.primary,
.secondary,
.icon-btn,
.logout,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
  font-weight: 750;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.primary:active {
  transform: translateY(0);
}

.secondary,
.icon-btn,
.logout {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.secondary:hover,
.icon-btn:hover,
.logout:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.link-btn {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 750;
}

.link-btn:hover {
  text-decoration: underline;
}

button:disabled,
a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* =========================================================
   BRAND
   ========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #3478f6, #48c6d9);
  box-shadow: 0 11px 28px rgba(52, 120, 246, 0.3);
  font-size: 23px;
  font-weight: 800;
}

.brand-mark img,
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark svg {
  width: 29px;
  height: 29px;
}

.brand-name {
  color: #f8fafc;
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: -0.045em;
}

.brand-name span {
  color: #74a7ff;
}

.login-visual .brand-name {
  color: #152033;
}

.login-visual .brand-name span {
  color: #3478f6;
}

.package-upgrade-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.upgrade-alert {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
}

.upgrade-request-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.upgrade-request-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.upgrade-request-item strong,
.upgrade-request-item small {
  display: block;
}

.upgrade-request-item small {
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 800px) {
  .upgrade-request-item {
    grid-template-columns: 1fr;
  }

  .global-upgrade-notice {
    margin: 16px 18px 0;
    align-items: stretch;
    flex-direction: column;
  }
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: #98a2b3;
}

/* =========================================================
   LOGIN
   ========================================================= */

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-visual {
  padding: 48px;
  display: flex;
  flex-direction: column;
  color: #152033;
  background:
    radial-gradient(circle at 7% 7%, rgba(72, 198, 217, 0.18), transparent 25rem),
    radial-gradient(circle at 90% 2%, rgba(52, 120, 246, 0.18), transparent 32rem),
    linear-gradient(145deg, #f7faff 0%, #edf3fb 54%, #f9fbff 100%);
}

.login-copy {
  max-width: 720px;
  margin: auto 0;
}

.login-copy h1 {
  margin: 24px 0 18px;
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-copy h1 span {
  display: block;
  color: #3478f6;
}

.login-copy p {
  max-width: 620px;
  color: #667085;
  font-size: 1.15rem;
  line-height: 1.7;
}

.pill {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(52, 120, 246, 0.2);
  border-radius: 999px;
  color: #215fcf;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.login-panel {
  position: relative;
  padding: 48px;
  display: grid;
  place-items: center;
}

.login-tools {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  gap: 8px;
}

.login-card {
  width: min(470px, 100%);
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-card h2 {
  margin: 0;
  font-size: 2.15rem;
  letter-spacing: -0.04em;
}

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

.login-card form {
  display: grid;
  gap: 20px;
}

.login-card label > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.login-card input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 48px;
}

.password-wrap button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.form-row a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.alert {
  margin-bottom: 20px;
  padding: 13px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
  background: #fef2f2;
}

.success-alert {
  border-color: #bbf7d0;
  color: #166534;
  background: var(--success-soft);
}

html[data-theme="dark"] .success-alert {
  border-color: rgba(22, 163, 74, 0.35);
  color: #86efac;
}

.sidebar-subitem {
  padding-left: 42px !important;
  font-size: 0.9rem;
}

.leadership-create-card {
  margin-bottom: 22px;
}

.package-usage-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.package-create-card,
.organization-create-card,
.package-list-panel,
.organization-package-panel {
  margin-bottom: 22px;
}

.package-create-form {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr) auto auto;
  align-items: end;
  gap: 12px;
  padding: 0 28px 28px;
}

.package-active-check {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.package-admin-list,
.organization-package-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.package-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}

.package-edit-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 95px 95px auto auto auto;
  align-items: end;
  gap: 10px;
}

.package-delete-form {
  margin: 0;
}

.organization-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
  gap: 14px;
  padding: 0 28px 28px;
}

.organization-create-form .primary {
  min-height: 50px;
}

.organization-package-item {
  display: grid;
  grid-template-columns:
    minmax(190px, 1fr)
    minmax(150px, 0.65fr)
    minmax(240px, 1fr)
    auto
    auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}

.organization-undo-form {
  margin-left: auto;
}

.organization-package-item strong,
.organization-package-item small {
  display: block;
}

.organization-package-item small {
  margin-top: 3px;
  color: var(--muted);
}

.organization-package-item select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
}

.package-usage-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.65rem;
  font-weight: 900;
}

.package-usage-heading,
.package-usage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.package-usage-heading small {
  display: block;
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.package-usage-heading h3 {
  margin: 0;
  font-size: 1.18rem;
}

.package-usage-number {
  color: var(--text-strong);
  font-size: 1rem;
}

.package-progress {
  height: 10px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.package-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 300ms ease;
}

.package-usage-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.package-usage-card.warning .package-usage-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.package-usage-card.warning .package-progress span {
  background: var(--warning);
}

.package-usage-card.critical,
.package-usage-card.limit {
  border-color: rgba(220, 38, 38, 0.28);
}

.package-usage-card.critical .package-usage-icon,
.package-usage-card.limit .package-usage-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.package-usage-card.critical .package-progress span,
.package-usage-card.limit .package-progress span {
  background: var(--danger);
}

.package-usage-card.warning .package-usage-meta strong {
  color: var(--warning);
}

.package-usage-card.critical .package-usage-meta strong,
.package-usage-card.limit .package-usage-meta strong {
  color: var(--danger);
}

.leadership-create-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 0 28px 28px;
}

.leadership-create-form .primary {
  min-height: 50px;
}

.leadership-list-panel {
  margin-top: 0;
}

.leadership-title-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.leadership-title-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}

.leadership-title-edit-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.leadership-title-delete-form {
  margin: 0;
}

.role-action {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  font-weight: 750;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.role-action.edit {
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.18);
}

.role-action.edit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.role-action.delete {
  background: var(--danger);
  box-shadow: 0 5px 12px rgba(220, 38, 38, 0.18);
}

.role-action.delete:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-1px);
}

.role-action:disabled {
  box-shadow: none;
}

@media (max-width: 900px) {
  .leadership-create-form,
  .leadership-title-edit-form,
  .leadership-title-item {
    grid-template-columns: 1fr;
  }

  .leadership-title-delete-form,
  .role-action {
    width: 100%;
  }

  .package-usage-card {
    grid-template-columns: 1fr;
  }

  .package-usage-heading,
  .package-usage-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .package-create-form,
  .package-edit-form,
  .package-admin-item,
  .organization-create-form,
  .organization-package-item {
    grid-template-columns: 1fr;
  }

  .package-delete-form,
  .package-delete-form .role-action {
    width: 100%;
  }
}

/* =========================================================
   ARBEITSBEREICHE / STATIONEN
   ========================================================= */

.area-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.area-organization-picker {
  min-width: 270px;
}

.area-organization-picker label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.area-create-form {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 16px;
}

.area-active-check {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.area-admin-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.area-admin-item {
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.58);
}

html[data-theme="dark"] .area-admin-item {
  background: var(--surface-soft);
}

.area-edit-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, auto) auto auto;
  align-items: end;
  gap: 14px;
}

.area-usage-meta {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.area-usage-meta span,
.area-usage-meta strong,
.area-usage-meta small {
  display: block;
}

.area-usage-meta strong {
  color: var(--primary);
  font-size: 1rem;
}

.area-usage-meta small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.area-delete-form {
  margin: 0;
}

.area-delete-form .shift-action:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

@media (max-width: 1100px) {
  .area-edit-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .area-page-heading,
  .area-create-form,
  .area-admin-item,
  .area-edit-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .area-organization-picker {
    min-width: 0;
  }
}

html[data-theme="dark"] .alert {
  border-color: rgba(220, 38, 38, 0.35);
  color: #fecaca;
  background: rgba(220, 38, 38, 0.12);
}

.dev-login {
  margin-top: 24px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.82rem;
}

.dev-login strong,
.dev-login span {
  display: block;
}

.dev-login span {
  margin-top: 4px;
}

/* =========================================================
   APP-LAYOUT
   ========================================================= */

.app-shell {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 10% 8%,
      rgba(72, 198, 217, 0.2),
      transparent 34%
    ),
    linear-gradient(170deg, #162541 0%, #101b31 42%, #123257 100%);
  box-shadow: inset -1px 0 rgba(96, 165, 250, 0.13);
}

.app-shell.planning-layout {
  grid-template-columns: 76px minmax(0, 1fr);
}

.planning-layout .sidebar {
  padding-inline: 10px;
}

.planning-layout .sidebar .brand {
  width: 56px;
  padding-inline: 2px;
  overflow: hidden;
}

.planning-layout .sidebar .brand-copy {
  display: none;
}

.planning-layout .sidebar .brand-mark {
  width: 52px;
  min-width: 52px;
}

.planning-layout .sidebar nav a,
.planning-layout .sidebar .settings {
  width: 56px;
  padding-inline: 17px;
  overflow: hidden;
  white-space: nowrap;
}

.planning-layout .page {
  padding-inline: 18px;
}

.planning-sidebar-toggle {
  position: absolute;
  z-index: 20;
  top: 88px;
  right: -21px;
  width: 43px;
  height: 43px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 9px 24px rgba(37, 99, 235, 0.38);
  font-size: 2rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.planning-sidebar-toggle:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 11px 28px rgba(37, 99, 235, 0.48);
  transform: scale(1.06);
}

.planning-sidebar-toggle span {
  display: block;
  line-height: 0.8;
  transform: translateY(-1px);
}

.app-shell.planning-layout.sidebar-expanded {
  grid-template-columns: 260px minmax(0, 1fr);
}

.planning-layout.sidebar-expanded .sidebar {
  padding-inline: 18px;
}

.planning-layout.sidebar-expanded .sidebar .brand {
  width: auto;
  padding-inline: 9px;
  overflow: visible;
}

.planning-layout.sidebar-expanded .sidebar .brand-copy {
  display: block;
}

.planning-layout.sidebar-expanded .sidebar nav a,
.planning-layout.sidebar-expanded .sidebar .settings {
  width: auto;
  padding-inline: 12px;
  overflow: visible;
}

.sidebar .brand {
  padding: 4px 9px 28px;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.sidebar nav a,
.settings {
  min-height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  color: #d0d5dd;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.sidebar nav a:hover,
.sidebar nav a.active,
.settings:hover {
  color: #ffffff;
  background: var(--sidebar-hover);
}

.settings.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.2);
  box-shadow: inset 3px 0 0 #60a5fa;
}

.sidebar nav a.active {
  box-shadow: inset 3px 0 #60a5fa;
}

.sidebar nav a[href="/packages"] {
  justify-content: space-between;
}

.sidebar-notification-badge {
  min-width: 23px;
  height: 23px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: #ef4444;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
  font-size: 0.75rem;
}

.global-upgrade-notice {
  margin: 22px 30px 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 16px;
  background: linear-gradient(
    110deg,
    rgba(37, 99, 235, 0.15),
    rgba(96, 165, 250, 0.06)
  );
}

.global-upgrade-notice strong,
.global-upgrade-notice span {
  display: block;
}

.organization-usage {
  min-width: 150px;
}

.organization-usage strong,
.organization-usage small {
  display: block;
}

.organization-usage small {
  margin-top: 2px;
  color: var(--muted);
}

.organization-usage-track {
  height: 6px;
  margin-top: 8px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-hover);
}

.organization-usage-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #22c55e;
}

.organization-usage.warning .organization-usage-track i {
  background: #f59e0b;
}

.organization-usage.critical .organization-usage-track i,
.organization-usage.limit .organization-usage-track i {
  background: #ef4444;
}

/* =========================================================
   SCHICHTARTEN
   ========================================================= */

.shift-organization-picker {
  min-width: 260px;
}

.shift-organization-picker label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.shift-type-form {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.shift-color-field input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 5px;
  cursor: pointer;
}

.shift-area-fieldset {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.shift-area-fieldset legend {
  padding: 0 7px;
  font-weight: 800;
}

.shift-area-fieldset > p {
  margin: 0 0 14px;
  color: var(--muted);
}

.shift-area-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shift-area-options label {
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-hover);
  cursor: pointer;
}

.shift-active-switch {
  grid-column: 1 / -1;
}

.shift-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.shift-type-list {
  display: grid;
}

.shift-type-item {
  padding: 17px 20px;
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr) minmax(190px, auto) auto auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--border);
}

.shift-type-code {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: var(--shift-color);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--shift-color) 30%, transparent);
  font-weight: 850;
}

.shift-type-name strong,
.shift-type-name small,
.shift-type-time strong,
.shift-type-time small {
  display: block;
}

.shift-type-name small,
.shift-type-time small {
  margin-top: 4px;
  color: var(--muted);
}

.shift-type-actions {
  display: flex;
  gap: 8px;
}

.shift-type-actions form {
  margin: 0;
}

.shift-action {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.shift-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.shift-action.edit {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.09);
}

.shift-action.edit:hover {
  color: #ffffff;
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.shift-action.delete {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.08);
}

.shift-action.delete:hover {
  color: #ffffff;
  border-color: #dc2626;
  background: #dc2626;
  box-shadow: 0 7px 16px rgba(220, 38, 38, 0.2);
  transform: translateY(-1px);
}

.shift-action:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.24);
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .shift-type-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shift-type-item {
    grid-template-columns: 54px 1fr auto;
  }

  .shift-type-time,
  .shift-type-actions {
    grid-column: 2 / -1;
  }
}

@media (max-width: 680px) {
  .shift-type-form {
    grid-template-columns: 1fr;
  }

  .shift-type-item {
    grid-template-columns: 50px 1fr;
  }

  .shift-type-item > .status,
  .shift-type-time,
  .shift-type-actions {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   MONATSDIENSTPLAN
   ========================================================= */

.planning-heading,
.planning-toolbar,
.planning-month-nav,
.planning-export-actions,
.planning-legend {
  display: flex;
  align-items: center;
}

.planning-health {
  margin: 16px 0;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 18px;
  background: rgba(255, 251, 235, 0.82);
}

.planning-health.is-complete {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(236, 253, 245, 0.78);
}

.planning-health > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.planning-health small,
.planning-hours-column small {
  color: var(--muted);
}

.planning-health details {
  grid-column: 1 / -1;
}

.planning-health summary {
  cursor: pointer;
  color: #b45309;
  font-weight: 750;
}

.planning-conflict-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.planning-conflict-list span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #92400e;
  background: rgba(245, 158, 11, 0.13);
  font-size: 0.76rem;
  font-weight: 700;
}

.planning-rule-conflicts {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.planning-rule-conflicts span {
  padding: 9px 11px;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-size: 0.78rem;
}

.station-heading,
.station-scope-picker,
.station-form-actions {
  display: flex;
  align-items: center;
}

.station-heading,
.station-form-actions {
  justify-content: space-between;
  gap: 20px;
}

.station-scope-picker {
  align-items: end;
  gap: 12px;
}

.station-scope-picker label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.station-scope-picker select {
  min-width: 190px;
  margin-top: 5px;
  display: block;
}

.station-staffing-panel {
  overflow: hidden;
}
.station-capacity-panel{margin-bottom:16px;padding:22px;display:grid;gap:16px}.station-capacity-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.station-capacity-panel>header h3{margin:3px 0 5px}.station-capacity-panel>header p{margin:0;color:var(--muted)}.station-capacity-panel>header small{color:var(--primary);font-weight:850;text-transform:uppercase;letter-spacing:.06em}.station-capacity-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.station-capacity-grid article{padding:15px;display:grid;gap:5px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.station-capacity-grid article>small{color:var(--muted);font-weight:750}.station-capacity-grid article>strong{font-size:1.35rem}.station-capacity-grid article>span{color:var(--muted);font-size:.74rem;line-height:1.35}.station-capacity-grid article.is-positive{border-color:#b9e4ce;background:#effbf5}.station-capacity-grid article.is-positive>strong{color:#14804a}.station-capacity-grid article.is-negative{border-color:#f3c5b8;background:#fff5f1}.station-capacity-grid article.is-negative>strong{color:#c64b2f}.station-reserve-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.station-reserve-row>span{color:var(--muted);font-size:.76rem;font-weight:800}.station-reserve-row>b{padding:7px 10px;border-radius:9px;color:#355777;background:var(--primary-soft);font-size:.75rem}.station-capacity-warning{padding:12px 14px;border:1px solid #f0d49a;border-radius:12px;color:#805713;background:#fff8e6;font-size:.82rem}.station-capacity-note{margin:0;color:var(--muted);font-size:.76rem;line-height:1.5}
@media(max-width:1000px){.station-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.station-capacity-panel>header{flex-direction:column}.station-capacity-grid{grid-template-columns:1fr}}

.station-staffing-panel > header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.station-staffing-panel header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.station-shift-list {
  padding: 10px 22px;
}

.station-shift-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) 210px 110px;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--border);
}

.station-shift-row > div,
.station-shift-row > label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.station-shift-row small,
.station-form-actions {
  color: var(--muted);
}

.station-shift-row > label {
  display: grid;
  grid-template-columns: auto 72px;
  align-items: center;
  gap: 3px 9px;
  font-size: 0.78rem;
  font-weight: 750;
}

.station-shift-row > label input {
  grid-row: 1 / 3;
  grid-column: 2;
  min-height: 44px;
  text-align: center;
}

.station-form-actions {
  padding: 16px 22px 21px;
}

.onboarding-settings {
  margin-top: 6px;
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.onboarding-duration-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 13px;
}

.onboarding-settings[hidden],
.onboarding-duration-settings[hidden] {
  display: none !important;
}

.onboarding-duration-settings > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.onboarding-permanent {
  margin-top: 2px;
  background: #fff;
}

.input-with-suffix {
  position: relative;
}

.input-with-suffix small {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.onboarding-until {
  grid-column: 1 / -1;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 750;
}

.onboarding-badge {
  width: fit-content;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #9a3412 !important;
  background: #ffedd5;
  font-size: 0.66rem !important;
  font-weight: 800;
}

.onboarding-badge.permanent {
  color: #3730a3 !important;
  background: #e0e7ff;
}

.rule-select-setting {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.rule-select-setting select {
  width: 100%;
}

.employee-heading,
.employee-detail-heading,
.employee-profile-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.employee-list-panel {
  overflow: hidden;
}

.employee-list-panel > header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.employee-table-wrap {
  overflow-x: auto;
}

.employee-table {
  width: 100%;
  border-collapse: collapse;
}

.employee-table th,
.employee-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.employee-table td:first-child {
  min-width: 190px;
}

.employee-table td:first-child,
.employee-table td:first-child > small {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.employee-table td small,
.muted-value {
  color: var(--muted);
}

.employee-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.employee-sort span {
  color: var(--primary);
}

.employee-profile-strip {
  margin-bottom: 16px;
  padding: 16px 18px;
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}

.employee-profile-strip > div {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.employee-profile-strip small {
  color: var(--muted);
}

.preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.preference-card {
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.preference-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.preference-card-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #2563eb;
  background: var(--primary-soft);
  font-weight: 850;
}

.preference-card-head h3,
.preference-card-head p {
  margin: 2px 0 0;
}

.preference-card-head p,
.preference-card-head small {
  color: var(--muted);
}

.preference-options,
.weekday-options {
  margin-top: 17px;
  display: grid;
  gap: 9px;
}

.preference-options label,
.weekday-options label {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  cursor: pointer;
}

.preference-options label > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preference-options small {
  color: var(--muted);
}

.weekday-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preference-mode {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.preference-mode select {
  min-width: 190px;
}

.preference-notes {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .preference-grid { grid-template-columns: 1fr; }
  .employee-detail-heading,
  .employee-heading,
  .employee-profile-strip { align-items: stretch; flex-direction: column; }
}

@media (max-width: 800px) {
  .station-heading,
  .station-scope-picker,
  .station-form-actions { align-items: stretch; flex-direction: column; }
  .station-shift-row { grid-template-columns: 48px 1fr; padding: 12px 0; }
  .station-shift-row > label,
  .station-shift-row > .status { grid-column: 1 / -1; }
  .onboarding-duration-settings { grid-template-columns: 1fr; }
}

.planning-hours-column.hours-over {
  color: #dc2626;
  background: rgba(254, 226, 226, 0.62);
}

.planning-primary-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(37, 99, 235, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.planning-primary-actions form {
  display: flex;
  margin: 0;
}

.planning-version-form {
  min-height: 54px;
  padding: 5px 6px 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}

.planning-version-form label {
  display: grid;
  gap: 2px;
}

.planning-version-form label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planning-version-form select {
  min-width: 190px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-weight: 750;
  outline: none;
}

.restore-version-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 11px;
  color: #0f766e;
  background: #f0fdfa;
  font: inherit;
  font-weight: 800;
}

.restore-version-button:hover {
  border-color: rgba(15, 118, 110, 0.38);
  background: #ccfbf1;
}

html[data-theme="dark"] .planning-version-form {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.76);
}

.planning-export-actions .autofill-button {
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.planning-export-actions .autofill-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 22px rgba(37, 99, 235, 0.28);
}

.planning-export-actions .replan-button {
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  color: #1e40af;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease,
    background 160ms ease, box-shadow 160ms ease;
}

.planning-export-actions .replan-button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.38);
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.planning-action-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1rem;
  line-height: 1;
}

.replan-icon {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  font-size: 1.15rem;
}

html[data-theme="dark"] .planning-primary-actions {
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(15, 23, 42, 0.7);
}

html[data-theme="dark"] .planning-export-actions .replan-button {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(180deg, #172033, #111827);
}

.autofill-button small {
  padding: 3px 6px;
  border-radius: 999px;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.12);
  font-size: 0.68rem;
}

.autofill-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.plan-reset-button,
.employee-reset-button,
.undo-reset-button {
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.plan-reset-button {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius);
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.92);
}

.plan-reset-button:hover {
  background: #fee2e2;
}

.planning-person-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.planning-person-heading > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.employee-reset-button {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #dc2626;
  background: rgba(254, 226, 226, 0.72);
}

.employee-reset-button:hover {
  color: #fff;
  background: #dc2626;
}

.employee-plan-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.employee-plan-actions form {
  margin: 0;
}

.employee-lock-button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 9px;
  color: #2563eb;
  background: rgba(219, 234, 254, 0.72);
  font: inherit;
  font-size: 0.67rem;
  font-weight: 850;
  cursor: pointer;
}

.employee-lock-button span {
  margin-right: 4px;
}

.employee-lock-button:hover,
.employee-lock-button.is-locked {
  color: #ffffff;
  border-color: #2563eb;
  background: #2563eb;
}

.employee-plan-meta {
  display: grid;
  gap: 5px;
  margin-top: 5px;
}

.existing-target-form {
  display: flex;
  align-items: center;
  gap: 5px;
}

.existing-target-form label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.existing-target-form input {
  width: 64px;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.existing-target-form button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 900;
  cursor: pointer;
}

.employee-plan-locked > td {
  background: color-mix(in srgb, #2563eb 4%, var(--surface));
}

.employee-plan-locked .planning-person-column {
  background: color-mix(in srgb, #2563eb 7%, var(--surface)) !important;
}

.employee-plan-locked .plan-cell:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.reset-undo-alert {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reset-undo-alert > span {
  font-weight: 750;
}

.reset-undo-alert > small {
  margin-left: auto;
  color: var(--muted);
}

.undo-reset-button {
  padding: 8px 12px;
  border-radius: 10px;
  color: #fff;
  background: #2563eb;
}

.planning-heading,
.planning-toolbar {
  justify-content: space-between;
  gap: 20px;
}

.planning-export-actions,
.planning-month-nav,
.planning-legend {
  gap: 10px;
}

.planning-toolbar {
  padding: 16px 18px;
}

.planning-filter-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.planning-filter-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.planning-filter-form select {
  min-width: 180px;
  margin-top: 5px;
  display: block;
}

.planning-month-picker-label {
  position: relative;
}

.planning-month-picker-label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.planning-month-picker {
  min-width: 158px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 750;
}

.planning-month-jump{position:relative}.planning-month-trigger{min-width:190px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;padding:0 14px;border:1px solid var(--border);border-radius:12px;color:var(--text);background:var(--surface);font:inherit}.planning-month-trigger span{font-weight:850}.planning-month-trigger strong{color:var(--muted)}.planning-month-trigger i{margin-left:auto;color:var(--muted);font-style:normal}.planning-month-trigger[aria-expanded="true"]{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.planning-month-popover{position:absolute;z-index:80;top:calc(100% + 9px);left:50%;width:330px;padding:14px;transform:translateX(-50%);border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 22px 55px rgba(15,42,75,.2)}.planning-month-popover[hidden]{display:none}.planning-month-popover header{display:grid;grid-template-columns:42px 1fr 42px;gap:8px;align-items:center}.planning-month-popover header button{height:40px;border:1px solid var(--border);border-radius:10px;color:var(--text);background:var(--surface-soft);font-size:1rem}.planning-month-popover header label{position:relative}.planning-month-popover header label span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.planning-month-popover select{width:100%;height:40px;text-align:center;border:1px solid var(--border);border-radius:10px;color:var(--text);background:var(--surface);font:inherit;font-weight:850}.planning-month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}.planning-month-grid button{min-height:55px;display:grid;place-items:center;gap:1px;padding:7px;border:1px solid transparent;border-radius:11px;color:var(--text);background:var(--surface-soft)}.planning-month-grid button span{font-size:.9rem;font-weight:850}.planning-month-grid button small{color:var(--muted);font-size:.62rem}.planning-month-grid button:hover,.planning-month-grid button:focus-visible{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}.planning-month-grid button.is-current{color:#fff;background:var(--primary)}.planning-month-grid button.is-current small{color:rgba(255,255,255,.82)}.planning-month-popover footer{margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.planning-month-popover footer button{width:100%;min-height:38px;border:0;border-radius:10px;color:var(--primary);background:var(--primary-soft);font-weight:800}

.planning-view-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.planning-view-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.planning-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.planning-view-switch button,
.planning-view-switch a {
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease,
    box-shadow 150ms ease, transform 150ms ease;
}

.planning-view-switch button:hover,
.planning-view-switch a:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.planning-view-switch button.is-active,
.planning-view-switch a.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--primary) 28%, transparent);
  transform: translateY(-1px);
}

.planning-view-icon {
  min-width: 17px;
  font-size: 1rem;
  line-height: 1;
}

.planning-legend {
  margin: 16px 0;
  flex-wrap: wrap;
}

.planning-legend > span,
.print-plan-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.planning-legend i,
.print-plan-legend i {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--shift-color);
  font-style: normal;
  font-weight: 850;
}

.planning-legend .legend-free,
.print-plan-legend .legend-free,
.picker-free {
  background: #94a3b8;
  font-size: 0.68rem;
}

.planning-legend .legend-vacation,
.print-plan-legend .legend-vacation,
.picker-vacation {
  background: #0ea5e9;
}

.vacation-balance {
  color: #0284c7 !important;
  font-weight: 750 !important;
}

.planning-board {
  overflow: hidden;
}

.planning-horizontal-scroll {
  width: 100%;
  height: 17px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  scrollbar-color: var(--primary) var(--surface-hover);
  scrollbar-width: auto;
}

.planning-horizontal-scroll > div {
  height: 1px;
}

.planning-grid-wrap {
  max-width: 100%;
  overflow-x: scroll;
  overflow-y: visible;
  scrollbar-color: var(--primary) var(--surface-hover);
  scrollbar-width: auto;
}

.planning-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.planning-grid th,
.planning-grid td {
  min-width: 38px;
  height: 49px;
  padding: 3px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.planning-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 82px;
  color: var(--muted);
  background: var(--surface-soft);
}

.planning-employee-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.planning-employee-heading > b {
  min-width: 25px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.72rem;
  line-height: 1;
}

.day-shift-counts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin: 0 0 3px;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
}

.day-shift-counts > span {
  width: 29px;
  display: grid;
  grid-template-columns: 12px 1fr;
  justify-content: center;
  gap: 2px;
  padding: 1px 3px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--border) 55%, transparent);
}

.day-shift-counts b,
.day-shift-counts i {
  font-style: normal;
}

.day-shift-counts .count-f b { color: #2563eb; }
.day-shift-counts .count-s b { color: #e07800; }
.day-shift-counts .count-n b { color: #7c3aed; }

.day-shift-counts > span.is-understaffed {
  color: #b91c1c;
  background: #fee2e2;
  box-shadow: inset 0 0 0 1px #fecaca;
}

.day-shift-counts > span.is-understaffed b,
.day-shift-counts > span.is-understaffed i {
  color: #b91c1c;
}

.day-gap-indicator {
  position: absolute;
  top: 43px;
  right: 3px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #ef4444;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.34);
  font-size: 0.68rem;
  font-weight: 900;
  cursor: help;
}

.day-gap-indicator[hidden] {
  display: none;
}

.day-gap-tooltip {
  position: absolute;
  z-index: 50;
  top: 22px;
  left: 50%;
  min-width: 170px;
  padding: 10px 12px;
  display: none;
  border: 1px solid #fecaca;
  border-radius: 11px;
  color: #7f1d1d;
  background: #fff7f7;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  text-align: left;
  transform: translateX(-50%);
  white-space: nowrap;
}

.day-gap-tooltip b,
.day-gap-tooltip span {
  display: block;
}

.day-gap-tooltip b {
  margin-bottom: 5px;
  font-size: 0.75rem;
}

.day-gap-tooltip span {
  font-size: 0.72rem;
  font-weight: 700;
}

.day-gap-indicator:hover .day-gap-tooltip,
.day-gap-indicator:focus .day-gap-tooltip,
.day-gap-indicator:focus-within .day-gap-tooltip {
  display: block;
}

.planning-grid thead th small,
.planning-grid thead th strong,
.planning-person-column small,
.planning-person-column strong {
  display: block;
}

.planning-grid .weekend {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.planning-grid tbody tr:nth-child(odd) > th,
.planning-grid tbody tr:nth-child(odd) > td {
  --planning-row-background: var(--surface);
  background: var(--planning-row-background) !important;
}

.planning-grid tbody tr:nth-child(even) > th,
.planning-grid tbody tr:nth-child(even) > td {
  --planning-row-background: color-mix(
    in srgb,
    var(--primary) 4%,
    var(--surface)
  );
  background: var(--planning-row-background) !important;
}

.planning-grid tbody tr > .weekend {
  background: color-mix(
    in srgb,
    var(--primary) 12%,
    var(--planning-row-background)
  ) !important;
}

.planning-grid .weekend-start {
  border-left: 3px solid color-mix(in srgb, var(--primary) 48%, var(--border));
}

.planning-grid .weekend-end {
  border-right: 3px solid color-mix(in srgb, var(--primary) 48%, var(--border));
}

.planning-person-column {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 240px;
  min-width: 240px !important;
  padding: 8px 10px !important;
  text-align: left !important;
  background: var(--surface) !important;
  box-shadow: 6px 0 12px rgba(15, 23, 42, 0.04);
}

.planning-person-column small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.planning-person-column .employment-scope {
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 750;
}

.employee-edit-shortcut {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  color: #2563eb;
  background: #eff6ff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 140ms ease, color 140ms ease,
    background-color 140ms ease;
  cursor: pointer;
}

.employee-edit-shortcut:hover {
  color: #ffffff;
  background: #2563eb;
  transform: rotate(18deg);
}

.planning-hours-column {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 118px !important;
  background: var(--surface-soft);
  box-shadow: -6px 0 12px rgba(15, 23, 42, 0.06);
}

.planning-grid thead .planning-hours-column {
  z-index: 4;
}

.planning-hours-column strong,
.planning-hours-column small {
  display: block;
  white-space: nowrap;
}

.planning-board[data-view="simple"] .planning-hours-column,
.planning-board.planning-view-simple .planning-hours-column,
.planning-board[data-view="simple"] .planning-person-heading small,
.planning-board.planning-view-simple .planning-person-heading small,
.planning-board[data-view="simple"] .employee-plan-actions,
.planning-board.planning-view-simple .employee-plan-actions,
.planning-board[data-view="simple"] .employee-plan-meta,
.planning-board.planning-view-simple .employee-plan-meta {
  display: none;
}

.planning-board[data-view="simple"] .planning-person-column,
.planning-board.planning-view-simple .planning-person-column {
  width: 190px;
  min-width: 190px !important;
  padding: 5px 10px !important;
}

.planning-board[data-view="simple"] .planning-grid th,
.planning-board.planning-view-simple .planning-grid th,
.planning-board[data-view="simple"] .planning-grid td,
.planning-board.planning-view-simple .planning-grid td {
  height: 39px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.planning-board[data-view="simple"] .planning-person-heading,
.planning-board.planning-view-simple .planning-person-heading {
  align-items: center;
}

.planning-board[data-view="simple"] .plan-cell,
.planning-board.planning-view-simple .plan-cell {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: none;
}

.employee-editor-modal {
  width: min(1180px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 22px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34);
}

.employee-editor-modal::backdrop {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(3px);
}

.employee-editor-modal > header {
  min-height: 70px;
  padding: 14px 18px 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.employee-editor-modal h3 { margin: 2px 0 0; }
.employee-editor-modal header small { color: var(--muted); font-weight: 750; }
.employee-editor-modal header button {
  width: 38px; height: 38px; border: 0; border-radius: 12px;
  color: var(--muted); background: var(--surface-soft);
  font-size: 1.5rem; cursor: pointer;
}
.employee-editor-modal > nav {
  padding: 10px 18px;
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}
.employee-editor-modal > nav button {
  min-height: 38px; padding: 0 15px; border: 0; border-radius: 10px;
  color: var(--muted); background: transparent; font: inherit;
  font-size: 0.8rem; font-weight: 800; cursor: pointer;
}
.employee-editor-modal > nav button.is-active {
  color: #fff; background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--primary) 25%, transparent);
}
.employee-editor-modal iframe {
  width: 100%; height: calc(100% - 129px); display: block; border: 0;
  background: var(--bg);
}

body.embedded-view .sidebar,
body.embedded-view .topbar,
body.embedded-view .global-upgrade-notice { display: none !important; }
body.embedded-view .app-shell { display: block; min-height: 0; }
body.embedded-view .app-shell main { min-height: 0; }
body.embedded-view .page { padding: 20px; }

.weekend-consecutive-setting {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.weekend-consecutive-setting input { width: 82px; min-height: 40px; }

.weekend-month-limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(105px, 1fr));
  gap: 9px;
}
.weekend-month-limits label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}
.weekend-month-limits input {
  grid-column: 1;
  width: 100%;
  min-height: 40px;
}
.weekend-month-limits small {
  grid-column: 2;
  grid-row: 2;
  white-space: nowrap;
}

.plan-cell {
  width: 31px;
  height: 34px;
  padding: 0;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.plan-cell.assigned {
  border-color: var(--shift-color);
  color: #ffffff;
  background: var(--shift-color);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--shift-color) 24%, transparent);
}

.plan-cell.entry-free {
  font-size: 0.64rem;
  letter-spacing: -0.02em;
}

.plan-cell.entry-vacation {
  box-shadow: 0 5px 12px rgba(14, 165, 233, 0.24);
}

.plan-cell:hover {
  transform: translateY(-1px);
}

.plan-cell.saving {
  opacity: 0.45;
  pointer-events: none;
}

.shift-picker {
  position: fixed;
  z-index: 1000;
  width: 250px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.2);
}

.shift-picker button {
  width: 100%;
  min-height: 46px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

/* The browser's hidden attribute must beat the button display rule. */
.shift-picker button[hidden] { display: none !important; }

.shift-picker button:hover {
  background: var(--surface-hover);
}

.shift-picker i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #ffffff;
  background: var(--shift-color);
  font-style: normal;
  font-weight: 850;
}

.shift-picker strong,
.shift-picker small {
  display: block;
}

.shift-picker small {
  margin-top: 2px;
  color: var(--muted);
}

.shift-picker-clear {
  color: var(--muted) !important;
}

.print-plan-header,
.print-plan-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.print-plan-table-wrap {
  margin-top: 20px;
  overflow: auto;
}

.print-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.print-plan-table th,
.print-plan-table td {
  height: 30px;
  border: 1px solid #dbe3ef;
  text-align: center;
}

.print-plan-table th:first-child {
  min-width: 145px;
  padding-left: 8px;
  text-align: left;
}

.print-plan-table .weekend {
  background: #f1f5ff;
}

.print-plan-table td span {
  width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: var(--shift-color);
  font-weight: 850;
}

.print-plan-legend {
  margin-top: 18px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media print {
  @page { size: A3 landscape; margin: 10mm; }
  .sidebar, .topbar, .global-upgrade-notice, .print-trigger { display: none !important; }
  .app-shell { display: block; }
  .page { padding: 0 !important; }
  .print-plan { color: #0f172a; background: #ffffff; }
  .print-plan-table-wrap { overflow: visible; }
  * { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
}

.organization-sidebar-brand {
  margin: -8px 18px 14px;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.organization-sidebar-brand img {
  display: block;
  width: 100%;
  max-width: 150px;
  max-height: 48px;
  object-fit: contain;
}

.planning-layout .sidebar .organization-sidebar-brand { display: none; }
.planning-layout.sidebar-expanded .sidebar .organization-sidebar-brand { display: grid; }

.branding-settings-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
  align-items: center;
}

.branding-preview {
  padding: 22px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.branding-preview > small,
.branding-preview > strong { display: block; }
.branding-preview > strong { margin-top: 12px; }

.branding-preview-logo {
  height: 110px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
}

.branding-preview-logo img {
  max-width: 90%;
  max-height: 82px;
  object-fit: contain;
}

.branding-upload-form label > span,
.branding-upload-form label > small { display: block; }
.branding-upload-form input[type="file"] { width: 100%; margin: 9px 0; }
.branding-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.danger-text { color: var(--danger) !important; }
.settings-organization-picker { margin-bottom: 18px; }
.settings-organization-picker label { display: flex; align-items: center; gap: 12px; }

.employee-list-title-filter > div {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.employee-list-title-filter h3 { margin: 0; }
.employee-area-filter { display: flex; align-items: center; gap: 8px; }
.employee-area-filter span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.employee-area-filter select { min-width: 180px; }

.print-plan-brand { display: flex; align-items: center; gap: 18px; }
.print-plan-brand > img { width: auto; max-width: 150px; height: auto; max-height: 62px; object-fit: contain; }

@media (max-width: 760px) {
  .branding-settings-card { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .planning-heading,
  .planning-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .planning-filter-form { flex-wrap: wrap; }
}

.global-upgrade-notice span {
  margin-top: 4px;
  color: var(--muted);
}

.settings {
  margin-top: auto;
}

.app-shell main {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  min-height: 88px;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .topbar {
  background: rgba(17, 24, 39, 0.65);
}

.topbar h1 {
  margin: 3px 0 0;
  font-size: 1.45rem;
}

.topbar > div > small {
  color: var(--primary);
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  font-weight: 800;
}

.profile strong,
.profile small {
  display: block;
}

.profile small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.page {
  width: 100%;
  min-width: 0;
  padding: 30px;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.welcome,
.panel,
.stats article {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.welcome {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--radius-xl);
}

.welcome h2 {
  margin: 5px 0 7px;
  font-size: 2rem;
}

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

.welcome-actions {
  display: flex;
  gap: 10px;
}

.stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats article {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-radius: 18px;
}

.stats article > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.25rem;
}

.stats small,
.stats strong,
.stats em {
  display: block;
}

.stats strong {
  margin-top: 3px;
  font-size: 2rem;
}

.stats em {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
}

.dashboard-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 18px;
}

.panel {
  padding: 24px;
  border-radius: 22px;
}

.panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel > header small {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.status.success {
  color: #166534;
  background: var(--success-soft);
}

.status.warning {
  color: #92400e;
  background: var(--warning-soft);
}

.status.danger {
  color: #991b1b;
  background: var(--danger-soft);
}

html[data-theme="dark"] .status.success {
  color: #86efac;
}

html[data-theme="dark"] .status.warning {
  color: #fcd34d;
}

html[data-theme="dark"] .status.danger {
  color: #fca5a5;
}

.progress-area {
  margin-top: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
}

.ring {
  position: relative;
  display: grid;
  width: 138px;
  height: 138px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--dashboard-progress, 0%), var(--border) 0);
}

.ring::after {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.ring span {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 800;
}

.ring small {
  font-size: 0.85rem;
}

.progress-area h4 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.progress-area p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.meta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.meta strong {
  color: var(--text);
}

.activities {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.activity {
  padding: 13px;
  display: flex;
  gap: 11px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.activity i {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
}

.activity.danger i {
  background: var(--danger);
}

.activity.warning i {
  background: var(--warning);
}

.activity.success i {
  background: var(--success);
}

.activity strong,
.activity p {
  display: block;
}

.activity p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.shifts {
  margin-top: 20px;
  display: grid;
}

.shifts > div {
  padding: 15px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  border-top: 1px solid var(--border);
}

.shifts > div:first-child {
  border-top: 0;
}

.shift {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.shifts strong,
.shifts small {
  display: block;
}

.shifts small {
  margin-top: 3px;
  color: var(--muted);
}

.quick {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.quick button,
.quick a {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: left;
  text-decoration: none;
}

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

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* =========================================================
   SEITENÜBERSCHRIFTEN
   ========================================================= */

.page-heading {
  margin-bottom: 24px;
}

.page-heading-content {
  max-width: 760px;
}

.breadcrumb-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 750;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.page-heading small {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.page-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

/* =========================================================
   FORMULARE
   ========================================================= */

.user-form {
  max-width: 980px;
  display: grid;
  gap: 20px;
}

.form-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-card-header {
  padding: 23px 25px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.form-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.15rem;
}

.form-card-header small {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.form-card-header h3 {
  margin: 0;
  font-size: 1.22rem;
}

.form-card-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-fields {
  padding: 25px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.form-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field > label:not(.switch-card) {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

.form-field > label span {
  color: var(--danger);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.form-field textarea {
  min-height: 130px;
  padding-top: 13px;
  padding-bottom: 13px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.72;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.field-help {
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.area-assignment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.area-assignment-row {
  min-height: 52px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.area-choice,
.primary-area-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.area-assignment-row input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.primary-area-choice {
  color: var(--muted);
  font-size: 0.76rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 100px;
}

.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 750;
}

.password-toggle:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.switch-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
  cursor: pointer;
}

.switch-card strong,
.switch-card small {
  display: block;
}

.switch-card strong {
  color: var(--text);
  font-size: 0.9rem;
}

.switch-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.4;
}

.switch-control {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 44px;
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #94a3b8;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.switch-slider::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.switch-control input:checked + .switch-slider {
  background: #16a34a;
}

.switch-control input:checked + .switch-slider::after {
  transform: translateX(19px);
}

.switch-control input:focus-visible + .switch-slider {
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
}

.switch-control input:disabled + .switch-slider {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-footer {
  padding: 4px 0 30px;
  display: flex;
  justify-content: flex-end;
  gap: 11px;
}

.form-footer .primary,
.form-footer .secondary {
  min-width: 145px;
}

/* =========================================================
   TABELLEN
   ========================================================= */

.table-wrapper {
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.data-table th,
.data-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  padding: 0;
  gap: 7px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.table-sort:hover {
  color: var(--primary);
}

.table-sort:focus-visible {
  border-radius: 5px;
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 3px;
}

.sort-indicator {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 5px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.85rem;
  line-height: 1;
}

.data-table tbody tr {
  background: var(--surface);
  transition: background-color 160ms ease;
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.table-actions .shift-action {
  white-space: nowrap;
}

.delete-user-form {
  margin: 0;
}

.table-actions .link-btn {
  min-height: 36px;
  padding: 0 12px;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.18);
  font-size: 0.84rem;
  line-height: 1;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.table-actions .link-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.24);
  text-decoration: none;
  transform: translateY(-1px);
}

.table-actions .link-btn.danger {
  background: var(--danger);
  box-shadow: 0 5px 12px rgba(220, 38, 38, 0.18);
}

.table-actions .link-btn.danger:hover {
  background: #b91c1c;
  box-shadow: 0 7px 16px rgba(220, 38, 38, 0.24);
}

.table-actions .link-btn:active {
  transform: translateY(0);
}

.table-actions .link-btn span {
  font-size: 1rem;
  font-weight: 900;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-state h4 {
  margin: 0;
  font-size: 1.2rem;
}

.empty-state p {
  margin: 8px 0 20px;
  color: var(--muted);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (min-width: 900px) {
  .form-fields.form-fields-two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.planning-layout {
    grid-template-columns: 1fr;
  }

  .app-shell.planning-layout.sidebar-expanded {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 15px;
  }

  .profile,
  .logout {
    display: none;
  }

  .page {
    padding: 15px;
  }

  .welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-actions {
    width: 100%;
    flex-direction: column;
  }

  .welcome-actions .primary,
  .welcome-actions .secondary {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .progress-area {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 20px;
  }

  .login-card {
    padding: 28px;
  }

  .login-tools {
    top: 14px;
    right: 14px;
  }

  .form-card-header {
    padding: 20px;
  }

  .form-fields {
    padding: 20px;
  }

  .form-footer {
    flex-direction: column-reverse;
  }

  .form-footer .primary,
  .form-footer .secondary {
    width: 100%;
  }

  .shifts > div {
    grid-template-columns: auto 1fr;
  }

  .shifts > div .status {
    grid-column: 2;
    justify-self: start;
  }
}
/* =========================================================
   FEHLERSEITEN
   ========================================================= */

.error-page {
  min-height: calc(100vh - 148px);
  padding: 40px 20px;
  display: grid;
  place-items: center;
}

.error-card {
  position: relative;
  width: min(680px, 100%);
  padding: 46px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary),
    #60a5fa
  );
  content: "";
}

.error-card-top {
  display: flex;
  justify-content: flex-end;
}

.error-code {
  display: inline-flex;
  min-height: 32px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.error-icon {
  width: 92px;
  height: 92px;
  margin: 16px auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
  font-size: 2.7rem;
}

.error-eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-card h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.045em;
}

.error-message {
  max-width: 540px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.error-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 11px;
}

.error-actions .primary,
.error-actions .secondary {
  min-width: 170px;
}

.error-help {
  max-width: 510px;
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .error-page {
    min-height: calc(100vh - 110px);
    padding: 20px 0;
  }

  .error-card {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .error-card-top {
    justify-content: center;
  }

  .error-icon {
    width: 78px;
    height: 78px;
    border-radius: 23px;
    font-size: 2.2rem;
  }

  .error-actions {
    flex-direction: column-reverse;
  }

  .error-actions .primary,
.error-actions .secondary {
    width: 100%;
  }
}

/* Arbeitswochenenden: finales Layout nach den allgemeinen Regelkarten. */
.rules-grid .rule-card-weekend {
  grid-template-columns: 44px minmax(220px, 1fr) minmax(320px, 1.25fr) 145px;
  align-items: start;
}
.rules-grid .rule-card-weekend .rule-card-icon,
.rules-grid .rule-card-weekend .rule-card-copy,
.rules-grid .rule-card-weekend .weekend-month-limits,
.rules-grid .rule-card-weekend > select { align-self: center; }
.rules-grid .rule-card-weekend .weekend-month-limits {
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 12px;
}
.rules-grid .rule-card-weekend .weekend-month-limits label {
  grid-template-columns: minmax(78px, 1fr) auto;
  gap: 6px 8px;
  font-size: 0.76rem;
}
.rules-grid .rule-card-weekend .weekend-month-limits label > span {
  grid-column: 1 / -1;
  white-space: nowrap;
}
.rules-grid .rule-card-weekend .weekend-month-limits input { min-width: 78px; min-height: 44px; }
.rules-grid .rule-card-weekend > select {
  grid-column: 4;
  grid-row: 1;
  width: 100%;
  min-height: 44px;
}
.rules-grid .rule-card-weekend .weekend-consecutive-setting {
  grid-column: 2 / 4;
  grid-row: 2;
  margin-top: 4px;
}
.rules-grid .rule-card-weekend .rule-check {
  grid-column: 2 / -1;
  grid-row: 3;
  margin-top: 2px;
  line-height: 1.5;
}
@media (max-width: 1450px) {
  .rules-grid .rule-card-weekend {
    grid-template-columns: 44px minmax(190px, 1fr) minmax(285px, 1.2fr) 135px;
  }
  .rules-grid .rule-card-weekend .weekend-month-limits {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}
@media (max-width: 760px) {
  .rules-grid .rule-card-weekend { grid-template-columns: 42px 1fr; }
  .rules-grid .rule-card-weekend .weekend-month-limits,
  .rules-grid .rule-card-weekend > select,
  .rules-grid .rule-card-weekend .weekend-consecutive-setting,
  .rules-grid .rule-card-weekend .rule-check {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .rules-grid .rule-card-weekend .weekend-month-limits {
    grid-template-columns: repeat(2, minmax(125px, 1fr));
  }
}

/* Horizontal navigation overrides (must remain after legacy sidebar rules). */
.app-shell,
.app-shell.planning-layout,
.app-shell.planning-layout.sidebar-expanded {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.sidebar,
.planning-layout .sidebar,
.planning-layout.sidebar-expanded .sidebar {
  position: sticky;
  z-index: 100;
  top: 0;
  width: 100%;
  height: 72px;
  min-height: 72px;
  padding: 9px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  overflow: visible;
}
.sidebar .brand,
.planning-layout .sidebar .brand,
.planning-layout.sidebar-expanded .sidebar .brand {
  width: 54px;
  min-width: 54px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border-radius: 15px;
}
.sidebar .brand-mark,
.planning-layout .sidebar .brand-mark { width: 54px; min-width: 54px; height: 54px; }
.sidebar .brand-copy,
.planning-layout .sidebar .brand-copy,
.planning-layout.sidebar-expanded .sidebar .brand-copy,
.organization-sidebar-brand,
.planning-sidebar-toggle { display: none; }
.sidebar nav { min-width: 0; display: flex; align-items: center; gap: 5px; overflow: visible; }
.sidebar nav a,
.sidebar .settings,
.planning-layout .sidebar nav a,
.planning-layout .sidebar .settings,
.planning-layout.sidebar-expanded .sidebar nav a,
.planning-layout.sidebar-expanded .sidebar .settings {
  position: relative;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0 13px;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 13px;
}
.sidebar nav a:hover,
.sidebar nav a:focus-visible,
.sidebar .settings:hover,
.sidebar .settings:focus-visible { width: 190px; max-width: 190px; }
.sidebar nav a.active,
.sidebar .settings.active { box-shadow: inset 0 -3px #60a5fa; }
.sidebar nav a[href="/packages"] { justify-content: flex-start; }
.sidebar .settings { margin: 0 0 0 auto; }
.sidebar-notification-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; }
.app-shell main { flex: 1 1 auto; }
.planning-layout .page { padding-inline: 30px; }
@media (max-width: 1180px) {
  .sidebar { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .sidebar nav { flex: 0 0 auto; }
  .sidebar .settings { margin-left: 4px; }
}
@media (max-width: 760px) {
  .sidebar,
  .planning-layout .sidebar,
  .planning-layout.sidebar-expanded .sidebar {
    display: flex;
    height: 64px;
    min-height: 64px;
    padding: 7px 10px;
  }
  .sidebar .brand,
  .planning-layout .sidebar .brand { width: 48px; min-width: 48px; height: 48px; }
  .sidebar .brand-mark,
  .planning-layout .sidebar .brand-mark { width: 48px; min-width: 48px; height: 48px; }
  .sidebar nav a,
  .sidebar .settings { width: 44px; min-width: 44px; max-width: 44px; height: 44px; min-height: 44px; padding-inline: 12px; }
}

/* Variante 2: Bezeichnungen bleiben dauerhaft lesbar. */
.sidebar { gap: 12px; }
.sidebar nav { gap: 2px; }
.sidebar nav a,
.sidebar .settings,
.planning-layout .sidebar nav a,
.planning-layout .sidebar .settings,
.planning-layout.sidebar-expanded .sidebar nav a,
.planning-layout.sidebar-expanded .sidebar .settings {
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0 10px;
  gap: 6px;
  overflow: visible;
  color: #d8e0ec;
  background: transparent;
  box-shadow: none;
  font-size: 0.78rem;
  transition: color 160ms ease, background-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}
.sidebar .nav-icon { width: 18px; min-width: 18px; font-size: 1rem; }
.sidebar .nav-label {
  max-width: 160px;
  overflow: visible;
  opacity: 1;
  font-weight: 650;
  transition: none;
}
.sidebar nav a:hover,
.sidebar nav a:focus-visible,
.sidebar .settings:hover,
.sidebar .settings:focus-visible {
  width: auto;
  max-width: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.22),
    0 6px 16px rgba(4, 12, 27, 0.16);
  transform: translateY(-1px);
}
.sidebar nav a.active,
.sidebar .settings.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.2);
  box-shadow: inset 0 -3px #60a5fa;
}
.sidebar nav a:hover .nav-label,
.sidebar nav a:focus-visible .nav-label,
.sidebar .settings:hover .nav-label,
.sidebar .settings:focus-visible .nav-label { max-width: 160px; opacity: 1; }
.sidebar-notification-badge { top: 1px; right: 1px; }
.sidebar nav a:hover .sidebar-notification-badge,
.sidebar nav a:focus-visible .sidebar-notification-badge { right: 1px; }

@media (max-width: 1180px) {
  .sidebar nav a,
  .sidebar .settings { width: auto; min-width: max-content; max-width: none; }
}

@media (max-width: 760px) {
  .sidebar nav a,
  .sidebar .settings {
    width: auto;
    min-width: max-content;
    max-width: none;
    height: 44px;
    padding-inline: 9px;
  }
}

/* Konto bleibt dauerhaft rechts in der horizontalen Hauptnavigation. */
.nav-account {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.nav-account .profile { min-width: 0; }
.nav-account-copy {
  min-width: 0;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}
.nav-account-copy strong,
.nav-account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-account-copy strong { color: #fff; font-size: 0.82rem; }
.nav-account-copy small {
  margin-top: 3px;
  color: #aebdd1;
  font-size: 0.66rem;
}
.nav-account .avatar {
  width: 38px;
  min-width: 38px;
  height: 38px;
}
.nav-account .logout {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-account .logout:hover {
  border-color: rgba(147, 197, 253, 0.45);
  background: rgba(255, 255, 255, 0.14);
}
@media (max-width: 1180px) {
  .sidebar { overflow: hidden; }
  .sidebar nav {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .nav-account { position: sticky; right: 0; background: var(--sidebar); }
}
@media (max-width: 760px) {
  .nav-account { gap: 7px; padding-left: 8px; }
  .nav-account-copy { max-width: 105px; }
  .nav-account .logout { min-height: 38px; padding-inline: 10px; }
}

/* Mandantenbezogenes Corporate Design. */
.sidebar,
.planning-layout .sidebar,
.planning-layout.sidebar-expanded .sidebar {
  background: var(--sidebar);
}
.navigation-organization-brand { flex: 0 1 auto; max-width: 190px; height: 46px; padding: 5px 11px; display: flex; align-items: center; gap: 8px; overflow: hidden; border-left: 1px solid rgba(255,255,255,.16); border-right: 1px solid rgba(255,255,255,.16); }
.navigation-organization-brand img { max-width: 74px; max-height: 34px; object-fit: contain; }
.navigation-organization-brand span { overflow: hidden; color: #fff; font-size: .76rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .brand-mark, .avatar { background: linear-gradient(135deg, var(--primary), var(--brand-accent, #35bfe7)); }
.primary { background: var(--primary); }
.primary:hover { background: color-mix(in srgb, var(--primary) 84%, #000); }
.sidebar nav a.active, .sidebar .settings.active { background: color-mix(in srgb, var(--primary) 30%, transparent); box-shadow: inset 0 -3px var(--brand-accent, #60a5fa); }
.sidebar.nav-text-dark nav a, .sidebar.nav-text-dark .settings, .sidebar.nav-text-dark .navigation-organization-brand span, .sidebar.nav-text-dark .nav-account-copy strong, .sidebar.nav-text-dark .nav-account .logout { color: #102038; }
.sidebar.nav-text-dark .nav-account-copy small { color: #43546b; }
.sidebar.nav-text-dark nav a:hover, .sidebar.nav-text-dark nav a:focus-visible, .sidebar.nav-text-dark .settings:hover, .sidebar.nav-text-dark .settings:focus-visible { color: #071426; background: rgba(0,0,0,.08); }
.sidebar.nav-text-dark .navigation-organization-brand, .sidebar.nav-text-dark .nav-account { border-color: rgba(0,0,0,.14); }
.sidebar.nav-text-dark .nav-account .logout { border-color: rgba(0,0,0,.18); background: rgba(255,255,255,.22); }
.corporate-design-form { display: grid; gap: 16px; }
.corporate-preview-card { padding: 22px; display: grid; grid-template-columns: minmax(220px,.6fr) minmax(480px,1.4fr); align-items: center; gap: 24px; }
.corporate-preview-card h3, .corporate-setting-card h3 { margin: 3px 0 5px; }
.corporate-preview-card p, .corporate-setting-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.corporate-preview-card small, .corporate-setting-card header small { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.corporate-preview-copy { display: flex; align-items: flex-start; flex-direction: column; }
.corporate-reset-button { margin-top: 14px; }
.corporate-nav-preview { min-width: 0; min-height: 68px; padding: 9px 13px; display: flex; align-items: center; gap: 10px; overflow: hidden; border-radius: 16px; color: #fff; background: var(--preview-navigation); box-shadow: 0 14px 32px color-mix(in srgb, var(--preview-navigation) 30%, transparent); }
.corporate-everyplan-mark { width: 43px; min-width: 43px; height: 43px; display: block; border-radius: 12px; object-fit: contain; }
.corporate-nav-preview > strong { font-size: .82rem; }
.corporate-nav-preview > i { width: 1px; height: 32px; background: rgba(255,255,255,.22); }
.corporate-preview-organization { min-width: 0; display: flex; align-items: center; gap: 7px; }
.corporate-preview-organization img { max-width: 62px; max-height: 34px; object-fit: contain; }
.corporate-preview-organization span { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 750; }
.corporate-preview-link { padding: 8px 9px; border-radius: 9px; font-size: .68rem; white-space: nowrap; }
.corporate-preview-link.is-active { background: color-mix(in srgb,var(--preview-primary) 42%,transparent); box-shadow: inset 0 -2px var(--preview-accent); }
.corporate-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.corporate-setting-card { padding: 22px; display: flex; flex-direction: column; gap: 17px; }
.corporate-setting-card header { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.corporate-setting-card header > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-weight: 850; }
.corporate-logo-current { min-height: 92px; padding: 14px; display: grid; place-items: center; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-soft); color: var(--muted); }
.corporate-logo-current img { max-width: 220px; max-height: 72px; object-fit: contain; }
.corporate-field { display: grid; gap: 7px; font-weight: 750; }
.corporate-field > small { color: var(--muted); font-weight: 500; }
.corporate-color-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.corporate-color-grid label { padding: 12px; display: grid; gap: 7px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.corporate-color-grid label > span { font-size: .78rem; font-weight: 800; }
.corporate-color-grid label > div { display: flex; align-items: center; gap: 8px; }
.corporate-color-grid input[type="color"] { width: 45px; min-width: 45px; height: 39px; padding: 3px; }
.corporate-color-grid code { color: var(--text); font-size: .7rem; }
.corporate-color-grid small, .corporate-color-note { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.compact-switch { padding: 13px; }
.corporate-design-actions { padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); }
.corporate-design-actions > div { display: flex; gap: 9px; }
@media (max-width:1180px) { .navigation-organization-brand span { display:none; } .navigation-organization-brand { max-width:100px; } .corporate-preview-card, .corporate-settings-grid { grid-template-columns:1fr; } }
@media (max-width:760px) { .navigation-organization-brand { display:none; } .corporate-color-grid { grid-template-columns:1fr; } .corporate-design-actions { align-items:stretch; flex-direction:column; } .corporate-design-actions > div { flex-direction:column; } }

/* Mobile Dienstplan und Mitarbeiterwünsche */
.wish-deadline-rule{grid-column:1/-1!important;display:block!important;padding:22px!important}.wish-rule-heading{display:grid;grid-template-columns:48px minmax(240px,1fr) minmax(280px,.8fr);gap:14px;align-items:center}.wish-rule-heading .rule-card-icon{width:48px;height:48px}.wish-deadline-toggle{display:flex;align-items:center;gap:12px;padding:13px 15px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.wish-deadline-toggle>span:last-child{display:grid;gap:2px}.wish-deadline-toggle small{color:var(--muted);font-weight:500}.wish-deadline-settings{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:14px;margin-top:18px;padding-top:18px;border-top:1px solid var(--border)}.wish-deadline-settings>label{display:grid;gap:7px;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);font-size:.78rem;font-weight:800;color:var(--text)}.wish-deadline-settings>label>div{display:grid;grid-template-columns:1fr auto;align-items:center;overflow:hidden;border:1px solid var(--border-strong);border-radius:11px;background:var(--surface)}.wish-deadline-settings input{width:100%;min-width:0;height:44px;padding:9px 12px;border:0!important;background:transparent!important;font-size:1rem;font-weight:800}.wish-deadline-settings em{padding:0 12px;color:var(--muted);font-size:.75rem;font-style:normal}.wish-deadline-settings small{color:var(--muted);font-weight:500}.wish-deadline-settings.is-disabled{opacity:.42;pointer-events:none}.wish-deadline-preview{display:flex;align-items:center;gap:10px;margin-top:14px;padding:11px 14px;border-radius:12px;color:#36516f;background:var(--primary-soft)}.wish-deadline-preview>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:#fff;background:var(--primary);font-size:.75rem;font-weight:900}.wish-deadline-preview p{margin:0}.wish-deadline-preview.is-disabled{color:var(--muted);background:var(--surface-soft)}
.wish-deadline-banner{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:14px 18px;border:1px solid var(--border);border-radius:16px;background:var(--surface)}.wish-deadline-banner>span{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;font-size:1.25rem}.wish-deadline-banner div{display:grid;gap:3px}.wish-deadline-banner small{color:var(--muted)}.wish-deadline-banner.is-open>span{color:#b26a00;background:#fff4d6}.wish-deadline-banner.is-closed{opacity:.8}.wish-deadline-banner.is-closed>span{background:var(--surface-soft)}
.employee-day-button{width:100%;height:100%;padding:0;border:0;text-align:inherit;color:inherit;background:transparent}.employee-day-button:disabled{cursor:default}.employee-day.has-wish{border-color:#f0b429;box-shadow:0 0 0 2px rgba(240,180,41,.12)}.employee-wish-badge{display:flex;justify-content:center;margin-top:8px;padding:4px 6px;border-radius:8px;color:#805500;background:#fff3cd;font-size:.7rem;font-weight:900}.plan-cell.has-employee-wish{position:relative;outline:2px solid #f2b632;outline-offset:-2px}.plan-cell.has-employee-wish sup{position:absolute;right:2px;top:0;color:#ffd45c;font-size:.65rem;text-shadow:0 1px 2px rgba(0,0,0,.35)}
.wish-dialog{width:min(600px,calc(100vw - 24px));padding:0;border:1px solid var(--border);border-radius:22px;color:var(--text);background:var(--surface);box-shadow:0 30px 80px rgba(15,23,42,.28)}.wish-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(4px)}.wish-dialog form{display:grid;gap:18px;padding:24px}.wish-dialog header,.wish-dialog footer{display:flex;align-items:center;gap:12px;justify-content:space-between}.wish-dialog header h3{margin:3px 0 0}.wish-dialog header>button{border:0;background:none;color:var(--muted);font-size:1.7rem}.wish-choice-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.wish-choice-grid input{position:absolute;opacity:0}.wish-choice-grid span{display:grid;place-items:center;min-height:52px;padding:8px;border:1px solid var(--border);border-radius:12px;font-weight:800}.wish-choice-grid input:checked+span{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}.wish-dialog>form>label{display:grid;gap:7px;font-weight:750}.wish-dialog select,.wish-dialog textarea{width:100%;padding:12px;border:1px solid var(--border);border-radius:12px;color:var(--text);background:var(--surface-soft)}.wish-dialog textarea{min-height:90px;resize:vertical}.wish-dialog footer span{flex:1}.danger-link{border:0;color:#c23b3b;background:transparent;font-weight:800}.today-chip{display:grid;place-items:center;padding:0 12px;border:1px solid var(--border);border-radius:10px;color:var(--text);text-decoration:none;font-size:.8rem;font-weight:800}

@media(max-width:1000px) and (min-width:761px){.employee-calendar{grid-template-columns:repeat(2,minmax(180px,1fr))}.employee-day{min-height:145px}.employee-day-button{padding:4px}.wish-dialog button,.wish-dialog select,.wish-dialog textarea{min-height:46px}.wish-rule-heading{grid-template-columns:48px 1fr}.wish-deadline-toggle{grid-column:1/-1}.wish-deadline-settings{grid-template-columns:repeat(2,minmax(180px,1fr))}}

@media(max-width:760px){
 body{overflow-x:hidden}.app-shell{display:block;padding-top:68px}.sidebar{position:fixed;inset:0 0 auto 0;z-index:100;height:68px;min-height:0;display:flex;align-items:center;padding:8px 10px;border-radius:0;overflow:hidden}.sidebar .brand{flex:0 0 auto}.sidebar .brand-copy,.sidebar .organization-sidebar-brand{display:none}.sidebar nav{display:flex;flex:1;align-items:center;gap:5px;margin:0 8px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none}.sidebar nav::-webkit-scrollbar{display:none}.sidebar nav a,.sidebar .settings{flex:0 0 auto;min-height:44px;padding:8px 10px;scroll-snap-align:start}.sidebar .nav-account{flex:0 0 auto;display:flex;margin:0;padding:0;border:0}.sidebar .nav-account-copy{display:none}.sidebar .profile{padding:0}.sidebar .avatar{width:40px;height:40px}.sidebar .logout{display:grid;place-items:center;width:40px;height:40px;padding:0;font-size:0}.sidebar .logout::before{content:'↪';font-size:1.1rem}.app-shell main{width:100%;padding:14px 10px 28px}.topbar{display:none}
 .employee-plan-head{padding:18px;gap:14px}.employee-plan-head h2{font-size:1.55rem}.employee-plan-actions-main{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.planning-month-nav{order:-1}.wish-deadline-banner{margin-bottom:10px;padding:12px}.employee-calendar{display:grid;grid-template-columns:1fr;gap:8px;padding:0;border:0;background:transparent;box-shadow:none}.employee-day{min-height:0;padding:0;border-radius:16px;background:var(--surface)}.employee-day-button{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:10px;padding:12px}.employee-day header{display:grid;place-items:center;gap:1px}.employee-day header strong{font-size:1.25rem}.employee-shift{width:auto;min-width:110px;margin:0;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.employee-day-off{margin:0;text-align:left}.employee-wish-badge{margin:0;white-space:nowrap}.wish-dialog{inset:auto 8px 8px;width:calc(100vw - 16px);max-height:88vh;margin:0;border-radius:24px}.wish-dialog form{padding:20px 16px}.wish-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wish-dialog footer{display:grid;grid-template-columns:1fr 1fr}.wish-dialog footer span{display:none}.wish-dialog footer .danger-link{grid-column:1/-1;order:3;padding:10px}.wish-rule-heading{grid-template-columns:46px 1fr}.wish-deadline-toggle{grid-column:1/-1}.wish-deadline-settings{grid-template-columns:1fr}.rule-card.wish-deadline-rule{align-items:stretch}
}

@media(max-width:760px){.planning-month-trigger{min-width:150px}.planning-month-popover{position:fixed;inset:auto 10px 12px;width:auto;max-height:calc(100vh - 90px);transform:none;padding:18px;border-radius:24px}.planning-month-grid{gap:9px}.planning-month-grid button{min-height:58px}.planning-month-popover header button,.planning-month-popover select,.planning-month-popover footer button{min-height:46px}}

.vacation-scope-dialog{width:min(590px,calc(100vw - 28px));padding:0;border:1px solid var(--border);border-radius:22px;color:var(--text);background:var(--surface);box-shadow:0 30px 80px rgba(15,23,42,.3)}.vacation-scope-dialog::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(4px)}.vacation-scope-dialog form{display:grid;gap:18px;padding:24px}.vacation-scope-dialog header{display:flex;align-items:center;gap:13px}.vacation-scope-dialog header>span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;color:#fff;background:#0ea5e9;font-size:1.15rem;font-weight:900}.vacation-scope-dialog header small{color:#0a8fc9;font-weight:850;letter-spacing:.07em}.vacation-scope-dialog h3{margin:3px 0 0}.vacation-scope-dialog p{margin:0;color:var(--muted);line-height:1.55}.vacation-scope-dialog footer{display:flex;justify-content:flex-end;gap:9px;padding-top:4px}.vacation-scope-dialog footer button{min-height:44px}
@media(max-width:620px){.vacation-scope-dialog{inset:auto 8px 8px;width:calc(100vw - 16px);margin:0;border-radius:24px}.vacation-scope-dialog form{padding:20px 16px}.vacation-scope-dialog footer{display:grid;grid-template-columns:1fr}.vacation-scope-dialog footer button{width:100%;min-height:50px}.vacation-scope-dialog footer .primary{order:-1}}
.employee-order-actions{display:inline-flex!important;gap:2px!important;margin:0!important}.employee-order-actions button{width:25px;height:25px;padding:0;border:1px solid #d3deec;border-radius:7px;background:#f8fbff;color:#506783;font-weight:900;cursor:pointer}.employee-order-actions button:hover{background:#e9f2ff;color:#1d5fc2;border-color:#acc7ea}.hours-export-dialog{width:min(430px,calc(100vw - 28px));border:0;border-radius:20px;padding:0;box-shadow:0 28px 70px rgba(20,40,75,.28)}.hours-export-dialog::backdrop{background:rgba(15,29,50,.44);backdrop-filter:blur(3px)}.hours-export-dialog form{padding:22px}.hours-export-dialog header{display:flex;justify-content:space-between;align-items:start}.hours-export-dialog header small{color:#3574d4;font-weight:800}.hours-export-dialog h3{margin:4px 0 0}.hours-export-dialog header>button{border:0;background:#eef3f9;border-radius:9px;width:32px;height:32px;font-size:20px}.hours-export-dialog p{color:#5f708a;margin:18px 0 22px}.hours-export-dialog footer{display:flex;justify-content:flex-end;gap:9px}.account-invitation-card{border-color:#cfe0f6!important;background:linear-gradient(135deg,#fff,#f1f7ff)!important}
.planning-employee-sort{display:flex;align-items:center;gap:4px;padding:4px;background:#eef3f9;border:1px solid #dce5f1;border-radius:13px;white-space:nowrap}.planning-employee-sort>span{padding:0 7px;color:#64748b;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.planning-employee-sort a{display:inline-flex;align-items:center;min-height:34px;padding:0 10px;border-radius:9px;color:#52657f;font-size:12px;font-weight:750;text-decoration:none}.planning-employee-sort a:hover{background:#fff;color:#1e5eb8}.planning-employee-sort a.is-active{background:#fff;color:#1858b4;box-shadow:0 2px 8px rgba(30,67,112,.13)}@media(max-width:900px){.planning-employee-sort{width:100%;overflow-x:auto}.planning-employee-sort>span{display:none}}
.planning-employee-table-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:350px}.planning-employee-table-head label{display:flex;align-items:center;gap:6px}.planning-employee-table-head label>span{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#708098}.planning-employee-table-head select{height:34px;max-width:155px;border:1px solid #b9cee9;border-radius:9px;background:#fff;padding:0 28px 0 9px;color:#284d7d;font:700 11px inherit;cursor:pointer;box-shadow:0 2px 7px rgba(35,72,119,.08)}.planning-employee-table-head select:hover,.planning-employee-table-head select:focus{border-color:#4e89d5;outline:none}@media(max-width:700px){.planning-employee-table-head label>span{display:none}}

/* primadipla branding */
.login-visual .primadipla-full-logo{display:block;width:min(220px,40vw);height:auto;border-radius:12px}
.sidebar .brand .primadipla-nav-logo{display:block;width:140px;max-height:55px;object-fit:contain}
@media(max-width:720px){.sidebar .brand .primadipla-nav-logo{width:80px;max-height:48px}}

/* Short successful-login transition. */
.primadipla-splash{position:fixed;inset:0;display:grid;place-items:center;overflow:hidden;background:#fff}
.primadipla-splash-logo{display:block;width:min(460px,92vw);height:auto;opacity:0;animation:primadipla-logo-appear 1.65s ease-out forwards}
.primadipla-splash-dot{opacity:0}
.primadipla-splash-dot.dot-first{animation:primadipla-dot-first 1.65s linear both}
.primadipla-splash-dot.dot-second{animation:primadipla-dot-second 1.65s linear both}
.primadipla-splash-skip{position:absolute;bottom:16px;right:20px;color:#29476a;font-size:.78rem;text-decoration:none;opacity:.6}
.primadipla-splash-skip:focus-visible{opacity:1;outline:2px solid #377cf6;outline-offset:5px}
.screen-reader-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@keyframes primadipla-logo-appear{0%{opacity:0;transform:translateY(8px) scale(.97)}18%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:1;transform:none}}
@keyframes primadipla-dot-first{0%,13%{opacity:0}21%,56%{opacity:1}63%{opacity:.22}70%{opacity:1}78%{opacity:.22}87%,100%{opacity:1}}
@keyframes primadipla-dot-second{0%,32%{opacity:0}40%,56%{opacity:1}63%{opacity:.22}70%{opacity:1}78%{opacity:.22}87%,100%{opacity:1}}
@media(prefers-reduced-motion:reduce){.primadipla-splash-logo,.primadipla-splash-dot{animation:none;opacity:1}}

/* Clear white badge for the logo in the dark top navigation. */
.sidebar .brand{display:flex;align-items:center;justify-content:center;flex:0 0 58px;width:58px;height:50px;padding:3px;background:#fff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.08);overflow:hidden}
.sidebar .brand .primadipla-nav-logo{display:block;width:54px;height:54px;max-height:none;object-fit:contain}
@media(max-width:720px){.sidebar .brand{flex-basis:52px;width:52px;height:46px}.sidebar .brand .primadipla-nav-logo{width:49px;height:49px;max-height:none}}

/* Rounded light-blue native selectors, with enhanced pickers where available. */
.app-shell select,.login-shell select,dialog select{border:1px solid #b9d0ea;border-radius:12px;background-color:#edf5ff;color:#173454;min-height:39px;padding:8px 32px 8px 12px;cursor:pointer}
.app-shell select:hover,.login-shell select:hover,dialog select:hover{border-color:#89b4e6;background-color:#e6f1ff}
.app-shell select:focus-visible,.login-shell select:focus-visible,dialog select:focus-visible{outline:3px solid rgba(55,124,246,.2);outline-offset:1px;border-color:#377cf6}
@supports (appearance:base-select){
 .app-shell select,.login-shell select,dialog select{appearance:base-select}
 .app-shell select::picker(select),.login-shell select::picker(select),dialog select::picker(select){appearance:base-select;border:1px solid #b9d0ea;border-radius:14px;background:#edf5ff;box-shadow:0 16px 34px rgba(22,61,107,.16);padding:5px}
 .app-shell select option,.login-shell select option,dialog select option{padding:9px 12px;border-radius:9px;background:#edf5ff;color:#173454}
}
.station-holiday-toggle{display:flex;align-items:center;gap:14px;margin:14px 0 18px;padding:14px;border:1px solid #dce6f2;border-radius:12px}.station-holiday-toggle>span:last-child{display:grid;gap:4px}.station-holiday-toggle small{color:#667085}.station-holiday-field[hidden]{display:none}.station-shift-row{grid-template-columns:auto minmax(120px,1fr) repeat(3,minmax(80px,105px)) auto}@media(max-width:1000px){.station-shift-row{grid-template-columns:auto 1fr 1fr}.station-shift-row .status{grid-column:1/-1}}

/* Station: keep each label directly above its own staffing input. */
.station-shift-row {
  grid-template-columns: 48px minmax(160px, 1fr) repeat(3, minmax(108px, 138px)) auto;
  gap: 14px;
  padding: 12px 0;
}
.station-shift-row > label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  line-height: 1.25;
}
.station-shift-row > label input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-row: auto;
  grid-column: auto;
  min-height: 42px;
  border-radius: 10px;
}
.station-shift-row > label small { font-weight: 500; }
.station-shift-row > .status { justify-self: end; white-space: nowrap; }
@media (max-width: 1200px) {
  .station-shift-row { grid-template-columns: 48px repeat(3, minmax(105px, 1fr)) auto; }
  .station-shift-row > div { grid-column: 2 / -1; }
  .station-shift-row > label { grid-column: auto; }
  .station-shift-row > label:first-of-type { grid-column: 2; }
  .station-shift-row > .status { grid-column: 5; }
}
@media (max-width: 680px) {
  .station-shift-list { padding: 8px 16px; }
  .station-shift-row { grid-template-columns: 42px repeat(2, minmax(0, 1fr)); gap: 10px; }
  .station-shift-row > div { grid-column: 2 / -1; }
  .station-shift-row > label:first-of-type { grid-column: 2; }
  .station-shift-row > label:nth-of-type(2) { grid-column: 3; }
  .station-shift-row > label:nth-of-type(3) { grid-column: 2; }
  .station-shift-row > .status { grid-column: 3; align-self: center; }
}

.audit-panel{overflow:hidden}.audit-empty{padding:24px}.audit-scroll{overflow:auto}.audit-table{width:100%;border-collapse:collapse;text-align:left;font-size:.86rem}.audit-table th,.audit-table td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:top}.audit-table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;background:var(--surface-soft);white-space:nowrap}.audit-time{white-space:nowrap;font-variant-numeric:tabular-nums}.audit-action{display:inline-block;padding:5px 9px;border-radius:9px;background:var(--primary-soft);color:var(--primary);font-weight:750}.audit-table details summary{cursor:pointer;color:var(--primary);font-weight:700}.audit-details{margin-top:10px;display:grid;gap:8px;min-width:220px;max-width:440px}.audit-details>div{display:grid;gap:2px;padding:7px 9px;border-radius:8px;background:var(--surface-soft);overflow-wrap:anywhere}.audit-details strong{font-size:.72rem}.audit-details span{font-size:.8rem;color:var(--muted)}

.dashboard-scope{display:flex;flex-wrap:wrap;gap:14px;padding:13px 18px;margin:16px 0}.dashboard-scope label{display:grid;gap:5px;min-width:180px;font-weight:700}.dashboard-empty{padding:25px}

/* Wochenende: Schalter und Zahlenfeld erhalten eigene Rasterzeilen. */
.rules-grid .rule-card-weekend > .wish-deadline-toggle {
  grid-column: 2 / -1;
  grid-row: 3;
  min-width: 0;
  margin: 0;
  align-self: stretch;
}
.rules-grid .rule-card-weekend > .wish-deadline-toggle > span:last-child { min-width: 0; }
.rules-grid .rule-card-weekend > .weekend-consecutive-setting { grid-row: 2; }
.rules-grid .rule-card-weekend > .rule-check { grid-row: 4; }
@media (max-width: 760px) {
  .rules-grid .rule-card-weekend > .wish-deadline-toggle,
  .rules-grid .rule-card-weekend > .weekend-consecutive-setting,
  .rules-grid .rule-card-weekend > .rule-check {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* Soll/Ist: tatsächliche Abweichung und Toleranz auf einen Blick. */
.planning-grid .planning-hours-column.hours-under { background:#fff0ed; color:#9f2424; }
.planning-grid .planning-hours-column.hours-over { background:#fff1df; color:#9a4b00; }
.planning-grid .planning-hours-column.hours-within { background:#ebf9f3; color:#176b4b; }
.planning-hours-column .hours-deviation { display:block; margin:5px 0 2px; font-size:.84rem; font-weight:850; white-space:nowrap; }
.planning-hours-column .hours-tolerance-note { display:block; font-size:.72rem; font-weight:700; }

.tolerance-settings { grid-column:3; display:grid; grid-template-columns:minmax(170px,1.5fr) repeat(2,minmax(80px,1fr)); gap:8px; min-width:0; }
.tolerance-settings label { display:grid; gap:4px; color:var(--muted); font-size:.72rem; font-weight:750; }
.tolerance-settings input,.tolerance-settings select { width:100%; min-width:0; min-height:42px; border:1px solid var(--border-strong); border-radius:11px; background:var(--surface-soft); padding:7px 10px; color:var(--text); font:inherit; }
@media(max-width:1100px) { .tolerance-settings { grid-column:1/-1; } }
@media(max-width:600px) { .tolerance-settings { grid-template-columns:repeat(2,minmax(0,1fr)); } .tolerance-settings label:first-child { grid-column:1/-1; } }

/* Kalenderfarben im Browser und in der Druckvorschau. Feiertag hat Vorrang. */
.planning-grid thead th.weekend { background:#dbeafe !important; color:#15345f; }
.planning-grid tbody tr > td.weekend { background:#e7f1ff !important; }
.planning-grid thead th.holiday { background:#fbd5de !important; color:#7f233e; }
.planning-grid tbody tr > td.holiday { background:#ffe8ee !important; }
.planning-grid th.weekend-start, .planning-grid td.weekend-start { border-left:3px solid #6aa2df !important; }
.planning-grid th.weekend-end, .planning-grid td.weekend-end { border-right:3px solid #6aa2df !important; }
.planning-grid th.holiday, .planning-grid td.holiday { border-left:2px solid #e783a0 !important; border-right:2px solid #e783a0 !important; }
.print-plan-table th.weekend,.print-plan-table td.weekend { background:#dbeafe !important; border-left-color:#7ca9df; border-right-color:#7ca9df; }
.print-plan-table th.holiday,.print-plan-table td.holiday { background:#fbd5de !important; border-left-color:#db7494; border-right-color:#db7494; }
.print-plan-table thead th.weekend { color:#15345f; }
.print-plan-table thead th.holiday { color:#7f233e; }

.print-plan-legend .legend-weekend { background:#dbeafe; border:2px solid #7ca9df; }
.print-plan-legend .legend-holiday { background:#fbd5de; border:2px solid #db7494; }

/* Toleranzregel: volle Kartenbreite, keine überlappenden Felder. */
.rules-grid .rule-card-tolerance { display:grid; grid-template-columns:44px minmax(0,1fr); gap:14px; align-items:center; }
.rules-grid .rule-card-tolerance > .rule-card-icon { grid-column:1; grid-row:1; }
.rules-grid .rule-card-tolerance > .rule-card-copy { grid-column:2; grid-row:1; min-width:0; }
.rules-grid .rule-card-tolerance > .tolerance-settings { grid-column:2; grid-row:2; width:100%; grid-template-columns:minmax(200px,1.5fr) repeat(2,minmax(105px,1fr)); }
.rules-grid .rule-card-tolerance > select { grid-column:2; grid-row:3; width:min(210px,100%); min-width:0; }
@media(max-width:700px) {
 .rules-grid .rule-card-tolerance > .tolerance-settings { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .rules-grid .rule-card-tolerance > .tolerance-settings label:first-child { grid-column:1/-1; }
}

.rules-grid .rule-card-tolerance > .tolerance-settings { grid-template-columns:minmax(210px,1fr) minmax(110px,180px); }
.rules-grid .rule-card-tolerance > .tolerance-settings label[hidden] { display:none !important; }
.rules-grid .rule-card-tolerance > .tolerance-settings label:first-child { grid-column:auto; }
@media(max-width:560px) { .rules-grid .rule-card-tolerance > .tolerance-settings { grid-template-columns:1fr; } }

/* Light blue menus retain dark text even when the page is in dark mode. */
html[data-theme="dark"] .app-shell select,
html[data-theme="dark"] .login-shell select,
html[data-theme="dark"] dialog select {
  color-scheme:light !important;
  color:#173454 !important;
  background-color:#edf5ff !important;
}
html[data-theme="dark"] .app-shell select option,
html[data-theme="dark"] .login-shell select option,
html[data-theme="dark"] dialog select option {
  color-scheme:light;
  color:#173454 !important;
  background-color:#edf5ff !important;
}
html[data-theme="dark"] .app-shell select option:checked,
html[data-theme="dark"] .login-shell select option:checked,
html[data-theme="dark"] dialog select option:checked {
  color:#102d50 !important;
  background-color:#cfe4ff !important;
}
@supports (appearance:base-select) {
  html[data-theme="dark"] .app-shell select::picker(select),
  html[data-theme="dark"] .login-shell select::picker(select),
  html[data-theme="dark"] dialog select::picker(select) {
    color-scheme:light;
    color:#173454;
    background:#edf5ff;
  }
}

.account-invitation-card .account-resend-button { margin-top:16px; width:auto; min-height:42px; padding:9px 16px; border-radius:11px; font-weight:800; }
.account-invitation-card .account-resend-button:disabled { opacity:.55; cursor:not-allowed; }

/* Optional qualified staffing */
.qualification-panel{margin-top:24px}.qualification-row{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:12px 0;border-top:1px solid #d8e6f5}.qualification-row form.qualification-row{flex:1;border:0;padding:0}.qualification-row label{display:grid;gap:5px;min-width:180px;flex:1}.qualification-row .qualification-checkbox{display:flex;align-items:center;gap:8px;min-width:220px}.qualification-checkbox input{width:auto;accent-color:#3678f5}.qualification-requirements{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:10px 14px;border-radius:12px;background:#eaf3ff;color:#152c4b}.qualification-requirements label{display:flex;align-items:center;gap:8px}.qualification-requirements input{width:74px;max-width:74px;color:#152c4b;background:#fff}.qualification-requirements[hidden]{display:none!important} [data-qualification-holiday][hidden]{display:none!important}

/* Personalqualifikationen: separate edit rows with readable input widths. */
.qualification-panel{padding:24px clamp(16px,3vw,30px)}
.qualification-panel>header{margin-bottom:18px}
.qualification-panel .qualification-row{display:grid;grid-template-columns:minmax(240px,2fr) minmax(235px,1fr) auto;gap:16px;align-items:end;padding:16px 0;border-top:1px solid var(--border)}
.qualification-panel .qualification-row.qualification-entry{grid-template-columns:minmax(0,1fr) auto}
.qualification-panel .qualification-edit{display:grid;grid-template-columns:minmax(240px,2fr) minmax(235px,1fr) auto auto;gap:16px;align-items:end;padding:0;border:0;min-width:0}
.qualification-panel .qualification-row label{min-width:0;display:grid;gap:6px;font-weight:700}
.qualification-panel .qualification-row label input[type=text]{width:100%;box-sizing:border-box;min-height:44px;border-radius:11px;padding:9px 12px}
.qualification-panel .qualification-row .qualification-checkbox{display:flex;align-items:center;gap:9px;min-height:44px;white-space:normal}
.qualification-panel .qualification-checkbox input{flex:none;width:18px;height:18px}
.qualification-panel .qualification-row button{min-height:44px;white-space:nowrap}
@media(max-width:860px){.qualification-panel .qualification-row,.qualification-panel .qualification-edit{grid-template-columns:1fr 1fr}.qualification-panel .qualification-row.qualification-entry{grid-template-columns:1fr auto}.qualification-panel .qualification-row label:first-child{grid-column:1/-1}}
@media(max-width:560px){.qualification-panel .qualification-row,.qualification-panel .qualification-edit,.qualification-panel .qualification-row.qualification-entry{grid-template-columns:1fr}.qualification-panel .qualification-row label:first-child{grid-column:auto}.qualification-panel .qualification-row button{width:100%}}
/* The existing station selector styles also target all direct divs; override them for this full-width subrow. */
.station-shift-row > .qualification-requirements{grid-column:1/-1;display:grid;grid-template-columns:minmax(170px,1fr) repeat(3,minmax(115px,145px));gap:12px;align-items:center;width:100%;box-sizing:border-box;padding:14px 18px;margin:2px 0 8px;background:#eaf3ff;border:1px solid #cbdffa;border-radius:14px;color:#173454}
.station-shift-row > .qualification-requirements strong{line-height:1.35}
.station-shift-row > .qualification-requirements label{display:grid;gap:5px;min-width:0;font-size:.82rem;font-weight:700;line-height:1.2;color:#173454}
.station-shift-row > .qualification-requirements label input{width:100%;max-width:none;box-sizing:border-box;min-height:42px;padding:6px 10px;border-radius:10px;background:#fff;color:#173454}
.station-shift-row > .qualification-requirements[hidden]{display:none!important}
@media(max-width:780px){.station-shift-row > .qualification-requirements{grid-template-columns:repeat(3,minmax(0,1fr))}.station-shift-row > .qualification-requirements strong{grid-column:1/-1}}
@media(max-width:460px){.station-shift-row > .qualification-requirements{grid-template-columns:repeat(2,minmax(0,1fr))}}
.planning-health .qualification-health{padding:11px 14px;border-radius:12px;border:1px solid #bad4ff;background:#eaf3ff;color:#173454}
.planning-health .qualification-health small{color:#3a5674}
.planning-health details[data-health-kind=qualification] summary{color:#235cc5}

/* Fachkräfte: distinct from general headcount warnings, also in the daily header. */
.planning-health .qualification-health.has-gap{border-color:#f6b3b9;background:#fff1f2;color:#9f1239}
.planning-health .qualification-health.has-gap small{color:#842b49}
.planning-health .qualification-health.needs-setup{border-color:#f5d58c;background:#fff9e9;color:#81500b}
.planning-health .qualification-health.needs-setup small{color:#705b37}
.planning-health .qualification-health.is-covered{border-color:#96dec6;background:#ecfdf5;color:#12644a}
.planning-health .qualification-health.is-covered small{color:#356b58}
.day-gap-indicator.is-qualification{width:23px;border-radius:7px;background:#a92463;box-shadow:0 3px 8px rgba(169,36,99,.35);font-size:.58rem}
.day-gap-indicator.is-qualification .day-gap-tooltip{border-color:#e9afc9;background:#fff1f7;color:#701c47}
/* A floating mirror keeps dates and staffing counts visible over long rosters. */
.planning-floating-header{position:fixed;z-index:90;overflow:hidden;pointer-events:auto;background:var(--surface);box-shadow:0 6px 15px rgba(15,23,42,.15);border:1px solid var(--border);box-sizing:border-box}
.planning-floating-header[hidden]{display:none!important}
.planning-floating-header .planning-grid{border-spacing:0;table-layout:fixed;margin:0}
.planning-floating-header .planning-grid thead th{position:static;height:82px}

/* The real table header stays at the top of the scrollable roster; no cloned bar. */
.planning-board .planning-grid-wrap{max-height:calc(100vh - 100px);overflow-x:auto;overflow-y:auto;overscroll-behavior:auto;scrollbar-color:var(--primary) var(--surface-hover)}
.planning-board .planning-grid thead th{position:sticky;top:0;z-index:5;box-shadow:0 4px 8px rgba(15,23,42,.09)}
.planning-board .planning-grid thead .planning-person-column{z-index:7}
.planning-board .planning-grid thead .planning-hours-column{z-index:7}

/* Login security verification below the sign-in form. */
.login-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}
.login-panel .login-card{flex:none}
.login-security-badge{display:flex;justify-content:center;align-items:center;min-height:48px;max-width:100%;padding:6px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 4px 14px rgba(15,23,42,.07)}
.login-security-badge a{display:inline-flex;align-items:center;justify-content:center;min-height:36px}
.login-security-badge img{display:block;width:auto;height:auto;max-width:180px;max-height:58px;object-fit:contain}
@media(max-width:760px){.login-panel{gap:16px;padding-top:70px}.login-security-badge{margin-bottom:6px}}

/* Holiday configuration in organization create/edit forms. */
.organization-create-form>.organization-holiday-settings{grid-column:1/-1}
.organization-holiday-editor{margin:0 0 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface);overflow:hidden}
.organization-holiday-editor>summary{padding:14px 18px;cursor:pointer;font-weight:800;color:var(--text)}
.organization-holiday-editor>summary span{margin-left:8px;color:var(--primary);font-size:.8rem}
.organization-holiday-editor>form{padding:4px 18px 18px}
.organization-holiday-editor form>.primary{margin-top:16px}
.organization-holiday-settings{width:100%;min-width:0;padding:18px;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft);box-sizing:border-box}
.organization-holiday-settings .holiday-state-field{display:grid;gap:7px;max-width:360px;font-weight:800}
.organization-holiday-settings select{width:100%;min-height:44px}
.holiday-list-heading{display:grid;gap:4px;margin:20px 0 12px}
.holiday-list-heading small,.holiday-local-note{color:var(--muted);font-weight:500;line-height:1.45}
.organization-holiday-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:9px}
.organization-holiday-choice{display:flex;align-items:center;gap:11px;min-width:0;min-height:56px;padding:10px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface);cursor:pointer;box-sizing:border-box}
.organization-holiday-choice:has(input:checked){border-color:#94baf2;background:#eaf3ff;color:#173454}
.organization-holiday-choice input{width:17px;height:17px;flex:none;accent-color:var(--primary)}
.organization-holiday-choice>span:last-child{display:grid;gap:3px;min-width:0}
.organization-holiday-choice small{color:var(--muted);font-size:.72rem;line-height:1.3}
.holiday-choice-date{flex:none;font-variant-numeric:tabular-nums;font-weight:850;color:var(--primary)}
.holiday-local-note{display:block;margin-top:12px}
@media(max-width:720px){.organization-holiday-settings{padding:14px}.organization-holiday-list{grid-template-columns:1fr}}

/* A day number doubles as the deliberate, confirmed holiday action. */
.planning-day-holiday-button{display:grid;place-items:center;width:27px;height:27px;margin:2px auto 0;padding:0;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;font-weight:850;cursor:pointer}
.planning-day-holiday-button:hover,.planning-day-holiday-button:focus-visible{border-color:#5b91eb;background:#dceaff;color:#153f86;outline:none}
.planning-grid thead th.holiday .planning-day-holiday-button{color:#892347;background:rgba(255,255,255,.55)}

/* Clear status text and daily staffing counts in the dark theme. */
@media screen {
  html[data-theme="dark"] .planning-health {
    border-color: #755a27;
    background: #282718;
    color: #f8fafc;
  }
  html[data-theme="dark"] .planning-health.is-complete {
    border-color: #276b59;
    background: #142c29;
  }
  html[data-theme="dark"] .planning-health > div:not(.qualification-health) strong,
  html[data-theme="dark"] .planning-health > div:not(.qualification-health) small {
    color: #f8fafc;
  }
  html[data-theme="dark"] .planning-health > div:not(.qualification-health) small {
    color: #d3dfec;
  }
  html[data-theme="dark"] .planning-health summary {
    color: #ffd27b;
  }
  html[data-theme="dark"] .planning-health details[data-health-kind="qualification"] summary {
    color: #a9c8ff;
  }
  html[data-theme="dark"] .planning-health .planning-conflict-list span {
    color: #ffe3aa;
    background: #4a351c;
  }
  html[data-theme="dark"] .planning-health .planning-rule-conflicts span {
    color: #eef4ff;
    background: #1b2537;
  }
  .planning-grid thead .day-shift-counts {
    font-size: .68rem;
    line-height: 1.15;
  }
  .planning-grid thead .day-shift-counts > span {
    width: 39px;
    grid-template-columns: 11px 1fr;
    gap: 3px;
    padding: 2px 4px;
    font-variant-numeric: tabular-nums;
  }
  html[data-theme="dark"] .planning-grid thead .day-shift-counts > span {
    color: #f8fafc;
    background: #263852;
    box-shadow: inset 0 0 0 1px #3d5573;
  }
  html[data-theme="dark"] .planning-grid thead .day-shift-counts .count-f b { color: #8dbbff; }
  html[data-theme="dark"] .planning-grid thead .day-shift-counts .count-s b { color: #ffd188; }
  html[data-theme="dark"] .planning-grid thead .day-shift-counts .count-n b { color: #d4b5ff; }
  html[data-theme="dark"] .planning-grid thead .day-shift-counts > span.is-understaffed {
    color: #fff0f0;
    background: #87343d;
    box-shadow: inset 0 0 0 1px #ef8791;
  }
  html[data-theme="dark"] .planning-grid thead .day-shift-counts > span.is-understaffed b,
html[data-theme="dark"] .planning-grid thead .day-shift-counts > span.is-understaffed i {
    color: #fff0f0;
  }
}

/* A hidden leadership selector must stay hidden despite the form grid styles. */
#leadershipTitleField[hidden] { display: none !important; }
#emailRequiredMark[hidden] { display: none !important; }
#areaAssignmentsField .area-assignment-row[hidden],
#shiftQualificationsField .area-assignment-row[hidden] { display: none !important; }

.employee-email-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.employee-email-dialog::backdrop { background: rgba(10, 22, 43, .55); backdrop-filter: blur(3px); }
.employee-email-dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 13px; color: #2563eb; background: #e8f1ff; font-size: 1.3rem; }
.employee-email-dialog h3 { margin: 0 0 8px; color: var(--text-strong); font-size: 1.2rem; }
.employee-email-dialog p { margin: 0; color: var(--muted); line-height: 1.55; }
.employee-email-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 22px; }

/* Assigned leadership titles: clickable count and person-level removal. */
.assignment-count { justify-self: start; border: 1px solid transparent; font: inherit; font-size: .78rem; cursor: pointer; }
.assignment-count:hover, .assignment-count:focus-visible { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.leadership-assignees-dialog:not([open]), .leadership-confirm-dialog:not([open]) { display: none !important; }
.leadership-assignees-dialog, .leadership-confirm-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 680px); padding: 0; border: 1px solid var(--border); border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: 0 26px 76px rgba(10, 25, 49, .3); }
.leadership-assignees-dialog::backdrop, .leadership-confirm-dialog::backdrop { background: rgba(10, 22, 43, .55); backdrop-filter: blur(3px); }
.leadership-assignees-dialog > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.leadership-assignees-dialog h3, .leadership-confirm-dialog h3 { margin: 3px 0 6px; color: var(--text-strong); }
.leadership-assignees-dialog header small { color: var(--primary); font-weight: 800; }
.leadership-assignees-dialog header p, .leadership-confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.5; }
.leadership-assignees-dialog header button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; color: var(--text); background: var(--surface-soft); font-size: 1.4rem; cursor: pointer; }
.leadership-assignees-list { display: grid; gap: 9px; max-height: 52vh; overflow: auto; padding: 18px 24px 24px; }
.leadership-unassign-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.leadership-unassign-form strong { overflow-wrap: anywhere; }
.leadership-unassign-form .role-action { white-space: nowrap; }
.leadership-confirm-dialog { padding: 25px; }
.leadership-confirm-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
@media (max-width: 600px) { .leadership-unassign-form { flex-direction: column; align-items: stretch; } }

/* Dienstplan: Sortierung innerhalb der fixierten Mitarbeitendenspalte halten. */
.planning-board .planning-person-column .planning-employee-table-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.planning-board .planning-employee-table-head .planning-employee-heading {
  white-space: nowrap;
}
.planning-board .planning-employee-table-head label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}
.planning-board .planning-employee-table-head select {
  flex: 0 1 155px;
  width: 155px;
  min-width: 0;
  max-width: 155px;
  height: 34px;
  padding: 0 27px 0 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* Die Soll/Ist-Zusammenfassung braucht Platz für Abweichung und Toleranz. */
.planning-board .planning-grid .planning-hours-column {
  width: 265px;
  min-width: 265px !important;
  box-sizing: border-box;
  padding: 8px 12px !important;
  white-space: normal;
}
.planning-board .planning-grid .planning-hours-column .hours-tolerance-note {
  white-space: normal;
  overflow-wrap: break-word;
}

/* Einrichtung und Station in der Mitarbeitenden-Übersicht. */
.employee-list-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.employee-list-filters .employee-area-filter { flex-wrap: wrap; }
.employee-list-filters select { max-width: min(260px, 100%); }
@media (max-width: 760px) { .employee-list-filters { width: 100%; } .employee-list-filters .employee-area-filter { width: 100%; justify-content: space-between; } }

/* Öffentliche Kontaktmöglichkeit. */
.login-contact-link{display:inline-flex;align-items:center;gap:14px;margin-top:30px;padding:12px 16px;border:1px solid #bfd7fa;border-radius:16px;background:rgba(255,255,255,.82);color:#173a68;text-decoration:none;box-shadow:0 12px 30px rgba(28,80,150,.09);transition:transform .2s,box-shadow .2s}
.login-contact-link:hover,.login-contact-link:focus-visible{transform:translateY(-2px);box-shadow:0 15px 30px rgba(28,80,150,.17)}
.login-contact-link .contact-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#e8f2ff;color:#266cea;font-size:23px}
.login-contact-link strong,.login-contact-link small{display:block}.login-contact-link small{margin-top:2px;color:#526884;font-size:.83rem}.login-contact-link>span:last-child{margin-left:10px;font-size:22px}
.contact-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 10% 10%,#dff7fb,transparent 35%),radial-gradient(circle at 90% 10%,#dce9ff,transparent 38%),#f4f8ff}
.contact-card{width:min(610px,100%);padding:36px;border:1px solid #dbe7f6;border-radius:24px;background:#fff;box-shadow:0 22px 65px rgba(17,51,94,.12);color:#142947}
.contact-brand img{display:block;width:155px;height:auto}.contact-back{display:inline-block;margin:22px 0;color:#3478f6;font-weight:700}.contact-eyebrow{display:block;color:#3478f6;font-size:.74rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.contact-card h1{margin:9px 0;font-size:clamp(1.8rem,5vw,2.5rem)}.contact-card>p{color:#5b6d85;line-height:1.55}.contact-card form{display:grid;gap:16px;margin-top:24px}.contact-card form>label{display:grid;gap:7px;font-size:.87rem;font-weight:750}.contact-card input,.contact-card textarea{width:100%;padding:12px 14px;border:1px solid #c9d8ed;border-radius:12px;background:#f4f8ff;color:#142947;font:inherit}.contact-card textarea{resize:vertical}.contact-card input:focus,.contact-card textarea:focus{outline:3px solid #dceaff;border-color:#3478f6}.contact-card form>small{color:#6b7891}.contact-card button.primary{min-height:48px}.contact-honeypot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.contact-notice{margin-top:20px;padding:14px;border-radius:12px}.contact-notice.success{background:#eaf9f1;color:#126241}.contact-notice.error{background:#fff1f1;color:#9b2626}
@media(max-width:600px){.contact-card{padding:24px}.login-contact-link{margin-top:20px}}

.planning-saved-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.planning-saved-plans .planning-version-form { display: flex; min-width: 0; padding: 10px 12px; }
.planning-saved-plans .planning-version-form label { min-width: 0; flex: 1; }
.planning-saved-plans .planning-version-form select { width: 100%; min-width: 0; }
@media (max-width: 900px) { .planning-saved-plans { grid-template-columns: 1fr; } }

.employee-heading-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.demo-employee-modal { width:min(720px,calc(100vw - 32px)); max-height:calc(100vh - 50px); padding:0; border:1px solid var(--border); border-radius:22px; color:var(--text); background:var(--surface); box-shadow:0 30px 90px rgba(9,30,59,.28); }
.demo-employee-modal::backdrop { background:rgba(10,27,55,.48); backdrop-filter:blur(8px); }
.demo-employee-modal form { display:flex; flex-direction:column; max-height:calc(100vh - 50px); }
.demo-employee-modal header,.demo-employee-modal footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 22px; }
.demo-employee-modal header { border-bottom:1px solid var(--border); }
.demo-employee-modal header h3 { margin:2px 0 0; }
.demo-employee-modal footer { border-top:1px solid var(--border); justify-content:flex-end; }
.demo-employee-modal .demo-modal-body { overflow:auto; display:grid; gap:18px; padding:20px 22px; }
.demo-employee-modal .demo-modal-body p { margin:0; color:var(--muted); }
.demo-employee-modal label { display:grid; gap:6px; min-width:0; font-weight:700; }
.demo-employee-modal input,.demo-employee-modal select { width:100%; min-width:0; padding:10px 12px; border:1px solid var(--border); border-radius:10px; color:var(--text); background:var(--surface); font:inherit; }
.demo-scope-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.demo-group-list { display:grid; gap:8px; }
.demo-group { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:10px; }
.demo-group label:last-of-type { position:relative; }
.demo-group label span { position:absolute; right:13px; bottom:11px; }
.demo-group label:last-of-type input { padding-right:30px; }
@media(max-width:620px) { .demo-scope-row { grid-template-columns:1fr; } }

#userEditorModal [data-user-editor-section][hidden] { display:none !important; }

.transfer-row{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:16px 0;border-top:1px solid #dce8f7}.transfer-row>*{flex:1 1 150px}.transfer-row label{display:grid;gap:5px}.transfer-row input,.transfer-row select{min-height:42px;border:1px solid #c6d8ef;background:#f2f7ff;color:#183554;border-radius:11px;padding:8px}.transfer-row button{flex:0 1 auto;min-height:42px}

/* Feiertage bleiben auch in der einspaltigen Mitarbeitendenansicht deutlich sichtbar. */
.employee-day.is-holiday{background:#fff0f1!important;border:2px solid #d73b4a!important;color:#661925!important}.employee-day.is-holiday header,.employee-day.is-holiday header strong,.employee-day.is-holiday .employee-day-off{color:#a71f34!important}.employee-holiday-label{display:block;margin:5px 0;padding:2px 7px;border-radius:7px;background:#d93449;color:#fff;font-size:.68rem;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:760px){.employee-day.is-holiday .employee-day-button{grid-template-columns:48px minmax(0,1fr) auto}.employee-day.is-holiday .employee-holiday-label{grid-column:2;grid-row:2;margin:0}.employee-day.is-holiday .employee-shift,.employee-day.is-holiday .employee-day-off{grid-column:2/-1}}html[data-theme="dark"] .employee-day.is-holiday{background:#4c202d!important;border-color:#fa7185!important;color:#fff!important}html[data-theme="dark"] .employee-day.is-holiday header,html[data-theme="dark"] .employee-day.is-holiday header strong,html[data-theme="dark"] .employee-day.is-holiday .employee-day-off{color:#ffe8ec!important}

.audit-day-nav{display:flex;align-items:center;gap:12px;justify-content:center;margin:0 0 15px;flex-wrap:wrap}.audit-day-nav strong{color:var(--text)}

.login-hero-links{display:flex;align-items:stretch;flex-wrap:wrap;gap:12px;margin-top:30px}.login-hero-links .login-contact-link{margin-top:0}.login-features-link{display:inline-flex;align-items:center;gap:13px;padding:12px 16px;border:1px solid #2d70e7;border-radius:16px;background:#3478f5;color:#fff;text-decoration:none;box-shadow:0 12px 28px #3478f53b;transition:transform .2s,box-shadow .2s}.login-features-link:hover,.login-features-link:focus-visible{transform:translateY(-2px);box-shadow:0 16px 32px #3478f555}.login-features-link .features-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#ffffff29;font-size:22px}.login-features-link strong,.login-features-link small{display:block}.login-features-link small{margin-top:2px;color:#e1edff;font-size:.82rem}.login-features-link>span:last-child{margin-left:8px;font-size:22px}@media(max-width:600px){.login-hero-links{margin-top:20px}.login-features-link,.login-hero-links .login-contact-link{width:100%}}

.welcome-actions .transfer-nav-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:11px 18px;border:1px solid #b7d0fa;border-radius:14px;background:#eaf3ff;color:#1552a8;font-weight:800;text-decoration:none;box-shadow:0 8px 20px #2768c01a;transition:transform .18s,background .18s,box-shadow .18s}.welcome-actions .transfer-nav-button:hover,.welcome-actions .transfer-nav-button:focus-visible{background:#dbeaff;transform:translateY(-2px);box-shadow:0 12px 24px #2768c033}.welcome-actions .transfer-nav-button span{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#d3e5ff;font-size:18px}html[data-theme="dark"] .welcome-actions .transfer-nav-button{background:#193e69;color:#e5f2ff;border-color:#4273ae}html[data-theme="dark"] .welcome-actions .transfer-nav-button span{background:#295889}

/* Personalqualifikationen: passende Felder, Schalter und Aktionen */
.qualification-panel .qualification-row input[type="text"]{width:100%;min-height:46px;box-sizing:border-box;border:1px solid #c7d9f2;border-radius:12px;background:#f1f6ff;color:#173451;padding:10px 14px;font:inherit;outline:none;transition:border-color .16s,box-shadow .16s}.qualification-panel .qualification-row input[type="text"]:focus{border-color:#3979ef;box-shadow:0 0 0 3px #3979ef28}.qualification-panel .qualification-checkbox input[type="checkbox"]{appearance:none;position:relative;flex:none;width:42px;height:24px;margin:0;border:1px solid #b4c8e2;border-radius:999px;background:#c3cede;cursor:pointer;transition:background .2s,border-color .2s}.qualification-panel .qualification-checkbox input[type="checkbox"]::before{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #102d4b4d;transition:transform .2s}.qualification-panel .qualification-checkbox input[type="checkbox"]:checked{background:#3278f5;border-color:#3278f5}.qualification-panel .qualification-checkbox input[type="checkbox"]:checked::before{transform:translateX(18px)}.qualification-panel .qualification-checkbox input[type="checkbox"]:focus-visible{outline:3px solid #8dbaff;outline-offset:2px}.qualification-panel .qualification-row button{border:1px solid transparent;border-radius:12px;padding:10px 18px;font:inherit;font-weight:800;cursor:pointer;transition:transform .18s,box-shadow .18s,background .18s}.qualification-panel .qualification-row button:hover:not(:disabled){transform:translateY(-1px)}.qualification-panel .qualification-save{background:#e8f1ff;color:#1556b5;border-color:#bbd4fa!important}.qualification-panel .qualification-save:hover{background:#d8e9ff;box-shadow:0 7px 18px #3578f51f}.qualification-panel .qualification-delete{background:#fff0f1;color:#bd2641;border-color:#f3c2cb!important}.qualification-panel .qualification-delete:hover:not(:disabled){background:#ffe1e5;box-shadow:0 7px 18px #d04a661c}.qualification-panel .qualification-delete:disabled{opacity:.47;cursor:not-allowed}.qualification-panel .qualification-create button.primary{background:#3478f5;color:#fff;box-shadow:0 7px 18px #3478f52e}.qualification-panel .qualification-create button.primary:hover{background:#2468e5}html[data-theme="dark"] .qualification-panel .qualification-row input[type="text"]{background:#1b3551;color:#eef6ff;border-color:#436280}html[data-theme="dark"] .qualification-panel .qualification-save{background:#21456d;color:#e5f1ff;border-color:#4b78ae!important}html[data-theme="dark"] .qualification-panel .qualification-delete{background:#562b3b;color:#ffdfe7;border-color:#945269!important}

/* Kopfzeile zeigt die tatsächlich benötigten Schichten des Arbeitsbereichs. */
.planning-grid thead .day-shift-counts{display:flex;flex-direction:column;align-items:center;gap:2px;margin-bottom:4px}.planning-grid thead .day-shift-counts .day-shift-summary{width:max-content;min-width:37px;max-width:68px;display:grid;grid-template-columns:minmax(15px,auto) auto;gap:3px;padding:2px 4px;border-radius:7px;background:#e9f2ff;color:#183452;font-size:.62rem;line-height:1.1}.planning-grid thead .day-shift-counts .day-shift-summary b{max-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--shift-color)}.planning-grid thead .day-shift-counts .day-shift-summary i{font-style:normal}.planning-grid thead .day-shift-counts .day-shift-summary.is-understaffed{background:#ffe6e9;color:#a91d38}.work-area-tabs{display:flex;flex-wrap:wrap;gap:9px;margin:4px 0 20px}.work-area-tabs a{padding:10px 16px;border-radius:12px;border:1px solid #c7dbf7;background:#f0f6ff;color:#23568f;text-decoration:none;font-weight:800}.work-area-tabs a.active{border-color:#3478f5;background:#3478f5;color:#fff;box-shadow:0 8px 18px #3478f52b}.work-area-tabs a:hover:not(.active){background:#e0edff}html[data-theme="dark"] .planning-grid thead .day-shift-counts .day-shift-summary{background:#203e60;color:#e5f2ff}html[data-theme="dark"] .planning-grid thead .day-shift-counts .day-shift-summary.is-understaffed{background:#632c3b;color:#ffe4eb}html[data-theme="dark"] .work-area-tabs a{background:#1d3a5d;color:#e6f3ff;border-color:#416388}html[data-theme="dark"] .work-area-tabs a.active{background:#3478f5;border-color:#3478f5;color:#fff}

/* Lift the entire sticky header cell above neighbouring date cells. */
.planning-board .planning-grid thead th:has(.day-gap-indicator:hover),
.planning-board .planning-grid thead th:has(.day-gap-indicator:focus-within) { z-index: 30; overflow: visible; }
.planning-board .planning-grid .day-gap-tooltip { z-index: 100; }
.welcome-actions .transfer-nav-button { text-decoration: none; border-radius: 14px; }


.rule-card .rule-select-setting:has(select[name="vacation_weekend_policy"]) { grid-column: 1 / -1; width: 100%; min-width: 0; }
.rule-card select[name="vacation_weekend_policy"] { width: 100%; min-width: 0; padding: 12px 36px 12px 14px; min-height: 46px; font-size: .85rem; }
.employee-back-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; padding:12px 18px; border-radius:14px; text-decoration:none; font-weight:800; background:#eaf3ff; color:#1552a8; border:1px solid #b7d0fa; box-shadow:0 6px 16px #2768c01a; }
html[data-theme="dark"] .employee-back-button { background:#193e69; color:#e5f2ff; border-color:#4273ae; }

.transfer-filters{display:flex;flex-wrap:wrap;gap:20px;padding:22px;margin-bottom:20px}.transfer-filters form{display:flex;align-items:end;gap:12px;flex:1 1 300px}.transfer-filters label{flex:1}.transfer-filters label,.transfer-person-card label{display:grid;gap:7px;font-size:.8rem;font-weight:750;color:var(--muted)}.transfer-filters input,.transfer-filters select,.transfer-person-card input,.transfer-person-card select{width:100%;min-width:0;min-height:44px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);color:var(--text);padding:10px 12px}.transfer-list{padding:22px;margin-bottom:20px;min-width:0}.transfer-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.transfer-section-heading h3{margin:0}.transfer-section-heading>span{padding:5px 10px;border-radius:20px;background:var(--surface-soft);color:var(--muted);font-size:.75rem}.transfer-help,.transfer-empty{color:var(--muted);line-height:1.6}.transfer-person-card{display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(130px,1fr) minmax(150px,1fr) minmax(155px,1fr) auto;align-items:center;gap:16px;padding:18px;margin-top:12px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}.transfer-person-card>div{min-width:0}.transfer-person,.transfer-current{display:grid;gap:7px}.transfer-person strong{color:var(--text)}.transfer-person small{color:var(--muted);overflow-wrap:anywhere}.transfer-current small{color:var(--muted);font-size:.75rem}.transfer-current>span{font-weight:700;color:var(--text)}.transfer-person-card button{white-space:nowrap}.transfer-pending{display:flex;flex-wrap:wrap;align-items:center;gap:16px;border-top:1px solid var(--border);padding:16px 0;margin-top:10px}.transfer-pending time{margin-left:auto;color:var(--muted)}.transfer-confirm{width:min(480px,calc(100vw - 32px));border:1px solid var(--border);border-radius:22px;background:var(--surface);color:var(--text);box-shadow:0 24px 80px #0004;padding:24px}.transfer-confirm::backdrop{background:#10243a66;backdrop-filter:blur(5px)}.transfer-confirm p{line-height:1.6}.transfer-confirm footer{display:flex;gap:10px;justify-content:flex-end;margin-top:24px}@media(max-width:1200px){.transfer-person-card{grid-template-columns:1fr 1fr}.transfer-person-card button{grid-column:1/-1;justify-self:end}}@media(max-width:600px){.transfer-filters{padding:16px}.transfer-filters form{flex-wrap:wrap}.transfer-filters label{flex-basis:100%}.transfer-filters button{width:100%}.transfer-list{padding:16px}.transfer-person-card{grid-template-columns:minmax(0,1fr);padding:16px}.transfer-person-card button{width:100%}.transfer-pending{display:grid}.transfer-pending time{margin-left:0}.transfer-confirm footer{flex-direction:column}}

.transfer-pending-card{padding:16px 0;border-top:1px solid var(--border);margin-top:12px}.transfer-pending-card .transfer-pending{border:0;margin:0;padding:0 0 14px}.transfer-pending-actions{display:flex;flex-wrap:wrap;align-items:start;gap:10px}.transfer-edit{flex:1}.transfer-edit summary{display:inline-flex;cursor:pointer;padding:10px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);color:var(--text);font-weight:750}.transfer-edit form{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin-top:14px;padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.transfer-edit label{display:grid;gap:7px;flex:1 1 180px;color:var(--muted);font-size:.8rem;font-weight:750}.transfer-edit input,.transfer-edit select{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text)}.transfer-delete-button{border:1px solid #ef9aa4!important;color:#aa2738!important;background:#fff0f1!important;border-radius:12px!important}html[data-theme="dark"] .transfer-delete-button{background:#4c202d!important;color:#ffccd5!important}@media(max-width:600px){.transfer-edit form button{width:100%}.transfer-pending-actions{display:grid;grid-template-columns:1fr}.transfer-pending-actions summary,.transfer-delete-button{width:100%;justify-content:center}}

.plan-cell.area-inactive{background:repeating-linear-gradient(135deg,#e2e8f0,#e2e8f0 5px,#f1f5f9 5px,#f1f5f9 10px)!important;color:#64748b!important;opacity:1;cursor:not-allowed;box-shadow:none}
[data-theme="dark"] .plan-cell.area-inactive{background:repeating-linear-gradient(135deg,#334155,#334155 5px,#273449 5px,#273449 10px)!important;color:#94a3b8!important}

.plan-cell.has-employee-wish{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:47px;overflow:visible}
.plan-wish-label{display:block;font-size:9px;line-height:12px;font-weight:700;border-radius:5px;padding:1px 4px;background:#fff7dc;color:#805600;white-space:nowrap}
.plan-actual-code{display:block;line-height:18px}

.plan-cell.area-external{background:color-mix(in srgb,var(--shift-color) 14%,#f1f5f9)!important;color:#526176!important;border:1px dashed #94a3b8!important;opacity:1;cursor:default;box-shadow:none!important}
.plan-cell.area-external .plan-actual-code{opacity:.7}
.other-area-hours{color:#64748b;font-weight:600}
[data-theme="dark"] .plan-cell.area-external{background:color-mix(in srgb,var(--shift-color) 15%,#273449)!important;color:#cbd5e1!important}
[data-theme="dark"] .other-area-hours{color:#cbd5e1}

.employee-order-actions button:disabled{opacity:.35;cursor:default}
.employee-row-moved td,.employee-row-moved th{box-shadow:inset 0 2px #60a5fa,inset 0 -2px #60a5fa}
.employee-order-status{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:150;background:#fff1f2;color:#9f1239;border:1px solid #fda4af;padding:12px 18px;border-radius:14px;box-shadow:0 8px 30px #0f172a26;max-width:90vw}

.planning-night-rule-summary{margin:10px 0 16px;border:1px solid #c7d8f5;border-radius:12px;background:#eef5ff;color:#183253;padding:10px 14px;font-size:12px}
.planning-night-rule-summary summary{cursor:pointer;font-weight:700}
.planning-night-rule-summary>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;padding-top:10px}
.planning-night-rule-summary small{flex-basis:100%}
[data-theme="dark"] .planning-night-rule-summary{background:#1d2c45;color:#dbeafe;border-color:#425b7c}

/* Step 66: mobile/tablet presentation and persistent view choice. */
.view-mode-footer{display:none;clear:both;padding:18px;text-align:center}
.view-mode-toggle{border:1px solid #b9d3f6;background:#eef5ff;color:#174e93;padding:11px 18px;border-radius:14px;font:inherit;font-weight:700;cursor:pointer;min-height:44px}
html[data-view-mode="desktop"] .view-mode-footer{display:block}
[data-theme="dark"] .view-mode-toggle{background:#1d3554;color:#dbeafe;border-color:#4b6d97}
@media(max-width:1024px){
 .view-mode-footer{display:block}
 .login-shell{display:flex!important;flex-direction:column;min-height:0;padding:18px 16px 0;gap:16px}
 .login-visual{display:block!important;padding:16px!important;border-radius:22px;background:linear-gradient(140deg,#e8f7fa,#edf2ff)!important}
 .login-visual .brand{margin:0 auto 8px!important;justify-content:center;background:transparent;max-width:140px}
 .login-visual .primadipla-full-logo{width:120px!important;height:110px!important;object-fit:contain;background:#fff;border-radius:16px;padding:8px}
 .login-copy{margin:0!important;padding:0!important}
 .login-copy .pill,.login-copy>p{display:none}
 .login-copy h1{font-size:clamp(24px,5vw,38px)!important;line-height:1.14;text-align:center;margin:10px 0 16px!important}
 .login-hero-links{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;margin-top:0!important}
 .login-features-link,.login-contact-link{display:flex!important;align-items:center;padding:12px!important;min-width:0;border-radius:14px!important;background:#fff!important;box-shadow:0 4px 16px #205eaa0d}
 .login-hero-links strong{font-size:13px}.login-hero-links small{font-size:11px;line-height:1.35}.login-hero-links .features-symbol,.login-hero-links .contact-symbol{font-size:20px}
 .login-panel{padding:0!important;display:flex!important;flex-direction:column;gap:12px}
 .login-tools{position:static!important;align-self:flex-end;display:flex;gap:8px;margin:0}
 .login-card{width:100%!important;max-width:520px!important;margin:0 auto!important;padding:24px!important;border-radius:22px}
 .login-card h2{font-size:26px;line-height:1.2}
 .login-card input,.login-card select{font-size:16px;min-height:48px}
 .login-card button[type="submit"]{min-height:48px}
 .employee-calendar{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;padding:12px!important}
 .employee-day-button{min-height:122px;padding:10px!important;border-radius:15px}
 .employee-day-button header strong{font-size:20px}
 .employee-shift{gap:5px}.employee-shift>span{font-size:11px}
 .employee-day-off{font-size:12px}
 .employee-holiday-label{font-size:10px;overflow-wrap:anywhere}
 .employee-wish-status{padding:14px!important;border-radius:16px}
}
@media(max-width:540px){
 .login-hero-links{grid-template-columns:1fr}
 .login-hero-links a>span:last-child{margin-left:auto}
 .employee-calendar{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .employee-day-button{min-height:116px}
 .login-visual .brand{max-width:112px}
 .login-visual .primadipla-full-logo{width:105px!important;height:92px!important}
}
[data-theme="dark"] .login-hero-links a{background:#203553!important;color:#e6f0ff!important}

/* Step 67: readable mobile rows and calls to action below login. */
.login-mobile-links{display:none}
@media(max-width:1024px){
 .login-copy .login-hero-links{display:none!important}
 .login-panel .login-mobile-links{display:grid!important;width:100%;max-width:520px;margin:4px auto 0!important;grid-template-columns:1fr!important;gap:12px}
 .login-mobile-links a{padding:16px!important;gap:12px;min-height:74px}
 .login-mobile-links strong{font-size:16px!important;line-height:1.4}
 .login-mobile-links small{font-size:14px!important;line-height:1.45;color:#465f7e}
 .login-mobile-links a>span:last-child{margin-left:auto}
 .login-card{font-size:16px;line-height:1.5}
 .login-card label>span,.login-card .muted{font-size:16px}
 .login-card .form-row{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
 .login-card .form-row a,.login-card .form-row .check{font-size:14px;line-height:1.5}
 .employee-calendar{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:10px!important;gap:12px!important}
 .employee-day{min-width:0;min-height:0}
 .employee-day .employee-day-button,.employee-day.is-holiday .employee-day-button{display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;gap:8px 12px;align-items:center;min-height:104px;padding:14px!important;width:100%;text-align:left}
 .employee-day-button header{grid-column:1;grid-row:1 / span 3;align-self:center}
 .employee-day-button header small{font-size:14px}.employee-day-button header strong{font-size:24px}
 .employee-day .employee-shift,.employee-day.is-holiday .employee-shift,.employee-day .employee-day-off,.employee-day.is-holiday .employee-day-off{grid-column:2!important;grid-row:auto!important;min-width:0;width:100%;margin:0}
 .employee-shift{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px}
 .employee-shift b{font-size:20px}.employee-shift>span{font-size:14px;line-height:1.45}
 .employee-day-off{font-size:16px}
 .employee-day .employee-wish-badge,.employee-day .employee-holiday-label{grid-column:2!important;grid-row:auto!important;white-space:normal!important;font-size:13px;line-height:1.4;overflow:visible;text-overflow:clip;margin:0;overflow-wrap:anywhere}
}
@media(max-width:600px){
 .employee-calendar{grid-template-columns:1fr!important;padding:0!important}
 .login-card{padding:22px 18px!important}
 .login-visual{padding:12px!important}
 .login-copy h1{font-size:26px!important}
}
[data-theme="dark"] .login-mobile-links small{color:#cbdcf3!important}

@media(max-width:1024px){
 .login-panel .login-mobile-links a{color:#173a65!important;background:#fff!important;border:1px solid #b7d0f2!important}
 .login-panel .login-mobile-links a strong,.login-panel .login-mobile-links a>span:last-child{color:#173a65!important;opacity:1!important}
 .login-panel .login-mobile-links a small{color:#465f7e!important;opacity:1!important}
 .login-panel .login-mobile-links .features-symbol,.login-panel .login-mobile-links .contact-symbol{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:12px;background:#e8f2ff!important;color:#2768c5!important}
 html[data-theme="dark"] .login-panel .login-mobile-links a{background:#203553!important;border-color:#4e709c!important;color:#e6f0ff!important}
 html[data-theme="dark"] .login-panel .login-mobile-links a strong,html[data-theme="dark"] .login-panel .login-mobile-links a>span:last-child{color:#e6f0ff!important}
 html[data-theme="dark"] .login-panel .login-mobile-links a small{color:#cbdcf3!important}
 html[data-theme="dark"] .login-panel .login-mobile-links .features-symbol,html[data-theme="dark"] .login-panel .login-mobile-links .contact-symbol{background:#2e4d75!important;color:#c2ddff!important}
}

/* Step 68: keep employee month controls inside the mobile header. */
@media(max-width:1024px){
 .employee-plan-head{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:18px;min-width:0}
 .employee-plan-head>div{width:100%;min-width:0}
 .employee-plan-head h2{font-size:clamp(1.5rem,6vw,2rem);line-height:1.25;overflow-wrap:normal}
 .employee-plan-head p{font-size:15px;line-height:1.45;max-width:none;width:100%}
 .employee-plan-head .employee-plan-actions-main{display:grid;grid-template-columns:1fr;gap:12px;align-items:stretch;justify-content:stretch}
 .employee-plan-actions-main .planning-month-nav{order:0;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;width:100%;min-width:0;gap:10px}
 .employee-plan-actions-main .planning-month-nav .icon-btn{width:44px;height:44px;min-width:0;padding:0;display:grid;place-items:center}
 .employee-plan-actions-main .planning-month-nav .today-chip{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:0;margin:0}
 .employee-plan-actions-main>a.button-link{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-width:0;min-height:44px;margin:0;box-sizing:border-box;white-space:normal;font-size:15px}
 .wish-deadline-banner{align-items:flex-start;padding:14px;gap:12px}
 .wish-deadline-banner>span{flex:0 0 38px;width:38px;height:38px}
 .wish-deadline-banner>div{min-width:0;flex:1}
 .wish-deadline-banner strong{font-size:15px;line-height:1.4}
 .wish-deadline-banner small{font-size:13px;line-height:1.4}
}

/* Step 79: keep the account and logout at the right for every role. */
.sidebar .nav-account { margin-left:auto; flex-shrink:0; }
@media (max-width:760px) {
 .sidebar .nav-account { margin-left:auto; }
 .sidebar .nav-account .logout { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:0; padding:8px 10px; font-size:.82rem; white-space:nowrap; }
 .sidebar .nav-account .logout::before { content:none; }
}

/* Step 81: sickness absence, without staffing count. */
.plan-cell.entry-sick { background:#E11D48; color:#fff; }
.planning-legend .legend-sick,.print-plan-legend .legend-sick,.picker-sick { display:inline-flex;align-items:center;justify-content:center;background:#E11D48;color:white;border-radius:6px;padding:3px 7px;font-style:normal;font-weight:700; }
@media print { .plan-cell.entry-sick { print-color-adjust:exact; -webkit-print-color-adjust:exact; } }

/* Step 82: absence badges in the picker use the legend colours. */
.shift-picker i.picker-free { --shift-color:#94A3B8; background:#94A3B8; font-size:.68rem; }
.shift-picker i.picker-vacation { --shift-color:#0EA5E9; background:#0EA5E9; }
.shift-picker i.picker-sick { --shift-color:#E11D48; background:#E11D48; }
.shift-picker i.picker-free,
.shift-picker i.picker-vacation,
.shift-picker i.picker-sick { display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; padding:0; border-radius:9px; color:#fff; font-style:normal; font-weight:850; }

/* Personal: shared navigation and accessible form sections */
.personal-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.personal-tabs a,.personal-form-tabs button{padding:12px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);font-weight:750;text-decoration:none}.personal-tabs .is-active,.personal-form-tabs .is-active{background:var(--primary-soft);color:var(--primary);border-color:var(--primary)}.personal-filters{display:flex;flex-wrap:wrap;align-items:end;gap:14px;padding:18px;margin-bottom:20px}.personal-filters label{display:grid;gap:6px;flex:1;min-width:170px}.personal-filters input,.personal-filters select{width:100%;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}.personal-form-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}[data-personal-panel][hidden]{display:none!important}.employee-editor-modal nav{flex-wrap:wrap}.employee-editor-modal nav button{flex:1;min-width:130px}.wish-choice-grid input:focus-visible+span{outline:3px solid var(--primary);outline-offset:2px}

.personal-form-tabs[hidden],.user-form .form-card[hidden]{display:none!important}

/* One flexible spacer: keep Help and Design beside the account at the right. */
.sidebar .utility-actions{display:flex;align-items:center;gap:6px;margin-left:auto;flex:0 0 auto}.sidebar .utility-actions .settings{margin:0}.sidebar .nav-account{margin-left:0}.help-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr);gap:24px;max-width:1500px}.help-faq,.help-request{padding:26px}.help-section-head{display:flex;align-items:center;gap:14px;margin-bottom:20px}.help-section-head h3,.help-request h3{margin:3px 0 12px;font-size:1.3rem}.help-symbol{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:var(--primary-soft);color:var(--primary);font-size:24px;font-weight:850}.help-faq small,.help-request>small{color:var(--muted);font-weight:750}.help-search-label,.help-request form label{display:grid;gap:7px;font-weight:750}.help-search-label{margin-bottom:18px}.help-search-label input,.help-request input,.help-request select,.help-request textarea{width:100%;padding:12px;border:1px solid var(--border);border-radius:11px;background:var(--surface-soft);color:var(--text);font:inherit}.help-question{border-top:1px solid var(--border);padding:15px 0}.help-question summary{cursor:pointer}.help-question summary small{display:block;margin-bottom:3px;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em}.help-question p{color:var(--muted);margin:12px 0 0;line-height:1.65}.help-question[hidden]{display:none!important}.help-request{align-self:start}.help-request>p{color:var(--muted)}.help-response{padding:12px 14px;border-radius:10px;background:var(--primary-soft);color:var(--primary)!important}.help-request form{display:grid;gap:17px;margin-top:22px}.help-request form>small{font-size:.78rem;color:var(--muted);line-height:1.6}.help-request textarea{resize:vertical}.help-request button{justify-self:start}@media(max-width:900px){.help-layout{grid-template-columns:1fr}}@media(max-width:720px){.sidebar .utility-actions{gap:2px}.sidebar .utility-actions .settings{width:36px;min-width:36px;padding:8px;justify-content:center}.sidebar .utility-actions .nav-label{display:none}.help-faq,.help-request{padding:20px}.help-request button{width:100%}}

.vacation-calendar-open.secondary{background:#2563eb;color:#fff;border:1px solid #1d4ed8;box-shadow:0 4px 12px rgba(37,99,235,.18);font-weight:800}.vacation-calendar-open.secondary:hover{background:#1d4ed8;color:#fff;border-color:#1e40af}.vacation-calendar-open.secondary:focus-visible{outline:3px solid #38bdf8;outline-offset:3px}.own-vacation-filter{display:flex;gap:18px;align-items:end;flex-wrap:wrap;padding:20px;margin-bottom:22px}.own-vacation-filter label{display:grid;gap:7px;font-weight:750}.own-vacation-filter select{padding:10px 14px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text)}.own-vacation-filter>span{color:var(--muted);font-size:.84rem;align-self:center;margin-left:auto}.own-vacation-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:24px}.own-vacation-stat{padding:24px}.own-vacation-stat>small{color:var(--muted);font-weight:750}.own-vacation-stat>strong{display:block;font-size:2rem;margin:8px 0}.own-vacation-stat strong span{font-size:.9rem;font-weight:600}.own-vacation-stat p{color:var(--muted);font-size:.85rem;margin:0}.own-vacation-stat.is-balance{border-color:#96d8c0;background:var(--primary-soft)}.own-vacation-details,.own-vacation-empty{padding:26px}.own-vacation-details header{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.own-vacation-details h3{margin:3px 0}.own-vacation-details dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;margin-top:24px}.own-vacation-details dl div{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid var(--border)}.own-vacation-details dt{color:var(--muted)}.own-vacation-details dd{font-weight:800;margin:0;white-space:nowrap}.own-vacation-details>p{color:var(--muted);font-size:.83rem;line-height:1.65}@media(max-width:1000px){.own-vacation-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.own-vacation-stats{gap:10px}.own-vacation-stat{padding:16px}.own-vacation-stat>strong{font-size:1.6rem}.own-vacation-details dl{grid-template-columns:1fr}.own-vacation-details{padding:20px}.own-vacation-details .vacation-calendar-open{width:100%}}

/* Highlight the planning selection at its familiar position. */
.planning-toolbar.panel{background:linear-gradient(110deg,#dbeafe,#eaf3ff);border:1px solid #93b9f3;border-left:5px solid var(--primary);margin-bottom:22px;box-shadow:0 3px 12px rgba(37,99,235,.09)}
html[data-theme="dark"] .planning-toolbar.panel{background:linear-gradient(110deg,#1e3556,#17263e);border-color:#41699f;border-left-color:#60a5fa;box-shadow:0 3px 12px rgba(0,0,0,.18)}

/* Explicit visibility wins over form layout rules, including moved fields. */
.user-form .form-field[hidden],.user-form .form-card[hidden],.user-form .personal-form-tabs[hidden]{display:none!important}

/* Dashboard actions and a consistent navigation logo for every role and viewport. */
.sidebar .brand{flex:0 0 58px;width:58px;min-width:58px;height:54px;min-height:54px;padding:3px;box-sizing:border-box;flex-shrink:0}
.sidebar .brand .primadipla-nav-logo{width:54px;height:54px;max-width:none;max-height:none;object-fit:contain;flex-shrink:0}
.dashboard-plan-link.primary{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:#2563eb;color:#fff;border:1px solid #1d4ed8;min-height:46px;padding:12px 18px;border-radius:12px;font-weight:800;box-shadow:0 4px 12px rgba(37,99,235,.22);white-space:nowrap;text-decoration:none}
.dashboard-plan-link.primary:hover{background:#1d4ed8;color:#fff}.dashboard-plan-link.primary:focus-visible{outline:3px solid #38bdf8;outline-offset:3px}
.superadmin-welcome{border-left:5px solid var(--primary)}.superadmin-stats article em{white-space:normal}.superadmin-overview,.superadmin-shortcuts{padding:24px;margin-bottom:22px}.superadmin-overview>header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.superadmin-overview h3{margin:5px 0}.superadmin-count-note{color:var(--muted);font-size:.84rem;line-height:1.6;max-width:1000px;margin:16px 0 22px}.superadmin-table-scroll{overflow-x:auto}.superadmin-table{width:100%;border-collapse:collapse;text-align:left}.superadmin-table th{background:var(--primary-soft);color:var(--text);font-size:.8rem}.superadmin-table th,.superadmin-table td{padding:14px 16px;border-bottom:1px solid var(--border);white-space:nowrap}.superadmin-table tbody tr:nth-child(even){background:var(--surface-soft)}.superadmin-table .dashboard-plan-link{min-height:40px;padding:9px 13px;font-size:.83rem}.superadmin-muted{color:var(--muted);font-size:.8rem}.superadmin-shortcuts .quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}@media(max-width:900px){.superadmin-shortcuts .quick{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.superadmin-overview,.superadmin-shortcuts{padding:18px}.superadmin-shortcuts .quick{grid-template-columns:1fr}.welcome-actions .dashboard-plan-link{width:100%}}

.personal-form-tabs button[hidden],.employee-editor-modal nav button[hidden]{display:none!important}

.billing-panel{padding:26px;margin:24px 0}.billing-panel>header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.billing-panel h3{margin:5px 0}.billing-panel p{line-height:1.65}.billing-note{display:block;color:var(--muted);font-size:.84rem;line-height:1.6;margin:16px 0}.billing-create{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0;padding:20px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.billing-create label{display:grid;gap:8px;font-weight:700}.billing-create input:not([type=checkbox]),.billing-create select{width:100%;padding:12px;border:1px solid var(--border);border-radius:10px;color:var(--text);background:var(--surface)}.billing-create .billing-confirm{grid-column:1/-1;display:flex;align-items:flex-start;font-size:.84rem;font-weight:500}.billing-confirm input{flex:none;margin-top:5px}.billing-create button{justify-self:start}.billing-table-scroll{overflow-x:auto}.billing-table{width:100%;border-collapse:collapse;text-align:left}.billing-table th,.billing-table td{padding:14px;border-bottom:1px solid var(--border);white-space:nowrap}.billing-table th{background:var(--primary-soft)}.billing-table td small{display:block;color:var(--muted);white-space:normal;max-width:340px}.billing-table tr:nth-child(even){background:var(--surface-soft)}.billing-events{margin-top:22px}.billing-events summary{cursor:pointer;font-weight:700}.billing-events li{margin:10px 0;color:var(--muted)}.billing-payment{max-width:900px}.billing-amount{display:block;font-size:2.6rem;color:var(--primary);margin:20px 0}.billing-payment dl{display:grid;grid-template-columns:160px minmax(0,1fr);gap:10px}.billing-payment dd{margin:0;overflow-wrap:anywhere}.billing-payment dt{color:var(--muted)}.billing-actions{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}.paypal-button{background:#ffc439!important;color:#142c5a!important;border:1px solid #dfaa24;min-height:46px;font-weight:850}@media(max-width:700px){.billing-panel{padding:20px}.billing-create{grid-template-columns:1fr;padding:16px}.billing-payment dl{grid-template-columns:1fr}.billing-actions form,.billing-actions button{width:100%}}

/* Monthly statements retain native table-cell layout, including the first column. */
.monthly-workforce-table td:first-child{display:table-cell;min-width:190px;vertical-align:middle}
.monthly-workforce-table td{white-space:nowrap}
.monthly-invoice-dialog{width:min(1000px,95vw);max-height:94vh;border:1px solid var(--border);border-radius:20px;padding:0;background:var(--surface);color:var(--text)}
.monthly-invoice-dialog::backdrop{background:rgba(15,30,50,.45);backdrop-filter:blur(8px)}
.monthly-invoice-dialog header{display:flex;align-items:center;justify-content:space-between;padding:12px 22px}
.monthly-invoice-dialog iframe{display:block;border:0;width:100%;height:75vh;background:white}

/* Schritt 102: wiederkehrende Verfügbarkeit und lesbare Dashboard-Köpfe */
.weekly-availability{grid-column:1/-1;min-width:0}
.weekly-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px;margin:22px 0}
.weekly-day{min-width:0;padding:16px 12px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft);transition:border-color .18s,background .18s}
.weekly-day h4{margin:0 0 16px;font-size:.9rem;color:var(--text);overflow-wrap:anywhere}
.weekly-toggle{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;color:var(--text);font-weight:750;cursor:pointer}
.weekly-toggle>span{min-width:0;overflow-wrap:anywhere}
.weekly-toggle input[role=switch]{position:absolute;opacity:0;width:42px;height:24px;right:0;margin:0}
.weekly-toggle i{position:relative;flex:none;display:block;width:42px;height:24px;border-radius:99px;background:#8895a7;border:1px solid #7b8798;transition:background .18s}
.weekly-toggle i:before{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .18s}
.weekly-toggle input:checked+i{background:#16834b;border-color:#16834b}
.weekly-toggle input:checked+i:before{transform:translateX(18px)}
.weekly-toggle input:focus-visible+i{outline:3px solid #609eff;outline-offset:3px}
.weekly-toggle:has(input[role="switch"]:disabled){opacity:.45;cursor:default}
.weekly-toggle[hidden]{display:none}
.weekly-free{padding-bottom:12px;border-bottom:1px solid var(--border);margin-bottom:10px}
.weekly-shifts{display:grid;gap:5px}
.weekly-day-state{display:block;margin-top:14px;min-height:2.5em;font-size:.72rem;line-height:1.4;color:var(--muted)}
.weekly-day.is-free{border-color:#73b68e;background:#edf8f1}
.weekly-availability .preference-mode{max-width:460px;margin-left:auto}
html[data-theme="dark"] .weekly-day{background:#1b2a40;border-color:#40526a}
html[data-theme="dark"] .weekly-day.is-free{background:#193b2d;border-color:#438f66}
html[data-theme="dark"] .weekly-toggle input:checked+i{background:#239e5d;border-color:#239e5d}
html[data-theme="dark"] .superadmin-table thead th{background:#243b58;color:#edf4ff;border-color:#405671}
html[data-theme="dark"] .employee-table thead th,html[data-theme="dark"] .billing-table thead th{background:#243b58;color:#edf4ff;border-color:#405671}
@media(max-width:1000px){.weekly-days{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.weekly-days{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.weekly-availability .preference-mode{max-width:none}.weekly-day{padding:14px}}

.weekly-day h4{margin-bottom:5px}.weekly-day-state{margin:0 0 12px;min-height:2.8em}.weekly-toggle input:disabled+i{background:#b9c4d2;border-color:#b9c4d2}.weekly-toggle input:disabled+i:before{transform:none}
html[data-theme="dark"] .weekly-toggle input:disabled+i{background:#536276;border-color:#536276}

/* Schritt 106: zentrale Kontextwahl */
.topbar:has(.workspace-context){display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:18px}
.topbar:has(.workspace-context) .top-actions{justify-self:end}
.workspace-context{display:flex;align-items:end;justify-content:center;gap:12px;margin:0}
.workspace-context label{display:grid;gap:5px;color:var(--muted);font-size:.72rem;font-weight:750}
.workspace-context select{min-height:40px;width:clamp(140px,15vw,240px);max-width:100%;padding:8px 30px 8px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:.82rem}
.workspace-apply{min-height:40px;font-size:.8rem}
.has-workspace-context form[method="get"] label[hidden]{display:none!important}
@media(max-width:1100px){.topbar:has(.workspace-context){grid-template-columns:1fr auto}.workspace-context{grid-row:2;grid-column:1/-1;flex-wrap:wrap}.workspace-context select{width:230px}}
@media(max-width:600px){.workspace-context{width:100%;gap:10px}.workspace-context label{flex:1;min-width:120px}.workspace-context select{width:100%}.workspace-apply{padding:8px}}

.station-shift-row .station-limit-toggle{display:flex;align-items:center;gap:10px;min-width:190px;max-width:280px;margin-right:14px;cursor:pointer}
.station-limit-toggle>span:last-child{display:grid;gap:4px}.station-limit-toggle strong{font-size:.8rem}.station-limit-toggle small{line-height:1.35;color:var(--muted);font-size:.7rem;white-space:normal}
.station-limit-toggle .switch-control{flex:none}.station-limit-toggle input:checked+.switch-slider{background:#239e5d!important}
.station-shift-row:has(.station-limit-toggle){grid-template-columns:48px minmax(150px,1fr) minmax(190px,260px) repeat(3,110px) 110px}
.station-shift-row .station-limit-toggle .switch-control input{grid-row:auto}
@media(max-width:1250px){.station-shift-row:has(.station-limit-toggle){grid-template-columns:48px minmax(140px,1fr) repeat(3,100px)}.station-shift-row .station-limit-toggle{grid-column:2;grid-row:2}.station-shift-row:has(.station-limit-toggle)>.status{grid-column:1/-1;justify-self:end}}
@media(max-width:700px){.station-shift-row:has(.station-limit-toggle){grid-template-columns:42px minmax(0,1fr);padding:16px 0}.station-shift-row:has(.station-limit-toggle)>label:not(.station-limit-toggle){grid-column:2}.station-shift-row .station-limit-toggle{max-width:none;margin:8px 0}}

/* Schritt 109: Kontolöschung mit Bestätigung */
.employee-table .employee-delete-button{margin-left:10px;white-space:nowrap;border:1px solid #f0b5bf;background:#fff0f2;color:#b4233c;cursor:pointer}
.employee-delete-dialog{width:min(520px,calc(100vw - 32px));padding:0;border:1px solid var(--border);border-radius:22px;background:var(--surface);color:var(--text);box-shadow:0 25px 80px #0005}
.employee-delete-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.employee-delete-dialog form{padding:28px}.employee-delete-dialog header small{color:#c23650;font-weight:800;letter-spacing:.08em}.employee-delete-dialog h2{margin:8px 0 18px}.employee-delete-dialog p{line-height:1.65;color:var(--muted)}.employee-delete-dialog strong{color:var(--text);overflow-wrap:anywhere}.employee-delete-dialog footer{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.employee-delete-confirm{padding:12px 18px;border:0;border-radius:12px;background:#c52b45;color:white;font-weight:800;cursor:pointer}.employee-delete-confirm:hover{background:#ab1f36}.employee-delete-confirm:disabled{opacity:.6;cursor:wait}html[data-theme="dark"] .employee-table .employee-delete-button{background:#472637;border-color:#885063;color:#ffd5df}
@media(max-width:600px){.employee-delete-dialog form{padding:22px}.employee-delete-dialog footer{flex-wrap:wrap}.employee-table .employee-delete-button{margin:8px 0 0}}

.wish-vacation-options{padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);display:grid;gap:10px}.wish-vacation-options[hidden]{display:none!important}.wish-vacation-options p{margin:0;color:var(--muted)}.wish-vacation-options label{display:flex!important;align-items:center;gap:9px}.wish-vacation-options input{width:auto!important}.wish-vacation-options small{line-height:1.45;color:var(--muted)}.wish-dialog{max-height:90dvh;overflow-y:auto}.wish-dialog::backdrop{backdrop-filter:blur(8px);background:#0f172a70}

.plan-reset-dialog fieldset{border:1px solid var(--border);border-radius:14px;padding:16px;display:grid;gap:12px}.plan-reset-dialog legend{font-weight:750;font-size:.9rem;padding:0 6px}.plan-reset-dialog fieldset label{display:flex;align-items:center;gap:10px;cursor:pointer;color:var(--text)}.plan-reset-dialog input[type=radio]{accent-color:var(--primary)}.plan-reset-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}

/* Schritt 112: Einheiten außerhalb der Zahlenfelder, Platz für native Pfeile */
.rule-value{display:flex;align-items:center;gap:8px;min-width:0}
.rule-value input{flex:1 1 72px;width:0;min-width:0;min-height:44px;padding:10px 6px 10px 10px;box-sizing:border-box}
.rule-value span{position:static;transform:none;flex:0 0 auto;white-space:nowrap;color:var(--muted);font-size:.72rem;font-weight:750}
@media(max-width:760px){.rule-value input{flex-basis:100px}.rule-value{justify-content:flex-start}.rule-value span{padding-right:4px}}

/* Schritt 113: öffentliche AGB und Footerlinks */
.view-mode-footer .legal-footer-link{color:var(--muted);text-decoration:none;margin:0 9px;font-size:.8rem}.view-mode-footer .legal-footer-link:hover{text-decoration:underline}.view-mode-footer{flex-wrap:wrap;gap:8px}
.legal-page{max-width:1000px;margin:28px auto;padding:0 22px}.legal-page>nav{display:flex;flex-wrap:wrap;gap:18px;align-items:center;margin-bottom:20px}.legal-page>nav a{color:var(--primary)}.legal-page>nav button{margin-left:auto;padding:10px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);cursor:pointer}.legal-content{padding:32px;border:1px solid var(--border);border-radius:20px;background:var(--surface);color:var(--text);line-height:1.75}.legal-content h1{font-size:1.8rem;line-height:1.3}.legal-content h2{font-size:1.18rem;margin-top:30px;line-height:1.4}.legal-content li{margin:12px 0}.legal-content ol{padding-left:24px}.legal-content p{overflow-wrap:anywhere}.legal-draft-note{padding:16px;border:1px solid #d0a452;border-radius:12px;background:#fff7df;color:#654b14;line-height:1.5}
@media(max-width:600px){.legal-page{padding:0 12px}.legal-content{padding:20px}.legal-content h1{font-size:1.4rem}}
@media print{.legal-page>nav,.view-mode-footer{display:none!important}.legal-page{max-width:none;margin:0;padding:0}.legal-content{border:0;padding:0;background:white;color:black}h2{break-after:avoid}li{orphans:3;widows:3}}

.automatic-planning-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.automatic-planning-dialog header small{color:var(--primary)}.automatic-planning-dialog .automatic-planning-note{font-size:.85rem;padding:12px;border-radius:12px;background:var(--surface-soft)}.automatic-planning-dialog [data-auto-confirm]{min-height:44px;border-radius:12px;cursor:pointer}.automatic-planning-dialog [data-auto-confirm]:disabled{opacity:.6;cursor:wait}

.billing-settings{padding:12px 0;white-space:normal}.billing-settings summary{cursor:pointer;font-weight:750;color:var(--primary)}.billing-settings-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:20px;margin-top:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.billing-settings-form label{display:grid;gap:8px;font-weight:700}.billing-settings-form input:not([type=checkbox]),.billing-settings-form select{width:100%;min-height:42px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}.billing-settings-form small{white-space:normal;color:var(--muted);line-height:1.4}.billing-settings-form p{grid-column:1/-1;margin:0;white-space:normal}.billing-settings-form .billing-trial-toggle{display:flex;align-items:center;gap:8px}.billing-settings-form button{justify-self:start}.billing-trial-status{padding:12px;border-radius:10px;background:var(--primary-soft)}@media(max-width:700px){.billing-settings-form{grid-template-columns:1fr;padding:14px}}

.billing-settings-form label[data-trial-setting][hidden]{display:none!important}

.billing-trial-toggle .switch-control{flex:none}.billing-trial-toggle input:checked+.switch-slider{background:#239e5d!important}.billing-settings-form [data-trial-status][hidden]{display:none!important}

/* Schritt 221: Mitarbeitende und Konten/Rollen übersichtlich abwechseln. */
.striped-person-table tbody > tr:nth-child(odd) > td{background:#fff}
.striped-person-table tbody > tr:nth-child(even) > td{background:#edf5ff}
.striped-person-table tbody > tr:hover > td{background:#deedff}
html[data-theme="dark"] .striped-person-table tbody > tr:nth-child(odd) > td{background:#17273c}
html[data-theme="dark"] .striped-person-table tbody > tr:nth-child(even) > td{background:#203750}
html[data-theme="dark"] .striped-person-table tbody > tr:hover > td{background:#2a4563}

/* Schritt 262: readable rows in current and archived audit views. */
.audit-table tbody tr:nth-child(even){background:var(--surface-soft,#f2f7fc)}
.audit-table pre{max-width:560px;white-space:pre-wrap;overflow-wrap:anywhere}
