:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #57534e;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --err: #b91c1c;
  --ok: #15803d;
  --border: #e7e5e4;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(28, 25, 23, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(160deg, #ecfdf5 0%, var(--bg) 45%, #fafaf9 100%);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
header.appbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
header.appbar h1 {
  font-size: 1.35rem;
  margin: 0;
}
header.appbar .sub {
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}
.card h2 { margin: 0 0 0.6rem; font-size: 1.15rem; }
.card p { margin: 0.4rem 0; line-height: 1.45; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}
.btn.secondary {
  background: #fff;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
}
.btn.block { display: block; text-align: center; width: 100%; }

.module-link {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafaf9;
  color: var(--ink);
  font-weight: 600;
}
.module-link span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
.module-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.warn {
  background: var(--warn-bg);
  border: 1px solid #fdba74;
  color: #7c2d12;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
}
.note {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
}
.flash {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.flash li {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.4rem;
}
.flash .ok { background: #dcfce7; color: var(--ok); }
.flash .err { background: #fee2e2; color: var(--err); }

label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
input[type="password"], input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
}
footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Admin form — Neuer Mitarbeiter */

.form-ma .field {
  margin-bottom: 0.9rem;
}
.form-ma label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.form-ma input[type="text"],
.form-ma input[type="email"],
.form-ma input[type="number"],
.form-ma input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  letter-spacing: normal;
  background: #fff;
  color: var(--ink);
}
.form-ma input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form-ma .hint,
.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}
.form-ma .btn {
  margin-top: 0.25rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}
