/* ================================================================
   BE:KI Base – App-Styles
   Farben aus Logo. Layout: Header + Sidebar/Main + Footer (no scroll).
   Pinnwand-Dashboard im Suite-Stil.
   ================================================================ */

/* ── Logo-Palette (überschreibt beki-base.css Variablen) ────── */
:root {
  --navy:   #1648a6;
  --navy-d: #0f3683;
  --teal:   #23b5a0;
  --teal-d: #1c9583;
  --sky:    #15a7ce;
  --yellow: #fdbc28;
  --pink:   #fd5e90;
  --bg:     #f3f5f9;
  --card:   #ffffff;
  --line:   #e1e6ee;
  --text:   #1a2740;
  --muted:  #6b7a8d;
  --soft:   #f4f7fb;
  --radius: 14px;
  --input-border: #94a3b8;
}

/* ── Body Layout (Suite-Stil: Sidebar full-height links, main rechts) ── */
/* WICHTIG: beki-base.css setzt flex-direction: column — wir überschreiben hier */
html, body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
}
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex !important;
  flex-direction: row !important;   /* horizontal: Sidebar | main-wrap */
}

#sidebar-wrap {
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(160deg, #0d2557 0%, var(--navy) 58%, #1a7a6a 100%);
  box-shadow: 3px 0 18px rgba(13, 35, 71, .26);
  position: relative;
  z-index: 10;
}

#sidebar-brand {
  background: #fff;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#sidebar-logo {
  height: 96px;
  max-width: 200px;
  object-fit: contain;
}

#sidebar-tagline {
  font-size: 10px;
  font-weight: 700;
  color: #3a6b8a;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 8px;
  line-height: 1.5;
}

#main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Header (Suite-Stil, kompakt 58px) ───────────────────────── */
#suite-header {
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 12px;
  height: 58px;
  flex-shrink: 0;
  border-bottom: 3px solid var(--navy);
  box-shadow: 0 2px 16px rgba(22, 72, 166, .10);
  position: relative;
  z-index: 100;
}

/* Menu-Button (Hamburger, Suite-Stil) */
#menu-btn {
  background: none; border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #4b5a6e; flex-shrink: 0; transition: background .15s;
}
#menu-btn:hover { background: var(--bg, #f3f5f9); }

/* Sidebar collapse */
body.sidebar-collapsed #sidebar-wrap { width: 0; overflow: hidden; }

/* Login-Pille (Suite-Stil) */
#login-wrap { position: relative; flex-shrink: 0; }

#login-btn {
  background: linear-gradient(135deg, var(--navy), var(--teal-d));
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 7px 14px 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: filter .15s, transform .05s;
  box-shadow: 0 2px 8px rgba(22, 72, 166, .15);
}
#login-btn:hover  { filter: brightness(1.08); }
#login-btn:active { transform: scale(.98); }
.header-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #1e3d73, #3a8c68);
  color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background-size: cover; background-position: center;
  cursor: pointer;
}

#login-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .18), 0 1px 0 rgba(255,255,255,.4) inset;
  z-index: 200;
  overflow: hidden;
}
.lp-block { padding: 12px 18px; }
.lp-sep   { height: 1px; background: #f0f4f8; }
.lp-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase;
            letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.lp-hint  { font-size: 11px; color: var(--muted); line-height: 1.5; }
.lp-hint code {
  background: var(--soft); padding: 1px 5px; border-radius: 4px;
  color: var(--navy); font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10.5px;
}

.text-inp {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.text-inp:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,72,166,.10); }

.btn-navy {
  width: 100%;
  background: linear-gradient(135deg, var(--navy), var(--teal-d));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .15s;
}
.btn-navy:hover { filter: brightness(1.08); }

.modal-error, .login-error {
  background: #ffe1ec; color: #b73166;
  border-radius: 8px; padding: 7px 11px;
  font-size: 12px; font-weight: 600; margin-bottom: 8px;
}

/* Eingeloggt-Zustand */
.lp-profile {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 18px;
}
.lp-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(160deg, var(--navy), var(--teal));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
  flex-shrink: 0;
}
.lp-name { font-weight: 800; color: var(--text); font-size: 14px; }
.lp-org  { font-size: 11.5px; color: var(--muted); }

.lp-nav-btn {
  width: 100%;
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .12s;
}
.lp-nav-btn:hover { border-color: var(--navy); background: var(--soft); }

.lp-footer-block { padding: 12px 18px; background: var(--soft); }
.lp-login-main {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .15s;
}
.lp-login-main:hover { filter: brightness(1.1); }

/* Breadcrumb (mittig im Header) */
#header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5a6e;
  flex: 1;
  margin-left: 6px;
}
.bc-root  { color: var(--navy); font-weight: 700; cursor: pointer; }
.bc-sep,
.bc-active { color: var(--navy); font-weight: 700; }
.bc-hidden { display: none !important; }

/* Rechte Seite */
#header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}
#header-institut {
  height: 52px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Layout: Sidebar + Main ───────────────────────────────────── */
#sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0 12px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 5;
}

.nav-section {
  padding: 12px 16px 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .55);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-item {
  width: 100%;
  box-sizing: border-box;
  background: none;
  border: none;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  transition: background .12s, color .12s, border-color .12s;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item > span:not(.nav-icon):not(.nav-badge) {
  flex: 1; min-width: 0; line-height: 1.35;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff;
  border-left-color: rgba(122, 220, 176, .55);
}

.nav-item.active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-left-color: rgba(122, 220, 176, .8);
}

.nav-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: .9;
}

/* Letter-Icon-Fallback bleibt unsichtbar (Suite-Stil) */
.nav-ic-fb { display: none; }

/* Statische Sektion (Dashboard / Persönlich / Chat) */
.nav-static {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-static-tail {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--pink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}

.nav-badge.warn { background: var(--yellow); color: #6a4a00; }

.nav-empty {
  padding: 20px 16px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  font-style: italic;
  line-height: 1.5;
}

/* Public-Modus: ausgegraute Nav-Items mit Schloss */
.nav-item.nav-locked {
  opacity: .42;
  cursor: default;
  pointer-events: none;
}
.nav-lock {
  margin-left: auto;
  font-size: 11px;
  opacity: .8;
}

/* ── Main Content ─────────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-loader {
  color: var(--muted);
  font-size: 14px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.page-sub {
  font-size: 13px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── PINNWAND (desk surface, Suite-Stil) ──────────────────────── */
.desk-surface {
  position: relative;
  display: grid;
  grid-template-columns: 1.04fr .96fr .9fr;
  gap: 16px;
  padding: 18px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(251,255,248,.88), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)),
    radial-gradient(circle at 22% 26%, rgba(111,146,104,.08) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 68% 62%, rgba(106,139,100,.06) 0 1px, transparent 1px 6px),
    radial-gradient(circle at 82% 34%, rgba(98,129,93,.05) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #dfead6 0%, #d2e2c8 24%, #c4d8bc 54%, #d7e5ce 78%, #e8f1df 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.36),
    inset 0 -10px 24px rgba(67,96,62,.08),
    0 16px 36px rgba(67,96,62,.12);
  flex-shrink: 0;
}

.desk-surface.fill { flex: 1; min-height: 0; display: grid; }

.desk-surface::before {
  content:''; position:absolute; inset:14px;
  border-radius:18px; border:1px solid rgba(255,255,255,.16);
  pointer-events:none;
}

.desk-surface::after {
  content:''; position:absolute; inset:0; border-radius:26px;
  pointer-events:none; opacity:.5;
  background:
    radial-gradient(circle at var(--stain-x1, 26%) var(--stain-y1, 24%),
      rgba(111,82,47,.12) 0, rgba(161,130,86,.07) 28%, transparent 55%),
    radial-gradient(circle at var(--stain-x2, 72%) var(--stain-y2, 66%),
      rgba(114,82,44,.10) 0, rgba(168,140,92,.05) 24%, transparent 50%);
  background-size: var(--stain-s1, 110px) var(--stain-s1, 110px),
                   var(--stain-s2, 88px) var(--stain-s2, 88px);
  background-repeat: no-repeat;
  filter: blur(.2px);
}

.desk-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(205,214,229,.96);
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 22px rgba(30,61,115,.07), 0 3px 8px rgba(53,34,15,.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.desk-card-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.desk-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.desk-card-date {
  font-size: 11px;
  color: #8a96a8;
  font-weight: 700;
}

.desk-card-pin {
  position: absolute; top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b7f0d0, var(--teal-d) 68%, #2f6e54 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
}

.desk-card-clip {
  position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 18px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #dde3eb, #b4becd);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}

.desk-thumbtack {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #f3f3f3 66%, #d8d8d8 100%);
  border: 1px solid rgba(160,160,160,.7);
  box-shadow: 0 2px 5px rgba(0,0,0,.16);
}

.desk-thumbtack::before {
  content:''; position:absolute; left:50%; top:10px; transform:translateX(-50%);
  width:2px; height:13px;
  background: linear-gradient(180deg, #8b8b8b, #d4d4d4);
  border-radius:2px; box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.desk-termine {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,253,255,.96)),
    repeating-linear-gradient(0deg, transparent 0 32px, rgba(30,61,115,.06) 32px 33px);
  padding-top: 22px;
}

.desk-aufgaben {
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72)),
    linear-gradient(180deg, #d9ecfb 0 18px, #eef7fe 18px, #f7fbff 100%);
  transform: rotate(-1deg);
  padding-top: 14px;
}

.desk-fristen {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,252,.95)),
    repeating-linear-gradient(0deg, transparent 0 32px, rgba(30,61,115,.05) 32px 33px);
  padding-top: 22px;
}

.desk-sticky {
  grid-column: 1 / -1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.9)),
    linear-gradient(180deg, #fffef6 0%, #f9efc8 100%);
  transform: rotate(-.6deg);
}

.desk-sticky::before, .desk-sticky::after {
  content:''; position:absolute; top:-12px;
  width:64px; height:18px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #dde3eb, #b4becd);
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
}
.desk-sticky::before { left: 24px; transform: rotate(-7deg); }
.desk-sticky::after  { right: 24px; transform: rotate(7deg); }

.desk-letterhead {
  margin: -2px -2px 10px;
  padding: 6px 10px 8px;
  border-bottom: 1px solid rgba(30,61,115,.08);
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(236,242,250,.95), rgba(247,249,252,.65));
}

.desk-letterhead img {
  display: block;
  width: 44px; height: 44px;
  object-fit: contain;
  mix-blend-mode: multiply;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 2px rgba(30,61,115,.08));
}

.desk-letterhead-text {
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy);
  max-width: 240px;
}

/* Daten-Liste innerhalb einer desk-card */
.desk-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.desk-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 0;
  border-top: 1px dashed #d9e1ee;
}
.desk-item:first-child { border-top: none; padding-top: 2px; }

.desk-item-badge {
  min-width: 48px;
  border-radius: 10px;
  background: #f4f7fb;
  color: var(--navy);
  font-size: 10.5px;
  font-weight: 800;
  padding: 6px 8px;
  text-align: center;
  flex-shrink: 0;
}

