/* ── Variables ── */
:root {
  --primary: #993333;
  --primary-light: #fdf6f6;
  --bg: #f5f2ef;
  --card: #fff;
  --text: #333;
  --text-light: #717171;
  --border: #e0dbd5;

  --offen: #c4880d;
  --offen-bg: #fef3e0;
  --in-arbeit: #2563eb;
  --in-arbeit-bg: #dbeafe;
  --fertig: #16803c;
  --fertig-bg: #dcfce7;
  --geprueft: #6d28d9;
  --geprueft-bg: #ede9fe;

  --priorsbau: #b8ddb0;
  --altbau: #f0b0b0;
  --neubau: #fde68a;
  --verbindungsbau: #d5c8e8;
  --esh: #d9d9d9;
  --morimond: #c8d8e8;
  --extern: #e8e8e8;

  --header-h: 48px;
  --radius: 8px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: Calibri, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ── Login Overlay ── */
.overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.login-box { width: 100%; max-width: 320px; }
.login-header { text-align: center; margin-bottom: 28px; }
.login-brand {
  font-family: Georgia, serif;
  font-size: 12px; letter-spacing: 3px;
  color: var(--text-light);
}
.login-title {
  font-family: Georgia, serif;
  font-size: 20px; color: var(--text);
  margin-top: 4px;
}
.login-step[hidden] { display: none; }
.login-label {
  font-size: 12px; color: var(--text-light);
  text-align: center; margin-bottom: 10px;
}

/* User List */
.user-list { display: flex; flex-direction: column; gap: 6px; }
.user-btn {
  width: 100%; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-family: inherit;
  transition: border-color 0.15s;
}
.user-btn:active { border-color: var(--primary); }
.user-role-tag {
  font-size: 10px; color: var(--text-light);
  background: #f0ede9; padding: 2px 8px;
  border-radius: 4px;
}

/* PIN Pad */
.pin-user-name { font-size: 14px; text-align: center; margin-bottom: 8px; }
.pin-dots {
  font-size: 22px; letter-spacing: 10px;
  text-align: center; margin-bottom: 6px;
  font-family: monospace;
}
.pin-error {
  font-size: 11px; color: var(--primary);
  text-align: center; margin-bottom: 6px;
}
.pin-error[hidden] { display: none; }
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 5px; max-width: 220px; margin: 0 auto;
}
.pin-key {
  height: 46px; border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card); font-size: 18px;
  cursor: pointer; font-family: inherit;
  transition: background 0.1s;
}
.pin-key:active { background: #f0ede9; }
.pin-key--action { font-size: 13px; }
.pin-key--primary {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.pin-key--primary:active { background: #7a2929; }
.pin-back {
  display: block; margin: 10px auto 0;
  background: none; border: none;
  color: var(--text-light); font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.lockout-msg {
  text-align: center; color: var(--primary);
  font-size: 13px; padding: 20px;
}

/* ── App Header ── */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-bottom: 3px solid var(--primary);
  padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center;
  height: var(--header-h);
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-title { font-family: Georgia, serif; font-size: 14px; }
.header-user { font-size: 10px; color: var(--text-light); }
.header-right { display: flex; align-items: center; gap: 8px; }
.badge {
  background: var(--offen); color: #fff;
  border-radius: 10px; padding: 2px 7px;
  font-size: 11px; font-weight: 700;
  min-width: 22px; text-align: center;
}
.badge[hidden] { display: none; }
.offline-tag {
  background: var(--primary); color: #fff;
  border-radius: 4px; padding: 2px 6px;
  font-size: 9px; font-weight: 600;
}
.offline-tag[hidden] { display: none; }
.btn-logout {
  background: none; border: 1px solid var(--border);
  border-radius: 5px; padding: 4px 10px;
  font-size: 11px; cursor: pointer;
  color: var(--text-light); font-family: inherit;
}

/* ── Notification Banner ── */
.notify-banner {
  background: var(--in-arbeit-bg);
  border-bottom: 1px solid var(--in-arbeit);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  animation: slideDown 0.3s ease-out;
}
.notify-banner[hidden] { display: none; }
.notify-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--in-arbeit); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.notify-title { font-size: 13px; font-weight: 600; color: var(--in-arbeit); }
.notify-body { font-size: 10px; color: var(--text-light); }
.notify-close {
  margin-left: auto; background: none; border: none;
  font-size: 18px; cursor: pointer; color: var(--text-light);
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Main Content ── */
.app-content { padding: 10px; }

/* ── Status Bar ── */
.status-bar { display: flex; gap: 5px; margin-bottom: 10px; }
.status-card {
  flex: 1; border-radius: 6px; padding: 6px;
  text-align: center;
}
.status-card--offen { background: var(--offen-bg); color: var(--offen); }
.status-card--in_arbeit { background: var(--in-arbeit-bg); color: var(--in-arbeit); }
.status-card--fertig { background: var(--fertig-bg); color: var(--fertig); }
.status-count { font-size: 18px; font-weight: 700; }
.status-label { font-size: 9px; }

/* ── Progress Card (Leitung) ── */
.progress-card {
  background: var(--card); border-radius: 10px;
  padding: 14px; border: 1px solid var(--border);
  margin-bottom: 10px; text-align: center;
}
.progress-pct { font-size: 32px; font-weight: 700; }
.progress-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.progress-bar {
  height: 6px; background: #eee;
  border-radius: 3px; margin-top: 8px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.3s;
}
.progress-warn {
  margin-top: 6px; font-size: 11px;
  color: var(--offen); font-weight: 600;
}

/* ── Legend ── */
.legend { display: flex; gap: 6px; flex-wrap: wrap; font-size: 9px; margin-bottom: 8px; }
.legend-item { display: flex; align-items: center; gap: 3px; }
.legend-dot {
  width: 8px; height: 8px; border-radius: 2px;
  border: 1px solid transparent;
}

/* ── Plan Section ── */
.plan-section {
  border-radius: 6px; padding: 6px;
  margin-bottom: 5px;
}
.plan-section--priorsbau { background: var(--priorsbau); }
.plan-section--altbau { background: var(--altbau); }
.plan-section--neubau { background: var(--neubau); }
.plan-section--verbindungsbau { background: var(--verbindungsbau); }
.plan-section--esh { background: var(--esh); }
.plan-section--morimond { background: var(--morimond); }
.plan-section--extern { background: var(--extern); }

.plan-section-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 4px;
}
.plan-section-label { font-size: 12px; font-weight: 700; color: #333; }
.plan-section-bulk {
  font-size: 10px; padding: 3px 10px;
  border-radius: 4px; border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.7);
  cursor: pointer; color: #333; font-family: inherit;
  font-weight: 600;
}
.plan-row { display: flex; gap: 3px; margin-bottom: 3px; flex-wrap: nowrap; }

/* ── Room Cell ── */
.room-cell {
  width: 48px; height: 56px;
  border-radius: 5px; border: 2px solid #bbb;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0; cursor: default;
  transition: opacity 0.15s, box-shadow 0.15s;
  padding: 1px 4px; font-family: inherit;
  background: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.room-cell:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.room-cell--tappable { cursor: pointer; }
.room-cell--tappable:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.room-cell--selected { box-shadow: 0 0 0 2px var(--primary); border-color: var(--primary); }
.room-cell--dimmed { opacity: 0.15; }
.room-cell--prio { border-left: 3px solid var(--primary); }
.room-cell--offen { background: #fcecd0; border-color: #b07a0a; }
.room-cell--in_arbeit { background: #c9dcf7; border-color: #1d4ed8; }
.room-cell--fertig { background: #c5f0d0; border-color: #15803d; }
.room-cell--geprueft { background: #ddd6fe; border-color: #6d28d9; }
.room-cell--none { background: #f8f8f8; border-color: #bbb; }

.room-nr {
  font-size: 12px; font-weight: 700;
  line-height: 1; text-align: center;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 100%;
  padding: 0 2px; color: #222;
}
.room-cell--group .room-nr { font-size: 9px; font-weight: 600; }
.room-cell--group { height: 38px; }
.room-status-row {
  display: flex; align-items: center;
  gap: 3px; margin-top: 2px;
}
.room-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.room-assigned {
  font-size: 8px; color: #555;
  max-width: 38px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}
}

/* ── Edit Mode Toggle (Rezeption) ── */
.edit-toggle {
  padding: 4px 10px; border-radius: 5px;
  font-size: 10px; cursor: pointer;
  font-family: inherit; flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card); color: var(--text-light);
}
.edit-toggle--active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary); font-weight: 600;
}
.edit-warning {
  background: #fef3e0; border: 1px solid #f0c040;
  border-radius: 6px; padding: 6px 10px;
  font-size: 10px; color: #8a6d1b;
  margin-bottom: 8px;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--card); border-radius: 12px;
  padding: 18px; width: 100%; max-width: 340px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-title { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.modal-subtitle { font-size: 11px; color: var(--text-light); margin-bottom: 14px; }
.modal-section { margin-bottom: 14px; }
.modal-section-label { font-size: 11px; font-weight: 600; margin-bottom: 5px; }

.modal-status-row { display: flex; gap: 4px; }
.modal-status-btn {
  flex: 1; padding: 5px 2px; border-radius: 5px;
  font-size: 9px; cursor: pointer;
  font-weight: 600; font-family: inherit;
}

.modal-user-btn {
  width: 100%; padding: 10px 12px; border-radius: 6px;
  margin-bottom: 4px; cursor: pointer;
  font-size: 13px; text-align: left;
  font-family: inherit; border: 1.5px solid var(--border);
  background: var(--card);
}
.modal-user-btn--selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
.modal-user-btn--none {
  font-size: 12px; color: var(--text-light);
}

.modal-textarea {
  width: 100%; height: 54px; border-radius: 6px;
  border: 1px solid var(--border); padding: 8px;
  font-size: 12px; font-family: inherit; resize: none;
}

.modal-actions { display: flex; gap: 6px; }
.modal-btn {
  flex: 1; padding: 9px; border-radius: 6px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.modal-btn--cancel {
  border: 1px solid var(--border);
  background: var(--card);
}
.modal-btn--save {
  border: none; background: var(--primary);
  color: #fff; font-weight: 600;
}

/* ── Info text ── */
.info-text { font-size: 10px; color: var(--text-light); margin-bottom: 8px; }
.empty-msg { text-align: center; padding: 40px; color: var(--text-light); font-size: 14px; }

/* ── Scrollable plan ── */
.plan-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Admin ── */
.admin-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  border-bottom: 2px solid var(--border); padding-bottom: 4px;
}
.admin-tab {
  padding: 8px 16px; border: none; background: none;
  font-size: 13px; cursor: pointer; font-family: inherit;
  color: var(--text-light); border-radius: 6px 6px 0 0;
}
.admin-tab--active {
  color: var(--primary); font-weight: 600;
  background: var(--primary-light);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -6px;
}
.admin-info {
  background: #dbeafe; border: 1px solid var(--in-arbeit);
  border-radius: 6px; padding: 10px 12px;
  font-size: 11px; color: #1e40af; margin-bottom: 12px;
  line-height: 1.4;
}
.admin-section-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 8px;
}
.admin-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: center;
}
.admin-card--compact { padding: 8px 12px; }
.admin-card-main { flex: 1; min-width: 0; }
.admin-card-name { font-size: 13px; font-weight: 500; }
.admin-card-detail { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.admin-form { flex-direction: column; align-items: stretch; }
.admin-edit-btn {
  padding: 4px 10px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 11px; cursor: pointer; font-family: inherit;
  color: var(--text-light); flex-shrink: 0;
}
.admin-label {
  font-size: 11px; font-weight: 600; display: block; margin-bottom: 3px;
}
.admin-input {
  width: 100%; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border); font-size: 13px;
  font-family: inherit;
}
.admin-btn-primary {
  width: 100%; padding: 10px; border-radius: 6px;
  border: none; background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; margin-top: 8px;
}
.admin-toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; flex-shrink: 0; font-size: 11px;
}
.admin-toggle input { width: 16px; height: 16px; cursor: pointer; }
.admin-toggle-label { color: var(--text-light); }

/* ── Floor Tabs ── */
.floor-tabs {
  display: flex; gap: 0; margin-bottom: 10px;
  background: var(--card); border-radius: var(--radius);
  padding: 3px; border: 1px solid var(--border);
}
.floor-tab {
  flex: 1; padding: 8px 10px; border: none;
  border-radius: 6px; font-size: 12px; font-weight: 400;
  cursor: pointer; font-family: inherit;
  background: transparent; color: var(--text-light);
  transition: all 0.15s; white-space: nowrap;
}
.floor-tab--active {
  background: var(--primary); color: #fff; font-weight: 700;
}

/* ── Floor content ── */
.plan-floor {
  display: flex; flex-direction: column; gap: 6px;
}
.plan-floor > .plan-section {
  flex: 1 1 0; min-width: 180px;
}

/* ── Corridor (Flur line) ── */
.plan-flur {
  height: 2px;
  background: rgba(0,0,0,0.08);
  margin: 3px 0;
  border-radius: 1px;
}

/* ── L-Shape ── */
.plan-lshape {
  display: flex; gap: 0;
}
.plan-vert {
  display: flex; flex-direction: column;
  gap: 3px; margin-left: 3px;
}

/* ── Groups row ── */
.plan-row--groups {
  margin-top: 5px; flex-wrap: wrap;
}

/* ── Laundry summary ── */
.plan-laundry {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; padding: 4px 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 5px; font-size: 10px; color: #555;
}
.plan-laundry-icon { font-size: 13px; }

/* ── Half-width row (ESH EG+UG) ── */
.plan-half-row {
  display: flex; gap: 6px;
}
.plan-section--half {
  flex: 1 1 0; min-width: 120px;
}

/* ── Bed count in room cell ── */
.room-belegung {
  font-size: 9px; color: #1d4ed8;
  font-weight: 700; margin-top: 1px;
}

/* ── JBVS Reload button ── */
.btn-reload-jbvs {
  padding: 5px 12px; border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--card); font-size: 11px;
  cursor: pointer; font-family: inherit;
  color: var(--text-light); white-space: nowrap;
  flex-shrink: 0;
}
.btn-reload-jbvs:active { background: #f0ede9; }

/* ── Legend separator ── */
.legend-sep {
  width: 1px; height: 12px;
  background: #ccc; align-self: center;
}

/* ── Responsive: Wings nebeneinander auf breiten Screens ── */
@media (min-width: 700px) {
  .plan-floor {
    flex-direction: row; flex-wrap: wrap;
  }
}

/* ── Week Bar ── */
.week-bar {
  background: var(--card); border-radius: 10px;
  padding: 10px 12px; border: 1px solid var(--border);
  margin-bottom: 8px;
}
.week-bar-title {
  font-size: 11px; font-weight: 700; color: #444;
  margin-bottom: 6px;
}
.week-bar-days {
  display: flex; gap: 4px;
}
.week-day-btn {
  flex: 1; border: 1.5px solid transparent;
  border-radius: 8px; padding: 4px 2px;
  cursor: pointer; font-family: inherit;
  background: transparent; text-align: center;
  transition: all 0.15s;
}
.week-day-btn--sel {
  border-color: var(--primary);
  background: var(--primary-light);
}
.week-day-bar-wrap {
  height: 40px; display: flex;
  align-items: flex-end; justify-content: center;
}
.week-day-bar {
  width: 18px; border-radius: 3px 3px 0 0;
  transition: height 0.2s;
}
.week-day-label {
  font-size: 10px; margin-top: 3px;
  color: var(--text-light); font-weight: 400;
}
.week-day-btn--sel .week-day-label { color: var(--primary); font-weight: 700; }
.week-day-btn--today .week-day-label { color: var(--in-arbeit); font-weight: 700; }
.week-day-datum { font-size: 8px; color: #aaa; }
.week-day-count {
  font-size: 9px; font-weight: 600;
  color: var(--text-light); margin-top: 1px;
}
.week-day-btn--sel .week-day-count { color: var(--primary); }
.week-day-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--in-arbeit); margin: 2px auto 0;
}
.week-bar-summary {
  display: flex; justify-content: space-between;
  margin-top: 8px; padding: 6px 8px;
  background: var(--bg); border-radius: 6px;
  font-size: 10px; color: #555;
}

/* ── Progress day label ── */
.progress-day-label {
  font-size: 10px; font-weight: 600;
  margin-bottom: 4px;
}

/* ── Laundry Dashboard ── */
.laundry-dashboard {
  background: var(--card); border-radius: 10px;
  padding: 12px 16px; border: 1px solid var(--border);
  margin-bottom: 8px;
}
.laundry-title {
  font-size: 12px; font-weight: 700; color: #444;
  margin-bottom: 8px;
}
.laundry-cards {
  display: flex; gap: 8px;
}
.laundry-card {
  flex: 1; border-radius: 8px;
  padding: 10px 12px; text-align: center;
}
.laundry-card--today {
  background: var(--in-arbeit-bg);
}
.laundry-card--week {
  background: var(--bg);
}
.laundry-card-label {
  font-size: 9px; font-weight: 600;
  margin-bottom: 4px;
}
.laundry-card--today .laundry-card-label { color: var(--in-arbeit); }
.laundry-card--week .laundry-card-label { color: var(--primary); }
.laundry-card-value {
  font-size: 24px; font-weight: 700;
}
.laundry-card--today .laundry-card-value { color: var(--in-arbeit); }
.laundry-card--week .laundry-card-value { color: var(--primary); }
.laundry-card-unit {
  font-size: 9px; color: #555;
}
.laundry-card-sub {
  font-size: 9px; color: var(--text-light);
  margin-top: 2px;
}

/* ── Reinigungskraft: Große Kacheln ── */
.rk-progress {
  background: var(--card); border-radius: 10px;
  padding: 14px 16px; border: 1px solid var(--border);
  margin-bottom: 10px; text-align: center;
}
.rk-progress-pct {
  font-size: 36px; font-weight: 700;
  font-family: Georgia, serif;
}
.rk-progress-sub {
  font-size: 12px; color: var(--text-light); margin: 2px 0 8px;
}
.rk-help {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px;
  margin-bottom: 10px; font-size: 12px;
  color: var(--text-light); text-align: center; line-height: 1.6;
}
.rk-section {
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
}
.rk-section--altbau { background: var(--altbau); }
.rk-section--priorsbau { background: var(--priorsbau); }
.rk-section--neubau { background: var(--neubau); }
.rk-section--esh { background: var(--esh); }
.rk-section--extern { background: var(--extern); }
.rk-section-label {
  font-size: 11px; font-weight: 700; color: #444; margin-bottom: 8px;
}
.rk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.rk-card {
  height: 72px; border-radius: 10px;
  border: 2px solid #ccc; background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
  padding: 4px;
}
.rk-card:active { transform: scale(0.94); }
.rk-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.rk-card--offen { background: var(--offen-bg); border-color: var(--offen); }
.rk-card--in_arbeit { background: var(--in-arbeit-bg); border-color: var(--in-arbeit); }
.rk-card--fertig { background: var(--fertig-bg); border-color: var(--fertig); }
.rk-card-nr { font-size: 20px; font-weight: 700; color: #333; line-height: 1; }
.rk-card-status {
  font-size: 10px; font-weight: 600; margin-top: 4px;
  display: flex; align-items: center; gap: 3px;
}
.rk-card--offen .rk-card-status { color: var(--offen); }
.rk-card--in_arbeit .rk-card-status { color: var(--in-arbeit); }
.rk-card--fertig .rk-card-status { color: var(--fertig); }

.rk-done {
  background: var(--fertig-bg); border: 1px solid var(--fertig);
  border-radius: 10px; padding: 20px; text-align: center; margin-top: 12px;
}
.rk-done-icon { font-size: 32px; color: var(--fertig); }
.rk-done-title { font-size: 16px; font-weight: 700; color: var(--fertig); margin-top: 4px; }
.rk-done-sub { font-size: 12px; color: #555; margin-top: 4px; }

/* ── Rezeption: Dashboard ── */
.rez-dashboard { display: flex; gap: 6px; margin-bottom: 10px; }
.rez-dash-card {
  flex: 1; background: var(--card); border-radius: 10px;
  padding: 12px; border: 1px solid var(--border); text-align: center;
}
.rez-dash-label { font-size: 9px; color: var(--text-light); font-weight: 600; margin-bottom: 4px; }
.rez-dash-value { font-size: 24px; font-weight: 700; }
.rez-dash-bars { display: flex; gap: 4px; margin-top: 8px; }
.rez-dash-bar {
  flex: 1; border-radius: 4px; padding: 4px 2px;
  font-size: 9px; text-align: center;
}
.rez-dash-bar-val { font-weight: 700; font-size: 12px; }

/* ── Rezeption: Filter ── */
.rez-filters { display: flex; gap: 4px; margin-bottom: 10px; }
.rez-filter {
  flex: 1; padding: 7px 4px; border-radius: 6px;
  font-size: 10px; font-weight: 400; cursor: pointer;
  font-family: inherit; border: 1px solid var(--border);
  background: var(--card); color: var(--text-light);
  transition: all 0.15s;
}
.rez-filter--active {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary); font-weight: 700;
}

/* ── Anweisung ── */
.btn-anweisung {
  background: var(--primary); color: #fff; border: none;
  border-radius: 5px; padding: 5px 10px;
  font-size: 10px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.anw-user-btn {
  flex: 1; min-width: 80px; padding: 8px 4px;
  border-radius: 6px; cursor: pointer; font-family: inherit;
  border: 1.5px solid var(--border); background: var(--card);
  text-align: center;
}
.anw-user-btn--sel {
  border-color: var(--primary); background: var(--primary-light);
}
.anw-preview-btn {
  width: 100%; padding: 8px; border-radius: 6px;
  border: 1px solid var(--in-arbeit); background: var(--in-arbeit-bg);
  color: var(--in-arbeit); font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.anw-translation-box {
  background: #f0f7ff; border: 1px solid #b8d4f0;
  border-radius: 6px; padding: 8px; margin-top: 8px;
}

/* ── Date Navigator ── */
.date-nav {
  background: var(--card); border-radius: 10px;
  padding: 10px 12px; border: 1px solid var(--border);
  margin-bottom: 8px;
}
.date-nav-header {
  display: flex; justify-content: flex-end;
  margin-bottom: 8px;
}
.date-nav-actions { display: flex; gap: 6px; }
.nav-view-switch {
  display: flex; gap: 0; margin-bottom: 10px;
  background: var(--bg); border-radius: 6px; padding: 2px;
}
.nav-view-btn {
  flex: 1; padding: 6px 8px; border: none;
  border-radius: 5px; font-size: 11px; font-weight: 400;
  cursor: pointer; font-family: inherit;
  background: transparent; color: var(--text-light);
  transition: all 0.15s;
}
.nav-view-btn--active {
  background: var(--primary); color: #fff; font-weight: 700;
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-arrow {
  width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card);
  cursor: pointer; font-size: 18px; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.nav-arrow:active { background: #f0ede9; }
.nav-title {
  text-align: center; flex: 1;
  font-size: 14px; font-weight: 700;
  color: var(--text); font-family: Georgia, serif;
}
.nav-today-btn {
  padding: 4px 16px; border-radius: 5px;
  border: 1px solid var(--primary);
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}

/* ── Month Grid ── */
.month-grid-wrap {
  background: var(--card); border-radius: 10px;
  padding: 10px 12px; border: 1px solid var(--border);
  margin-bottom: 8px;
}
.month-header {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; margin-bottom: 4px;
}
.month-header-cell {
  text-align: center; font-size: 9px;
  font-weight: 600; color: var(--text-light); padding: 4px 0;
}
.month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.month-cell {
  padding: 4px 2px; border: none; border-radius: 6px;
  cursor: pointer; font-family: inherit;
  background: transparent; text-align: center;
  min-height: 48px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
}
.month-cell--empty { cursor: default; }
.month-cell--today { background: var(--in-arbeit-bg); }
.month-cell--past { opacity: 0.5; }
.month-bar {
  width: 14px; border-radius: 2px 2px 0 0; margin-bottom: 2px;
}
.month-day { font-size: 11px; font-weight: 400; color: var(--text); }
.month-day--today { font-weight: 700; color: var(--in-arbeit); }
.month-count { font-size: 7px; color: var(--text-light); }
.month-summary {
  display: flex; justify-content: space-between;
  margin-top: 8px; padding: 6px 8px;
  background: var(--bg); border-radius: 6px;
  font-size: 10px; color: #555;
}

/* ── Month cell selected state ── */
.month-cell--selected {
  background: var(--primary-light);
  box-shadow: inset 0 0 0 2px var(--primary);
  border-radius: 6px;
}
.month-cell--selected .month-day { color: var(--primary); font-weight: 700; }

/* ── Day header label (no checkouts) ── */
.day-header-label {
  font-size: 12px; color: var(--text-light);
  text-align: center; padding: 12px;
  margin-bottom: 8px;
}

/* ── Sync Info ── */
.sync-info {
  font-size: 9px; color: var(--fertig);
  font-weight: 600; padding: 2px 0;
}

/* ── Assignment Badge in Room Cell ── */
.room-assign-badge {
  width: 14px; height: 14px; border-radius: 50%;
  color: #fff; font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.room-cell--unassigned {
  border-style: dashed;
}

/* ── Assignment Legend ── */
#l-assign-legend { margin-bottom: 8px; }
.assign-legend-title {
  font-size: 10px; font-weight: 700; color: #444;
  margin-bottom: 4px;
}
.assign-legend-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: var(--text);
}
.assign-legend-item {
  display: flex; align-items: center; gap: 4px;
}
.assign-legend-badge {
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.assign-legend-badge--none {
  background: #bbb;
}
.assign-legend-count {
  font-size: 10px; color: var(--text-light); margin-left: 1px;
}

/* ══════════════════════════════════════
   SERVICE-APP SPECIFIC STYLES
   ══════════════════════════════════════ */

/* ── App Tabs ── */
.app-tabs {
  display: flex; margin: 0;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.app-tab {
  flex: 1; padding: 12px 8px; border: none;
  font-size: 12px; font-weight: 400; cursor: pointer;
  font-family: inherit; background: transparent;
  color: var(--text-light); border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.app-tab--active {
  color: var(--primary); font-weight: 700;
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

/* ── Filter Row ── */
.filter-row {
  display: flex; gap: 4px; margin-bottom: 10px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 11px; cursor: pointer; font-family: inherit;
  color: var(--text-light); white-space: nowrap;
}
.filter-btn--active {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary); font-weight: 700;
}

/* ── Reload Button ── */
.btn-reload {
  padding: 5px 12px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 11px; cursor: pointer; font-family: inherit;
  color: var(--text-light); white-space: nowrap;
}

/* ── Serviceplan Card ── */
.sp-card {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--text-light);
  border-radius: 8px; padding: 10px 12px;
  margin-bottom: 6px;
}
.sp-card--done { opacity: 0.5; }
.sp-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.sp-card-title { font-size: 13px; font-weight: 700; color: var(--text); }
.sp-card-menge { font-weight: 400; color: var(--text-light); font-size: 11px; }
.sp-card-kurs { font-size: 10px; color: var(--text-light); margin-top: 1px; }
.sp-card-right { text-align: right; flex-shrink: 0; }
.sp-card-status {
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
  display: inline-block;
}
.sp-card-status--offen { background: var(--offen-bg); color: var(--offen); }
.sp-card-status--in_arbeit { background: var(--in-arbeit-bg); color: var(--in-arbeit); }
.sp-card-status--erledigt { background: var(--fertig-bg); color: var(--fertig); }
.sp-card-zeit { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.sp-card-bemerkung {
  font-size: 11px; color: var(--text); margin-top: 6px;
  background: var(--bg); padding: 4px 8px; border-radius: 4px;
}
.sp-card-assigned {
  font-size: 10px; color: var(--in-arbeit); margin-top: 4px; font-weight: 600;
}
.sp-card-actions { display: flex; gap: 6px; margin-top: 8px; }
.sp-btn {
  flex: 1; padding: 8px; border-radius: 6px; border: none;
  font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit;
  color: #fff;
}
.sp-btn--start { background: var(--in-arbeit); }
.sp-btn--done { background: var(--fertig); }

/* ── Tour Progress ── */
.tour-progress {
  background: var(--card); border-radius: 10px;
  padding: 12px 16px; border: 1px solid var(--border); margin-bottom: 8px;
}
.tour-progress-label { font-size: 11px; font-weight: 700; color: var(--in-arbeit); }
.tour-progress-count { font-size: 24px; font-weight: 700; color: var(--text); }
.tour-progress-unit { font-size: 12px; font-weight: 400; color: var(--text-light); }
.tour-progress-done { font-size: 24px; font-weight: 700; }

/* ── Packliste ── */
.packliste-toggle {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; color: var(--text-light);
  text-align: left; margin-bottom: 8px;
}
.packliste {
  background: var(--card); border-radius: 8px;
  border: 1px solid var(--border); padding: 8px 12px; margin-bottom: 8px;
}
.packliste-item {
  display: flex; justify-content: space-between;
  padding: 4px 0; border-bottom: 1px solid var(--bg); font-size: 12px;
}
.packliste-menge { font-weight: 700; color: var(--in-arbeit); }

/* ── Tour Route Info ── */
.tour-route-info {
  font-size: 10px; color: var(--text-light); margin-bottom: 6px;
}

/* ── Tour Raum Card ── */
.tour-raum { margin-bottom: 5px; }
.tour-raum--done .tour-raum-header { opacity: 0.6; }
.tour-raum-header {
  width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; font-family: inherit;
  display: flex; justify-content: space-between; align-items: center;
}
.tour-raum--done .tour-raum-header {
  background: var(--fertig-bg); border-color: var(--fertig);
}
.tour-raum-left { display: flex; align-items: center; gap: 8px; }
.tour-raum-nr { font-size: 11px; color: var(--text-light); font-weight: 400; }
.tour-raum-name { font-size: 14px; font-weight: 700; color: var(--text); }
.tour-raum-buchung { font-size: 10px; color: var(--text-light); margin-top: 1px; }
.tour-raum-artikel { font-size: 11px; color: var(--text-light); }
.tour-raum-check { font-size: 18px; color: var(--fertig); font-weight: 700; }

/* ── Tour Detail ── */
.tour-detail {
  background: var(--card); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 8px 8px; padding: 8px 12px;
}
.tour-table { width: 100%; border-collapse: collapse; }
.tour-th {
  text-align: left; padding: 4px 0; font-weight: 600;
  color: var(--text-light); font-size: 10px;
  border-bottom: 2px solid var(--border);
}
.tour-th--num { text-align: center; width: 50px; }
.tour-th--input { text-align: center; width: 60px; color: var(--in-arbeit); }
.tour-td { padding: 6px 0; font-size: 12px; }
.tour-td--num { text-align: center; font-weight: 600; }
.tour-td--input { text-align: center; }
.tour-row { border-bottom: 1px solid var(--bg); }
.tour-input {
  width: 48px; padding: 4px 2px; text-align: center;
  border: 2px solid var(--in-arbeit); border-radius: 5px;
  font-size: 14px; font-weight: 700; font-family: inherit;
}
.tour-done-btn {
  width: 100%; padding: 10px; margin-top: 8px;
  border-radius: 6px; border: none; background: var(--fertig);
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.tour-note {
  font-size: 10px; color: var(--text-light); margin-top: 6px;
  padding: 4px 8px; background: var(--bg); border-radius: 4px;
}
.tour-note--intern { border-left: 3px solid var(--offen); }
.tour-alles-erledigt {
  background: var(--fertig-bg); border: 1px solid var(--fertig);
  border-radius: 10px; padding: 20px; text-align: center; margin-top: 12px;
}

/* ── Packliste Kisten ── */
.packliste-detail {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.packliste-kisten {
  background: var(--in-arbeit); color: #fff;
  padding: 2px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.packliste-rest {
  font-size: 11px; font-weight: 600; color: var(--offen);
}
.packliste-info {
  font-size: 9px; color: var(--text-light);
}
.packliste-total {
  margin-top: 8px; padding: 8px 10px;
  background: var(--in-arbeit-bg); border-radius: 6px;
  font-size: 12px; color: var(--in-arbeit);
  text-align: center;
}
