:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --shadow: 0 18px 55px rgba(2,6,23,.10);
  --shadow2: 0 10px 40px rgba(2,6,23,.06);
  --primary:#2563eb;
  --danger:#dc2626;
  --glass: rgba(255,255,255,.65);
  --glass2: rgba(255,255,255,.92);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 450px at 15% 10%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(700px 420px at 85% 20%, rgba(99,102,241,.10), transparent 55%),
    radial-gradient(800px 500px at 50% 100%, rgba(14,165,233,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

.wrap{max-width:1360px;margin:0 auto;padding:22px 22px 38px;}

.topbar{
  display:flex;gap:16px;align-items:center;justify-content:space-between;
  margin-bottom:18px;
  padding:14px 16px;
  border-radius:var(--radius);
  border:1px solid rgba(226,232,240,.9);
  background:var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow2);
}

.brand{display:flex;gap:14px;align-items:center;min-width:0}
.logo img{max-height:56px;width:auto;display:block}
.title h1{margin:0;font-size:18px;letter-spacing:-.02em}
.title .sub{color:var(--muted);font-size:12px;margin-top:3px}

.nav{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;align-items:center}
.navbtn{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 12px;border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.75);
  color:var(--text);text-decoration:none;
  font-size:14px;font-weight:800;line-height:1;
}
.navbtn-primary{border-color:rgba(37,99,235,.35)}
.navbtn-danger{border-color:rgba(220,38,38,.35); color:var(--danger)}

.card{
  background:var(--glass2);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
.card .bd{padding:16px}

.grid{display:grid;grid-template-columns:1fr;gap:14px}
@media(min-width:960px){ .grid-2{grid-template-columns: 1fr 1fr;} }

.muted{color:var(--muted)}
.alert{padding:12px 14px;border-radius:16px;border:1px solid var(--border);background:rgba(37,99,235,.08)}
.alert-err{background:rgba(220,38,38,.08)}

.btn{
  border:none;
  background:linear-gradient(135deg, rgba(37,99,235,1), rgba(99,102,241,1));
  color:white;padding:11px 14px;border-radius:16px;cursor:pointer;font-weight:900;
}
.btn-soft{
  background:rgba(255,255,255,.75);
  border:1px solid var(--border);
  color:var(--text);
  font-weight:900;
}

.input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  color:var(--text);
  outline:none;
}
.row{display:grid;grid-template-columns:1fr;gap:12px}
@media(min-width:760px){
  .row-2{grid-template-columns:repeat(2, minmax(0,1fr));}
  .row-3{grid-template-columns:repeat(3, minmax(0,1fr));}
}

/* =========================================================
   TABLE BASE
   ======================================================= */

.tableWrap{
  border-radius:var(--radius);
  overflow:auto;
  background:rgba(255,255,255,.65);
  border:1px solid var(--border);
}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:top}
.table thead th{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:rgba(255,255,255,.92);
  position:sticky;top:0;z-index:2;
}

/* =========================================================
   MODAL
   ======================================================= */

.modalBack{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;
  padding:18px;background:rgba(2,6,23,.45);backdrop-filter: blur(6px);z-index:9999;
}
.modal{
  width:min(560px,100%);
  background:rgba(255,255,255,.96);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden
}
.modalHd{
  padding:14px 16px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:12px
}
.modalBd{padding:16px}
.xbtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.9);
  width:38px;height:38px;border-radius:14px;
  cursor:pointer;font-weight:900
}

/* =========================================================
   DIENSTPLAN – TOP CONTROLS
   ======================================================= */

.wpPlanTop { display:flex; flex-direction:column; gap:10px; align-items:flex-end; }
.wpPlanTopRow { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.wpPlanFilter { margin:0; display:flex; gap:10px; align-items:center; }
.wpInlineForm { margin:0; display:inline; }
.wpPlanFilter select{min-width:220px}

/* =========================================================
   DIENSTPLAN – ACCORDION (Gruppe)
   ======================================================= */

details.acc{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:rgba(255,255,255,.92);
  overflow:hidden;
  margin-top:14px;
}
details.acc[open]{box-shadow:0 14px 40px rgba(15,23,42,.08)}

summary.acc-sum{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  display:flex;
  gap:12px;
  align-items:center;
  background:rgba(255,255,255,.95);
}
summary.acc-sum::-webkit-details-marker{display:none;}

.acc-title{font-weight:900}
.acc-sub{
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.acc-body{
  padding:16px;
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.92);
}

/* =========================================================
   DIENSTPLAN – TABLE
   ======================================================= */

.acc-body .tableWrap{
  background:transparent;
  border:0;
  border-radius:0;
  overflow:auto;
}

.wpPlanTable{
  width:100%;
  border-collapse:collapse;
  border-spacing:0;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
}

.wpPlanTable thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:12px 14px;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.10em;
  vertical-align:middle;
}