.desk-item-badge.urgent { background: #ffe1ec; color: #b73166; }
.desk-item-badge.warn   { background: #fdf3d3; color: #a07c00; }

.desk-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}

.desk-item-meta {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.desk-item-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 4px 0;
}

/* Schreibbereich (Pinnwand-Notiz) */
.desk-writing-area {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  border-radius: 10px;
  padding: 10px 12px 8px;
  font: 500 12.5px/24px "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  color: #39465b;
  background:
    linear-gradient(180deg, transparent 0 23px, rgba(30,61,115,.10) 23px 24px),
    linear-gradient(90deg, rgba(199,79,61,.14) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.76));
  background-size: 100% 24px, 100% 100%, 100% 100%;
  box-shadow: inset 0 1px 3px rgba(30,61,115,.05);
  flex: 1;
  min-height: 60px;
}

.desk-writing-area::placeholder {
  color: #8e8f96;
  font-style: italic;
}

.desk-writing-area:focus {
  box-shadow:
    inset 0 1px 3px rgba(30,61,115,.05),
    0 0 0 2px rgba(30,61,115,.08);
}

/* Layout des Dashboards: Pinnwand füllt verfügbare Höhe */
.dashboard-pinwand {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-pinwand .desk-surface {
  flex: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.35fr .85fr;
  grid-template-areas:
    "termine aufgaben"
    "sticky  sticky";
}

.dashboard-pinwand .desk-termine  { grid-area: termine; }
.dashboard-pinwand .desk-aufgaben { grid-area: aufgaben; }
.dashboard-pinwand .desk-sticky   { grid-area: sticky; }

/* ── Buttons (lokal) ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .12s;
  font-family: inherit;
}

.btn-primary-sm {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-primary-sm:hover { background: var(--navy-d); border-color: var(--navy-d); }

.btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--navy); background: var(--soft); }

/* ── Forbidden / Empty ────────────────────────────────────────── */
.notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.notice-icon { font-size: 36px; margin-bottom: 8px; }
.notice-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 20, 50, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9500;
}

.modal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  width: 92vw;
  max-width: 440px;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(8, 18, 50, 0.22);
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* ── Role list (in modal) ─────────────────────────────────────── */
.role-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  margin-bottom: 7px;
  cursor: pointer;
  transition: all .12s;
}

.role-option:hover { border-color: var(--navy); background: var(--soft); }

.role-option.selected {
  border-color: var(--navy);
  background: #e9eefb;
}

.role-option-cb { margin-top: 2px; accent-color: var(--navy); }

.role-name { font-weight: 700; color: var(--text); font-size: 14px; }
.role-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ── Stub-Page ─────────────────────────────────────────────────── */
.stub {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stub-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.stub-list {
  display: inline-block;
  text-align: left;
  margin: 12px auto 0;
  font-size: 13px;
  line-height: 1.75;
  color: #4b5a6e;
}

.stub-list b { color: var(--navy); }

/* ── Footer (BE:KI-Standard) ──────────────────────────────────── */
#app-footer {
  background: #fff;
  border-top: 1px solid #dde3ec;
  padding: 7px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  font-size: 11.5px;
  color: #9ba8bb;
}

.footer-copy { font-size: 11.5px; color: #9ba8bb; font-weight: 500; }
.footer-copy strong { color: #6b7a8d; }
.footer-version { font-size: 11px; color: #c8d0dc; }

/* Hinweise-Page (für Leitung) */
.hinweise-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
}

.hinweis {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 10px;
  padding: 12px 14px;
}

.hinweis.urgent { border-left-color: var(--pink); }
.hinweis.warn   { border-left-color: var(--yellow); }

.hinweis-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.hinweis-title { font-weight: 700; color: var(--text); font-size: 14px; }
.hinweis-meta  { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   KLIENT:INNEN – Liste, Filter, Akte
   ════════════════════════════════════════════════════════════ */

.text-input {
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 220px;
  background: #fff;
  color: var(--text);
}
.text-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,72,166,.08); }

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.filter-chip {
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .12s;
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-chip-count {
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
}
.filter-chip.active .filter-chip-count { background: rgba(255,255,255,.22); color: #fff; }

/* ── Liste ──────────────────────────────────────────────── */
.client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.client-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all .12s;
  width: 1200px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.client-row:hover { border-color: var(--navy); box-shadow: 0 4px 12px rgba(22,72,166,.06); }
.client-row-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--navy), var(--teal));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.client-row-main { flex: 1; min-width: 0; }
.client-row-name {
  font-weight: 800;
  color: var(--text);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.client-row-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  line-height: 1.45;
}
.client-row-fls {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 130px;
  flex-shrink: 0;
}
.fls-mini-bar {
  width: 110px;
  height: 6px;
  background: #eaeef5;
  border-radius: 3px;
  overflow: hidden;
}
.fls-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--sky));
  border-radius: 3px;
}
.client-row-fls-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.client-row-arrow {
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
  margin-left: 4px;
  flex-shrink: 0;
}

/* ── Falltyp-Badges ───────────────────────────────────────── */
.ct-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.ct-badge-lg {
  padding: 4px 12px;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}
