/* ============================================================
   DEICHPLANER — STYLESHEET
   Sortiert in logische Blöcke, Duplikate entfernt.
   ============================================================ */


/* -----------------------------------------------
   1. VARIABLEN & RESET
   ----------------------------------------------- */

:root {
  --red: #c4002b;
  --dark-red: #8f001f;
  --blue: #005a8d;
  --light-blue: #e8f3fa;
  --yellow: #fff3cd;
  --bg: #f4f6f8;
  --text: #1f2933;
  --muted: #667085;
  --card: #ffffff;
  --border: #d9e2ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none;
}


/* -----------------------------------------------
   2. TOPBAR & NAVIGATION
   ----------------------------------------------- */

.topbar {
  background: linear-gradient(90deg, var(--red), var(--dark-red));
  color: white;
  padding: 0.9rem 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.5rem;
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a,
.userbox a {
  color: white;
  text-decoration: none;
}

.main-nav a {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.main-nav .admin-sub {
  background: #e8eaf6;
  color: #3949ab;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.main-nav .admin-sub:hover {
  background: #c5cae9;
  color: #1a237e;
}

.userbox {
  font-size: 0.9rem;
  white-space: nowrap;
}


/* -----------------------------------------------
   3. SEITENLAYOUT
   ----------------------------------------------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.2rem;
}


/* -----------------------------------------------
   4. HERO
   ----------------------------------------------- */

.hero {
  background: var(--card);
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}

.hero-compact {
  padding: 1.5rem 2rem;
}

.hero-compact h1 {
  font-size: 1.6rem;
  margin-bottom: 0.2rem;
}

.hero-compact p {
  font-size: 0.9rem;
  margin: 0;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.eyebrow {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
}

.hero-status {
  background: #e8f8ef;
  color: #177245;
  border: 1px solid #b7e4c7;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #20c997;
  margin-right: 0.35rem;
}


/* -----------------------------------------------
   5. PHASEN (Dashboard-Timeline, Pills, Dots)
   ----------------------------------------------- */

.phase-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
}

.phase-card {
  display: flex;
  flex-direction: column;
  min-height: 225px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.phase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
}

.phase-card-current {
  border: 2px solid var(--blue);
  box-shadow: 0 10px 28px rgba(0, 90, 141, 0.14);
}

.phase-card-header {
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.phase-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.8rem 0.9rem 0.9rem;
  text-align: center;
}

.phase-card-body strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.phase-card-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.phase-card-description {
  display: block;
  min-height: 2.4em;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  margin-bottom: 0.7rem;
}

.phase-deadlines {
  margin-top: auto;
  display: grid;
  gap: 0.32rem;
  padding-top: 0.7rem;
  border-top: 1px solid #eef2f7;
  font-size: 0.78rem;
  color: var(--muted);
}

.phase-deadlines span {
  display: block;
  line-height: 1.35;
}

.phase-no-deadline {
  display: block;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid #eef2f7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.phase-published {
  display: inline-block;
  margin-top: auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #e8fff4;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  align-self: center;
}

/* Kleine Pills außerhalb der Timeline */
.phase-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid transparent;
}

/* Neue Phasenfarben: primär für Header und Pills */
.phase-card-header.phase-wunschplanung,
.phase-pill.phase-wunschplanung {
  background: #eef7ff;
  color: #005a8d;
}

.phase-card-header.phase-teamabstimmung,
.phase-pill.phase-teamabstimmung {
  background: #fff8d8;
  color: #7a5a00;
}

.phase-card-header.phase-finalisierung,
.phase-pill.phase-finalisierung {
  background: #fff0f3;
  color: #8a0024;
}

.phase-card-header.phase-veroeffentlicht,
.phase-pill.phase-veroeffentlicht {
  background: #e8fff4;
  color: #047857;
}

/* Alte Klassen vorerst als Alias behalten, falls noch irgendwo genutzt */
.phase-open,
.phase-card-header.phase-open,
.phase-pill.phase-open {
  background: #eef7ff;
  color: #005a8d;
}

.phase-moderate,
.phase-card-header.phase-moderate,
.phase-pill.phase-moderate {
  background: #fff8d8;
  color: #7a5a00;
}

.phase-final,
.phase-card-header.phase-final,
.phase-pill.phase-final {
  background: #fff0f3;
  color: #8a0024;
}

.phase-notice-panel {
  border-left: 6px solid var(--blue);
}

.phase-notice-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.phase-notice-head h2 {
  margin-bottom: 0.25rem;
}

.phase-notice-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.phase-notice-body {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.phase-notice-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.phase-notice-item strong {
  color: var(--text);
}

.phase-notice-item span {
  color: var(--muted);
  text-align: right;
}

.phase-notice-published {
  background: #e8fff4;
  border-color: #10b981;
}

.phase-notice-published strong,
.phase-notice-published span {
  color: #047857;
}

.phase-notice-missing {
  background: #fff7ed;
  border-color: #fdba74;
}

.phase-notice-missing strong {
  color: #92400e;
}

.phase-notice-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}


/* -----------------------------------------------
   5.1 ENTSCHEIDUNG - Selbstplaner/Ich-lass-mich-Planen
   ----------------------------------------------- */
.planning-mode-panel {
  border-left: 6px solid var(--blue);
}

.planning-mode-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.planning-mode-head h2 {
  margin-bottom: 0.25rem;
}

.planning-mode-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.planning-mode-status {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: grid;
  gap: 0.25rem;
}

.planning-mode-status span {
  color: var(--muted);
}

.planning-mode-self {
  background: #e8fff4;
  border-color: #10b981;
}

.planning-mode-managed {
  background: #eef7ff;
  border-color: #93c5fd;
}

.planning-mode-undecided {
  background: #fff7ed;
  border-color: #fdba74;
}

.planning-mode-form {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.planning-mode-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.planning-mode-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
}

.planning-mode-option input {
  margin-top: 0.25rem;
}

.planning-mode-option strong {
  display: block;
  color: var(--text);
}

.planning-mode-option small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  line-height: 1.35;
}

.planning-mode-option-active {
  background: #eef7ff;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(0, 90, 141, 0.16);
}

.planning-mode-note-label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
}

.planning-mode-note-label textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem;
  font: inherit;
}

.planning-wishes-box {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.planning-wishes-head h3 {
  margin: 0 0 0.25rem;
}

.planning-wishes-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.planning-wish-form {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}

.planning-wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.planning-wish-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
}

.planning-wish-grid input,
.planning-wish-grid select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.planning-wish-slots {
  display: grid;
  gap: 0.35rem;
}

.planning-wish-slots p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.planning-wish-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 0.45rem;
}

.planning-wish-slot-grid label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.planning-wish-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.planning-wish-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.planning-wish-item p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.planning-wish-slots-line span {
  display: inline-flex;
  margin: 0.15rem 0.15rem 0 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #eef7ff;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 850;
}

.planning-mode-modal-hint {
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  line-height: 1.45;
  font-size: 0.9rem;
  font-weight: 700;
}

.planning-mode-modal-hint-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.planning-mode-modal-hint-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}


/* -----------------------------------------------
   6. DASHBOARD — Quick-Grid & Konzept
   ----------------------------------------------- */