.wpPlanTable thead th:nth-child(1),
.wpPlanTable thead th:nth-child(2){
  text-align:left;
}
.wpPlanTable thead th:nth-child(n+3){
  text-align:center;
}

.wpPlanTable th,
.wpPlanTable td{
  border-right:1px solid var(--border);
}
.wpPlanTable tr > *:last-child{
  border-right:0;
}
.wpPlanTable tbody td{
  border-bottom:1px solid var(--border);
}
.wpPlanTable tbody tr:last-child td{
  border-bottom:0;
}

.wpPlanTable td{
  padding:12px 14px;
  vertical-align:middle;
  background:#fff;
}

.wpPlanTable tbody tr:hover td{
  background:rgba(15,23,42,.015);
}

.wpPlanTable thead th:nth-child(1){ width: 300px; }
/* .wpPlanTable thead th:nth-child(2){ width: 320px; } */

.wpDayHead{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  line-height:1.1;
}
.wpDayName{font-weight:900;font-size:11px;letter-spacing:.10em}
.wpDayDate{font-size:11px;color:var(--muted)}

/* Feiertage (ohne Icon!) */
th.wpHoliday{ background: rgba(220, 38, 38, .05); }
td.wpHolidayCell{ background: rgba(220, 38, 38, .04); }

/* =========================================================
   DIENSTPLAN – Mitarbeiter-Zelle (ohne Initialen)
   ======================================================= */

.wpStaffRow{display:flex;gap:0;align-items:flex-start}
.wpAvatar{display:none!important}
.wpStaffInfo{min-width:0}
.wpStaffName{
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:320px;
}
.wpStaffMeta{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}
.wpNoteCell{
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

/* =========================================================
   DIENSTPLAN – Slots: volle Höhe + mittig
   ======================================================= */

.wpPlanTable td.dropzone{
  padding:0!important;
  min-width:140px;
  vertical-align:middle;
}

.wpPlanTable .slot{
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  min-height:86px;
  height:100%;
  width:100%;
  padding:10px 12px;
  cursor:pointer;

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

.wpPlanTable .slotEmpty{
  padding:0;
  color:#94a3b8;
  font-weight:800;
}

.wpPlanTable .slotInner{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:6px;
}

.wpPlanTable .slotTime{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:10px;
  background: rgba(15,23,42,.02);
  border:1px solid rgba(226,232,240,.9);
  font-weight:900;
  font-size:13px;
  position:relative;
}
.wpPlanTable .slotTime::before{
  content:"";
  width:6px;height:18px;border-radius:999px;
  background: rgba(99,102,241,.65);
  display:inline-block;
}

.wpPlanTable .slotNote{
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Abwesenheiten als Pill */
.wpAbsPill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:10px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.95);
  font-size:12px;
  font-weight:800;
  color:var(--text);
  width:fit-content;
}
.wpAbsPill .wpAbsIcon{
  width:18px;height:18px;
  display:grid;place-items:center;
  color:var(--ab);
}
.wpAbsPill svg{display:block}
.slotBadges{display:flex;flex-direction:column;gap:6px;align-items:center}

/* Feiertag disabled */
.slotDisabled{ opacity:.55; cursor:not-allowed; }

/* Fokus */
.slotFocus{
  outline: 3px solid rgba(37,99,235,.35);
  box-shadow: 0 0 0 6px rgba(37,99,235,.10);
}

/* Highlight nach Save */
.slotFlash{
  animation: slotFlash 1.2s ease-in-out;
}
@keyframes slotFlash{
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.0); border-color: rgba(37,99,235,.25); }
  40%  { box-shadow: 0 0 0 6px rgba(37,99,235,.14); border-color: rgba(37,99,235,.40); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,.0); border-color: var(--border); }
}

/* Modal polish */
.wpModalForm{margin:0}
.wpModalGrid{display:grid;grid-template-columns:1fr;gap:14px}
.wpModalFull{grid-column:1/-1}
.wpModalRow2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.wpModalActions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  align-items:center;
  margin-top:4px;
}
@media(min-width:560px){
  .wpModalRow2{grid-template-columns:1fr 1fr}
}