.ma-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.ma-table th,
.ma-table td {
  text-align: left;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ma-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ma-table tbody tr:hover {
  background: #fafaf9;
}

.readonly-value {
  margin: 0.25rem 0 0;
  padding: 0.5rem 0.75rem;
  background: #f4f4f2;
  border-radius: 4px;
}

/* Dienstplan */
.wrap:has(.wrap-wide-inner),
.wrap:has(.dp-nav) {
  max-width: 1100px;
}
.dp-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.dp-nav a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
}
.dp-nav a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}
.form-ma select,
.form-ma input[type="date"],
.form-ma input[type="time"],
.form-ma input[type="number"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
.form-ma input[type="checkbox"] {
  width: auto;
  margin-right: 0.4rem;
}
.ampel {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}
.ampel-unter { background: #fee2e2; color: var(--err); }
.ampel-ok { background: #dcfce7; color: var(--ok); }
.ampel-ueber { background: #fef9c3; color: #854d0e; }
.btn-tiny {
  background: #fff;
  color: var(--err);
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.day-head {
  font-size: 1rem;
  margin: 1rem 0 0.35rem;
}
.flash .warn { background: var(--warn-bg); color: var(--warn); }

/* Onboarding Wizard (Tablet) */
.wizard-card h3 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.wizard-progress { margin: 1rem 0 0.25rem; }
.wizard-bar {
  height: 10px;
  background: #e7e5e4;
  border-radius: 999px;
  overflow: hidden;
}
.wizard-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.wizard-steps {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0.75rem 0 0;
  flex-wrap: wrap;
}
.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
  min-width: 7rem;
}
.wizard-steps li .num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.wizard-steps li.current { color: var(--ink); font-weight: 700; }
.wizard-steps li.current .num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.wizard-steps li.done .num {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.form-wizard .field input,
.form-wizard .field select,
.form-wizard .safety-note {
  font-size: 1.15rem;
  min-height: 3rem;
  padding: 0.85rem 1rem;
}
.form-wizard select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.btn-touch {
  min-height: 3.1rem;
  padding: 0.9rem 1.35rem;
  font-size: 1.1rem;
  width: 100%;
  margin-bottom: 0.55rem;
}
.wizard-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .wizard-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .wizard-actions .btn-touch {
    width: auto;
    flex: 1;
  }
}
.wrap:has(.wizard-card) {
  max-width: 640px;
}
.safety-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.safety-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fafaf9;
}
.safety-item.required {
  border-color: #99f6e4;
  background: #f0fdfa;
}
.safety-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
}
.safety-check input[type="checkbox"] {
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}
.safety-desc {
  margin: 0.35rem 0 0.5rem 2.5rem !important;
  font-size: 0.9rem;
}
.safety-note {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.badge-pflicht, .badge-opt {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.badge-pflicht { background: #ccfbf1; color: #0f766e; }
.badge-opt { background: #f5f5f4; color: #57534e; }
.review-dl {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
}
.review-dl dt { color: var(--muted); font-weight: 600; }
.review-dl dd { margin: 0; }
.safety-review { list-style: none; padding: 0; margin: 0; }
.safety-review li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.safety-review li.ok { color: var(--ok); }
.safety-review li.miss { color: var(--err); }
button.btn:disabled, .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ——— Dienstplan A+ (6 Wochen, Touch) ——— */
.dp-week-grid {
  display: grid;
  gap: 0.75rem;
}
.dp-week-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafaf9;
  overflow: hidden;
}
.dp-week-title {
  margin: 0;
  padding: 0.65rem 0.9rem;
  background: var(--accent-soft);
  color: #115e59;
  font-size: 0.95rem;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
.dp-days {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 900px) {
  .dp-days {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}
.dp-day {
  border-top: 1px solid var(--border);
  padding: 0.55rem 0.5rem 0.7rem;
  min-height: 5.5rem;
  background: #fff;
}
@media (min-width: 900px) {
  .dp-day { border-top: none; border-left: 1px solid var(--border); }
  .dp-day:first-child { border-left: none; }
}
.dp-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.dp-day-head .wd { color: var(--ink); }
.dp-day-head .dt { color: var(--muted); font-weight: 600; }
.dp-shift {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.35rem;
  background: #f0fdfa;
  font-size: 0.82rem;
  line-height: 1.25;
}
.dp-shift.protected {
  border-color: #f59e0b;
  background: #fffbeb;
}
.dp-shift .who { font-weight: 700; color: var(--ink); }
.dp-shift .meta { color: var(--muted); }
.dp-shift-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}
.dp-shift-actions .btn-tiny {
  min-height: 2.2rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}
.btn-quick-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  width: 100%;
  margin-top: 0.25rem;
  border: 1px dashed #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none !important;
}
.btn-quick-add:hover { background: #ccfbf1; }
.rule-list { list-style: none; padding: 0; margin: 0; }
.rule-list li {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.4rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.rule-list li.hard { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.rule-list li.soft { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.rule-list li.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.rule-list li.info { background: #f8fafc; color: var(--muted); }
.badge-protect {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  margin-left: 0.25rem;
}
.badge-springer {
  background: #e0e7ff;
  color: #3730a3;
}
.hint-box {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #115e59;
}
.hint-box ul { margin: 0.35rem 0 0 1.1rem; padding: 0; }
.dp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0 0;
}
.dp-toolbar .btn, .dp-toolbar a.btn {
  min-height: 2.6rem;
  padding: 0.55rem 0.95rem;
}
.ma-shift-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  background: #fff;
}
.ma-shift-card .when { font-weight: 700; font-size: 1.05rem; }
.ma-shift-card .detail { color: var(--muted); margin-top: 0.2rem; }

/* ——— Stempel (Zeiterfassung) ——— */
.stempel-highlight {
  border-color: #7f1d1d;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 60%);
  font-size: 1.05rem;
}
.stempel-highlight span { color: #7f1d1d; }
.stempel-hero .stempel-greeting { font-size: 1.05rem; color: var(--ink); }
.stempel-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.75rem 0 0.35rem;
}
.stempel-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #a8a29e;
}
.stempel-dot-working { background: #15803d; box-shadow: 0 0 0 4px #dcfce7; }
.stempel-dot-paused { background: #b45309; box-shadow: 0 0 0 4px #ffedd5; }
.stempel-dot-off { background: #a8a29e; }
.stempel-clock {
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 600;
  color: #7f1d1d;
  margin: 0.5rem 0 !important;
}
.stempel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.stempel-btn {
  width: 100%;
  min-height: 3.4rem;
  font-size: 1.15rem;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  touch-action: manipulation;
}
.stempel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.stempel-btn-in { background: #15803d; }
.stempel-btn-out { background: #7f1d1d; }
.stempel-btn-pause { background: #b45309; }
.stempel-pause-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.stempel-msg {
  min-height: 1.4rem;
  font-weight: 600;
  margin: 0.5rem 0 0 !important;
}
.stempel-msg.ok { color: var(--ok); }
.stempel-msg.err { color: var(--err); }
.stempel-today {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stempel-today li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.stempel-today li.denied { color: var(--err); }
.stempel-today li.ok { color: var(--ink); }
.row-denied td { background: #fef2f2; color: #7f1d1d; }

/* Bordeaux accent touch (Hotel) — Stempel primary */
:root {
  --bordeaux: #7f1d1d;
  --bordeaux-soft: #fef2f2;
}

/* MA einfach — großer als Planday */
.stempel-btn-huge {
  min-height: 4.5rem !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  border-radius: 16px !important;
  margin-bottom: 0.35rem;
}
.stempel-btn-pause-end { background: #0f766e; }
.stempel-today-title { font-size: 1rem; margin: 0 0 0.5rem; }
.stempel-today-card { padding-top: 0.9rem; }
.stempel-gps-line { text-align: center; font-size: 0.85rem; }

.ma-big-tile {
  display: block;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none !important;
  min-height: 5rem;
}
.ma-big-tile:active, .ma-big-tile:hover {
  border-color: var(--bordeaux, #7f1d1d);
  background: var(--bordeaux-soft, #fef2f2);
}
.ma-big-tile-stempel {
  border-color: #7f1d1d;
  background: linear-gradient(160deg, #fef2f2, #fff 70%);
}
.ma-big-tile-title {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
}
.ma-big-tile-sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.ma-more {
  margin: 1.25rem 0;
  color: var(--muted);
}
.ma-more summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem;
  list-style: none;
}
.ma-more summary::-webkit-details-marker { display: none; }

/* ——— Schritt 2: Positions-Board (einfacher als Planday) ——— */
.board-hero .board-week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}
.board-week-label {
  text-align: center;
  flex: 1 1 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.board-prefill {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bordeaux, #7f1d1d);
  margin: 0 0 0.75rem;
}
.board-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.touch-select, .touch-input {
  min-height: 3rem !important;
  font-size: 1.05rem !important;
}
.pos-board-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
}
.pos-board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  font-size: 0.9rem;
}
.pos-board th, .pos-board td {
  border: 1px solid var(--border);
  vertical-align: top;
  padding: 0.35rem;
}
.pos-board thead th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
  font-weight: 700;
}
.pos-board .pos-col {
  min-width: 7.5rem;
  text-align: left;
}
.pos-board .day-col.today,
.pos-board td.today {
  background: #fef2f2;
}
.pos-board .day-col .wd { display: block; font-size: 0.85rem; }
.pos-board .day-col .dt { display: block; color: var(--muted); font-weight: 600; }
.pos-cat td {
  background: var(--cat-color, #1e293b);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.45rem 0.6rem;
}
.pos-cat-name { margin-right: 0.75rem; }
.pos-cat-meta { font-weight: 600; opacity: 0.75; font-size: 0.8rem; }
.pos-name {
  background: #f1f5f9;
  font-weight: 700;
  text-align: left !important;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 7.5rem;
}
.pos-cell {
  min-width: 5.5rem;
  min-height: 4.5rem;
  background: #fff;
}
.pos-chip {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  background: #16a34a;
  border: 1px solid #15803d;
  border-radius: 8px;
  margin-bottom: 0.3rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.pos-chip.protected {
  background: #ca8a04;
  border-color: #a16207;
}
.pos-chip.open {
  background: #64748b;
  border-style: dashed;
  border-color: #475569;
}
.pos-chip-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.45rem;
  text-decoration: none !important;
  color: #fff !important;
  min-height: 2.8rem;
}
.pos-chip-main .who { font-weight: 700; font-size: 0.88rem; line-height: 1.2; color: #fff; }
.pos-chip-main .when { font-size: 0.78rem; color: rgba(255,255,255,0.9); margin-top: 0.1rem; }
.tpl-chip {
  background: #fff;
  border: 1px solid #cbd5e1;
}
.tpl-chip .pos-chip-main { color: #0f172a !important; }
.tpl-chip .pos-chip-main .who { color: #0f172a; }
.tpl-chip .pos-chip-main .when { color: #64748b; }
.tpl-chip.open { background: #f8fafc; border-style: dashed; }
.pos-chip-del { display: flex; }
.pos-chip-del .btn-tiny {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  padding: 0 0.4rem;
  min-width: 2rem;
  cursor: pointer;
}
.tpl-chip .pos-chip-del .btn-tiny { color: #991b1b; }
.pos-add {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none !important;
  background: #f8fafc;
}
.pos-add:active, .pos-add:hover {
  border-color: var(--bordeaux, #7f1d1d);
  color: var(--bordeaux, #7f1d1d);
  background: var(--bordeaux-soft, #fef2f2);
}
@media (max-width: 700px) {
  .board-week-nav .btn-touch { flex: 1 1 40%; min-height: 3.25rem; }
  .pos-board { font-size: 0.82rem; min-width: 640px; }
  .pos-add { min-height: 3rem; }
}

/* Urlaubsanspruch Balance (MA) */
.urlaub-balance {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.urlaub-balance-item {
  flex: 1 1 5.5rem;
  text-align: center;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
}
.urlaub-balance-rest {
  background: #ecfdf5;
}
.urlaub-balance-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}
.urlaub-balance-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ——— Schritt 4: MA-Portal ——— */
.ma-status-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.35rem;
}
.ma-status-offen { background: #ffedd5; color: #9a3412; }
.ma-status-genehmigt { background: #dcfce7; color: #166534; }
.ma-status-abgelehnt { background: #fee2e2; color: #991b1b; }
.ma-shift-today {
  border-color: #7f1d1d;
  background: #fef2f2;
}
.ma-shift-card .pos {
  font-size: 0.9rem;
  color: #7f1d1d;
  font-weight: 600;
  margin-top: 0.15rem;
}
.ma-next-shift {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
}
.ma-next-shift strong { display: block; font-size: 1.05rem; margin-bottom: 0.2rem; }
.ma-profile-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.ma-profile-row:last-child { border-bottom: none; }
.ma-profile-label { font-size: 0.85rem; color: var(--muted); }
.ma-profile-value { font-size: 1.1rem; font-weight: 600; }
.leave-form label { display: block; margin-top: 0.75rem; font-weight: 600; }
.leave-form input[type="date"],
.leave-form input[type="text"],
.leave-form textarea {
  width: 100%;
  min-height: 3rem;
  font-size: 1.05rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-sizing: border-box;
}
.leave-form textarea { min-height: 4.5rem; resize: vertical; }
.urlaub-balance-pending {
  background: #ffedd5;
}


/* Passwort anzeigen / verbergen */
.pw-field { position: relative; }
.pw-toggle {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid #334155;
  background: #f1f5f9;
  color: #0f172a;
  cursor: pointer;
}
.pw-toggle[aria-pressed="true"] {
  background: #dbeafe;
  border-color: #1d4ed8;
}
.copy-box {
  word-break: break-all;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  padding: 0.85rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  margin: 0.4rem 0 0.8rem;
}
.btn-touch-lg {
  display: block;
  width: 100%;
  padding: 1.1rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0.5rem 0;
  text-align: center;
  border-radius: 12px;
}
.auth-hint { font-size: 1rem; line-height: 1.4; }

/* ——— Planday-Parity Dashboard / Schichten ——— */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 900px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
.dash-widget h3 { margin-top: 0; font-size: 1.15rem; }
.dash-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.dash-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
  line-height: 1.4;
}
.dash-list li:last-child { border-bottom: none; }
.shift-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.shift-nav .btn { flex: 1 1 8rem; text-align: center; }

/* ——— Planday-ähnliche Admin-Nav ——— */
.pd-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem 0.5rem;
  margin: 0 0 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.pd-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  margin-right: 0.25rem;
}
.pd-nav-item {
  display: inline-block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #0f172a !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.pd-nav-item:hover { background: #f1f5f9; }
.pd-nav-item.is-active {
  background: #dbeafe;
  color: #1e40af !important;
}
.pd-nav-muted { opacity: 0.55; }
.pd-nav-spacer { flex: 1 1 auto; }
.pd-nav-out { color: #64748b !important; }
.pd-page-head { margin-bottom: 0.75rem; }
.pd-page-head h2 { margin: 0 0 0.25rem; }
.pd-hotel { font-size: 1.35rem; margin: 0; }
.pd-subtabs { margin-top: 0.35rem; }
.pd-subtab {
  display: inline-block;
  padding: 0.35rem 0;
  margin-right: 1rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}
.pd-subtab.is-active { border-bottom-color: #2563eb; color: #1e40af; }

.pd-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}
.pd-view-tab {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
  text-decoration: none !important;
  color: #334155 !important;
}
.pd-view-tab.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af !important;
}

.pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.75rem;
}
.pending-donut {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  background: conic-gradient(#14b8a6 0 40%, #22c55e 40% 75%, #e2e8f0 75% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pending-donut-inner {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.pending-donut-inner strong { font-size: 1.4rem; }
.pending-donut-inner span { font-size: 0.75rem; color: var(--muted); }
.pending-legend { list-style: none; padding: 0; margin: 0; }
.pending-legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 1rem;
}
.pending-legend a { color: inherit; text-decoration: none; }
.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  display: inline-block;
}
.dot-teal { background: #14b8a6; }
.dot-green { background: #22c55e; }
.dot-orange { background: #f97316; }
.dot-blue { background: #2563eb; }
.dot-grey { background: #94a3b8; }
.dash-widget-wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .dash-widget-wide { grid-column: 1 / -1; }
}
.stunden-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.lohnkosten-stub { margin-top: 0.5rem; }
.lk-row { padding: 0.35rem 0; }

@media (max-width: 720px) {
  .pd-topnav { position: static; }
  .pd-nav-item { font-size: 0.88rem; padding: 0.45rem 0.55rem; }
}


/* ——— Wochenboard / Vorlagen (Planday-ähnlich, einfacher) ——— */
.board-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}
.board-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pd-view-badge {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
}
.tpl-stunden-footer th,
.tpl-stunden-footer td {
  background: #1e3a5f !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.55rem 0.35rem !important;
}
.tpl-stunden-footer th { text-align: left !important; letter-spacing: 0.04em; }

.vorlagen-dd { position: relative; }
.vorlagen-dd > summary {
  list-style: none;
  cursor: pointer;
}
.vorlagen-dd > summary::-webkit-details-marker { display: none; }
.vorlagen-dd-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 40;
  min-width: 18rem;
  max-width: min(92vw, 22rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,0.18);
  padding: 0.35rem 0;
}
.vorlagen-dd-head {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem 0.35rem;
  color: #334155;
}
.vorlagen-dd-list { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow-y: auto; }
.vorlagen-dd-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-top: 1px solid #f1f5f9;
}
.vorlagen-dd-apply { flex: 1; min-width: 0; }
.vorlagen-dd-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem 0.35rem;
  border-radius: 8px;
}
.vorlagen-dd-name:hover { background: #f1f5f9; }
.vorlagen-dd-icon, .vorlagen-dd-del button {
  border: none;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  text-decoration: none;
  color: #475569;
  font-size: 1rem;
}
.vorlagen-dd-foot {
  border-top: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.vorlagen-list { list-style: none; margin: 0; padding: 0; }
.vorlagen-list-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.vorlagen-list-actions { display: flex; gap: 0.35rem; }
.empty-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

/* Vorlagen-Editor */
.tpl-editor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
}
.tpl-editor-title-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
.tpl-title-input {
  font-size: 1.35rem !important;
  font-weight: 800;
  border: none !important;
  border-bottom: 2px solid #e2e8f0 !important;
  border-radius: 0 !important;
  min-width: min(70vw, 22rem);
  padding: 0.25rem 0.15rem !important;
  background: transparent !important;
}
.tpl-area-tag { color: #64748b; font-weight: 700; }
.tpl-editor-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tpl-week-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  background: #1e293b;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}
.tpl-week-tile {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #334155;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none !important;
  border: 2px solid transparent;
}
.tpl-week-tile.is-active {
  background: #2563eb;
  border-color: #93c5fd;
}
.tpl-week-add {
  flex-direction: column;
  gap: 0.1rem;
  background: transparent;
  border: 2px dashed #64748b;
  color: #cbd5e1 !important;
  font-size: 0.95rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}
.tpl-week-add span { font-size: 0.65rem; font-weight: 600; }
.tpl-week-add-form { display: inline; margin: 0; }
.tpl-editor.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #f8fafc;
  overflow: auto;
  padding: 0.75rem 1rem 2rem;
}
@media (max-width: 700px) {
  .vorlagen-dd-panel { right: auto; left: 0; }
  .tpl-title-input { font-size: 1.1rem !important; min-width: 12rem; }
}

/* ——— Mitarbeiter-Liste (Planday-ähnlich, einfacher) ——— */
.wrap:has(.ma-emp-layout),
.wrap:has(.ma-emp-detail-header) {
  max-width: 1200px;
}
.ma-emp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 860px) {
  .ma-emp-layout {
    grid-template-columns: 240px 1fr;
    align-items: start;
  }
}
.ma-emp-sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 0.6rem;
}
.ma-emp-sidebar-title {
  margin: 0.35rem 0.6rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ma-emp-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none !important;
  min-height: 2.75rem;
}
.ma-emp-side-item:hover { background: #f5f5f4; }
.ma-emp-side-item.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}
.ma-emp-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #e7e5e4;
  font-size: 0.85rem;
  font-weight: 700;
}
.ma-emp-side-item.is-active .ma-emp-count {
  background: #1d4ed8;
  color: #fff;
}
.ma-emp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ma-emp-heading { margin: 0; font-size: 1.25rem; }
.ma-emp-create-btn {
  width: auto !important;
  display: inline-block !important;
  margin: 0 !important;
  white-space: nowrap;
}
.ma-emp-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.ma-emp-search {
  flex: 1 1 12rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
}
.ma-emp-table tbody tr.ma-emp-row { cursor: pointer; }
.ma-emp-name-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none !important;
}
.ma-emp-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  object-fit: cover;
}
.ma-emp-avatar-lg { width: 3.25rem; height: 3.25rem; font-size: 1rem; }
.ma-emp-avatar-img { padding: 0; }
.ma-emp-avatar-preview {
  width: 6rem; height: 6rem; border-radius: 999px; object-fit: cover;
  border: 2px solid var(--border);
}

/* Detail header + tabs */
.ma-emp-detail-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.ma-emp-detail-ident {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}
.ma-emp-detail-kicker {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.ma-emp-detail-name { margin: 0.1rem 0; font-size: 1.35rem; }
.ma-emp-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}
.ma-emp-save-btn {
  width: auto !important;
  display: inline-block !important;
  margin: 0 !important;
  background: #1d4ed8;
}
.ma-emp-actions { position: relative; }
.ma-emp-actions > summary {
  list-style: none;
  cursor: pointer;
}
.ma-emp-actions > summary::-webkit-details-marker { display: none; }
.ma-emp-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 50;
  min-width: 16rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ma-emp-action-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none !important;
}
.ma-emp-action-btn:hover { background: #f5f5f4; }
.ma-emp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  margin-top: 0.25rem;
}
.ma-emp-tab {
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none !important;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}
.ma-emp-tab:hover { background: #f5f5f4; color: var(--ink); }
.ma-emp-tab.is-active {
  color: #1d4ed8;
  box-shadow: inset 0 -3px 0 #1d4ed8;
  border-radius: 8px 8px 0 0;
}
.ma-emp-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 800px) {
  .ma-emp-two-col { grid-template-columns: 1fr 1fr; }
}
.ma-emp-abteilung-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.ma-emp-abteilung-select {
  font-size: 1.1rem;
  font-weight: 700;
  min-height: 2.85rem;
}
.ma-emp-month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.ma-emp-save-bar { margin-top: 0.5rem; }
.ma-emp-dialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  max-width: 26rem;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow);
}
.ma-emp-dialog::backdrop { background: rgba(15, 23, 42, 0.35); }
.ma-emp-welcome-text {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: #e2e8f0;
}
.ma-emp-action-panel { border-left: 4px solid #1d4ed8; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

/* ——— Stundenlisten (editierbare Schichten) ——— */
.stunden-head { margin-bottom: 0.5rem; }
.stunden-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}
.stunden-filter .input-lg,
.stunden-table .input-lg {
  min-height: 2.75rem;
  font-size: 1.05rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1.5px solid var(--border, #cbd5e1);
  width: 100%;
  box-sizing: border-box;
}
.stunden-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.stunden-count { font-weight: 600; color: #334155; }
.btn-approve { font-size: 1.05rem; padding: 0.65rem 1.1rem; }
.stunden-table-wrap { overflow-x: auto; }
.stunden-table th { white-space: nowrap; font-size: 0.82rem; }
.stunden-table td { vertical-align: middle; }
.stunden-table .col-check { width: 2.2rem; text-align: center; }
.stunden-table .col-check input { width: 1.25rem; height: 1.25rem; }
.stunden-table .col-name { font-weight: 600; min-width: 8rem; }
.stunden-table .col-planned,
.stunden-table .col-clock { white-space: nowrap; color: #475569; }
.zeit-inputs { display: flex; align-items: center; gap: 0.35rem; min-width: 11rem; }
.zeit-inputs .zeit-in,
.zeit-inputs .zeit-out,
.col-break .break-in { width: 4.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.zeit-sep { color: #64748b; font-weight: 700; }
.hint-inline { font-weight: 400; color: #94a3b8; font-size: 0.75rem; }
.pos-select { min-width: 9rem; max-width: 12rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.btn-sm { padding: 0.4rem 0.7rem !important; font-size: 0.92rem !important; }
.stunden-row.is-pending { background: #fffbeb; }
.stunden-row.is-ok { background: #f0fdf4; }
.stunden-row.is-incomplete { background: #fef2f2; }
.stunden-row.is-incomplete .zeit-out { border-color: #f87171; }
@media (max-width: 900px) {
  .stunden-table .col-planned { display: none; }
}

/* Mehrfachauswahl Personalgruppen (Mitarbeiter → Anstellung) */
.gruppen-wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.gruppen-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  font-weight: normal;
  cursor: pointer;
  user-select: none;
}
.gruppen-option:has(input:checked) {
  border-color: #0f766e;
  background: #ecfdf5;
  font-weight: 600;
}
.gruppen-option input {
  margin: 0;
}

/* Dienstplan-Zeilen: Bereich und Wochenstunden unter dem Namen (wie Planday) */
.pos-row-group,
.pos-row-meta {
  display: block;
  font-weight: normal;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #64748b;
}
.pos-row-group {
  color: #0f766e;
}

/* Abwesenheit im Dienstplan (Urlaub, Krankenstand, Berufsschule) */
.pos-chip .when.abwesend {
  color: #b45309;
  font-weight: 600;
}

/* ——— Dienstplan: Dialog an der Zelle statt Formular am Seitenende ——— */
.board-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2vh 1rem 4vh;
  overflow-y: auto;
}
.board-modal[hidden] { display: none; }
.board-modal-hintergrund {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.board-modal-box {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 96vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
.board-modal-zu {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}
body.modal-offen { overflow: hidden; }

/* Auswahl mehrerer Schichten */
.pos-chip { position: relative; }
.pos-chip-pick {
  position: absolute;
  top: 2px;
  left: 2px;
  display: none;
  cursor: pointer;
}
.pos-chip:hover .pos-chip-pick,
.pos-chip-pick:has(input:checked) { display: block; }
.pos-chip-pick input { margin: 0; }
.pos-chip:has(.chip-check:checked) { outline: 2px solid #0f766e; }

button.pos-chip-main {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
button.pos-add {
  border: 1px dashed #cbd5e1;
  background: transparent;
  cursor: pointer;
}

.board-auswahl {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
}
.board-auswahl[hidden] { display: none; }
.board-auswahl .btn { margin: 0; }

/* Wochensumme beim Mitarbeiternamen */
.pos-row-summe {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #0f766e;
}
.pos-row-summe.leer {
  color: #94a3b8;
  font-weight: normal;
}

/* Vorlagen-Editor: Gesamtsumme in der Stundenzeile */
.tpl-stunden-gesamt {
  display: block;
  font-weight: 700;
  color: #0f766e;
}

/* ═══════════════════════════════════════════════════════════════
   Vorlagen-Editor — Aufmachung wie Planday (Chef 2026-09-20)
   Dunkler Kopf mit Wochenkacheln, ruhiges Raster, fixierte Summenzeile.
   ═══════════════════════════════════════════════════════════════ */

.tpl-editor {
  background: #fff;
  margin: -1rem -1rem 0;
  border-radius: 0;
}

/* ——— Kopfleiste ——— */
.tpl-editor-bar {
  background: #16202e;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: 0;
  gap: 1rem;
}
.tpl-editor-bar .tpl-title-input {
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 1.15rem !important;
  font-weight: 600;
  padding: 0.2rem 0 !important;
}
.tpl-editor-bar .tpl-title-input:focus {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}
.tpl-editor-bar .tpl-area-tag { color: #94a3b8; font-weight: 500; }
.tpl-editor-actions .btn {
  background: #2b3949;
  color: #e2e8f0;
  border: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}
.tpl-editor-actions .btn:not(.secondary) { background: #2563eb; color: #fff; }

/* ——— Wochenkacheln ——— */
.tpl-week-bar {
  background: #16202e;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.2rem 1rem 1.6rem;
  border: 0;
  flex-wrap: wrap;
}
.tpl-week-tile {
  width: 104px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #212e3e;
  color: #fff;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 1.7rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  margin-bottom: 1.4rem;
}
.tpl-week-tile::after {
  content: "Woche " attr(data-woche);
  position: absolute;
  bottom: -1.35rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: #cbd5e1;
}
.tpl-week-tile:hover { background: #2b3b4e; }
.tpl-week-tile.is-active {
  border-color: #3b82f6;
  background: #16202e;
}
.tpl-week-add {
  background: transparent;
  border: 2px dashed #46566b;
  color: #3b82f6;
  font-size: 1.5rem;
  cursor: pointer;
}
.tpl-week-add span {
  position: absolute;
  bottom: -1.35rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* ——— Reiter Mitarbeiter / Positionen ——— */
.tpl-editor .tpl-view-tabs {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  align-items: center;
  gap: 0;
}
.tpl-editor .tpl-view-tabs .pd-view-tab {
  border: 1px solid #cbd5e1;
  border-right: 0;
  border-radius: 0;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  color: #475569;
  background: #fff;
}
.tpl-editor .tpl-view-tabs .pd-view-tab:first-of-type { border-radius: 5px 0 0 5px; }
.tpl-editor .tpl-view-tabs .pd-view-tab:last-of-type {
  border-right: 1px solid #cbd5e1;
  border-radius: 0 5px 5px 0;
}
.tpl-editor .tpl-view-tabs .pd-view-tab.is-active {
  color: #2563eb;
  border-color: #2563eb;
  font-weight: 600;
}

/* ——— Raster ——— */
.tpl-grid-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
.tpl-board { border-collapse: collapse; width: 100%; }
.tpl-board thead th {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.9rem 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
}
.tpl-board thead th.pos-col { width: 240px; }
.tpl-board thead .dt { display: none; }

.tpl-board tbody td,
.tpl-board tbody th {
  border-bottom: 1px solid #eef2f6;
  border-right: 1px solid #eef2f6;
  vertical-align: top;
  padding: 0.35rem;
}
.tpl-board tbody th.pos-name {
  background: #fff;
  padding: 0.7rem 0.75rem;
  font-weight: 500;
  text-align: left;
  width: 240px;
}

/* Mitarbeiterzeile mit Avatar */
.tpl-board th.pos-name.ist-mitarbeiter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tpl-avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #475569;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tpl-person { display: flex; flex-direction: column; line-height: 1.25; }
.tpl-person-name { font-size: 0.9rem; color: #0f172a; }
.tpl-person-std { font-size: 0.72rem; color: #64748b; }
.tpl-person-std.leer { color: #cbd5e1; }

/* Positionszeile */
.tpl-pos-name { display: block; font-size: 0.9rem; color: #0f172a; }
.tpl-pos-gruppe {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: normal;
}
.tpl-pos-gruppe::before { content: "◦ "; }

/* Bereichsbänder */
.tpl-board tr.pos-cat td {
  background: var(--cat-color, #94a3b8);
  padding: 0.35rem 0.9rem;
  border: 0;
}
.tpl-board .pos-cat-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
}
.tpl-board .pos-cat-meta {
  margin-left: 1.5rem;
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.75);
}

/* Karten */
.tpl-board .tpl-chip {
  background: #f1f5f9;
  border: 0;
  border-radius: 3px;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.3rem;
}
.tpl-board .tpl-chip .who {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  font-weight: normal;
}
.tpl-board .tpl-chip .when {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 500;
}
.tpl-board .pos-add {
  width: 100%;
  min-height: 28px;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  font-size: 1.1rem;
  opacity: 0;
}
.tpl-board .pos-cell:hover .pos-add { opacity: 1; color: #2563eb; }

/* Summenzeile */
.tpl-board tfoot { position: sticky; bottom: 0; }
.tpl-stunden-footer th,
.tpl-stunden-footer td {
  background: #fff;
  border-top: 1px solid #cbd5e1;
  padding: 0.7rem 0.75rem;
  font-size: 0.82rem;
  color: #334155;
  text-align: center;
}
.tpl-stunden-footer th {
  text-align: left !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.tpl-stunden-gesamt { color: #0f172a; font-weight: 700; }

@media (max-width: 900px) {
  .tpl-week-tile { width: 68px; height: 56px; font-size: 1.25rem; }
  .tpl-board thead th.pos-col,
  .tpl-board tbody th.pos-name { width: 150px; }
}

/* Auswahlzeilen im Anwenden-Dialog */
.wahl-zeile {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.35rem 0;
  font-weight: normal;
  cursor: pointer;
}
.wahl-zeile input { margin-top: 0.2rem; }

/* ——— Vorlagen-Editor: Feinschliff (volle Breite, keine Umbrüche) ——— */
.tpl-editor {
  /* aus dem schmalen Inhaltsrahmen ausbrechen — wie Planday über den Schirm */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.tpl-editor .pos-board-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.tpl-board { min-width: 1100px; }

/* Wochenkacheln: Platz für die Beschriftung darunter */
.tpl-week-bar { padding-bottom: 2.4rem; }
.tpl-week-tile { margin-bottom: 0; }
.tpl-week-tile::after,
.tpl-week-add span { bottom: -1.6rem; white-space: nowrap; }

/* Spaltenköpfe: nur der Wochentag, wie in der Vorlage */
.tpl-board thead th .dt { display: none !important; }
.tpl-board thead th .wd { display: block; }
.tpl-board thead th.day-col { min-width: 132px; }

/* Zeiten bleiben einzeilig */
.tpl-board .tpl-chip .when { white-space: nowrap; }
.tpl-board .tpl-chip .who {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Löschen erst beim Überfahren, damit das Raster ruhig bleibt */
.tpl-board .tpl-chip .pos-chip-del {
  position: absolute;
  top: 2px;
  right: 4px;
  opacity: 0;
}
.tpl-board .tpl-chip { position: relative; }
.tpl-board .tpl-chip:hover .pos-chip-del { opacity: 1; }
.tpl-board .tpl-chip .pos-chip-del .btn-tiny {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1;
}
.tpl-board .tpl-chip:hover .pos-chip-del .btn-tiny { color: #dc2626; }

/* "Woche hinzufügen" braucht mehr Platz als die Zahlkacheln */
.tpl-week-add { width: 132px; }
.tpl-week-add span { font-size: 0.72rem; }

/* Das Plus-Feld hat seine eigene Beschriftung — keine zweite dazu */
.tpl-week-add::after { content: none !important; }

/* Erste Spalte nicht am Bildschirmrand kleben lassen */
.tpl-board thead th.pos-col,
.tpl-board tbody th.pos-name { padding-left: 1.1rem; }
.tpl-board tr.pos-cat td { padding-left: 1.1rem; }
.tpl-stunden-footer th { padding-left: 1.1rem; }

/* ——— Vorlagen-Editor: etwas kompakter (Chef: „ein wenig kleiner") ——— */
.tpl-week-bar { padding: 0.9rem 1rem 2rem; gap: 0.7rem; }
.tpl-week-tile { width: 82px; height: 56px; font-size: 1.35rem; }
.tpl-week-add { width: 112px; font-size: 1.2rem; }
.tpl-week-tile::after,
.tpl-week-add span { bottom: -1.4rem; font-size: 0.72rem; }

.tpl-editor-bar { padding: 0.5rem 1.1rem; }
.tpl-editor-bar .tpl-title-input { font-size: 1rem !important; }
.tpl-editor-actions .btn { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.tpl-board thead th { padding: 0.6rem 0.4rem; font-size: 0.85rem; }
.tpl-board thead th.day-col { min-width: 118px; }
.tpl-board thead th.pos-col,
.tpl-board tbody th.pos-name { width: 200px; }
.tpl-board tbody td,
.tpl-board tbody th { padding: 0.25rem; }
.tpl-board tbody th.pos-name { padding: 0.5rem 0.75rem 0.5rem 1.1rem; }

.tpl-avatar { width: 26px; height: 26px; font-size: 0.66rem; }
.tpl-person-name { font-size: 0.83rem; }
.tpl-person-std { font-size: 0.68rem; }
.tpl-pos-name { font-size: 0.83rem; }
.tpl-pos-gruppe { font-size: 0.68rem; }

.tpl-board .tpl-chip { padding: 0.32rem 0.5rem; margin-bottom: 0.22rem; }
.tpl-board .tpl-chip .who { font-size: 0.7rem; }
.tpl-board .tpl-chip .when { font-size: 0.85rem; }

.tpl-board tr.pos-cat td { padding: 0.28rem 1.1rem; }
.tpl-board .pos-cat-name { font-size: 0.8rem; }
.tpl-board .pos-cat-meta { font-size: 0.72rem; margin-left: 1.1rem; }

.tpl-stunden-footer th,
.tpl-stunden-footer td { padding: 0.5rem 0.75rem; font-size: 0.78rem; }

/* Kopfleiste: zwischen den 6-Wochen-Plänen wechseln */
.tpl-editor-plaene {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.tpl-wechsel {
  background: #22303f;
  color: #e2e8f0;
  border: 1px solid #3b4a5c;
  border-radius: 5px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  max-width: 260px;
}
.tpl-neu-knopf { white-space: nowrap; }
.tpl-anwenden-knopf { background: #0f766e !important; color: #fff !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-klein { padding: 0.3rem 0.7rem !important; font-size: 0.78rem !important; }

/* Monatsstunden im Mitarbeiter-Portal */
.ma-monats-tabelle { width: 100%; border-collapse: collapse; }
.ma-monats-tabelle th,
.ma-monats-tabelle td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  font-weight: normal;
}
.ma-monats-tabelle th { font-weight: 600; }
.ma-monats-tabelle .std {
  text-align: right;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}
.ma-monats-tabelle tr.laufend { background: #f0fdfa; }
.wochen-summe {
  float: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f766e;
}
.monats-summe {
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  background: #f0fdfa;
  border-radius: 6px;
}

/* Link auf die eigenständige Stundenplan-App */
.pd-nav-extern { opacity: 0.9; }
.pd-nav-extern::after { content: ""; }

/* Mehrere Tage auf einmal anlegen (Vorlagen-Dialog) */
.tage-wahl { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tage-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-weight: normal;
  cursor: pointer;
  min-width: 3.2rem;
  justify-content: center;
}
.tage-option:has(input:checked) {
  border-color: #0f766e;
  background: #ecfdf5;
  font-weight: 600;
}
.tage-option input { margin: 0; }
.btn-mini {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 5px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 0.25rem;
}
.btn-mini:hover { border-color: #0f766e; color: #0f766e; }

/* ——— Selbst-Onboarding MA (2026-09-28): Tablet, große Knöpfe ——— */
.onb-card { max-width: 860px; margin-left: auto; margin-right: auto; }
.onb-steps { list-style: none; display: flex; gap: 0.5rem; padding: 0; margin: 0 0 0.5rem; flex-wrap: wrap; }
.onb-steps li { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.7rem; border-radius: 999px; background: #f1f5f9; color: #475569; font-weight: 600; }
.onb-steps li.current { background: #1d4ed8; color: #fff; }
.onb-steps li.done { background: #dcfce7; color: #166534; }
.onb-num { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; align-items: center; justify-content: center; background: rgba(255,255,255,0.6); color: inherit; }
.onb-form input[type="text"], .onb-form input:not([type]), .onb-form input[type="email"], .onb-form input[type="tel"], .onb-form input[type="date"] { font-size: 1.2rem; padding: 0.75rem; min-height: 3rem; width: 100%; box-sizing: border-box; }
.onb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.onb-grid-plz { grid-template-columns: 8rem 1fr; }
@media (max-width: 640px) { .onb-grid, .onb-grid-plz { grid-template-columns: 1fr; } }
.onb-check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.onb-check { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.9rem 1rem; border: 2px solid #cbd5e1; border-radius: 12px; cursor: pointer; font-size: 1.1rem; background: #fff; }
.onb-check input[type="checkbox"] { width: 2rem; height: 2rem; flex: 0 0 auto; margin-top: 0.1rem; }
.onb-check:has(input:checked) { border-color: #16a34a; background: #f0fdf4; }
.onb-check-text small { display: block; color: #64748b; font-size: 0.95rem; margin-top: 0.2rem; }
.onb-sig-wrap { border: 2px dashed #94a3b8; border-radius: 12px; background: #fff; touch-action: none; }
.onb-sig { width: 100%; height: auto; aspect-ratio: 3 / 1; display: block; touch-action: none; cursor: crosshair; border-radius: 12px; }
.onb-sig-view { max-width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.table-compact { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table-compact th, .table-compact td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