/*.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}*/

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.tile {
  background: var(--card);
  border-radius: 18px;
  padding: 1.3rem;
  min-height: 190px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.tile-icon {
  font-size: 2rem;
  margin-bottom: 0.7rem;
}

.tile h2 {
  margin: 0 0 0.45rem;
}

.tile p {
  color: var(--muted);
  line-height: 1.45;
}

.tile-blue   { border-top: 6px solid var(--blue); }
.tile-red    { border-top: 6px solid var(--red); }
.tile-yellow { border-top: 6px solid #f2b705; }
.tile-gray   { border-top: 6px solid #64748b; }
.tile-green  { border-top: 6px solid #10b981; }
.tile-purple { border-top: 6px solid #8b5cf6; }

.info-panel {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 1.4rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.4rem;
}

.info-panel h2 {
  margin-top: 0;
}

.concept-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.concept-list div {
  background: #f8fafc;
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}

.concept-list p {
  color: var(--muted);
  margin-bottom: 0;
}


/* -----------------------------------------------
   7. KALENDER (Teamplan)
   ----------------------------------------------- */

.calendar-wrap {
  margin-top: 1.4rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
}

.calendar-week {
  margin-bottom: 1rem;
}

.week-label {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.85rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.calendar-day {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 205px;
  padding: 0.55rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.calendar-day {
  scroll-margin-top: 1.5rem;
}

.calendar-day:target {
  outline: 4px solid rgba(0, 90, 141, 0.35);
  box-shadow: 0 0 0 6px rgba(0, 90, 141, 0.12),
              0 12px 28px rgba(15, 23, 42, 0.16);
}

.calendar-day-header {
  color: var(--blue);
  font-size: 0.86rem;
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.calendar-day.past-day {
  opacity: 0.58;
  filter: grayscale(0.35);
}

.calendar-day.past-day .calendar-day-header {
  color: var(--muted);
}

.calendar-day.past-day .compact-slot {
  cursor: pointer;
}

.calendar-day.past-day::after {
  content: "vergangen";
  display: inline-flex;
  margin-top: 0.45rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
}


.other-month-day {
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  opacity: 0.7;
}

.muted-day {
  color: #9ca3af;
}

.empty-day {
  background: transparent;
  border: 1px dashed transparent;
  box-shadow: none;
}

/* Wochenenden */
.weekend.saturday {
  background: #f8fafc;
}

.weekend.sunday {
  background: #fff7ed;
  border-color: #fed7aa;
}

/* Feiertage */
.calendar-day.holiday {
  background: #fce4e4;
  border-left: 3px solid #d32f2f;
}

.calendar-day.weekend.holiday {
  background: #f8d0d0;
}

.holiday-badge {
  display: block;
  font-size: 0.7rem;
  color: #d32f2f;
  font-weight: 600;
  margin-top: 2px;
  line-height: 1.2;
}

/* Schulferien */
.calendar-day.school-holiday {
  background: #fef9e7;
  border-left: 3px solid #f9a825;
}

.school-holiday-badge {
  display: block;
  font-size: 0.65rem;
  color: #f57f17;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.2;
}


/* Prio-/Jokertag-Leiste im Kalender */
.day-flag-bar {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.25rem;
}

.day-flag-btn {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    transition: all 0.15s;
}

.day-flag-btn:hover {
    background: #e2e8f0;
}

.day-flag-active-prio {
    background: #fce4e4;
    border-color: #d32f2f;
}

.day-flag-active-joker {
    background: #d1e7dd;
    border-color: #4caf50;
}

.day-flag-label {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.day-flag-label.prio {
    color: #d32f2f;
    background: #fce4e4;
}

.day-flag-label.joker {
    color: #2e7d32;
    background: #d1e7dd;
}

.day-flag-label.blocked {
    color: #64748b;
    background: #f1f5f9;
}

/* Prio-Frei: kräftiges Rot, klar unterscheidbar von slot-empty */
.compact-slot.my-flag-prio {
    background: #f8b4b4 !important;
    border-color: #c62828 !important;
    border-left: 3px solid #c62828;
}

/* Springer: kräftiges Blaugrün, klar unterscheidbar von slot-full */
.compact-slot.my-flag-joker {
    background: #b2dfdb !important;
    border-color: #00796b !important;
    border-left: 3px solid #00796b;
}


/* Flag-Toggle im Modal */
.flag-toggle {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.flag-btn {
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
}

.flag-btn:hover {
    background: #f1f5f9;
}

.flag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Flag-Buttons im Modal */
.flag-active-prio {
    background: #f8b4b4;
    border-color: #c62828;
    color: #c62828;
}

.flag-active-joker {
    background: #b2dfdb;
    border-color: #00796b;
    color: #00796b;
}

.flag-readonly {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: #f1f5f9;
}

.flag-description {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.3rem 0 0.5rem;
}

/* Einklappbarer Bereich im Slot-Modal */

.flag-details {
  padding-top: 0;
}

.flag-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-weight: 800;
}

.flag-summary::-webkit-details-marker {
  display: none;
}

.flag-summary::before {
  content: "▸";
  color: var(--blue);
}

.flag-details[open] .flag-summary::before {
  content: "▾";
}

.flag-summary small {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.75rem;
}

.flag-details-body {
  margin-top: 0.6rem;
}


.flags-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.flag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Flag-Chips in Mein Plan ebenfalls anpassen */
.flag-chip-prio {
    background: #f8b4b4;
    color: #c62828;
}

.flag-chip-joker {
    background: #b2dfdb;
    color: #00796b;
}

.flag-chip-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

/*Admin/Moderation*/
.moderation-panel {
  display: grid;
  gap: 1rem;
}

.moderation-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.moderation-head h2 {
  margin: 0.1rem 0 0.35rem;
}

.moderation-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.moderation-total-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 850;
  font-size: 0.85rem;
}

.moderation-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.moderation-stat {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  gap: 0.2rem;
}

.moderation-stat span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.moderation-stat strong {
  font-size: 1.8rem;
  line-height: 1;
}

.moderation-stat small {
  color: var(--muted);
  font-weight: 750;
}

.moderation-stat-self {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.moderation-stat-managed {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.moderation-stat-undecided {
  background: #fff7ed;
  border-color: #fed7aa;
}

.moderation-details {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 0.85rem 1rem;
}

.moderation-details summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-weight: 900;
}

.moderation-details summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.moderation-groups {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.moderation-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem;
  background: #f8fafc;
}

.moderation-group h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.moderation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.moderation-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

.moderation-list li span {
  font-weight: 800;
}

.moderation-list li small {
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.moderation-wish-list {
  gap: 0.55rem;
}

.moderation-wish-item {
  display: block !important;
}

.moderation-wish-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.moderation-employee-wishes {
  margin-top: 0.55rem;
  border-top: 1px solid var(--border);
  padding-top: 0.55rem;
}

.moderation-employee-wishes summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 850;
  font-size: 0.85rem;
}

.moderation-wish-details {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.moderation-wish-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.moderation-wish-card strong {
  font-size: 0.85rem;
}

.moderation-wish-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.moderation-wish-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.4;
}

.compact-slot {
  position: relative;
}

.compact-slot-time {
  white-space: nowrap;
}

.admin-slot-flag-mini {
  position: absolute;
  right: 22px;
  top: 3px;

  width: 13px;
  height: 13px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 0.65rem;
  line-height: 1;
  font-weight: 950;

  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);

  pointer-events: none;
  z-index: 3;
}

.admin-slot-flag-prio {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

.admin-slot-flag-joker {
  color: #075985;
  background: #eff6ff;
  border-color: #93c5fd;
}

.admin-slot-flag-both {
  color: #581c87;
  background: #faf5ff;
  border-color: #c084fc;
}

@media (max-width: 720px) {
  .moderation-head {
    flex-direction: column;
  }

  .moderation-details summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .moderation-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ------------------------------------------------
   Live-Wochenplan (neuer interaktiver Plan)
   ------------------------------------------------ */
.weekly-plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1rem;
  align-items: start;
}

.weekly-plan-main {
  min-width: 0;
}

.weekly-board {
  display: grid;
  grid-template-columns: 112px repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  width: 100%;
  overflow-x: visible;
}

.weekly-board-header,
.weekly-section-label,
.weekly-cell {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
}

.weekly-board-header {
  padding: 0.45rem 0.35rem;
  text-align: center;
  display: grid;
  gap: 0.05rem;
  color: var(--text);
  font-weight: 900;
  min-width: 0;
}

.weekly-board-header strong {
  font-size: 0.85rem;
}

.weekly-board-header span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.weekly-board-corner {
  text-align: left;
  align-content: center;
}

.weekly-section-label {
  padding: 0.55rem;
  display: grid;
  gap: 0.15rem;
  align-content: start;
  min-height: 160px;
}

.weekly-section-label strong {
  font-size: 0.88rem;
  font-weight: 950;
}

.weekly-section-label small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.weekly-cell {
  min-height: 160px;
  padding: 0.32rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.weekly-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.03rem;
  padding: 0.28rem 0.35rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.weekly-entry strong {
  font-size: 0.75rem;
  font-weight: 950;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weekly-entry span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.05;
  white-space: nowrap;
}

.weekly-entry-homeoffice {
  border-color: #93c5fd;
  background: #eff6ff;
}

.weekly-empty {
  color: #cbd5e1;
  font-weight: 900;
  align-self: center;
  margin-top: auto;
  margin-bottom: auto;
}

.weekly-plan-side {
  display: grid;
  gap: 1rem;
}

@media (max-width: 1250px) {
  .weekly-plan-layout {
    grid-template-columns: 1fr;
  }

  .weekly-plan-side {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .weekly-board {
    grid-template-columns: 105px repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .weekly-board {
    grid-template-columns: 90px repeat(7, minmax(82px, 1fr));
    overflow-x: auto;
  }
}

/* -----------------------------------------------
   Wochenplan: Bereichsfarben
   ----------------------------------------------- */

.weekly-section-frueh {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.weekly-section-spaet {
  background: #fff7ed;
  border-color: #fed7aa;
}

.weekly-section-nacht {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.weekly-section-sonder {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Grundtönung der Zellen je Bereich */
.weekly-cell-frueh {
  background: #f8fbff;
}

.weekly-cell-spaet {
  background: #fffaf5;
}

.weekly-cell-nacht {
  background: #f8f9ff;
}

.weekly-cell-sonder {
  background: #fbfdff;
}

/* Personen-Chips je Bereich */
.weekly-entry-frueh {
  border-left: 3px solid #60a5fa;
}

.weekly-entry-spaet {
  border-left: 3px solid #fb923c;
}

.weekly-entry-nacht {
  border-left: 3px solid #818cf8;
}

.weekly-entry-sonder {
  border-left: 3px solid #94a3b8;
}


/* -----------------------------------------------
   Wochenplan: Wochenende / Feiertage / Ferien
   ----------------------------------------------- */

.weekly-board-weekend {
  background: #fff7ed;
  border-color: #fed7aa;
}

.weekly-cell-weekend {
  background: #fffaf0;
  border-color: #fed7aa;
}

.weekly-board-holiday {
  background: #fff1f2;
  border-color: #fda4af;
  color: #9f1239;
}

.weekly-board-holiday strong,
.weekly-board-holiday span {
  color: #9f1239;
}

.weekly-cell-holiday {
  background: #fff7f7;
  border-color: #fda4af;
}

.weekly-day-badge {
  display: inline-flex;
  justify-content: center;
  justify-self: center;
  max-width: 100%;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weekly-day-badge-holiday {
  background: #ffe4e6;
  color: #be123c;
}

.weekly-day-badge-school {
  background: #fef3c7;
  color: #92400e;
}

/* Heute bleibt sichtbar, auch wenn Wochenende/Feiertag */
.weekly-board-today,
.weekly-cell-today {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

/* -----------------------------------------------
   8. SLOTS (Compact-Slots im Kalender)
   ----------------------------------------------- */

.compact-slots {
  display: grid;
  gap: 0.32rem;
}

.compact-slot {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.42rem;
  min-height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.compact-slot strong {
  font-size: 0.82rem;
}

.compact-slot:hover {
  outline: 2px solid rgba(0, 90, 141, 0.18);
}

/* Slot-Status-Farben */
.slot-empty,
.compact-slot.slot-empty {
  background: #fee2e2;
  border-color: #ef4444;
}

.slot-partial,
.compact-slot.slot-partial {
  background: #fff7d6;
  border-color: #f2b705;
}

.slot-full,
.compact-slot.slot-full {
  background: #d1fae5;
  border-color: #10b981;
}

.slot-overbooked {
  background: #ffedd5;
  border-color: #ea580c;
  color: #7c2d12;
  box-shadow: inset 0 0 0 2px rgba(234, 88, 12, 0.22);
}

.slot-overbooked strong {
  color: #7c2d12;
  font-weight: 950;
}

.slot-overbooked:hover {
  background: #fed7aa;
  border-color: #c2410c;
}

.slot-attention::after {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 950;
  line-height: 1;
}

.compact-slot.slot-ok::after {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.35rem;
  border-radius: 999px;

  color: #fff;
  background: #16a34a;

  font-size: 0.75rem;
  font-weight: 950;
  line-height: 1;

  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

/* komplett offen */
.slot-attention-empty::after {
  background: #be123c;
}

/* unterbesetzt */
.slot-attention-partial::after {
  background: #d97706;
}

/* überbucht */
.slot-attention-overbooked::after {
  background: #ea580c;
}

.compact-slot.slot-overbooked {
  background: #ffedd5;
  border-color: #ea580c;
  color: #7c2d12;
  box-shadow: inset 0 0 0 2px rgba(234, 88, 12, 0.22);
}

.compact-slot.slot-overbooked strong {
  color: #7c2d12;
  font-weight: 950;
}

.compact-slot.slot-overbooked:hover {
  background: #fed7aa;
  border-color: #c2410c;
}

/* Eigener Slot im Teamplan */
.compact-slot.my-slot {
  outline: 2px solid #1565c0;
  outline-offset: -2px;
  background: #e3f2fd !important;
}

.compact-slot.my-slot.slot-ok {
  background: #d1fae5 !important;
  border-color: #10b981 !important;
  outline: 2px solid #16a34a;
  outline-offset: -2px;
}

/* Slots 1.Phase */
.slot-blind {
  background: #f8fafc;
  border-color: #dbeafe;
  color: var(--text);
}

.slot-blind strong {
  color: var(--blue);
  font-size: 0.72rem;
}


/* -----------------------------------------------
   9. MODAL (Slot-Details & Buchung)
   ----------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  z-index: 3000;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 22px;
  padding: 1.6rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
  border-top: 7px solid var(--red);
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 0.8rem;
  border: none;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--muted);
}

.modal-section {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.people-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.people-list li {
  margin: 0.25rem 0;
}

#locationSection {
  margin-bottom: 1.2rem;
}

.location-toggle {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.loc-btn {
  padding: 0.4rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}

.loc-btn:hover {
  border-color: #94a3b8;
}

.loc-btn.loc-active {
  background: #1565c0;
  color: #fff;
  border-color: #1565c0;
}

.detail-actions {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}

.modal-small-note {
  margin: 0.25rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.booking-block-list {
  display: grid;
  gap: 0.5rem;
}

.booking-block-option {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.booking-block-option input {
  margin-top: 0.2rem;
}

.booking-block-option span {
  display: grid;
  gap: 0.15rem;
}

.booking-block-option small {
  color: var(--muted);
  line-height: 1.35;
}

.booking-block-option-active {
  border-color: var(--blue);
  background: #eff6ff;
}

.booking-block-section {
  padding: 0.75rem 0.9rem;
}

.booking-block-summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  font-weight: 850;
}

.booking-block-summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-flag-list-section {
  background: #f8fafc;
}

.admin-flag-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.admin-flag-column {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 0.75rem;
}

.admin-flag-column h3 {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
}

.admin-flag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.admin-flag-list li {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-weight: 800;
}

.admin-flag-empty {
  color: var(--muted);
  font-weight: 700 !important;
}

/* -----------------------------------------------
   10. MEIN PLAN
   ----------------------------------------------- */

/*.myplan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.myplan-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}*/

.myplan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 200px));
    gap: 0.8rem;
    margin-top: 1rem;
}

.myplan-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 170px;
}

.myplan-header {
  color: var(--blue);
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.myplan-time {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

/*.myplan-hours {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.8rem;
}*/

.myplan-hours {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: auto;
}

.myplan-location {
  font-size: 0.75rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.pause-info {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.week-hours {
  font-size: 0.9rem;
  font-weight: normal;
  color: #64748b;
  margin-left: 0.5rem;
}


/* Mein Plan — Prio- und Springertage */

.my-flags-panel {
  border-left: 6px solid var(--blue);
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.section-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/*.my-flags-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}*/


.my-flags-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.my-flag-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  background: #f8fafc;
  min-width: 0;
}

.my-flag-card-prio {
  border-left: 6px solid #c62828;
}

.my-flag-card-joker {
  border-left: 6px solid #00796b;
}

.my-flag-card-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.my-flag-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.my-flag-card-header p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.my-flag-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.my-flag-list {
  display: grid;
  gap: 0.5rem;
}

.my-flag-row {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

.my-flag-row strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.my-flag-row span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.empty-flag-text {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

.my-flag-row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.my-flag-row-link:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.my-flag-edit-hint {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}


/* Mein Plan — Fairness-Ausgleich */

.fairness-panel {
  border-left: 6px solid #10b981;
}

.fairness-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.fairness-rule-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  border: 1px solid #10b981;
  font-size: 0.78rem;
  font-weight: 850;
}

.fairness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.fairness-metric {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
}

.fairness-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  margin-bottom: 0.25rem;
}

.fairness-metric strong {
  display: block;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.fairness-metric-ok {
  background: #d1fae5;
  border-color: #10b981;
}

.fairness-metric-ok strong {
  color: #047857;
}

.fairness-metric-muted {
  background: #eef2f7;
}

.fairness-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.fairness-explain {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.fairness-explain summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 0.9rem;
  font-weight: 850;
  color: var(--blue);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.fairness-explain summary::-webkit-details-marker {
  display: none;
}

.fairness-explain summary::after {
  content: "anzeigen";
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.fairness-explain[open] summary::after {
  content: "ausblenden";
}

.fairness-explain p {
  margin: 0;
  padding: 0 0.9rem 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.fairness-table-wrap {
  margin: 0 0.9rem 0.75rem;
  overflow-x: auto;
}

.fairness-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.86rem;
}

.fairness-table th {
  background: #eef6ff;
  color: var(--blue);
  text-align: left;
  padding: 0.55rem 0.65rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fairness-table td {
  padding: 0.55rem 0.65rem;
  border-top: 1px solid var(--border);
}

.fairness-table td:nth-child(3) {
  color: #047857;
  font-weight: 800;
}

.fairness-table td:nth-child(4) {
  color: #991b1b;
  font-weight: 800;
}


/* -----------------------------------------------
   11. SOLL / IST — Stundenübersicht
   ----------------------------------------------- */

/*.soll-ist-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.soll-ist-card {
  background: #f0f4f8;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.soll-ist-label {
  font-size: 0.85rem;
  color: #64748b;
}

.soll-ist-value {
  font-size: 1.4rem;
}*/

/* Stundenkonto: Plus-Stunden */
/*.soll-ist-plus {
    background: #d1e7dd;
}*/

/* Gesamtsaldo-Karte etwas prominenter */
/*.soll-ist-total {
    border: 2px solid var(--border);
    min-width: 200px;
}

.soll-ist-total .soll-ist-value {
    font-size: 1.6rem;
}

.soll-ist-total .soll-ist-label {
    font-weight: 700;
    color: var(--text);
}

.soll-ist-under { background: #fff3cd; }
.soll-ist-over  { background: #f8d7da; }
.soll-ist-ok    { background: #d1e7dd; }
*/


/* -----------------------------------------------
   11. SOLL / IST — Stundenübersicht (kompakt)
   ----------------------------------------------- */

.soll-ist-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.soll-ist-item {
    background: #f0f4f8;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    text-align: center;
    min-width: 70px;
}

.soll-ist-item .soll-ist-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 1px;
}

.soll-ist-item strong {
    font-size: 1.05rem;
}

.soll-ist-sep {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.9rem;
}

.soll-ist-total {
    border: 2px solid var(--border);
}

.soll-ist-total strong {
    font-size: 1.15rem;
}

.soll-ist-under { background: #fff3cd; }
.soll-ist-plus  { background: #d1e7dd; }
.soll-ist-ok    { background: #f0f4f8; }


/* -----------------------------------------------
   12. LOGIN
   ----------------------------------------------- */

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--blue));
  padding: 1rem;
}

.login-card {
  width: min(420px, 100%);
  background: white;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.login-brand {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f4f6f8;
  font-size: 2rem;
}

.login-card h1 {
  margin: 0 0 0.4rem;
}

.login-card p {
  color: var(--muted);
}

.login-form {
  margin-top: 1.4rem;
  display: grid;
  gap: 1rem;
  text-align: left;
}

.login-form label {
  font-weight: 700;
  color: var(--text);
}

.login-form input {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

/* -----------------------------------------------
   17. RAUMPLANER
   ----------------------------------------------- */

.roomplan-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.muted-text {
  color: var(--muted);
  margin: 0.3rem 0 0;
}

.room-map-wrap {
  position: relative;
  width: 100%;
  min-height: 420px; /* wurde eingebaut, so lange kein richtiges Bild da hinterlegt ist */
  /*background: #ffffff;*/
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.room-map-wrap {   /* wurde komplett eingefügt, so lange keine Bilder da sind */
  background:
    linear-gradient(90deg, rgba(0,90,141,0.06) 1px, transparent 1px),
    linear-gradient(rgba(0,90,141,0.06) 1px, transparent 1px),
    #ffffff;
  background-size: 40px 40px;
}


.room-map-image {
  display: block;
  width: 100%;
  height: auto;
}

.room-zone {
  position: absolute;
  border: 2px solid rgba(0, 90, 141, 0.55);
  background: rgba(0, 90, 141, 0.12);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.25rem;
  color: #003f63;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.room-zone:hover {
  background: rgba(0, 90, 141, 0.22);
  border-color: var(--blue);
  transform: translateY(-1px);
}

.room-zone span {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.resource-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.resource-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  background: #f8fafc;
}

.resource-item strong {
  display: block;
  color: var(--blue);
}

.resource-item span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}


.booking-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}

.booking-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.booking-time-grid label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}

#bookRoomBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.booking-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.booking-item .btn-danger {
  white-space: nowrap;
  margin-top: 0.1rem;
}

.resource-choice-btn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.resource-choice-btn:hover {
  background: #eef6fb;
  border-color: var(--blue);
  transform: translateY(-1px);
}

.resource-choice-btn strong {
  display: block;
  color: var(--blue);
}

.resource-choice-btn span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.resource-choice-active {
  background: #e8f3fa;
  border-color: var(--blue);
  outline: 2px solid rgba(0, 90, 141, 0.25);
}

.selected-resource-hint {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-weight: 700;
}

.selected-resource-active {
  background: #e8f3fa;
  border-color: var(--blue);
  color: var(--blue);
}

.room-zone-label {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 0.18rem 0.38rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  line-height: 1.1;
  max-width: 100%;
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
}

.room-zone-label strong {
  font-size: 0.7rem;
  color: #003f63;
}

.room-zone-label small {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 800;
}

/* Raumtyp-Farben */
.room-type-office,
.room-type-room {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.75);
}

.room-type-fixed_office,
.room-type-teamlead_office {
  background: rgba(0, 90, 141, 0.18);
  border-color: rgba(0, 90, 141, 0.78);
}

.room-type-conference {
  background: rgba(245, 158, 11, 0.20);
  border-color: rgba(245, 158, 11, 0.85);
}

.room-type-hnrz {
  background: rgba(196, 0, 43, 0.18);
  border-color: rgba(196, 0, 43, 0.85);
}

.room-type-terrace {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(100, 116, 139, 0.75);
}

.room-type-desk_area {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.75);
}

/* Status-Zusatzsignale */
.room-zone-free {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.room-zone-has-booking {
  box-shadow:
    inset 0 0 0 3px rgba(242, 183, 5, 0.95),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.room-zone-locked {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.18) 0,
    rgba(255,255,255,0.18) 6px,
    rgba(0,0,0,0.035) 6px,
    rgba(0,0,0,0.035) 12px
  );
}

/* Kompaktes Kartenlabel */
.room-zone-label {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 0.18rem 0.38rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  line-height: 1.1;
  max-width: 100%;
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
}

.room-zone-label strong {
  font-size: 0.7rem;
  color: #003f63;
}

.room-zone-label small {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 800;
}

.room-zone-label em {
  font-style: normal;
  font-size: 0.52rem;
  color: #475569;
  font-weight: 700;
}

.room-not-bookable-box {
  border: 1px solid #cbd5e1;
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #f8fafc;
}

.room-not-bookable-box strong {
  display: block;
  color: var(--blue);
  margin-bottom: 0.25rem;
}

.room-not-bookable-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}


/* Raum-Modal-Beschreibung */
.room-modal-subtitle {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.room-meta-line {
  margin-bottom: 0.9rem;
  color: var(--text);
}

.room-description-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.8rem;
}

.room-description-box p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.room-assignment-box {
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  color: var(--text);
  line-height: 1.5;
}

/* Modal-Titel etwas sauberer */
#roomModalTitle {
  margin: 0 0 0.25rem;
  line-height: 1.15;
}



/* Legende für die Karte */
.room-legend {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.legend-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  display: inline-block;
  border: 2px solid transparent;
}

.legend-office {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.75);
}

.legend-desk-area {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.75);
}

.legend-fixed {
  background: rgba(0, 90, 141, 0.18);
  border-color: rgba(0, 90, 141, 0.78);
}

.legend-conference {
  background: rgba(245, 158, 11, 0.20);
  border-color: rgba(245, 158, 11, 0.85);
}

.legend-hnrz {
  background: rgba(196, 0, 43, 0.18);
  border-color: rgba(196, 0, 43, 0.85);
}

.legend-terrace {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(100, 116, 139, 0.75);
}

.legend-locked {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.18) 0,
      rgba(255,255,255,0.18) 5px,
      rgba(0,0,0,0.08) 5px,
      rgba(0,0,0,0.08) 10px
    ),
    rgba(0, 90, 141, 0.12);
  border-color: rgba(0, 90, 141, 0.55);
}

.legend-booked {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(242, 183, 5, 0.95);
  box-shadow: inset 0 0 0 2px rgba(242, 183, 5, 0.95);
}

/* Hover-Karte beim Raum"hovern" */
.room-hover-card {
  position: fixed;
  z-index: 3500;
  width: min(280px, calc(100vw - 2rem));
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  font-size: 0.85rem;
}

.room-hover-card.hidden {
  display: none;
}

.hover-title {
  font-weight: 850;
  color: var(--text);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.hover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.hover-meta span {
  background: #f1f5f9;
  color: #475569;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.hover-detail {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.hover-detail > span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.hover-detail strong {
  color: var(--text);
  line-height: 1.35;
}

.hover-booking-list {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
}

.hover-booking-list li {
  margin: 0.18rem 0;
  color: var(--text);
}

.hover-booking-list strong {
  color: var(--blue);
}

.hover-more {
  color: var(--muted) !important;
  font-weight: 700;
}


/*Wochenübersicht*/
.room-week-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.room-week-table-wrap {
  overflow-x: auto;
}

.room-week-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0.4rem;
}

.room-week-table th {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.4rem;
}

.room-week-table th span {
  font-size: 0.75rem;
  color: #94a3b8;
}

.room-week-room {
  min-width: 220px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  vertical-align: top;
}

.room-week-room strong {
  display: block;
  color: var(--text);
  line-height: 1.2;
}

.room-week-room span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.room-week-cell {
  min-width: 105px;
  height: 74px;
  border-radius: 12px;
  padding: 0.5rem;
  vertical-align: top;
  border: 1px solid var(--border);
}

.room-week-cell-label {
  font-weight: 850;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.cell-free {
  background: #d1fae5;
  border-color: #10b981;
  color: #047857;
}

.cell-partial {
  background: #fff7d6;
  border-color: #f2b705;
  color: #8a5a00;
}

.cell-booked {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.cell-locked {
  background: #eef2f7;
  border-color: #cbd5e1;
  color: #64748b;
}

.room-week-bookings {
  margin: 0.25rem 0 0;
  padding-left: 0.85rem;
  font-size: 0.68rem;
  line-height: 1.25;
}

.room-week-bookings li {
  margin-bottom: 0.15rem;
}

.room-week-bookings strong {
  display: block;
}


.room-week-clickable {
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.room-week-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.week-nav-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.week-nav-row .btn-secondary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/*Filter für die Wochenübersicht*/
.room-week-filter-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  align-items: end;
}

.room-week-filter-grid label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}

.room-week-filter-grid label input,
.room-week-filter-grid label select {
  width: 100%;
  font-weight: 400;
  color: var(--text);
}

@media (max-width: 900px) {
  .room-week-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .room-week-filter-grid {
    grid-template-columns: 1fr;
  }
}

/*Wochenübersicht Legende*/
.room-week-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin: 0.8rem 0 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.week-legend-free {
  background: #d1fae5;
  border-color: #10b981;
}

.week-legend-partial {
  background: #fff7d6;
  border-color: #f2b705;
}

.week-legend-booked {
  background: #fee2e2;
  border-color: #ef4444;
}

.week-legend-locked {
  background: #eef2f7;
  border-color: #cbd5e1;
}

.room-week-click-hint {
  margin: 0 0 1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 650;
  font-size: 0.9rem;
}


/*Live Ansicht.*/
.room-action-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.room-main-actions {
  align-items: center;
}

.room-main-actions .btn-primary,
.room-main-actions .btn-secondary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.live-info-box {
  margin-top: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #b7e4c7;
  background: #e8f8ef;
  color: #166534;
  font-size: 0.9rem;
  line-height: 1.45;
}

.live-info-box strong {
  color: #064e3b;
}


/* Live-Status auf der Karte */
.room-zone-live-free {
  box-shadow:
    inset 0 0 0 3px rgba(16, 185, 129, 0.9),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.room-zone-live-soon {
  box-shadow:
    inset 0 0 0 3px rgba(245, 158, 11, 0.95),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.room-zone-live-busy {
  box-shadow:
    inset 0 0 0 3px rgba(239, 68, 68, 0.95),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.room-live-label {
  color: #0f172a;
  font-weight: 850;
}

.room-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.room-title-row h2 {
  margin: 0;
}

/* Live-Info in Hover-Karte */
.hover-live-box {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  margin: 0.45rem 0;
}

.hover-live-box span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
  margin-bottom: 0.18rem;
}

.hover-live-box strong {
  display: block;
  color: var(--text);
  line-height: 1.25;
}

.hover-live-box small {
  display: block;
  color: var(--muted);
  margin-top: 0.18rem;
  line-height: 1.25;
}



/* Koordinaten-Helfer - wenn Räume fertig, wieder auskommentieren/löschen */
.coord-helper {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}


/* -----------------------------------------------
   Raumplaner Liveboard
   ----------------------------------------------- */

.liveboard-hero {
  margin-bottom: 1rem;
}

.liveboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.liveboard-stack {
  display: grid;
  gap: 1.2rem;
}

.liveboard-floor {
  padding: 1rem;
}

.liveboard-floor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.liveboard-floor-head h2 {
  margin: 0;
  color: var(--blue);
}

.liveboard-map {
  min-height: auto;
}

.liveboard-map .room-zone {
  cursor: default;
}

.liveboard-map .room-zone:hover {
  transform: none;
}

.liveboard-map .room-zone-label {
  font-size: 0.9rem;
}

.liveboard-map .room-zone-label strong {
  font-size: 0.68rem;
}

.liveboard-map .room-zone-label small {
  font-size: 0.55rem;
}

.liveboard-map .room-zone-label em {
  font-size: 0.52rem;
}

.people-layer-placeholder {
  margin-top: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}


/* Liveboard: 2. OG als rechter Gebäudeteil */

.liveboard-floor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.liveboard-roof-area {
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(100, 116, 139, 0.08) 0,
      rgba(100, 116, 139, 0.08) 10px,
      rgba(255, 255, 255, 0.65) 10px,
      rgba(255, 255, 255, 0.65) 20px
    ),
    #f8fafc;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.liveboard-roof-area span {
  display: block;
  color: #475569;
  font-size: 1rem;
}

.liveboard-roof-area small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

.liveboard-2og-map-area {
  min-width: 0;
}

.liveboard-2og-map-area .room-map-wrap {
  height: 100%;
}

/* -----------------------------------------------
   Raumplaner Liveboard — Display/Kiosk
   ----------------------------------------------- */

.liveboard-display-body {
  margin: 0;
  background: #cfd7e2;
  overflow: hidden;
}

/* Kiosk-Grundlayout */
.liveboard-display-shell {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0.45rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.35rem;

  /*
    Zentrale Stellschrauben:
    - building-width bestimmt die gemeinsame Kartenbreite
    - label-width bestimmt die linke Etagenspalte
  */
  --display-building-width: min(80vw, calc((100vh - 3.1rem) * 0.98));
  --display-floor-label-width: clamp(72px, 7vw, 120px);
}

/* Kopfzeile */
.liveboard-display-header {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #bfc9d5;
  border-radius: 14px;
  padding: 0.35rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.liveboard-display-header .eyebrow {
  margin: 0 0 0.1rem;
  font-size: 0.62rem;
}

.liveboard-display-header h1 {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.45rem);
  line-height: 1.1;
}

.liveboard-display-status {
  display: grid;
  justify-items: end;
  gap: 0.05rem;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.liveboard-display-status strong {
  color: #047857;
  background: #d1fae5;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.liveboard-display-status span {
  font-size: 0.68rem;
}

/* Drei Etagen gleichmäßig untereinander */
.liveboard-display-floors {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}

/* Eine Etage = links Label, rechts Karte */
.liveboard-display-floor {
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid #bfc9d5;
  border-radius: 14px;
  padding: 0.34rem 0.45rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);

  display: grid;
  grid-template-columns: var(--display-floor-label-width) 1fr;
  gap: 0.5rem;
  align-items: center;
}

/* Linke Etagenbeschriftung */
.liveboard-floor-side {
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
}

.liveboard-floor-side span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-weight: 900;
  font-size: clamp(1.35rem, 2.35vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Rechter Kartenbereich */
.liveboard-floor-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
}

/* Display-Karten überschreiben normale Raumkarten-Mindesthöhe */
.display-map {
  position: relative;
  min-height: 0 !important;
  box-shadow: none;
}

.display-map .room-map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* EG und 1. OG: gemeinsamer Kartenrahmen */
.display-full-map-area {
  width: var(--display-building-width);
  max-width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 0;

  display: flex;
  align-items: stretch;
  justify-content: center;
}

.display-full-map-area .display-map-full {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

/* 2. OG: gleicher Gesamtmaßstab wie EG / 1. OG */
.display-floor-split {
  width: var(--display-building-width);
  max-width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 0;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.42rem;
  align-items: stretch;
}

.display-roof-area {
  min-height: 0;
  height: 100%;
  border: 1px dashed #bfc9d5;
  border-radius: 14px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(100, 116, 139, 0.08) 0,
      rgba(100, 116, 139, 0.08) 10px,
      rgba(255, 255, 255, 0.68) 10px,
      rgba(255, 255, 255, 0.68) 20px
    ),
    #f8fafc;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.display-roof-area span {
  display: block;
  color: #475569;
  font-size: 0.95rem;
}

.display-roof-area small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

.display-2og-map-area {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

.display-2og-map-area .display-map-2og {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

/* Display: reine Anzeige, keine Bedienung */
.display-map .room-zone {
  cursor: default;
  pointer-events: none;
}

.display-map .room-zone:hover {
  transform: none;
}

/* Labels im Displaymodus */
.display-map .room-zone-label strong {
  font-size: 0.62rem;
}

.display-map .room-zone-label small {
  font-size: 0.5rem;
}

.display-map .room-zone-label em {
  font-size: 0.48rem;
}


/* -----------------------------------------------
   Raumplaner — Einzelraum-Display / Türschild
   ----------------------------------------------- */

.room-display-body {
  margin: 0;
  min-height: 100vh;
  background: #e5eaf0;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.room-display-shell {
  min-height: 100vh;
  width: min(920px, 100vw);
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 0.85rem;
}

.room-display-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 20px;
  padding: 1rem 1.15rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.room-display-kicker {
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.room-display-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 1.05;
  color: #0f172a;
}

.room-display-clock {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
  white-space: nowrap;
}

.room-display-clock strong {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #047857;
}

.room-display-clock span {
  color: #64748b;
  font-weight: 750;
}

.room-display-status-card {
  border-radius: 24px;
  padding: 1.3rem 1.5rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

.room-display-status-text span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}

.room-display-status-text strong {
  display: block;
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.room-display-status-text p {
  margin: 0.4rem 0 0;
  font-size: clamp(1.1rem, 3vw, 2rem);
  font-weight: 800;
}

.room-display-free .room-display-status-card {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.room-display-busy .room-display-status-card {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.room-display-locked .room-display-status-card {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #94a3b8;
}

.room-display-card {
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 20px;
  padding: 1rem 1.15rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.room-display-card h2 {
  margin: 0 0 0.6rem;
  color: var(--blue);
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.room-display-card p {
  margin: 0;
  color: #475569;
  font-weight: 700;
  line-height: 1.4;
}

.room-display-booking-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
}

.room-display-booking-main strong {
  color: #0f172a;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
}

.room-display-booking-main span {
  color: #0f172a;
  font-size: clamp(1.15rem, 2.6vw, 1.8rem);
  font-weight: 850;
}

.room-display-booking-list {
  display: grid;
  gap: 0.45rem;
}

.room-display-booking-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.room-display-booking-item.is-current {
  background: #fff7d6;
  border-color: #f2b705;
}

.room-display-booking-item strong {
  color: #0f172a;
  font-size: 1rem;
}

.room-display-booking-item span {
  color: #0f172a;
  font-weight: 800;
}

.room-display-booking-item small {
  color: #64748b;
  font-weight: 750;
}

@media (max-width: 680px) {
  .room-display-shell {
    padding: 0.65rem;
  }

  .room-display-header {
    display: grid;
  }

  .room-display-clock {
    justify-items: start;
  }

  .room-display-booking-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* -----------------------------------------------
   Raumplaner — Raumanzeigen-Übersicht
   ----------------------------------------------- */

.display-overview-floor {
  margin-top: 1.4rem;
}

.display-overview-floor > h2 {
  margin: 0 0 0.75rem;
  color: var(--blue);
}

.display-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.display-room-card {
  display: grid;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 7px solid #10b981;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.display-room-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.display-room-card-locked {
  border-left-color: #94a3b8;
  opacity: 0.82;
}

.display-room-card-head {
  display: grid;
  gap: 0.25rem;
}

.display-room-card-head strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.display-room-card-head span {
  width: fit-content;
  background: #eef6ff;
  color: var(--blue);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 850;
}

.display-room-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.display-room-card small {
  color: #94a3b8;
  font-weight: 700;
}


/* -----------------------------------------------
   Raumplaner — eInk / Kindle Raumanzeige
   ----------------------------------------------- */

.ink-display-body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
}

.ink-display-shell {
  min-height: 100vh;
  width: min(760px, 100vw);
  margin: 0 auto;
  padding: 1.2rem;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 1rem;
}

.ink-display-header {
  border-bottom: 4px solid #000;
  padding-bottom: 0.8rem;
}

.ink-room-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ink-display-header h1 {
  margin: 0.35rem 0;
  font-size: clamp(2rem, 8vw, 4.6rem);
  line-height: 1;
  font-weight: 900;
}

.ink-time {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.ink-status-card {
  border: 5px solid #000;
  padding: 1rem;
  text-align: center;
}

.ink-status-title {
  font-family: system-ui, sans-serif;
  font-size: clamp(2.6rem, 12vw, 7rem);
  font-weight: 950;
  line-height: 0.95;
  text-transform: uppercase;
}

.ink-status-subtitle {
  margin-top: 0.65rem;
  font-family: system-ui, sans-serif;
  font-size: clamp(1.3rem, 5vw, 2.4rem);
  font-weight: 850;
}

.ink-status-free .ink-status-card {
  background: #fff;
}

.ink-status-busy .ink-status-card {
  background: #000;
  color: #fff;
}

.ink-status-locked .ink-status-card {
  background: #ddd;
}

.ink-section {
  border: 3px solid #000;
  padding: 0.9rem;
}

.ink-section h2 {
  margin: 0 0 0.65rem;
  font-family: system-ui, sans-serif;
  font-size: clamp(1.2rem, 4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ink-section p {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 700;
}

.ink-booking-large {
  display: grid;
  gap: 0.3rem;
}

.ink-booking-large strong {
  font-family: system-ui, sans-serif;
  font-size: clamp(1.7rem, 6vw, 3.2rem);
}

.ink-booking-large span {
  font-size: clamp(1.3rem, 5vw, 2.4rem);
  font-weight: 850;
}

.ink-booking-large small {
  font-family: system-ui, sans-serif;
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 750;
}

.ink-today {
  align-self: stretch;
}

.ink-booking-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.8rem;
  border-top: 2px solid #000;
  padding: 0.55rem 0;
  font-family: system-ui, sans-serif;
  font-size: clamp(1rem, 3vw, 1.45rem);
}

.ink-booking-row:first-of-type {
  border-top: none;
}

.ink-booking-current {
  background: #000;
  color: #fff;
  padding-inline: 0.4rem;
}

.ink-booking-row strong {
  font-weight: 900;
}

.ink-booking-row span {
  font-weight: 750;
}

@media (max-width: 520px) {
  .ink-display-shell {
    padding: 0.75rem;
  }

  .ink-booking-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* -----------------------------------------------
   13. ADMIN — Tabellen, Formulare & Verwaltung
   ----------------------------------------------- */

/* Grundlayout */

input,
select,
textarea {
  box-sizing: border-box;
}

.admin-form {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid label:not(.checkbox),
.admin-subsection label,
.admin-phase-grid label,
.admin-user-filter-form label,
.room-admin-card label,
.resource-add-fields label,
.resource-row-fields label,
.demand-override-grid label,
.holiday-add-grid label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.84rem;
  min-width: 0;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.admin-subsection input,
.admin-subsection select,
.admin-phase-grid input,
.admin-phase-grid select,
.admin-user-filter-form select,
.room-admin-card input,
.room-admin-card select,
.room-admin-card textarea,
.resource-add-fields input,
.resource-add-fields select,
.resource-row-fields input,
.resource-row-fields select,
.demand-override-grid input,
.demand-override-grid select,
.holiday-add-grid input {
  width: 100%;
  min-width: 0;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
  color: var(--text);
}

.checkbox,
.form-grid .checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  font-weight: 650;
  color: var(--text);
}


/* Admin kann für andere Buchen, Freigeben */
.admin-book-select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.people-list-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}

.btn-admin-release {
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

.btn-admin-release:hover {
    background: #fee2e2;
}

/* Admin-Dashboard */

.admin-dashboard {
  display: grid;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.admin-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.admin-group-head,
.admin-section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.admin-group-head h2,
.admin-section-head h2 {
  margin: 0;
}

.admin-section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.admin-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.admin-group .admin-overview-grid {
  margin-bottom: 0;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 7px solid #64748b;
  border-radius: 18px;
  padding: 1.1rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.admin-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  font-size: 1.55rem;
  flex: 0 0 auto;
}

.admin-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.admin-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.9rem;
}

.admin-card-blue   { border-left-color: var(--blue); }
.admin-card-red    { border-left-color: var(--red); }
.admin-card-yellow { border-left-color: #f2b705; }
.admin-card-green  { border-left-color: #10b981; }
.admin-card-purple { border-left-color: #7c3aed; }
.admin-card-gray   { border-left-color: #64748b; }

/* Infokarten */

.admin-help-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 6px solid var(--blue);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.admin-help-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.admin-help-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Mitarbeiter hinzufügen */

.admin-subsection {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  background: #f8fafc;
}

.admin-subsection h3 {
  margin: 0 0 0.8rem;
  color: var(--blue);
  font-size: 1rem;
}

.admin-person-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 115px 78px 78px;
  gap: 0.75rem;
  align-items: end;
}

.admin-login-grid {
  display: grid;
  grid-template-columns: minmax(190px, 280px) minmax(190px, 280px);
  gap: 0.75rem;
}

.admin-rights-grid {
  display: grid;
  grid-template-columns: 190px 170px;
  gap: 0.75rem;
  align-items: end;
}

.admin-small-number input {
  text-align: center;
}

.admin-check-tile {
  min-height: 42px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  color: var(--text) !important;
}

.admin-form-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.admin-submit-inline {
  width: fit-content;
  min-width: 160px;
  padding-inline: 1.2rem;
}

/* Soll/Ist individuell (Admin) anpassen */
.hour-balance-actions {
  display: grid;
  gap: 1rem;
}

.hour-balance-actions p {
  color: var(--muted);
  line-height: 1.45;
}

.hour-balance-table-wrap {
  overflow-x: auto;
}

.hour-balance-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0 0.45rem;
}

.hour-balance-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0 0.65rem 0.25rem;
}

.hour-balance-table td {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem;
  vertical-align: top;
  font-size: 0.86rem;
}

.hour-balance-table td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
}

.hour-balance-table td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 14px 14px 0;
}

.hour-balance-table td strong {
  display: block;
  font-weight: 900;
}

.hour-balance-table td small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  margin-top: 0.15rem;
}

.hour-positive {
  color: #166534;
  font-weight: 900;
}

.hour-negative {
  color: #b91c1c;
  font-weight: 900;
}

.hour-ok {
  color: #334155;
  font-weight: 900;
}

.hour-reset-form {
  display: grid;
  grid-template-columns: 90px minmax(160px, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.hour-reset-form input {
  min-width: 0;
}

.hour-reset-delete-form {
  margin-top: 0.35rem;
}

.hour-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  margin: 0 0.25rem 0.25rem 0;
}

.hour-status-reset {
  background: #eff6ff;
  color: #1d4ed8;
}

.hour-status-confirmed {
  background: #dcfce7;
  color: #166534;
}

.hour-status-open {
  background: #f1f5f9;
  color: #64748b;
}


/* Planungsphase */

.admin-phase-grid {
  display: grid;
  grid-template-columns: 100px 115px 320px max-content;
  column-gap: 1rem;
  row-gap: 0.75rem;
  align-items: end;
  justify-content: start;
}

.admin-phase-button {
  justify-self: start;
  width: auto;
  min-width: 140px;
  min-height: 42px;
  white-space: nowrap;
  padding-inline: 1.2rem;
}

.admin-phase-overview {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.admin-phase-overview h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.admin-phase-table td {
  vertical-align: middle;
}

.admin-phase-table .phase-pill {
  white-space: nowrap;
}

.admin-add-phase-details {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.admin-add-phase-details summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 900;
  color: var(--blue);
  list-style: none;
}

.admin-add-phase-details summary::-webkit-details-marker {
  display: none;
}

.admin-add-phase-details summary::after {
  content: " anzeigen";
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.admin-add-phase-details[open] summary::after {
  content: " ausblenden";
}

.admin-phase-create-form {
  padding: 0 1rem 1rem;
}

.admin-phase-create-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-phase-overview {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.admin-phase-overview h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.admin-phase-table td {
  vertical-align: middle;
}

.admin-phase-select {
  min-width: 220px;
}

.admin-phase-date {
  min-width: 145px;
}

.admin-phase-mini-pill {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.admin-phase-mini-pill.phase-wunschplanung {
  background: #eef7ff;
  color: #005a8d;
}

.admin-phase-mini-pill.phase-teamabstimmung {
  background: #fff8d8;
  color: #7a5a00;
}

.admin-phase-mini-pill.phase-finalisierung {
  background: #fff0f3;
  color: #8a0024;
}

.admin-phase-mini-pill.phase-veroeffentlicht {
  background: #e8fff4;
  color: #047857;
}

.admin-published-label {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #e8fff4;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 850;
}



/* Tabellen allgemein */

.table-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-x: auto;
  background: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th {
  text-align: left;
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding: 0.65rem;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
  vertical-align: middle;
}

.admin-table tbody tr:hover td {
  background: #f8fafc;
}

.table-input,
.table-textarea,
.admin-table select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.table-input {
  width: 100%;
  padding: 0.45rem;
}

.table-input.small {
  max-width: 90px;
}

.table-textarea {
  width: 100%;
  min-width: 180px;
  padding: 0.45rem;
  font-family: inherit;
  resize: vertical;
}

.table-input:focus,
.table-textarea:focus,
.admin-table select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 90, 141, 0.12);
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.compact-check {
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.1;
}

.admin-table-subtext {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted);
}

/* Mitarbeitendenliste */

.admin-user-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: end;
  margin: 0.8rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.admin-user-toolbar strong {
  color: var(--blue);
}

.admin-user-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
}

.admin-user-filter-form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-user-filter-form select {
  min-width: 130px;
  max-width: 150px;
  padding: 0.48rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}

.admin-user-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-user-inactive-row td {
  opacity: 0.68;
  background: #f8fafc !important;
}

.admin-employee-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-employee-table th,
.admin-employee-table td {
  padding: 0.45rem 0.35rem;
}

.admin-employee-table th {
  font-size: 0.66rem;
  line-height: 1.15;
}

.admin-employee-table input,
.admin-employee-table select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-employee-table th:nth-child(1),
.admin-employee-table td:nth-child(1) { width: 95px; }

.admin-employee-table th:nth-child(2),
.admin-employee-table td:nth-child(2) { width: 100px; }

.admin-employee-table th:nth-child(3),
.admin-employee-table td:nth-child(3) { width: 100px; }

.admin-employee-table th:nth-child(4),
.admin-employee-table td:nth-child(4) { width: 76px; }

.admin-employee-table th:nth-child(5),
.admin-employee-table td:nth-child(5) { width: 105px; }

.admin-employee-table th:nth-child(6),
.admin-employee-table td:nth-child(6) { width: 62px; }

.admin-employee-table th:nth-child(7),
.admin-employee-table td:nth-child(7) { width: 76px; }

.admin-employee-table th:nth-child(8),
.admin-employee-table td:nth-child(8) { width: 76px; }

.admin-employee-table th:nth-child(9),
.admin-employee-table td:nth-child(9) { width: 90px; }

.admin-person-input {
  max-width: 95px;
}

.admin-department-input {
  max-width: 70px;
}

.admin-hours-pair {
  display: flex;
  gap: 0.25rem;
  align-items: end;
}

.admin-hours-pair label {
  display: grid;
  gap: 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
}

.admin-hours-input {
  width: 44px;
  max-width: 44px;
  text-align: center;
}

.admin-role-select {
  max-width: 74px;
  padding-inline: 0.35rem;
}

.admin-status-stack {
  display: grid;
  gap: 0.15rem;
  justify-items: start;
}

/* Raumverwaltung */

.room-admin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: center;
  margin: 0.7rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.room-admin-floor {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  margin-top: 1rem;
  overflow: hidden;
}

.room-admin-floor summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.room-admin-floor summary::-webkit-details-marker {
  display: none;
}

.room-admin-floor summary span {
  font-weight: 900;
  color: var(--blue);
  font-size: 1.05rem;
}

.room-admin-floor summary small {
  color: var(--muted);
  font-weight: 800;
  background: #eef2f7;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.room-admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.room-admin-card {
  border: 1px solid var(--border);
  border-left: 7px solid #64748b;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.room-admin-card-office,
.room-admin-card-room { border-left-color: #10b981; }

.room-admin-card-desk_area { border-left-color: #7c3aed; }

.room-admin-card-fixed_office,
.room-admin-card-teamlead_office { border-left-color: var(--blue); }

.room-admin-card-conference { border-left-color: #f59e0b; }

.room-admin-card-hnrz { border-left-color: var(--red); }

.room-admin-card-terrace { border-left-color: #64748b; }

.room-admin-card-form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.room-admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.room-admin-card-head > div {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.room-admin-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.room-admin-card-wide {
  grid-column: 1 / -1;
}

.room-admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.room-resource-summary {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 650;
}

/* Raumtyp-Pills */

.room-type-pill,
.resource-type-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  border: 1px solid transparent;
  white-space: nowrap;
}

.resource-type-pill {
  background: #eef6ff;
  color: var(--blue);
  border-color: #bfdbfe;
}

.room-type-pill-office,
.room-type-pill-room {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.45);
}

.room-type-pill-desk_area {
  background: rgba(124, 58, 237, 0.13);
  color: #5b21b6;
  border-color: rgba(124, 58, 237, 0.35);
}

.room-type-pill-fixed_office,
.room-type-pill-teamlead_office {
  background: rgba(0, 90, 141, 0.14);
  color: #005a8d;
  border-color: rgba(0, 90, 141, 0.35);
}

.room-type-pill-conference {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.42);
}

.room-type-pill-hnrz {
  background: rgba(196, 0, 43, 0.13);
  color: #991b1b;
  border-color: rgba(196, 0, 43, 0.35);
}

.room-type-pill-terrace {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.35);
}

/* Ressourcenverwaltung */

.resource-admin-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.resource-row-card,
.resource-add-card {
  border: 1px solid var(--border);
  border-left: 7px solid var(--blue);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.resource-row-inactive {
  opacity: 0.72;
  border-left-color: #94a3b8;
}

.resource-row-form,
.resource-add-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
}

.resource-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.resource-row-fields,
.resource-add-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 1fr) 120px auto auto;
  gap: 0.75rem;
  align-items: end;
}

.resource-small-field input {
  max-width: 120px;
}

.resource-compact-check {
  min-height: 38px;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem !important;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text) !important;
  white-space: nowrap;
}

.resource-row-actions,
.resource-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.resource-add-actions .btn-primary {
  width: auto;
  min-width: 170px;
  padding-inline: 1.1rem;
}

.danger-muted {
  background: #7f1d1d;
}

/* Dienstplanung — Bedarf */

.demand-table-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-x: auto;
  background: #fff;
}

.demand-table {
  min-width: 760px;
}

.demand-table th,
.demand-table td {
  text-align: center;
  vertical-align: middle;
}

.demand-table th:first-child {
  text-align: left;
}

.demand-day-cell {
  text-align: left !important;
  background: #f8fafc !important;
  color: var(--blue);
  white-space: nowrap;
}

.demand-count-input {
  width: 72px;
  max-width: 72px;
  text-align: center;
  font-weight: 800;
}

.demand-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
}

.demand-actions .btn-primary {
  width: auto;
  min-width: 210px;
}

.demand-override-card {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-left: 7px solid var(--red);
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.demand-override-grid {
  display: grid;
  grid-template-columns: 160px 160px 120px max-content;
  gap: 0.75rem;
  align-items: end;
}

.demand-override-button {
  min-height: 42px;
  white-space: nowrap;
  padding-inline: 1.1rem;
}

.demand-override-list,
.holiday-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.demand-override-item,
.holiday-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border);
  border-left: 5px solid #f59e0b;
  border-radius: 14px;
  background: #fff;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.demand-override-item strong,
.holiday-item strong {
  display: block;
  color: var(--text);
}

.demand-override-item span,
.holiday-item span {
  display: block;
  color: var(--muted);
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

/* Dienstplanung — Ferien */

.holiday-add-card {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-left: 7px solid #f2b705;
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.holiday-add-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) 160px 160px max-content;
  gap: 0.75rem;
  align-items: end;
}

.holiday-add-button {
  min-height: 42px;
  white-space: nowrap;
  padding-inline: 1.1rem;
}

.holiday-item {
  border-left-color: #f2b705;
}

.holiday-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.holiday-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff7d6;
  font-size: 1.25rem;
}

.demand-empty-note,
.holiday-empty-note {
  margin-top: 1rem;
}

/* -----------------------------------------------
   Admin — Prio & Springer Übersicht
   ----------------------------------------------- */

.flag-admin-list {
  display: grid;
  gap: 0.4rem;
}

.flag-admin-chip {
  display: grid;
  gap: 0.15rem;
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  background: #fff;
}

.flag-admin-chip strong {
  font-size: 0.88rem;
  color: var(--text);
}

.flag-admin-chip span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 750;
}

.flag-admin-prio {
  border-left: 5px solid #dc2626;
  background: #fff5f5;
}

.flag-admin-joker {
  border-left: 5px solid #0284c7;
  background: #f0f9ff;
}

.usage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 900;
  border: 1px solid #bfdbfe;
}

.usage-pill-full {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.prio-springer-table td {
  vertical-align: top;
}

/* Admin — Prio/Springer Wochenfilter */

.admin-prio-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.week-filter-label {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  border: 1px solid #bfdbfe;
  font-size: 0.78rem;
  font-weight: 850;
}

/* Protokoll Phase2 - Mitgestaltungsverhalten MA */
.planning-log-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.planning-log-stat {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  gap: 0.2rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.planning-log-stat span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.planning-log-stat strong {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--blue);
}

.planning-log-panel {
  display: grid;
  gap: 1rem;
}

.planning-log-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.planning-log-table-wrap {
  overflow-x: auto;
}

.planning-log-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.45rem;
  min-width: 920px;
}

.planning-log-table th {
  text-align: left;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0 0.65rem 0.25rem;
}

.planning-log-table td {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem;
  vertical-align: top;
  font-size: 0.86rem;
}

.planning-log-table td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
}

.planning-log-table td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 14px 14px 0;
}

.planning-log-table td strong {
  display: block;
  font-weight: 900;
}

.planning-log-table td small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  margin-top: 0.15rem;
}

.planning-log-event-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  background: #f1f5f9;
  color: var(--text);
  white-space: nowrap;
}

.planning-log-event-phase2_take_slot,
.planning-log-event-phase2_take_block {
  background: #dcfce7;
  color: #166534;
}

.planning-log-event-phase2_release_slot {
  background: #fff7ed;
  color: #9a3412;
}

.planning-log-event-admin_take_slot,
.planning-log-event-admin_take_block {
  background: #eff6ff;
  color: #1d4ed8;
}

.planning-log-event-admin_release_slot {
  background: #fef2f2;
  color: #b91c1c;
}

.planning-log-values {
  margin-top: 0.35rem;
  padding-top: 0.3rem;
  border-top: 1px dashed var(--border);
}

/* Admin responsive */

@media (max-width: 900px) {
  .admin-person-grid,
  .admin-login-grid,
  .admin-rights-grid,
  .admin-phase-grid,
  .resource-row-fields,
  .resource-add-fields,
  .demand-override-grid,
  .holiday-add-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-user-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-user-filter-form {
    width: 100%;
  }

  .admin-user-filter-form select {
    min-width: 100%;
    max-width: none;
  }

  .room-admin-card-grid {
    grid-template-columns: 1fr;
  }

  .room-admin-card-body {
    grid-template-columns: 1fr;
  }

  .resource-small-field input {
    max-width: none;
  }

  .demand-override-button,
  .holiday-add-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .admin-person-grid,
  .admin-login-grid,
  .admin-rights-grid,
  .admin-phase-grid,
  .resource-row-fields,
  .resource-add-fields,
  .demand-override-grid,
  .holiday-add-grid {
    grid-template-columns: 1fr;
  }

  .demand-override-item,
  .holiday-item {
    display: grid;
    align-items: stretch;
  }
}

.password-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-action-stack .btn-small,
.admin-action-stack .small-btn {
  white-space: nowrap;
}

/* -----------------------------------------------
   ADMIN — Feinjustierung Mitarbeitende
   ----------------------------------------------- */

/* 1) Rechte & Besonderheiten: Nacht-Checkbox kompakter */
.admin-rights-grid {
  grid-template-columns: 180px max-content;
  align-items: end;
}

.admin-rights-grid .admin-check-tile {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  width: auto;
  min-width: 150px;
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
}

.admin-rights-grid .admin-check-tile input {
  width: auto;
  min-width: auto;
  flex: 0 0 auto;
}

/* 2) Stundenfelder in der Tabelle wieder lesbar machen */
.admin-employee-table th:nth-child(5),
.admin-employee-table td:nth-child(5) {
  width: 145px;
}

.admin-hours-pair {
  gap: 0.4rem;
}

.admin-hours-input {
  width: 58px;
  max-width: 58px;
  min-width: 58px;
  padding: 0.35rem 0.3rem;
  text-align: center;
}

/* 3) Toolbar oberhalb der Mitarbeitendenliste ruhiger */
.admin-user-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 0.75rem;
}

.admin-user-filter-form {
  margin-left: auto;
}

.admin-user-filter-form select {
  min-width: 130px;
  max-width: 150px;
}

.admin-user-toolbar-actions {
  margin-left: 0;
}

/* Kleine Entlastung für die Tabelle */
.admin-employee-table th:nth-child(7),
.admin-employee-table td:nth-child(7) {
  width: 88px;
}

.admin-role-select {
  max-width: 86px;
}


/* Raumverwaltung — Display Tokens */

.room-display-token-box {
  margin: 0 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.room-display-token-box summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  font-weight: 900;
  color: var(--blue);
}

.room-display-token-box summary::-webkit-details-marker {
  display: none;
}

.room-display-token-box summary::after {
  content: "aufklappen";
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.room-display-token-box[open] summary::after {
  content: "zuklappen";
}

.room-display-token-box summary small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.room-display-token-inner {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}

.room-token-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.room-token-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem;
}

.room-token-item strong {
  display: block;
  color: var(--text);
}

.room-token-item span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.room-token-inactive {
  opacity: 0.62;
}

.room-token-create-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.room-token-create-form input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

/* -----------------------------------------------
   14. BUTTONS & BADGES
   ----------------------------------------------- */

.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--dark-red);
}

.btn-secondary {
  background: #eef2f7;
  color: var(--text);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn-small {
  background: var(--blue);
  color: white;
  border: none;
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}

.btn-small:hover {
  filter: brightness(0.92);
}

.small-btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
}

.btn-danger {
  background: #d32f2f;
  color: #fff;
  border: none;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.btn-danger:hover {
  background: #b71c1c;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-green  { background: #d1fae5; color: #047857; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fff7d6; color: #8a5a00; }
.badge-gray   { background: #eef2f7; color: #475569; }


/* -----------------------------------------------
   15. FLASH-NACHRICHTEN
   ----------------------------------------------- */

.flash-container {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  border-left: 6px solid transparent;
}

.flash-success {
  background: #d1fae5;
  color: #065f46;
  border-left-color: #10b981;
}

.flash-success::before {
  content: "✅ ";
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
  border-left-color: #dc2626;
}

.flash-error::before {
  content: "⚠️ ";
}

/* -----------------------------------------------
   16. RESPONSIVE
   ----------------------------------------------- */

@media (max-width: 1100px) {
  .calendar-weekdays {
    display: none;
  }

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

  .empty-day {
    display: none;
  }
}

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

  .main-nav {
    justify-content: flex-start;
  }

  .hero {
    flex-direction: column;
  }

  .quick-grid,
  .concept-list {
    grid-template-columns: 1fr 1fr;
  }
}

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

@media (max-width: 560px) {
  .quick-grid,
  .concept-list {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 1rem;
  }

  .my-flags-grid {
    grid-template-columns: 1fr;
  }

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

  .fairness-header {
    flex-direction: column;
  }

  .fairness-rule-pill {
    white-space: normal;
  }

  .phase-notice-head,
  .phase-notice-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .phase-notice-item span {
    text-align: left;
  }
}


@media (max-width: 900px) {
  .resource-add-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-add-grid .compact-field input {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .resource-add-grid {
    grid-template-columns: 1fr;
  }
}