/* ===== Tagesnotizen ===== */
.wpDayNotesHead{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  min-height:86px;
}
.wpDayNotesList{display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center}
.wpDayNoteChip{
  width:100%;
  max-width:160px;
  border-radius:12px;
  padding:8px 10px;
  border:1px solid rgba(226,232,240,.9);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
}
.wpDayNoteTitle{font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wpDayNoteX{
  border:0;
  background:rgba(255,255,255,.35);
  width:26px;height:26px;
  border-radius:10px;
  cursor:pointer;
  font-weight:900;
  line-height:1;
}
.wpDayNoteAdd{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 12px;border-radius:14px;
  border:1px dashed rgba(148,163,184,.9);
  background:rgba(255,255,255,.75);
  cursor:pointer;
  font-size:13px;
  font-weight:800;
}
.wpDayNoteAdd .plus{
  width:18px;height:18px;border-radius:8px;
  border:1px solid rgba(148,163,184,.9);
  display:grid;place-items:center;
  font-weight:900;
}
/* =========================================================
   DIENSTPLAN – FIXES (Spaltenbreiten + Schicht ohne Balken)
   ======================================================= */

/* 1) Mo–Fr ALLE gleich breit: entferne die feste Breite für "Spalte 2" */
.wpPlanTable thead th:nth-child(2){ width:auto !important; }

/* Optional: damit Browser sich an die Verteilung hält */
.wpPlanTable{ table-layout:fixed; }

/* 2) Schicht: KEIN Farbbalken, KEINE Extra-Farbfläche */
.wpPlanTable .slotTime{
  background:#fff !important;
  border:1px solid rgba(226,232,240,.95) !important;
  box-shadow:none !important;
}
.wpPlanTable .slotTime::before{
  content:none !important;
  display:none !important;
}

/* 3) Hover in der Zelle (klarer Klick-Bereich) */
.wpPlanTable td.dropzone .slot:hover{
  background:rgba(15,23,42,.04) !important;
}
.wpPlanTable td.dropzone .slot:active{
  background:rgba(15,23,42,.06) !important;
}

/* =========================================================
   APP SHELL (Sidebar Layout) – Light
   ======================================================= */

.appShell{
  min-height:100vh;
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:18px;
  padding:22px;
}

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

.sidebar{
  position:sticky;
  top:22px;
  align-self:start;

  border-radius: var(--radius);
  border:1px solid rgba(226,232,240,.9);
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow2);
  overflow:hidden;
}

.sbTop{
  padding:16px 16px 14px;
  border-bottom:1px solid rgba(226,232,240,.9);
  display:flex;
  gap:12px;
  align-items:center;
}

.sbLogo{
  width:44px;height:44px;
  border-radius:16px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.92);
  display:grid;place-items:center;
  overflow:hidden;
}
.sbLogo img{max-width:100%;max-height:100%;display:block}

.sbBrand{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.sbBrand b{font-size:14px;letter-spacing:-.02em}
.sbBrand span{font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.sbUser{
  padding:12px 16px;
  border-bottom:1px solid rgba(226,232,240,.9);
  display:flex;
  gap:10px;
  align-items:center;
}
.sbAvatar{
  width:40px;height:40px;
  border-radius:16px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.92);
  display:grid;place-items:center;
  font-weight:900;
}
.sbUserMeta{min-width:0}
.sbUserMeta b{display:block;font-size:13px}
.sbUserMeta span{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.sbNav{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sbNav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  text-decoration:none;
  color:var(--text);
  font-weight:900;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.78);
}
.sbNav a:hover{background:rgba(255,255,255,.92)}
.sbNav a.active{
  border-color:rgba(37,99,235,.25);
  background:rgba(37,99,235,.10);
}

.main{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.mainTop{
  border-radius: var(--radius);
  border:1px solid rgba(226,232,240,.9);
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow2);
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.mainTitle{
  display:flex;
  flex-direction:column;
}
.mainTitle b{font-size:18px;letter-spacing:-.02em}
.mainTitle span{font-size:12px;color:var(--muted);margin-top:2px}

.mainActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Optional: dein Content soll nicht "max-width 1360" sein, sondern app-like */
.wrap{
  max-width:unset !important;
  margin:0 !important;
  padding:0 !important;
}