.ct-stat    { background: #e9eefb; color: var(--navy); }
.ct-tstat   { background: #fff3d2; color: #8a6700; }
.ct-eh      { background: #ffe1ec; color: #b73166; }
.ct-amb     { background: #d8f3eb; color: #166651; }
.ct-default { background: #eef1f6; color: var(--muted); }
.ct-beendet { background: #fce8e8; color: #c53030; }

/* ── Akte-Layout ──────────────────────────────────────────── */
.akte-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
}
.akte-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 14px;
  flex-shrink: 0;
  overflow-x: auto;
}
.akte-tab {
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all .12s;
  border-radius: 6px 6px 0 0;
}
.akte-tab:hover { color: var(--navy); background: var(--soft); }
.akte-tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  background: var(--soft);
}

.akte-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* ── KV-Grid (Stammdaten-Karten) ──────────────────────────── */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.kv-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.kv-card-wide { grid-column: 1 / -1; }
.kv-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kv-sub { font-size: 12px; color: var(--muted); margin: -6px 0 10px; }
.kv-row {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px dashed #ecf0f6;
  font-size: 13px;
}
.kv-row:first-of-type { border-top: none; padding-top: 1px; }
.kv-label { width: 150px; flex-shrink: 0; color: var(--muted); font-weight: 600; }
.kv-value { flex: 1; color: var(--text); font-weight: 600; }

.tag-warn {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  background: #fdf3d3;
  color: #8a6700;
  font-size: 10.5px;
  font-weight: 800;
  margin-left: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--navy);
  font-size: 10.5px;
  font-weight: 700;
  margin-right: 4px;
}

/* ── FLS-Block ────────────────────────────────────────────── */
.fls-block {
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}
.fls-block .fls-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
}
.fls-rest { color: var(--muted); font-weight: 600; }
.fls-bar {
  height: 10px;
  background: #e3eaf2;
  border-radius: 5px;
  overflow: hidden;
}
.fls-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--sky) 80%, var(--yellow) 100%);
  border-radius: 5px;
}
.fls-meta {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.fls-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.fls-stat {
  background: var(--soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.fls-stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.fls-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.fls-stat-value span { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.fls-stat-value.positive { color: #166651; }
.fls-stat-value.negative { color: #b73166; }

/* ── Kontakte ─────────────────────────────────────────────── */
.contact-list { display: flex; flex-direction: column; gap: 0; }
.contact-row {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px dashed #ecf0f6;
  font-size: 13px;
}
.contact-row:first-child { border-top: none; padding-top: 1px; }
.contact-role { color: var(--muted); font-weight: 700; }
.contact-name { color: var(--text); font-weight: 700; }
.contact-phone { color: var(--muted); }

/* ── Hilfeplan-Tab ────────────────────────────────────────── */
.goal-block {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 10px;
}
.goal-title {
  font-weight: 800;
  color: var(--navy);
  font-size: 13.5px;
  margin-bottom: 8px;
}
.subgoal-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d6dde9;
}
.subgoal-row:first-of-type { border-top: none; padding-top: 0; }
.subgoal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.subgoal-status {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .04em;
}
.status-progress { background: #e6f5f0; color: #1c7a64; }
.status-open     { background: #ecf0f6; color: var(--muted); }
.status-done     { background: #d5eecd; color: #2c6a23; }
.subgoal-title { flex: 1; font-weight: 700; color: var(--text); font-size: 13px; }
.subgoal-progress { font-weight: 800; color: var(--navy); font-size: 12px; }
.subgoal-bar {
  height: 6px;
  background: #e3eaf2;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.subgoal-fill { height: 100%; background: var(--teal); }
.action-list {
  margin: 4px 0 0 18px;
  padding: 0;
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
}
.action-list .muted { color: var(--muted); font-weight: 500; }

/* ── Doku-Tab ─────────────────────────────────────────────── */
.doku-list { display: flex; flex-direction: column; gap: 8px; }
.doku-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.doku-head {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
  margin-bottom: 6px;
}
.doku-cat {
  background: var(--navy);
  color: #fff;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: .03em;
  font-size: 10px;
  text-transform: uppercase;
}
.doku-date { color: var(--muted); font-weight: 600; }
.doku-author { color: var(--muted); margin-left: auto; }
.doku-text { font-size: 13px; line-height: 1.55; color: var(--text); }
.doku-tags { margin-top: 6px; }

/* ── Berichte-Tab ─────────────────────────────────────────── */
.report-list { display: flex; flex-direction: column; gap: 8px; }
.report-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto 110px;
  gap: 12px;
  align-items: center;
}
.report-type { font-weight: 700; color: var(--text); font-size: 13px; }
.report-meta { color: var(--muted); font-size: 11.5px; }
.report-status {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  text-align: center;
}
.report-status.status-draft   { background: #fff3d2; color: #8a6700; }
.report-status.status-open    { background: #ecf0f6; color: var(--muted); }
.report-status.status-overdue { background: #ffe1ec; color: #b73166; }

/* ── Termine-Tab ──────────────────────────────────────────── */
.termin-list { display: flex; flex-direction: column; gap: 6px; }
.termin-item {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.termin-date {
  background: var(--soft);
  color: var(--navy);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  min-width: 110px;
  text-align: center;
}
.termin-title { font-weight: 700; color: var(--text); font-size: 13px; }
.termin-meta  { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── Dokumente-Tab ────────────────────────────────────────── */
.dok-list { display: flex; flex-direction: column; gap: 6px; }
.dok-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
}
.dok-icon { font-size: 16px; }
.dok-name { flex: 1; font-weight: 700; color: var(--text); font-size: 13px; }
.dok-date { color: var(--muted); font-size: 11.5px; }

/* ── Risiken-Tab ──────────────────────────────────────────── */
.risk-list { display: flex; flex-direction: column; gap: 6px; }
.risk-item {
  background: #fff8ec;
  border: 1px solid #f4ddae;
  color: #8a6700;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.empty-tab {
  background: var(--soft);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty-tab a { color: var(--navy); font-weight: 700; }

/* ════════════════════════════════════════════════════════════
   HERO / LANDING (vor Login, Suite-Stil)
   ════════════════════════════════════════════════════════════ */
.hero-page {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 24px 28px;      /* 60px Abstand vom Header */
  margin: -18px -22px;          /* überschreibt #main padding (alle 4 Seiten) */
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(22, 72, 166, .22) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(13, 74, 107, .26) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 80%, rgba(35, 181, 160, .18) 0%, transparent 50%),
    linear-gradient(to right, transparent 0%, rgba(5,10,20,.4) 100%),
    linear-gradient(to bottom, #0d2347 0%, #1648a6 55%, #1a7a6a 100%);
}
.hero-content {
  max-width: 920px;
  width: 100%;
  text-align: center;
}
.hero-footnote {
  margin-top: 18px;
  color: rgba(255,255,255,.45);
  font-size: 11.5px;
  letter-spacing: .04em;
  font-weight: 500;
}
.hero-logo {
  width: 720px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 38px;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.3));
}
.hero-headline {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.hero-sub {
  margin: 0 auto 22px;
  color: #cdd6e3;
  font-size: .98rem;
  line-height: 1.65;
  max-width: 580px;
  text-align: center;
}

/* 4 Module-Cards in Reihe */
.hero-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 26px;
}
@media (max-width: 760px) {
  .hero-modules { grid-template-columns: repeat(2, 1fr); }
}
.hero-module {
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 14px 12px 16px;
  text-align: center;
  transition: transform .15s, border-color .15s;
}
.hero-module:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .26);
}
.hero-module-icon {
  font-size: 22px;
  margin-bottom: 4px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.3));
}
.hero-module-name {
  color: #f1f5f9;
  font-weight: 800;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.hero-module-desc {
  color: #94a3b8;
  font-size: 11.5px;
  line-height: 1.45;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero-primary {
  background: linear-gradient(135deg, var(--sky), var(--navy));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 18px 44px;
  font-size: 1.18rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 28px rgba(22, 72, 166, .5);
  transition: filter .15s, transform .05s;
  letter-spacing: .01em;
}
.btn-hero-primary:hover  { filter: brightness(1.1); }
.btn-hero-primary:active { transform: scale(.98); }
.btn-hero-ghost {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(4px);
  color: #f1f5f9;
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .35);
}

/* Dev-Mode User-Switcher (nur lokal sichtbar) */
.dev-switcher {
  border: 1.5px solid var(--yellow);
  background: #fffbe6;
  color: #6a4a00;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 8px;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  max-width: 220px;
}
.dev-switcher:hover { border-color: #b08400; }

/* ════════════════════════════════════════════════════════════
   FORMS (Profil-Bereich u. ä.)
   ════════════════════════════════════════════════════════════ */
.form-grid { display: flex; flex-direction: column; gap: 12px; }
.form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px dashed #ecf0f6;
}
.form-row:first-of-type { border-top: none; padding-top: 1px; }
.form-label { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.form-input {
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--text);
}
.form-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,72,166,.08); }
select.form-input { max-width: 240px; }
input.form-input[type="tel"],
input.form-input[type="email"],
input.form-input[type="date"],
input.form-input[type="password"],
input.form-input[type="number"] { max-width: 280px; }
.form-textarea { font-family: inherit; resize: vertical; min-height: 70px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ecf0f6;
}
.form-msg { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form-msg.ok  { color: #166651; }
.form-msg.err { color: #b73166; }

/* Einsatz-Chips im Profil */
.assignment-chip {
  display: inline-block;
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 4px 4px 0;
}
.muted { color: var(--muted); font-style: italic; font-weight: 500; }

/* ════════════════════════════════════════════════════════════
   LEISTUNGSERFASSUNG (#/leistung)
   ════════════════════════════════════════════════════════════ */
.funding-card { margin-bottom: 14px; }
.funding-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.funding-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.funding-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.buchungen-list { margin-top: 14px; }
.buchungen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.buchungen-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--soft);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.buchungen-table tbody td {
  padding: 8px 10px;
  border-top: 1px dashed #ecf0f6;
  vertical-align: top;
  color: var(--text);
}
.buchungen-table tbody tr:first-child td { border-top: none; }
.buchungen-table .b-note {
  color: var(--muted);
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
}
.b-status {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: .04em;
}
.b-status.status-erfasst    { background: #fff3d2; color: #8a6700; }
.b-status.status-freigegeben{ background: #d5eecd; color: #2c6a23; }
.b-status.status-storniert  { background: #ecf0f6; color: var(--muted); }

.b-del {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.b-del:hover { color: var(--pink); }

/* FLS-Monatszettel */
.fls-sheet-header { margin-bottom: 16px; }
.fls-sheet-header h3 { font-size: 16px; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.fls-sheet-meta { font-size: 12px; color: var(--muted); line-height: 1.6; }
.fls-sheet-table { margin-top: 8px; }
.fls-sheet-summary {
  margin-top: 18px; padding: 14px 16px;
  background: var(--soft); border-radius: 8px; border: 1px solid var(--line);
}
.fls-sheet-summary-title {
  font-size: 13px; font-weight: 800; color: var(--navy);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: .03em;
}
.fls-sheet-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
}
.fls-sheet-sum-item { }
.fls-sheet-sum-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.fls-sheet-sum-value { font-size: 15px; font-weight: 800; color: var(--text); }
.fls-sheet-sum-value span { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ── FLS-Tabelle (Arbeitszeit-Stil) ──────────────────────── */
.fls-client-bar {
  max-width: 1200px; margin: 0 auto 10px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--navy);
}
.fls-client-bar select { max-width: 400px; }
.fls-info-header {
  max-width: 1200px; margin: 0 auto 8px;
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 16px;
}
.fls-info-row {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  margin-bottom: 8px;
}
.fls-info-row:last-child { margin-bottom: 0; }
.fls-info-item {
  display: flex; flex-direction: column; gap: 2px; min-width: 120px;
}
.fls-info-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fls-info-value { font-size: 13px; font-weight: 600; color: var(--text); }
.fls-info-date, .fls-info-num {
  border: 1px solid var(--line); border-radius: 4px;
  padding: 3px 6px; font-size: 12px; font-family: inherit;
  background: #fff; color: var(--text); width: 130px;
}
.fls-info-num { width: 80px; }
.fls-month-nav {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 4px;
}
.fls-summary-top, .fls-summary-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  padding: 8px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--text);
  align-items: center;
}
.fls-summary-top { background: linear-gradient(135deg, #f0f4f8, #e8edf4); margin-bottom: 4px; }
.fls-summary-bottom { margin-top: 4px; background: linear-gradient(135deg, #e8edf4, #f0f4f8); border-top: 2px solid var(--navy, #1e3a5f); }
.fls-bar-inline {
  flex: 1; min-width: 120px; max-width: 300px;
  height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
}
.fls-bar-inline .fls-fill { height: 100%; background: var(--teal); border-radius: 4px; transition: width .3s; }

.fls-table-wrap {
  overflow-x: auto; border-radius: 8px;
  border: 1px solid #d0d7e2; box-shadow: 0 1px 4px rgba(30,58,95,.06);
  max-width: 1200px; margin: 0 auto;
}
.fls-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}
.fls-table thead { position: sticky; top: 0; z-index: 2; }
.fls-table th {
  background: var(--navy, #1e3a5f); color: rgba(255,255,255,.9);
  padding: 8px 4px; text-align: center; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  border-right: 1px solid rgba(255,255,255,.12);
}
.fls-table th:last-child { border-right: none; }
.fls-th-date { text-align: left !important; padding-left: 10px !important; }
.fls-table td {
  padding: 0 4px; text-align: center;
  height: 34px; vertical-align: middle;
  border-bottom: 1px solid #d0d7e2;
  border-right: 1px solid #eaeef3;
}
.fls-table td:last-child { border-right: none; }
.fls-table tbody tr:last-child td { border-bottom: none; }
.fls-td-date {
  text-align: left; padding-left: 10px !important; white-space: nowrap;
  font-size: 13px; color: var(--text); border-right: 1px solid #d0d7e2 !important;
}
.fls-td-date .az-wd { display: inline-block; width: 18px; font-weight: 700; color: var(--navy); font-size: 11px; }

.fls-row { transition: background .1s; }
.fls-row:hover:not(.az-we) { background: #e6edf7; }
.fls-row:nth-child(odd):not(.az-we) { background: #fff; }
.fls-row:nth-child(even):not(.az-we) { background: #f5f7fa; }
.fls-row:nth-child(even):not(.az-we):hover { background: #e6edf7; }

/* Inputs in der FLS-Tabelle – sichtbare Felder */
.fls-in {
  border: 1px solid #d0d7e2; background: #fff; border-radius: 3px;
  text-align: center; font-size: 13px; padding: 4px 6px;
  font-variant-numeric: tabular-nums; font-family: inherit;
  box-sizing: border-box; outline: none;
}
.fls-in:hover:not(:disabled) { border-color: #a0b0c8; }
.fls-in:focus { border-color: var(--navy, #1e3a5f); background: #fff; box-shadow: 0 0 0 2px rgba(30,58,95,.15); }
.fls-in:disabled { background: #f5f5f5; border-color: transparent; color: #c0c0c0; cursor: default; }
.fls-in-num { width: 80px; }
.fls-td-fk { padding: 0 !important; }
.fls-fk-wrap { display: flex; align-items: center; gap: 2px; padding: 0 2px; }
.fls-fk-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fls-fk-placeholder { display: none; }
.fls-in-fk { flex: 1; min-width: 0; padding: 2px; font-size: 11px; cursor: pointer; border: 1px solid #d0d7e2; border-radius: 3px; background: #fff; font-family: inherit; }
.fls-td-note { text-align: left; }
.fls-in-note { width: 100%; text-align: left; box-sizing: border-box; }
.fls-td-del { width: 24px; padding: 0 2px !important; }
.fls-del-btn { background: none; border: none; color: #c53030; cursor: pointer; font-size: 14px; padding: 2px 4px; opacity: 0.4; transition: opacity 0.15s; }
.fls-del-btn:hover { opacity: 1; }

@media print {
  .fls-client-bar, .page-header .page-actions { display: none !important; }
  .fls-new-row { display: none !important; }
  .fls-in { border: none !important; background: none !important; box-shadow: none !important; }
  .fls-info-edit input { border: none !important; padding: 0 !important; background: none !important; }
  .fls-info-header { border: 1px solid #ccc; }
  .fls-table-wrap { border: 1px solid #ccc; }
  .fls-table th { background: #f0f0f0 !important; color: #333 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fls-summary-top, .fls-summary-bottom { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .fls-month-nav button { display: none; }
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.form-check input { accent-color: var(--navy); }


/* ════════════════════════════════════════════════════════════
   PRICING & BUCHUNG (BEKI_PRICING_GUIDE.md, Schema B Standalone)
   ════════════════════════════════════════════════════════════ */

/* ── Tier-Chips ──────────────────────────────────────────── */
.tier-chip {
  display: inline-flex; align-items: center;
  padding: 4px 13px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  flex-shrink: 0;
}
.tier-small  { background: #dbe6f9; color: var(--navy); }
.tier-medium { background: #d1f0e4; color: #1e6b3a; }
.tier-large  { background: #fde8d0; color: #b45309; }

/* ── Pricing-Page Container ──────────────────────────────── */
.pricing-intro {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(22, 72, 166, .04);
}
.pricing-intro-title { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.pricing-intro-sub   { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.pricing-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 920px) {
  .pricing-full-grid { grid-template-columns: 1fr; }
}

/* ── Paket-Card .pf-card ─────────────────────────────────── */
.pf-card {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #eef1f5;
  padding: 16px 18px;
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, box-shadow .2s;
}
.pf-card:hover { border-color: #c8d4ea; box-shadow: 0 4px 18px rgba(22, 72, 166, .08); }
.pf-current    { border-color: var(--teal) !important; box-shadow: 0 4px 18px rgba(35, 181, 160, .15) !important; }
.pf-cur-badge {
  position: absolute; top: -10px; left: 14px;
  background: var(--teal); color: #fff;
  font-size: 9.5px; font-weight: 800;
  padding: 2px 10px; border-radius: 20px; letter-spacing: .04em;
}
.pf-card .tier-chip { display: inline-flex; align-self: flex-start; margin-bottom: 4px; }
.pf-users { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.pf-modules { list-style: none; flex: 1; padding: 0; margin: 0; }
.pf-modules li { font-size: 12px; color: var(--muted); padding: 1px 0; line-height: 1.5; }
.pf-modules li::before { content: '· '; color: #c8d4ea; }
.pf-price-block { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.pf-price-anfrage { font-size: 13px; color: #94a3b8; font-weight: 500; }
.pf-contact-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--sky), var(--navy));
  color: #fff; border: none;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: filter .15s, box-shadow .15s;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(22, 72, 166, .25);
}
.pf-contact-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(22, 72, 166, .32); }

/* ── Buchungs-Wizard ─────────────────────────────────────── */
.bw-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px 18px;
}
.bw-progress {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.bw-step {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #94a3b8;
}
.bw-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #eef1f5; color: #94a3b8;
  font-size: 11px; font-weight: 800;
}
.bw-step.bw-current { color: var(--navy); font-weight: 700; }
.bw-step.bw-current .bw-step-num { background: var(--navy); color: #fff; }
.bw-step.bw-done    { color: var(--teal); }
.bw-step.bw-done    .bw-step-num { background: var(--teal); color: #fff; }
.bw-step-sep { color: #c8d4ea; font-size: 14px; }

.bw-title { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.bw-sub   { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.55; }

.bw-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
}
.bw-form .bw-row-full { grid-column: 1 / -1; }
.bw-row { display: flex; flex-direction: column; gap: 6px; }
.bw-label { font-size: 11.5px; font-weight: 700; color: var(--text); }
.bw-input, .bw-textarea, .bw-select {
  width: 100%;
  border: 1.5px solid var(--input-border);
  border-radius: 9px;
  padding: 9px 11px;
  font: inherit; font-size: 13px;
  background: var(--soft);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.bw-input:focus, .bw-textarea:focus, .bw-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(22, 72, 166, .12);
  background: #fff;
}
.bw-textarea { resize: vertical; min-height: 80px; }

.bw-actions {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
}
.bw-actions .bw-spacer { flex: 1; }

.bw-summary {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.bw-summary-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.bw-summary-row { display: flex; gap: 12px; padding: 3px 0; font-size: 13px; }
.bw-summary-key { width: 180px; color: var(--muted); flex-shrink: 0; }
.bw-summary-val { color: var(--text); font-weight: 600; word-break: break-word; }

.bw-error {
  background: #ffe1ec; border: 1px solid #f4a4be;
  color: #8a1e3d; border-radius: 9px; padding: 8px 12px;
  font-size: 12.5px; margin-bottom: 12px;
}
.bw-success {
  background: #d5eecd; border: 1px solid #82b870;
  color: #1e6b3a; border-radius: 12px; padding: 18px 20px;
  font-size: 14px; line-height: 1.65; text-align: center;
}

/* ════════════════════════════════════════════════════════════
   ARBEITSZEIT (time) — Page-Layout
   ════════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 0 2px;
}
.tab-btn {
  background: transparent; border: none;
  color: var(--muted);
  font: inherit; font-weight: 700; font-size: 13.5px;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }

.zeit-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.zeit-month-pick {
  display: flex; align-items: center; gap: 10px;
}
.zeit-month-label {
  font-size: 16px; font-weight: 800; color: var(--text);
  min-width: 160px; text-align: center;
}

.zeit-balance-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 6px 18px rgba(22, 72, 166, .06);
  margin-bottom: 18px;
}
.zeit-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .zeit-balance-grid { grid-template-columns: 1fr; gap: 12px; }
}
.zeit-balance-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 24px;
  font-size: 13.5px;
}
.zeit-stat-inline {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.zeit-stat-inline.pos { color: #1c9583; }
.zeit-stat-inline.neg { color: #c0392b; }

/* ════════════════════════════════════════════════════════════
   MITARBEITENDE & GRUPPEN
   ════════════════════════════════════════════════════════════ */
.mitarb-list, .gruppen-list {
  display: flex; flex-direction: column;
  gap: 12px;
}
.mitarb-card, .gruppe-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.mitarb-main, .gruppe-main { flex: 1; min-width: 0; }
.mitarb-name, .gruppe-name {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.mitarb-meta, .gruppe-meta {
  font-size: 13px; color: var(--muted);
  margin-bottom: 4px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.mitarb-meta .muted, .gruppe-meta .muted { color: var(--muted); }
.mitarb-roles {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.role-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(22, 72, 166, .08);
  color: var(--navy);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.mitarb-actions, .gruppe-actions {
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0;
}
.mitarb-note-area {
  width: 100%; padding: 8px 0 0; border-top: 1px solid var(--border); margin-top: 8px;
}
.mitarb-prefs-area {
  width: 100%; padding: 8px 0 0; border-top: 1px solid var(--border); margin-top: 8px;
}
.mitarb-note-inline {
  width: 100%; font-size: 12px; color: var(--text); background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 6px; padding: 6px 10px; margin-top: 6px;
}

.role-checks {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 6px 0;
}
.role-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--text);
  cursor: pointer;
}

.gruppe-dp {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.gruppe-dp-label {
  font-size: 11.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.gruppe-dp-list {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.dp-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(35, 181, 160, .12);
  border: 1px solid rgba(35, 181, 160, .35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px; font-weight: 600;
  color: var(--teal-d);
}
.dp-pill-x {
  background: transparent;
  border: none;
  color: var(--teal-d);
  font: inherit; font-size: 14px; line-height: 1;
  cursor: pointer; padding: 0 0 0 4px;
}
.dp-pill-x:hover { color: #c0392b; }
.dp-add { margin-left: 4px; }

/* ════════════════════════════════════════════════════════════
   DEV-ONLY · Multi-Persona-Quick-Login
   TODO: vor Produktion vollständig entfernen.
   ════════════════════════════════════════════════════════════ */
.lp-dev-block { background: #fff8e1; border-top: 1px solid #f5e7a8; }
.lp-dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.lp-dev-btn {
  background: #fff;
  border: 1px solid #f0e1a3;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: #6e5413;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-align: center;
}
.lp-dev-btn:hover { filter: brightness(.93); }

/* Bereichsleitung – lila */
.dev-bl  { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
/* Stationär (Päd. Leitung, GL, MA) – kräftiges blau */
.dev-stat { background: #c7d7fe; border-color: #818cf8; color: #312e81; }
/* Ambulant (Büroleitung, MA amb.) – warmes grün/teal */
.dev-amb  { background: #a7f3d0; border-color: #34d399; color: #064e3b; }
/* Org/MAV – orange */
.dev-org  { background: #fff1e0; border-color: #f5c882; color: #92400e; }

.form-hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-top: 4px;
}
.zeit-stat-label {
  font-size: 11px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 6px;
}
.zeit-stat-val {
  font-size: 22px; font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.zeit-stat-val.pos { color: #1c9583; }
.zeit-stat-val.neg { color: #c0392b; }

.zeit-list {
  display: flex; flex-direction: column;
  gap: 10px;
}
.zeit-entry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px;
}
.zeit-entry:hover { box-shadow: 0 6px 18px rgba(22, 72, 166, .06); }
.zeit-entry-main {
  display: grid;
  grid-template-columns: 160px 150px 80px 110px 1fr;
  align-items: center;
  gap: 12px;
  flex: 1; min-width: 0;
  font-size: 14px;
}
@media (max-width: 900px) {
  .zeit-entry-main { grid-template-columns: 1fr; gap: 4px; }
}
.zeit-entry-date { font-weight: 700; color: var(--text); }
.zeit-entry-time { color: var(--text); font-variant-numeric: tabular-nums; }
.zeit-entry-time .muted { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.zeit-entry-net { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.zeit-entry-kind {
  font-size: 11.5px; font-weight: 700;
  color: var(--muted); letter-spacing: .04em;
  text-transform: uppercase;
}
.zeit-entry-user { font-size: 13px; color: var(--text); font-weight: 600; }
.zeit-entry-note { color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.zeit-entry-ack { grid-column: 1 / -1; margin-top: 4px; }
.zeit-ack {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.zeit-ack.ok { background: #e1f3ec; color: #1c6b48; }
.zeit-ack.pending { background: #fff4d6; color: #8a6c1d; }
.zeit-entry-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

/* ── Arbeitszeit Monats-Tabelle ── */
.az-header {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  margin-bottom: 12px;
}
.az-month-label {
  font-size: 17px; font-weight: 800; color: var(--navy, #1e3a5f);
  min-width: 170px; text-align: center; letter-spacing: -.02em;
}
.az-nav {
  background: none; border: 1.5px solid var(--line, #d0d7e2); color: var(--navy);
  width: 30px; height: 30px; border-radius: 6px; font-size: 17px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.az-nav:hover { background: var(--navy, #1e3a5f); color: #fff; }

.az-summary-top, .az-summary-bottom {
  display: flex; gap: 18px; flex-wrap: wrap; padding: 7px 10px;
  border-radius: 6px; font-size: 12.5px; color: var(--muted, #64748b);
  max-width: 1200px; margin-left: auto; margin-right: auto;
}
.az-summary-top { background: linear-gradient(135deg, #f0f4f8, #e8edf4); margin-bottom: 4px; }
.az-summary-bottom { margin-top: 4px; background: linear-gradient(135deg, #e8edf4, #f0f4f8); border-top: 2px solid var(--navy, #1e3a5f); }
.az-sum-item { display: flex; gap: 5px; align-items: center; }
.az-sum-val { font-weight: 700; color: var(--navy, #1e3a5f); }
.az-sum-val.pos { color: #16a34a; }
.az-sum-val.neg { color: #c53030; }
.az-sum-total { margin-left: auto; font-weight: 800; font-size: 13px; }

.az-table-wrap {
  overflow-x: auto; border-radius: 8px;
  border: 1px solid #d0d7e2; box-shadow: 0 1px 4px rgba(30,58,95,.06);
  max-width: 1200px; margin: 0 auto;
}
.az-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.az-table thead { position: sticky; top: 0; z-index: 2; }
.az-table th {
  background: var(--navy, #1e3a5f); color: rgba(255,255,255,.9);
  padding: 8px 4px; text-align: center; font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  border-right: 1px solid rgba(255,255,255,.12);
}
.az-table th:last-child { border-right: none; }
.az-th-date { text-align: left !important; padding-left: 10px !important; }
.az-table td {
  padding: 0 4px; text-align: center;
  height: 34px; vertical-align: middle;
  border-bottom: 1px solid #d0d7e2;
  border-right: 1px solid #eaeef3;
}
.az-table td:last-child { border-right: none; }
.az-table tbody tr:last-child td { border-bottom: none; }
.az-date {
  text-align: left; padding-left: 10px !important; white-space: nowrap;
  font-size: 13px; color: var(--text); border-right: 1px solid #d0d7e2 !important;
}
.az-wd { display: inline-block; width: 18px; font-weight: 700; color: var(--navy); font-size: 11px; }
.az-row { transition: background .1s; }
.az-row:hover { background: #e6edf7; }
.az-row:nth-child(odd):not(.az-we):not(.az-feiertag-row):not(.az-sick):not(.az-abs) { background: #fff; }
.az-row:nth-child(even):not(.az-we):not(.az-feiertag-row):not(.az-sick):not(.az-abs) { background: #f5f7fa; }
.az-row:nth-child(even):not(.az-we):not(.az-feiertag-row):not(.az-sick):not(.az-abs):hover { background: #e6edf7; }
.az-we { background: #eae8e4 !important; }
.az-we .az-date { color: #aaa; }
.az-we .az-wd { color: #bbb; }
.az-we:hover { background: #e0ded9 !important; }
.az-feiertag-row { background: #f3effb; }
.az-feiertag-row:nth-child(even) { background: #ece6f7; }
.az-feiertag-row:hover { background: #e4dcf0; }
.az-feiertag-row .az-date { color: #8b6db5; }
.az-feiertag-row .az-wd { color: #9b7dc5; }
.az-sick { background: #fef2f2; }
.az-abs { background: #eff6ff; }
.az-abs-label {
  display: inline-block; font-size: 9.5px; font-weight: 700;
  color: #2563eb; background: #dbeafe; padding: 1px 5px; border-radius: 3px;
}
.az-feiertag { color: #7c3aed; background: #ede9fe; }
.az-free-label {
  display: inline-block; font-size: 9.5px; font-weight: 600; color: #aaa;
}
.az-in {
  width: 80px; border: 1px solid transparent; background: transparent;
  text-align: center; font-size: 13px; padding: 3px 0;
  font-variant-numeric: tabular-nums; font-family: inherit;
  transition: all .12s;
}
/* Uhr-Icon bei time-Inputs entfernen */
.az-in[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.az-in[type="time"] { -moz-appearance: textfield; }
.az-in:hover:not(:disabled) { border-color: #c0cad8; border-radius: 3px; }
.az-in:focus {
  border-color: var(--navy, #1e3a5f); outline: none; background: #fff;
  border-radius: 3px; box-shadow: 0 0 0 2px rgba(30,58,95,.15);
}
.az-in:disabled { color: #c0c0c0; cursor: default; }
.az-pause { width: 50px; }
.az-hrs {
  font-weight: 800; color: var(--navy, #1e3a5f); min-width: 54px; font-size: 13px;
  border-right: 1px solid #d0d7e2 !important;
}
.az-sick-cell { text-align: center; width: 36px; }
.az-sick-cb { width: 14px; height: 14px; cursor: pointer; accent-color: #c53030; }
.az-save-status { font-size: 11px; text-align: right; min-height: 16px; padding: 3px 6px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 700px) {
  .az-in { width: 46px; font-size: 11px; }
  .az-table th, .az-table td { padding: 0 1px; }
  .az-summary-top, .az-summary-bottom { flex-direction: column; gap: 3px; font-size: 11.5px; }
}

.btn-ghost-sm {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-ghost-sm:hover { background: var(--bg); border-color: var(--muted); }

/* form-row-2: zwei Inputs nebeneinander (z. B. Start + Ende) */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row-2 > div { display: flex; flex-direction: column; gap: 4px; }

/* ════════════════════════════════════════════════════════════
   DIENSTPLAN (Monatsansicht)
   ════════════════════════════════════════════════════════════ */

/* Toolbar: Monatsnavigation + Status */
.dp2-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
  position: sticky; top: 0; z-index: 90; background: var(--bg); padding: 8px 0;
}
.dp2-month-nav {
  display: flex; align-items: center; gap: 12px;
}
.dp2-month-label {
  font-size: 16px; font-weight: 800; color: var(--text);
  min-width: 150px; text-align: center;
}
#dp2-status-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dp2-status-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  border-radius: 20px; padding: 3px 10px; border: 1.5px solid;
}
.dp2-status-draft    { background: #f0f4f8; border-color: #94a3b8; color: #475569; }
.dp2-status-leitung  { background: #eef2ff; border-color: #6366f1; color: #3730a3; }
.dp2-status-pending  { background: #fff8e1; border-color: #f0b429; color: #7a5a00; }
.dp2-status-approved { background: #e8fff3; border-color: #27ae60; color: #145a32; }
.dp2-status-rejected { background: #fff0f0; border-color: #e74c3c; color: #7b1c1c; }
.dp2-rejection-note {
  margin-top: 8px; padding: 8px 12px; background: #fff0f0;
  border: 1px solid #e74c3c; border-radius: 8px; font-size: 12px; color: #7b1c1c;
  max-width: 500px;
}
.btn-danger-sm {
  background: #e74c3c; color: #fff; border: none;
  padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.btn-danger-sm:hover { background: #c0392b; }

/* Gruppenname über Dienstplan */
.dp2-group-name {
  font-size: 15px; font-weight: 800; color: var(--navy);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: .03em;
}

/* Zoom-Slider */
.dp2-zoom-wrap { display: flex; align-items: center; gap: 6px; }
.dp2-zoom-wrap label { font-size: 11px; color: var(--muted); font-weight: 600; }
.dp2-zoom-slider { width: 80px; accent-color: var(--navy); }

/* ── Schichtmuster-Editor ── */
.dp2-rule-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid #f1f5f9; flex-wrap: nowrap;
  position: relative;
}
.dp2-rule-row:last-child { border-bottom: none; }
.dp2-rule-name {
  flex: 1; min-width: 100px; padding: 4px 8px; font-size: 13px;
  border: 1px solid #cbd5e1; border-radius: 4px;
}
.dp2-rule-type {
  width: 70px; padding: 4px; font-size: 12px;
  border: 1px solid #cbd5e1; border-radius: 4px;
}
.dp2-rule-time {
  width: 80px; padding: 4px; font-size: 12px;
  border: 1px solid #cbd5e1; border-radius: 4px;
}
.dp2-rule-sep { color: #94a3b8; font-size: 13px; }
.dp2-rule-break {
  width: 50px; padding: 4px; font-size: 12px; text-align: center;
  border: 1px solid #cbd5e1; border-radius: 4px;
}
.dp2-rule-hint {
  font-size: 10px; color: #1648a6; background: #e0f2fe; padding: 2px 8px; border-radius: 4px;
  position: absolute; bottom: -2px; left: 0; white-space: nowrap;
}
.dp2-rule-24h-block { padding-bottom: 18px; }
.dp2-rule-is24h { display: none; }
.dp2-rule-del {
  background: none; border: none; color: #ef4444; font-size: 18px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.dp2-rule-del:hover { color: #dc2626; }

/* Gruppenregeln – Parsed-Anzeige */
.dp2-staff-parsed-box {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 8px 12px; font-size: 12px;
}
.dp2-staff-param {
  display: flex; justify-content: space-between; align-items: center; padding: 4px 0;
  border-bottom: 1px solid #f1f5f9; color: var(--text); font-size: 13px;
}
.dp2-staff-param:last-child { border-bottom: none; }
.dp2-staff-input {
  width: 60px; padding: 3px 6px; font-size: 13px; text-align: center;
  border: 1px solid #cbd5e1; border-radius: 4px; background: #fff;
}
.dp2-staff-changed { color: var(--navy) !important; font-weight: 600; }
.dp2-staff-changed .dp2-staff-input { border-color: var(--navy); background: #eff6ff; font-weight: 700; }

/* ── Vorgaben-Tabs ── */
.dp2-vorgaben-tabs {
  display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #e2e8f0;
}
.dp2-vorgaben-tab {
  padding: 8px 18px; font-size: 13px; font-weight: 600; color: #64748b;
  background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.dp2-vorgaben-tab:hover { color: var(--navy); }
.dp2-vorgaben-tab.active {
  color: var(--navy); border-bottom-color: var(--navy);
}

/* ── Pflichttermine ── */
.dp2-team-event-row {
  display: flex; align-items: center; gap: 10px; padding: 5px 0;
  border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.dp2-te-date { font-weight: 600; min-width: 50px; color: var(--navy); }
.dp2-te-title { flex: 1; }
.dp2-te-time { color: #64748b; font-size: 12px; }

/* ── Manager-Tabellenansicht ── */
.dp2-table-wrap {
  overflow-x: auto; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
}
.dp2-table {
  border-collapse: collapse; min-width: 100%; font-size: 12px;
}
.dp2-table th, .dp2-table td {
  border: 1px solid var(--line); padding: 0;
}
.dp2-th-date {
  background: var(--bg); font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .07em;
  padding: 8px 10px; white-space: nowrap; min-width: 60px; position: sticky; left: 0; z-index: 2;
}
.dp2-th-member {
  background: var(--bg); font-size: 11px; font-weight: 700;
  color: var(--text); padding: 8px 10px; white-space: nowrap; min-width: 110px;
  text-align: center;
}
.dp2-th-gl {
  background: #e8eeff; color: var(--navy); border-bottom: 2px solid var(--navy);
}
.dp2-td-date {
  background: var(--bg); padding: 4px 8px; white-space: nowrap;
  position: sticky; left: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.dp2-day-num  { font-size: 13px; font-weight: 800; color: var(--text); }
.dp2-day-name { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dp2-row.dp2-weekend td { background: #f8f9fb; }
.dp2-row.dp2-today td   { background: #eef2ff; }
.dp2-row.dp2-today .dp2-td-date { background: #dde6ff; }
.dp2-td-cell {
  padding: 3px 4px; vertical-align: top; min-width: 110px; position: relative;
}
.dp2-td-cell:hover { background: #f0f4ff !important; }
.dp2-cell-add {
  display: block; text-align: center; font-size: 16px; color: var(--muted);
  line-height: 24px; opacity: .35;
}
.dp2-td-cell:hover .dp2-cell-add { opacity: .8; color: var(--navy); }
.dp2-wish {
  position: absolute; top: 2px; right: 4px;
  font-size: 9px; color: #f0b429;
}

/* Summen-Fußzeile */
.dp2-sum-row td { background: #f0f4f8 !important; }
.dp2-td-sum-lbl {
  font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; padding: 5px 8px; white-space: nowrap;
  position: sticky; left: 0; background: #e8edf4 !important;
}
.dp2-td-sum {
  font-size: 12px; font-weight: 700; color: var(--text);
  padding: 5px 8px; text-align: center; white-space: nowrap;
}
.dp2-td-sum.pos { color: #1a7a4a; }
.dp2-td-sum.neg { color: #c0392b; }
.dp2-carry-editable { cursor: pointer; text-decoration: underline dotted; }
.dp2-carry-editable:hover { background: #dde3ec !important; }

/* ── KW-Summenzeile ── */
.dp2-kw-row { background: #e8f0fb; }
.dp2-kw-row td { padding: 4px 6px; font-size: 11px; font-weight: 700; color: #2c4a8c; border-top: 2px solid #b0c4e8; }
.dp2-td-kw-lbl { text-align: left; white-space: nowrap; }
.dp2-td-kw { text-align: center; white-space: nowrap; }

/* ── 5 Farb-Kategorien Dienstplan ────────────────────────────
   1 Frei/leer  → grün
   2 Tagdienst  → blau
   3 Nacht/NB   → lila (nicht mehr einzeln verwendet)
   4 24h-Block  → lila (Nacht-Farbe)
   5 Urlaub     → bernstein
   6 Fortbildung → pink
   ──────────────────────────────────────────────────────── */
.dp2-cell-frei        { background: #86efac !important; border-left: 3px solid #22c55e !important; }
.dp2-cell-tag         { background: #93c5fd !important; border-left: 3px solid #3b82f6 !important; }
.dp2-cell-nacht       { background: #c4b5fd !important; border-left: 3px solid #7c3aed !important; }
.dp2-cell-24h         { background: #c4b5fd !important; border-left: 3px solid #7c3aed !important; }
.dp2-cell-24h-cont    { background: #c4b5fd !important; border-left: 3px solid #7c3aed !important; border-top: 2px dashed #7c3aed !important; }
.dp2-cell-urlaub      { background: #fcd34d !important; border-left: 3px solid #d97706 !important; }
.dp2-cell-fortbildung { background: #f9a8d4 !important; border-left: 3px solid #db2777 !important; }
.dp2-cell-krank       { background: #cbd5e1 !important; border-left: 3px solid #64748b !important; }
.dp2-cell-elternzeit  { background: #e9d5ff !important; border-left: 3px solid #a855f7 !important; }

/* MA-Tages-Karten: gleiche Palette */
.dp2-ma-day.dp2-cell-frei        { background: #86efac !important; border-left: 4px solid #22c55e !important; }
.dp2-ma-day.dp2-cell-tag         { background: #93c5fd !important; border-left: 4px solid #3b82f6 !important; }
.dp2-ma-day.dp2-cell-nacht       { background: #c4b5fd !important; border-left: 4px solid #7c3aed !important; }
.dp2-ma-day.dp2-cell-24h         { background: #c4b5fd !important; border-left: 4px solid #7c3aed !important; }
.dp2-ma-day.dp2-cell-24h-cont    { background: #c4b5fd !important; border-left: 4px solid #7c3aed !important; border-top: 2px dashed #7c3aed !important; }
.dp2-ma-day.dp2-cell-urlaub      { background: #fcd34d !important; border-left: 4px solid #d97706 !important; }
.dp2-ma-day.dp2-cell-fortbildung { background: #f9a8d4 !important; border-left: 4px solid #db2777 !important; }
.dp2-ma-day.dp2-cell-krank       { background: #cbd5e1 !important; border-left: 4px solid #64748b !important; }
.dp2-ma-day.dp2-cell-elternzeit  { background: #e9d5ff !important; border-left: 4px solid #a855f7 !important; }

/* Badge 24h-Block */
.dp2-badge-24h {
  display: inline-block; font-size: 9px; font-weight: 800;
  background: #7c3aed; color: #fff;
  border-radius: 4px; padding: 1px 4px; margin-bottom: 2px;
  letter-spacing: .03em;
}

/* ── Schicht-Chip ── */
.dp2-chip {
  border: 1.5px solid; border-radius: 6px; padding: 3px 5px;
  margin-bottom: 2px; font-size: 11px;
}
.dp2-chip-top  { font-weight: 800; font-size: 12px; display: flex; align-items: center; gap: 3px; }
.dp2-chip-time { font-size: 10px; opacity: .8; }
.dp2-chip-h    { font-size: 10px; opacity: .65; }
.dp2-chip-note { font-size: 10px; opacity: .7; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.dp2-mod-badge { font-size: 9px; background: rgba(0,0,0,.15); border-radius: 3px; padding: 0 3px; margin-left: 2px; }
.dp2-pending-badge { font-size: 9px; margin-left: 2px; }
.dp2-wish-dot  { font-size: 8px; color: #f0b429; }

/* ── MA-Monatsübersicht ── */
.dp2-sum-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
@media (max-width: 700px) { .dp2-sum-cards { grid-template-columns: repeat(2,1fr); } }
.dp2-sum-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.dp2-sum-label { font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.dp2-sum-val   { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.dp2-sum-val.pos { color: #1a7a4a; }
.dp2-sum-val.neg { color: #c0392b; }

/* Wunsch-Eingabe (MA) */
.dp2-wish-block {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 20px;
}
.dp2-wish-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px;
}
.dp2-wish-textarea {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--input-border);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 72px; color: var(--text);
}
.dp2-wish-textarea:focus { outline: none; border-color: var(--navy); }
.dp2-wish-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dp2-wish-saved-msg {
  font-size: 12px; color: #1a7a4a; font-weight: 700; opacity: 0; transition: opacity .3s;
}
.dp2-wish-saved-flash { opacity: 1 !important; }

.dp2-ma-wrap { }
.dp2-ma-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
@media (max-width: 900px) { .dp2-ma-grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 560px) { .dp2-ma-grid { grid-template-columns: repeat(2,1fr); } }
.dp2-ma-day {
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; min-height: 80px;
}
.dp2-ma-day.dp2-today   { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(22,72,166,.15); }
.dp2-ma-day.dp2-weekend { background: var(--bg); }
.dp2-ma-day-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px; border-bottom: 1px solid var(--line); background: var(--bg);
  font-size: 11px;
}
.dp2-ma-day.dp2-today .dp2-ma-day-hd { background: #e8eeff; }
.dp2-free { font-size: 11px; color: var(--muted); text-align: center; padding: 10px 0; }

/* ── MAV-Gruppenauswahl ── */
.dp2-mav-group-list { display: flex; flex-direction: column; gap: 8px; max-width: 600px; padding: 8px 0; }
.dp2-mav-group-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border);
  cursor: pointer; background: var(--card);
}
.dp2-mav-group-row:hover { border-color: var(--navy); background: #f0f4ff; }
.dp2-mav-group-name { font-weight: 600; font-size: 15px; }

/* ── Verstoß-Marker ── */
.dp2-viol-dot {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 4px; color: #fff; background: #dc2626;
  font-weight: 900; font-size: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  animation: dp2-viol-pulse 0.8s ease-in-out infinite;
}

/* ── Validierungs-Verstöße (deutliches blinkendes Rot) ── */
@keyframes dp2-viol-blink {
  0%, 100% { box-shadow: inset 0 0 0 4px #dc2626, 0 0 8px rgba(220,38,38,.3); background-color: rgba(220,38,38,.12); }
  50%      { box-shadow: inset 0 0 0 5px #dc2626, 0 0 20px rgba(220,38,38,.6); background-color: rgba(220,38,38,.25); }
}
@keyframes dp2-viol-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
  50%      { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(220,38,38,.3); }
}
.dp2-cell-violation {
  animation: dp2-viol-blink 0.8s ease-in-out infinite !important;
  position: relative;
  z-index: 1;
  border: 3px solid #dc2626 !important;
}
.dp2-viol-indicator {
  position: absolute; top: -4px; right: -4px;
  font-size: 13px; font-weight: 900; color: #fff;
  background: #dc2626; border-radius: 50%;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  z-index: 10;
  box-shadow: 0 0 6px rgba(220,38,38,.6);
  animation: dp2-viol-pulse 0.8s ease-in-out infinite;
}
.dp2-date-violation {
  color: #fff !important; font-weight: 700;
  background: #dc2626 !important;
  border-radius: 4px;
}
.dp2-viol-day-icon {
  font-size: 14px; margin-left: 4px; color: #dc2626;
  animation: dp2-viol-pulse 0.8s ease-in-out infinite;
  display: inline-block; font-weight: 900;
}
.dp2-violations-summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0; padding: 10px 16px;
  background: #fef2f2; border: 2px solid #dc2626; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: #991b1b;
  box-shadow: 0 2px 8px rgba(220,38,38,.15);
}
.dp2-viol-global-list {
  width: 100%; margin-top: 6px; display: flex; flex-direction: column; gap: 3px;
}
.dp2-viol-global-item {
  font-size: 12px; font-weight: 600; color: #7f1d1d; padding: 3px 0;
  border-top: 1px solid #fecaca;
}
.dp2-violations-summary.dp2-viol-ok {
  background: #f0fdf4; border-color: #86efac; color: #166534;
}
.dp2-viol-count { font-weight: 800; }

/* ── Tages-Wunsch: Frei-Toggle (MA-Kalender) ── */
.dp2-day-wish-frei {
  background: #ef4444 !important; border-color: #b91c1c !important;
}
.dp2-day-wish-frei .dp2-ma-day-hd {
  background: #ef4444 !important; border-bottom-color: #dc2626 !important;
}
.dp2-day-wish-frei .dp2-day-name,
.dp2-day-wish-frei .dp2-day-num,
.dp2-day-wish-frei .dp2-free,
.dp2-day-wish-frei .dp2-dw-note {
  color: #fff !important;
}
.dp2-dw-note {
  width: 100%; border: none; background: transparent; font-size: 11px;
  color: var(--muted); padding: 6px 8px; outline: none; resize: none;
  font-family: inherit; line-height: 1.3;
}
.dp2-dw-note::placeholder { color: var(--muted); opacity: .5; }
.dp2-day-wish-frei .dp2-dw-note::placeholder { color: #fff; opacity: .6; }

/* ── Freitext + Dauerwünsche nebeneinander ── */
.dp2-wish-prefs-row {
  display: flex; gap: 16px; margin-bottom: 12px;
}
.dp2-wish-col { flex: 1; min-width: 0; }
@media (max-width: 700px) {
  .dp2-wish-prefs-row { flex-direction: column; }
}

/* ── Dauerwünsche-Block ── */
.dp2-prefs-block {
  padding: 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
}
.dp2-prefs-title {
  font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text);
}
.dp2-prefs-grid {
  display: flex; flex-direction: column; gap: 10px;
}
.dp2-prefs-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.dp2-prefs-row label { font-size: 13px; font-weight: 600; min-width: 160px; }
.dp2-pref-select { max-width: 160px; font-size: 13px; padding: 4px 8px; }
.dp2-prefs-days { display: flex; gap: 4px; }
.dp2-pref-day-btn {
  width: 32px; height: 28px; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 12px; font-weight: 700;
  transition: all .15s;
}
.dp2-pref-day-btn:hover { border-color: var(--navy); }
.dp2-pref-day-btn.active { background: #ef4444; color: #fff; border-color: #dc2626; }
.dp2-prefs-saved {
  font-size: 12px; color: #16a34a; font-weight: 600; opacity: 0; transition: opacity .3s;
}
.dp2-prefs-saved.dp2-prefs-saved-flash { opacity: 1; }

/* ── Tages-Wunsch-Toast ── */
.dp2-dw-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #166534; color: #fff; padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .3s; z-index: 9999;
}
.dp2-dw-toast-show { opacity: 1; }

/* ── Wunsch-Icon in GL-Grid ── */
.dp2-dw-cell-icon {
  position: absolute; bottom: 1px; right: 2px;
  font-size: 9px; opacity: .7; line-height: 1;
}
.dp2-td-cell { position: relative; }

/* ── Sekundär-Button (Check, neutrale Aktion) ── */
.btn-secondary {
  background: #e2e8f0; color: #1e293b; border: 1px solid #cbd5e1;
  padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.btn-secondary:hover { background: #cbd5e1; }
.btn-secondary:disabled { opacity: .6; cursor: not-allowed; }

/* ── KI-Generator ── */
.btn-ki {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  color: #fff;
  border: none;
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
}
.btn-ki:hover { background: linear-gradient(135deg, #5b21b6, #4338ca); }
.btn-ki:disabled { opacity: .6; cursor: not-allowed; }

.dp2-ki-ta {
  font-size: 13px;
  min-height: 80px;
  resize: vertical;
}

/* ── KI-Konflikt-Block ── */
.dp2-ki-conflict-box {
  background: #fffbeb; border: 1px solid #f59e0b; border-radius: 8px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.dp2-ki-conflict-item {
  font-size: 13px; color: #92400e; padding: 6px 0; border-bottom: 1px solid #fde68a;
}
.dp2-ki-conflict-item:last-child { border-bottom: none; padding-bottom: 0; }

/* ── Schichttausch-Karten ── */
.dp2-swap-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.dp2-swap-card:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   URLAUB & FORTBILDUNG / ABWESENHEITEN
   ═══════════════════════════════════════════════════════════════ */

/* Allgemeine Page-Karte */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card-title {
  font-size: 14px; font-weight: 800; color: var(--navy);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 14px;
}
.card-title-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}
.card-title-row .card-title { margin-bottom: 0; }

/* Abwesenheits-Formular */
.abs-form-card { max-width: 480px; }
.abs-form-card .form-actions { margin-top: 6px; }
.abs-success-msg {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; color: #166534; font-weight: 600;
}
.abs-range-wrap { position: relative; }
.abs-range-display { cursor: pointer !important; }

/* Date-Range-Picker */
.abs-picker {
  position: absolute; top: 100%; left: 0; z-index: 50;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 12px; width: 280px;
  margin-top: 4px;
}
.abs-picker-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.abs-picker-month { font-weight: 700; font-size: 14px; color: #1e293b; }
.abs-picker-btn { background: none; border: 1px solid #e2e8f0; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; color: #475569; }
.abs-picker-btn:hover { background: #f1f5f9; }
.abs-picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.abs-picker-hd { text-align: center; font-size: 11px; font-weight: 600; color: #94a3b8; padding: 4px 0; }
.abs-picker-empty { }
.abs-picker-day {
  text-align: center; font-size: 13px; padding: 6px 0; border-radius: 6px;
  cursor: pointer; color: #334155; transition: background .1s;
}
.abs-picker-day:hover { background: #e0f2fe; }
.abs-picker-today { font-weight: 700; }
.abs-picker-in    { background: #e0f2fe !important; border-radius: 0; }
.abs-picker-start { background: #1648a6 !important; color: #fff !important; border-radius: 6px 0 0 6px; }
.abs-picker-end   { background: #1648a6 !important; color: #fff !important; border-radius: 0 6px 6px 0; }
.abs-picker-start.abs-picker-end { border-radius: 6px; }
.abs-picker-disabled { color: #cbd5e1 !important; cursor: default !important; pointer-events: none; }
.abs-picker-disabled:hover { background: transparent !important; }
.abs-picker-hint { font-size: 12px; color: #64748b; text-align: center; margin-top: 6px; min-height: 18px; }

/* Antrags-Liste */
.abs-list { display: flex; flex-direction: column; gap: 10px; }
.abs-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line);
}
.abs-item-pending     { background: #fffbeb; border-color: #fcd34d; }
.abs-item-approved    { background: #f0fdf4; border-color: #86efac; }
.abs-item-rejected    { background: #fef2f2; border-color: #fca5a5; }
.abs-item-left  { display: flex; align-items: flex-start; gap: 10px; }
.abs-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.abs-actions    { flex-direction: row; }
.abs-type-icon  { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.abs-item-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.abs-item-dates { font-size: 12px; color: var(--muted); }
.abs-item-group { font-size: 11px; color: var(--muted); margin-top: 2px; }
.abs-item-note  { font-size: 12px; color: #64748b; margin-top: 4px; font-style: italic; }
.abs-item-rejection { font-size: 12px; color: #b91c1c; margin-top: 4px; }
.abs-del-btn    { font-size: 12px; padding: 3px 9px; }
.abs-approve-btn { font-size: 12px; padding: 4px 12px; }
.abs-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* Status-Badges */
.abs-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 2px 10px; white-space: nowrap;
}
.abs-pending  { background: #fef9c3; color: #713f12; border: 1px solid #fcd34d; }
.abs-approved { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.abs-rejected { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

/* Zählbadge im Titel */
.abs-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 800; min-width: 20px; height: 20px;
  padding: 0 5px; margin-left: 6px; vertical-align: middle;
}

/* Monats-Navigation */
.abs-month-nav { display: flex; align-items: center; gap: 8px; }
.abs-month-lbl { font-size: 13px; font-weight: 700; color: var(--text); min-width: 90px; text-align: center; }
.abs-nav-btn   { font-size: 16px; padding: 2px 9px; line-height: 1; }

/* Übersichts-Tabelle */
.abs-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.abs-table th {
  text-align: left; padding: 7px 10px;
  background: #f8fafc; color: var(--navy);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 2px solid var(--line);
}
.abs-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  color: var(--text);
}
.abs-table tr:last-child td { border-bottom: none; }
.abs-table tr:hover td { background: #f8fafc; }

/* Abwesenheitskalender */
.abs-cal-wrap { overflow-x: auto; }
.abs-cal {
  border-collapse: collapse; font-size: 12px; white-space: nowrap;
}
.abs-cal th, .abs-cal td { padding: 0; text-align: center; }
.abs-cal-name {
  text-align: left !important; padding: 5px 10px 5px 4px !important;
  font-weight: 600; color: var(--text); white-space: nowrap;
  position: sticky; left: 0; background: #fff; z-index: 2;
  border-right: 2px solid var(--line);
}
.abs-cal thead .abs-cal-name { background: #f8fafc; }
.abs-cal-hd {
  padding: 3px 0 2px !important; min-width: 28px;
  font-size: 11px; font-weight: 700; color: var(--navy); line-height: 1.2;
}
.abs-cal-wd { font-size: 9px; font-weight: 400; color: #94a3b8; }
.abs-cal-hd.abs-cal-we { background: #f8fafc; }
.abs-cal-cell {
  width: 28px; height: 26px; border: 1px solid #f1f5f9;
}
.abs-cal-cell.abs-cal-we { background: #f8fafc; }
.abs-cal-urlaub  { background: #dbeafe; color: #1e40af; font-weight: 700; font-size: 11px; }
.abs-cal-krank   { background: #e2e8f0; color: #334155; font-weight: 700; font-size: 11px; }
.abs-cal-fb      { background: #fef3c7; color: #92400e; font-weight: 700; font-size: 11px; }
.abs-cal-ez      { background: #f3e8ff; color: #581c87; font-weight: 700; font-size: 11px; }
.abs-cal-avail td { border-top: 2px solid var(--line); }
.abs-cal-avail .abs-cal-name { font-weight: 800; font-size: 11px; color: var(--navy); }
.abs-cal-avail-cell { font-size: 11px; font-weight: 700; color: #16a34a; }
.abs-cal-avail-cell.abs-cal-warn { color: #b45309; background: #fef3c7; }
.abs-cal-avail-cell.abs-cal-low  { color: #dc2626; background: #fef2f2; }

/* Ablehnen-Btn */
.btn-danger {
  background: #ef4444; color: #fff; border: none;
  padding: 7px 16px; border-radius: 7px; font-size: 13px;
  font-weight: 700; cursor: pointer;
}
.btn-danger:hover { background: #dc2626; }

/* ── Feiertage ────────────────────────────────────── */
.dp2-row.dp2-holiday td { background: #fff7ed; }
.dp2-row.dp2-holiday .dp2-td-date { background: #fde8cd; }
.dp2-ma-day.dp2-holiday { background: #fff7ed; }
.dp2-ma-day.dp2-holiday .dp2-ma-day-hd { background: #fde8cd; }
.dp2-holiday-dot {
  display: inline-block; width: 6px; height: 6px;
  background: #f59e0b; border-radius: 50%;
  margin-left: 3px; vertical-align: middle;
}

/* ── Audit-Log ────────────────────────────────────── */
.audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-table th { text-align: left; padding: 6px 10px; background: var(--bg); border-bottom: 2px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.audit-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.audit-action { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.audit-create  { background: #dcfce7; color: #166534; }
.audit-update  { background: #dbeafe; color: #1e40af; }
.audit-delete  { background: #fee2e2; color: #991b1b; }
.audit-approve { background: #d1fae5; color: #065f46; }
.audit-reject  { background: #fef3c7; color: #92400e; }
.audit-submit  { background: #e0e7ff; color: #3730a3; }
.audit-generate { background: #f3e8ff; color: #6b21a8; }

/* ── Gesamtübersicht ──────────────────────────────── */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ov-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; transition: box-shadow .15s; }
.ov-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ov-card.ov-understaffed { border-color: #f59e0b; background: #fffbeb; }
.ov-card-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ov-card-title { font-weight: 700; font-size: 14px; }
.ov-card-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.ov-alert { background: #fef3c7; color: #92400e; padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.ov-section { margin-bottom: 6px; }
.ov-section-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.ov-person { font-size: 13px; padding: 2px 0; display: flex; align-items: center; gap: 6px; }
.ov-person.ov-absent { color: var(--muted); }
.ov-times { font-size: 11px; color: var(--muted); margin-left: auto; }
.ov-badge { font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.ov-nb { background: #e8e0f0; color: #6b21a8; }
.ov-abs-badge { background: #fee2e2; color: #991b1b; }
.ov-free-list { font-size: 12px; color: var(--muted); }

/* ── Print/PDF ────────────────────────────────────── */
.dp2-print-header, .dp2-print-legend, .dp2-print-footer { display: none; }

@media print {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;

  /* DP-spezifische Elemente im Print verstecken */
  .dp2-toolbar, .dp2-status-bar, .dp2-staffing-section,
  .dp2-wish-block, #dp2-prefs-block,
  .dp2-zoom-wrap, .abs-form-card, .abs-actions { display: none !important; }

  /* Print-Header + Legende + Footer anzeigen */
  .dp2-print-header, .dp2-print-legend, .dp2-print-footer { display: block !important; }

  #main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .page-content { padding: 0 !important; max-width: none !important; }

  /* Tabelle: overflow sichtbar, kompakt */
  .dp2-table-wrap { overflow: visible !important; border: none !important; box-shadow: none !important; }
  table.dp2-table { font-size: 8px !important; width: 100% !important; }
  .dp2-table th, .dp2-table td { padding: 2px 3px !important; border: 0.5px solid #ccc !important; }
  .dp2-th-member { font-size: 7px !important; max-width: 80px !important; }

  /* Farben drucken */
  .dp2-cell-frei        { background: #86efac !important; }
  .dp2-cell-tag         { background: #93c5fd !important; }
  .dp2-cell-nacht       { background: #c4b5fd !important; }
  .dp2-cell-24h         { background: #c4b5fd !important; }
  .dp2-cell-urlaub      { background: #fcd34d !important; }
  .dp2-cell-fortbildung { background: #f9a8d4 !important; }
  .dp2-cell-krank       { background: #cbd5e1 !important; }
  .dp2-cell-elternzeit  { background: #e9d5ff !important; }
  .dp2-row.dp2-weekend td { background: #f0f0f0 !important; }
  .dp2-row.dp2-holiday td { background: #fff0d4 !important; }
  .dp2-kw-row td { background: #e8f0fb !important; }

  /* Chips kompakt */
  .dp2-chip { padding: 1px 3px !important; margin-bottom: 1px !important; font-size: 8px !important; border-width: 1px !important; }
  .dp2-chip-top { font-size: 9px !important; }
  .dp2-chip-time, .dp2-chip-h { font-size: 7px !important; }
  .dp2-chip-note { display: none !important; }
  .dp2-cell-add { display: none !important; }
  .dp2-viol-indicator { display: none !important; }

  /* Summenzeilen */
  .dp2-sum-row td { font-size: 7px !important; }
  .dp2-kw-row td { font-size: 7px !important; }

  /* Seitenumbruch: Tabelle darf über Seiten brechen */
  .dp2-table-wrap { page-break-inside: auto; }

  /* Print-Header Styling */
  .dp2-print-header { margin-bottom: 8px; border-bottom: 2px solid #333; padding-bottom: 6px; }
  .dp2-print-header h2 { margin: 0; font-size: 16px; }
  .dp2-print-header .dp2-print-meta { font-size: 10px; color: #666; margin-top: 2px; }

  /* Legende */
  .dp2-print-legend { margin-top: 12px; display: flex !important; gap: 12px; flex-wrap: wrap; font-size: 9px; }
  .dp2-legend-item { display: flex; align-items: center; gap: 4px; }
  .dp2-legend-dot { width: 12px; height: 12px; border-radius: 2px; border: 1px solid #999; }

  /* Unterschriftenzeile */
  .dp2-print-footer { margin-top: 30px; display: flex !important; justify-content: space-between; }
  .dp2-sign-block { width: 200px; border-top: 1px solid #333; padding-top: 4px; font-size: 9px; text-align: center; }

  /* Buttons in Print verstecken */
  button, .btn { display: none !important; }
}

/* ── Globales Print-Layout ─────────────────────────── */
/* Versteckt Sidebar, Header, Footer, Buttons — zeigt nur #main.
   Spezifische Print-Regeln (FLS, Dienstplan) ergänzen dies. */
@media print {
  #sidebar-wrap,
  #suite-header,
  #app-footer,
  #menu-btn,
  .modal-overlay,
  .page-header,
  .page-actions,
  .toast-container,
  .dp2-zoom-wrap,
  .dp2-group-name { display: none !important; }

  html, body { height: auto !important; overflow: visible !important; }
  body { background: white !important; display: block !important; }
  #main-wrap { display: block !important; overflow: visible !important; height: auto !important; margin: 0 !important; }
  #main { display: block !important; overflow: visible !important; height: auto !important; padding: 8px !important; width: 100% !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  @page { size: portrait; margin: 10mm; }
}

/* ── Tab-Bar ─────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--line); }
.tab-btn {
  padding: 8px 18px; font-size: 13px; font-weight: 600; font-family: inherit;
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: var(--muted);
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.tab-active { color: var(--navy); border-bottom-color: var(--navy); }

/* ── Hilfeplan-Ziele ─────────────────────────────────────── */
.hp-goal-card {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; background: #fff;
}
.hp-goal-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap;
}
.hp-goal-type {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--navy); color: #fff;
}
.hp-type-teil { background: var(--teal); }
.hp-type-mass { background: #94a3b8; font-size: 9px; }
.hp-goal-title { font-weight: 600; }
.hp-subgoal {
  padding: 8px 0 4px 20px; border-left: 2px solid var(--teal);
  margin: 4px 0 4px 8px;
}
.hp-massnahme {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0 3px 40px; font-size: 13px;
}
.hp-goal-status-sel { border-radius: 4px; border: 1px solid var(--line); }

/* ── Bericht-Editor Overlay (Frame-Ribbon) ─────────────── */
.hp-editor-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: stretch; justify-content: center;
}
.hp-editor-shell {
  display: flex; flex-direction: column;
  width: 100%; margin: 0;
  background: #fff; overflow: hidden;
}

/* Ribbon */
#hp-ribbon {
  flex-shrink: 0;
  background: #f4f7fb;
  border-bottom: 2px solid rgba(30,61,115,.4);
  position: relative; z-index: 10;
}
#hp-ribbon-tabs {
  display: flex; align-items: stretch;
  background: rgba(30,61,115,.68);
  backdrop-filter: blur(8px);
  height: 30px;
}
#hp-ribbon .rtab {
  padding: 0 16px; border: none; background: transparent;
  color: rgba(255,255,255,.75); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; letter-spacing: .02em;
  transition: background .12s, color .12s; white-space: nowrap;
}
#hp-ribbon .rtab:hover { background: rgba(255,255,255,.12); color: #fff; }
#hp-ribbon .rtab.rtab-active {
  background: #f4f7fb; color: #1e3d73;
  border-radius: 4px 4px 0 0; margin-top: 3px;
}
#hp-ribbon .ribbon-panel {
  display: flex; align-items: stretch; gap: 0; padding: 0 8px;
  min-height: 60px; flex-wrap: nowrap; overflow-x: auto; overflow-y: visible;
}
#hp-ribbon .rgroup {
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; gap: 3px; padding: 4px 8px;
}
#hp-ribbon .rgroup-btns { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
#hp-ribbon .rgroup-label {
  font-size: 9.5px; color: #9ba8bb; text-align: center;
  width: 100%; letter-spacing: .03em;
}
#hp-ribbon .rsep {
  width: 1px; background: #dde3ec; align-self: stretch;
  margin: 4px 2px; flex-shrink: 0;
}
#hp-ribbon .rb {
  display: inline-flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1px; min-width: 30px; height: 34px;
  padding: 0 6px; border: 1.5px solid transparent; border-radius: 4px;
  background: transparent; color: #1e293b; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: background .1s, border-color .1s;
  white-space: nowrap; flex-shrink: 0;
}
#hp-ribbon .rb svg { width: 18px; height: 18px; }
#hp-ribbon .rb:hover { background: #e8eef8; border-color: #c8d4ea; }
#hp-ribbon .rb.rb-active { background: #dce8f8; border-color: #1e3d73; color: #1e3d73; }
#hp-ribbon .rb.rb-large, #hp-ribbon .rb.rb-action {
  flex-direction: column; height: 50px; min-width: 50px;
  padding: 4px 7px; font-size: 11px; gap: 3px;
}
#hp-ribbon .rb.rb-large span, #hp-ribbon .rb.rb-action span { font-size: 10.5px; color: #4b5a6e; }
#hp-ribbon .rb.rb-large:hover span, #hp-ribbon .rb.rb-action:hover span { color: #1e3d73; }
#hp-ribbon .rb.rb-generate { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); border-color: #1e40af; color: #fff; }
#hp-ribbon .rb.rb-generate span { color: #fff; font-weight: 600; }
#hp-ribbon .rb.rb-generate svg { stroke: #fff; }
#hp-ribbon .rb.rb-generate:hover { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 0 8px rgba(37,99,235,.4); }
#hp-ribbon .rb.rb-large svg, #hp-ribbon .rb.rb-action svg { width: 20px; height: 20px; }
#hp-ribbon .rs {
  height: 26px; border: 1.5px solid #dde3ec; border-radius: 4px;
  background: #fff; color: #1e293b; font-size: 12px;
  cursor: pointer; padding: 0 4px; font-family: inherit;
}
#hp-ribbon .rs:hover, #hp-ribbon .rs:focus { border-color: #1e3d73; outline: none; }
#hp-ribbon .rs-font { min-width: 96px; max-width: 110px; }
#hp-ribbon .rs-size { width: 44px; }
#hp-ribbon .rs-style { min-width: 110px; }
#hp-ribbon .rb-color-wrap {
  display: inline-flex; border: 1.5px solid transparent;
  border-radius: 4px; overflow: hidden; flex-shrink: 0;
}
#hp-ribbon .rb-color-wrap:hover { border-color: #c8d4ea; background: #e8eef8; }
#hp-ribbon .rb-color-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 3px;
  border: none; background: transparent; cursor: pointer; gap: 1px;
}
#hp-ribbon .rb-color-arrow {
  width: 13px; height: 26px; border: none;
  border-left: 1px solid #dde3ec; background: transparent;
  font-size: 9px; cursor: pointer; color: #6b7a8d; padding: 0;
}
#hp-ribbon .rb-color-arrow:hover { background: #dce8f8; }
#hp-ribbon .rb-dropdown-wrap { position: relative; }
#hp-ribbon .rb-dropdown {
  position: fixed; background: #fff; border: 1.5px solid #dde3ec;
  border-radius: 8px; padding: 4px 0; min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 9200;
}
#hp-ribbon .rdd-item {
  padding: 7px 14px; font-size: 12.5px; cursor: pointer;
  color: #1e293b; transition: background .1s;
}
#hp-ribbon .rdd-item:hover { background: #eef4ff; }
#hp-ribbon .rdd-item.rb-dd-active { color: #1e3d73; font-weight: 600; }

/* Page area */
.hp-editor-page-area {
  flex: 1; overflow-y: auto;
  padding: 28px 0 48px;
  display: flex; flex-direction: column; align-items: center;
  background: #d0d4d8;
}
.hp-editor-page {
  width: 210mm; min-height: 297mm; background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,.22); border-radius: 1px;
  padding: 2.5cm; box-sizing: border-box; flex-shrink: 0;
  position: relative;
}

/* TipTap inside editor */
.hp-editor-page .ProseMirror {
  outline: none !important; border: none !important;
  box-shadow: none !important; min-height: 200px;
  font-family: Calibri, sans-serif; font-size: 12pt; line-height: 1.5;
  color: #1e293b; caret-color: #2244b8; word-break: break-word;
  position: relative; z-index: 1; background: transparent !important;
}
.hp-editor-page .ProseMirror:focus { outline: none !important; }
.hp-editor-page .ProseMirror ::selection { background-color: rgba(30,61,115,.18); color: inherit; }
.hp-editor-page .ProseMirror p { margin: 0 0 0.5em; }
.hp-editor-page .ProseMirror h1 { font-size: 2em; font-weight: 700; margin: .5em 0 .3em; color: #1e3d73; }
.hp-editor-page .ProseMirror h2 { font-size: 1.5em; font-weight: 700; margin: .4em 0 .25em; color: #2a4f8f; }
.hp-editor-page .ProseMirror h3 { font-size: 1.2em; font-weight: 700; margin: .35em 0 .2em; color: #1e293b; }
.hp-editor-page .ProseMirror ul, .hp-editor-page .ProseMirror ol { padding-left: 1.6em; margin: .3em 0; }
.hp-editor-page .ProseMirror li { margin-bottom: .15em; }
.hp-editor-page .ProseMirror blockquote {
  border-left: 3px solid #1e3d73; margin: .5em 0;
  padding: .3em 1em; color: #4b5a6e; font-style: italic;
}
.hp-editor-page .ProseMirror table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.hp-editor-page .ProseMirror td, .hp-editor-page .ProseMirror th {
  border: 1px solid #aaa; padding: 6px 10px; min-width: 60px; vertical-align: top;
}
.hp-editor-page .ProseMirror th { background: #eef4ff; font-weight: 700; }
.hp-editor-page .ProseMirror hr { border: none; border-top: 2px solid #dde3ec; margin: 1em 0; }
.hp-editor-page .ProseMirror mark { padding: 0.06em 0.12em; border-radius: 2px; mix-blend-mode: multiply; }
.hp-editor-page .ProseMirror img { max-width: 100%; height: auto; display: block; margin: 6px 0; }

/* Print: Editor-Overlay druckt nur den Page-Bereich */
@media print {
  .hp-editor-overlay { position: static; background: none; }
  .hp-editor-shell { margin: 0; box-shadow: none; }
  #hp-ribbon, #hp-revision-section, #hp-status-bar { display: none !important; }
  .hp-editor-page-area { background: none; padding: 0; overflow: visible; display: block; }
  .hp-editor-page { box-shadow: none; width: 100%; padding: 2cm; min-height: auto; }
}

@media (max-width: 850px) {
  .hp-editor-page { width: 100%; }
  #hp-ribbon .rs-font { min-width: 80px; }
}

