:root{--pink:#e6007e;--pink-dark:#a9005d;--pink-soft:#ffe7f4;--ink:#201820;--muted:#6f6370;--line:#eadde5;--bg:#faf7f9;--white:#fff;--ok:#0c7a51;--danger:#b42318;--shadow:0 12px 35px rgba(60,20,45,.08)}*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}body{margin:0;min-height:100vh}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:24px;padding:14px 28px;background:#fff;border-bottom:1px solid var(--line)}.brand{font-weight:900;font-size:22px;color:var(--pink);text-decoration:none;white-space:nowrap}.brand span{color:var(--ink);font-weight:700}.topbar nav{display:flex;gap:8px;flex:1;flex-wrap:wrap}.topbar nav a,.userbox a{color:var(--ink);text-decoration:none;padding:8px 10px;border-radius:10px}.topbar nav a:hover,.userbox a:hover{background:var(--pink-soft);color:var(--pink-dark)}.userbox{display:flex;align-items:center;gap:8px}.userbox form{margin:0}.link-button{border:0;background:none;color:var(--pink);cursor:pointer;font:inherit}.nav-toggle{display:none}.container{width:min(1240px,calc(100% - 32px));margin:32px auto 70px}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}.eyebrow{text-transform:uppercase;letter-spacing:.15em;font-size:12px;font-weight:800;color:var(--pink)}h1{font-size:clamp(28px,4vw,46px);line-height:1.05;margin:6px 0 0}h2{margin-top:0}.muted{color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.cards article,.panel,.auth-card{background:var(--white);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.cards article{padding:24px}.cards strong{display:block;font-size:36px;color:var(--pink)}.cards span{color:var(--muted)}.panel{padding:22px;margin-bottom:20px;overflow:auto}.auth-card{width:min(460px,100%);margin:8vh auto;padding:34px}.button,button{display:inline-flex;align-items:center;justify-content:center;border-radius:12px;padding:11px 16px;font-weight:800;text-decoration:none;border:1px solid transparent;cursor:pointer}.primary{background:var(--pink);color:#fff}.primary:hover{background:var(--pink-dark)}.secondary{background:#fff;color:var(--ink);border-color:var(--line)}table{border-collapse:collapse;width:100%;min-width:720px}th,td{text-align:left;padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:top}th{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}td a{color:var(--pink-dark);font-weight:700;text-decoration:none}.badge{display:inline-block;background:var(--pink-soft);color:var(--pink-dark);padding:4px 9px;border-radius:999px;font-size:12px;font-weight:800}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid.one{grid-template-columns:1fr}.form-grid label,.form-grid fieldset{display:flex;flex-direction:column;gap:7px;font-weight:750}.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid #d7c8d1;border-radius:11px;padding:12px 13px;font:inherit;background:#fff}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{outline:3px solid var(--pink-soft);border-color:var(--pink)}.full{grid-column:1/-1}.actions{display:flex;gap:10px;flex-direction:row!important}.checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.checks label{display:flex;flex-direction:row;align-items:flex-start;gap:9px;padding:10px;border:1px solid var(--line);border-radius:10px;font-weight:600}.checks input{width:auto;margin-top:3px}.checks small{display:block;color:var(--muted);font-weight:500}.flash{padding:13px 15px;border-radius:12px;margin-bottom:16px;font-weight:700}.flash.success{background:#e9f8f1;color:var(--ok)}.flash.error{background:#fff0ef;color:var(--danger)}footer{text-align:center;color:var(--muted);padding:30px 16px;font-size:13px}@media(max-width:980px){.cards{grid-template-columns:repeat(2,1fr)}.topbar{align-items:flex-start}.topbar nav{display:none;position:absolute;left:16px;right:16px;top:64px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);padding:12px;border-radius:16px}.nav-open .topbar nav{display:flex;flex-direction:column}.nav-toggle{display:inline-flex;margin-left:auto}.userbox{display:none}}@media(max-width:700px){.container{width:min(100% - 20px,1240px);margin-top:20px}.cards{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.checks{grid-template-columns:1fr}.page-head{align-items:flex-start;flex-direction:column}.topbar{padding:12px 14px}.brand{font-size:19px}.panel{padding:15px}.auth-card{padding:24px}.full{grid-column:auto}}

/* SCHICHTPLANER_WEEKLY_PLAN_V1 */
.weekly-head {
  align-items: flex-start;
}

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

.weekly-panel {
  padding: 0;
}

.weekly-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) repeat(7, minmax(170px, 1fr));
  min-width: 1450px;
}

.weekly-corner,
.weekly-day-head,
.weekly-area-name,
.weekly-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.weekly-corner,
.weekly-day-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--pink-soft);
}

.weekly-corner {
  left: 0;
  z-index: 6;
  font-weight: 900;
}

.weekly-day-head {
  text-align: center;
}

.weekly-day-head strong,
.weekly-day-head span {
  display: block;
}

.weekly-day-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.weekly-area-name {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}

.weekly-cell {
  min-height: 115px;
  background: #fff;
}

.shift-card {
  padding: 10px;
  margin-bottom: 9px;
  border: 1px solid #efbfd9;
  border-left: 5px solid var(--pink);
  border-radius: 10px;
  background: var(--pink-soft);
}

.shift-card-time {
  font-weight: 900;
}

.shift-card-employee {
  margin-top: 5px;
  font-weight: 750;
}

.shift-card-meta {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.shift-card a {
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.weekly-empty {
  color: #b8abb3;
}

.weekly-no-areas {
  grid-column: 1 / -1;
  padding: 24px;
}

.hours-positive {
  color: var(--ok);
  font-weight: 800;
}

.hours-negative {
  color: var(--danger);
  font-weight: 800;
}

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

  .week-navigation {
    justify-content: flex-start;
  }
}

/* ==========================================================
   SKILL-MATRIX UI V1
   ========================================================== */

.skill-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}

.skill-filter label {
  min-width: 190px;
}

.check-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check-line input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.skill-matrix-wrap {
  padding: 0;
  overflow: auto;
}

.skill-matrix-table {
  min-width: 1250px;
}

.skill-matrix-table th,
.skill-matrix-table td {
  min-width: 170px;
}

.skill-matrix-table .sticky-name {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 240px;
  background: #fff;
}

.skill-matrix-table thead .sticky-name {
  z-index: 5;
}

.skill-employee-link {
  font-weight: 850;
  text-decoration: none;
}

.skill-cell {
  vertical-align: top;
}

.skill-status {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.status-not_cleared {
  background: #edf0f2;
  color: #48545c;
}

.status-training {
  background: #fff0c2;
  color: #795900;
}

.status-supervised {
  background: #dcecff;
  color: #164d85;
}

.status-independent {
  background: #d8f3e5;
  color: #17653c;
}

.status-trainer {
  background: #eadcff;
  color: #582b88;
}

.status-blocked {
  background: #ffe0e0;
  color: #9c1d1d;
}

.skill-gap {
  margin-top: 7px;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}

.skill-complete {
  margin-top: 7px;
  color: #087443;
  font-size: 12px;
  font-weight: 800;
}

.skill-edit-grid,
.area-assignment-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(310px, 1fr)
  );
  gap: 15px;
}

.skill-edit-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.skill-edit-card .full {
  grid-column: 1 / -1;
}

.skill-card-heading {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.skill-card-heading input {
  width: auto;
  min-height: auto;
}

.gap-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(220px, 1fr)
  );
  gap: 12px;
}

.gap-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px;
  border: 1px solid #edb6b6;
  border-left: 5px solid #b42318;
  border-radius: 10px;
  background: #fff5f5;
}

.gap-card small {
  color: #8a2525;
}

.floating-save {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: 15px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .13);
  backdrop-filter: blur(8px);
}

@media (max-width: 720px) {
  .skill-edit-card {
    grid-template-columns: 1fr;
  }

  .skill-edit-card .full,
  .skill-card-heading {
    grid-column: 1;
  }
}

/* ==========================================================
   SKILL- UND QUALIFIKATIONSKATALOG UI V1
   ========================================================== */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(310px, 1fr)
  );
  gap: 16px;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.catalog-card.is-inactive {
  opacity: .65;
  background: #f4f4f4;
}

.catalog-card-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}

.catalog-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 850;
}

.catalog-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0;
}

.catalog-facts div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.catalog-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.catalog-facts dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.catalog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 8px;
}

.catalog-actions form {
  margin: 0;
}

button.danger {
  border: 1px solid #c62d2d;
  background: #fff;
  color: #a52222;
}

button.danger:hover {
  background: #fff0f0;
}

/* ==========================================================
   ARBEITSZEITMODELL UND MINIJOB-STEUERUNG V1
   ========================================================== */

.working-time-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.working-time-table-wrap table {
  min-width: 1300px;
}

.missing-value {
  color: var(--danger);
  font-weight: 850;
}

.row-warning {
  background: #fff8df;
}

.row-danger {
  background: #fff0f0;
}

.info-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border: 1px solid #efbfd9;
  border-radius: 11px;
  background: var(--pink-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(190px, 1fr)
  );
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 24px;
}

/* ==========================================================
   SCHICHTMODELLE UND WECHSELSCHICHTEN V1
   ========================================================== */

.shift-color {
  display: inline-block;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(0, 0, 0, .1);
  border-radius: 50%;
}

.rotation-week {
  margin-bottom: 20px;
}

.rotation-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(330px, 1fr)
  );
  gap: 15px;
}

.rotation-day {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rotation-day h3 {
  margin-top: 0;
}

.rotation-template-row {
  display: grid !important;
  grid-template-columns: 1fr 75px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.rotation-template-row input {
  width: 75px;
  text-align: center;
}

.rotation-template-row:last-child {
  border-bottom: 0;
}

/* ==========================================================
   PLANWOCHEN UND OFFENE BESETZUNGSPLÄTZE V1
   ========================================================== */

.planning-week-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(330px, 1fr)
  );
  gap: 16px;
}

.planning-week-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.open-slot-label {
  display: inline-block;
  padding: 5px 8px;
  border: 1px dashed #c62775;
  border-radius: 8px;
  background: #fff;
  color: #a3155a;
  font-weight: 850;
}

.shift-card:has(.open-slot-label) {
  border-style: dashed;
  background: #fff8fc;
}

/* ==========================================================
   MITARBEITERPOOL UND DRAG-AND-DROP-PLANER V1
   ========================================================== */

.planner-layout {
  display: grid;
  grid-template-columns: 310px minmax(900px, 1fr);
  gap: 18px;
  align-items: start;
}

.employee-pool {
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 95px);
  padding: 15px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.employee-pool-head {
  position: sticky;
  top: -15px;
  z-index: 3;
  padding: 15px 0 12px;
  background: #fff;
}

.employee-pool-head h2 {
  margin-top: 0;
}

.employee-group {
  margin-top: 18px;
}

.employee-group h3 {
  position: sticky;
  top: 102px;
  z-index: 2;
  padding: 8px;
  margin: 0 0 8px;
  border-radius: 8px;
  background: #f3f3f4;
  font-size: 14px;
}

.employee-card {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 11px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: grab;
}

.employee-card:hover,
.employee-card.is-selected {
  border-color: #e6007e;
  background: #fff3f9;
}

.employee-card.is-selected {
  box-shadow: 0 0 0 2px rgba(230, 0, 126, .16);
}

.employee-card span {
  font-size: 12px;
}

.absence-badge {
  color: #a31b1b;
  font-weight: 800;
}

.planner-week {
  min-width: 0;
  overflow-x: auto;
}

.planner-days {
  display: grid;
  min-width: 1250px;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 10px;
}

.planner-day {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f8f9;
}

.planner-day > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  background: #fff;
}

.planner-day > header span {
  color: var(--muted);
  font-size: 12px;
}

.planner-day-shifts {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 9px;
}

.planner-shift {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.planner-shift.is-open {
  border-style: dashed;
  border-color: #d45b9d;
  background: #fff8fc;
}

.planner-shift-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.planner-shift-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.planner-shift-head span {
  font-size: 11px;
  color: var(--muted);
}

.planner-shift-color {
  width: 13px;
  height: 30px;
  flex: 0 0 13px;
  border-radius: 5px;
}

.planner-shift-time {
  padding: 7px 0;
  font-weight: 800;
}

.planner-shift-time small {
  display: block;
  color: var(--muted);
}

.planner-slot {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 9px;
  border: 1px dashed #cc7baa;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.planner-slot.is-drop-target {
  border-color: #e6007e;
  background: #ffe8f5;
  box-shadow: 0 0 0 3px rgba(230, 0, 126, .14);
}

.assigned-employee {
  font-weight: 850;
}

.open-slot-text {
  color: #a3155a;
  font-weight: 850;
}

.unassign-button {
  width: 27px;
  height: 27px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: #a52222;
  line-height: 1;
}

.planner-empty-day {
  padding: 20px 8px;
  color: var(--muted);
  text-align: center;
}

.planner-message {
  position: sticky;
  top: 50px;
  z-index: 50;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-weight: 750;
}

.planner-message.success {
  background: #ddf6e8;
  color: #125d38;
}

.planner-message.info {
  background: #e8f1ff;
  color: #1f5088;
}

.planner-message.warning {
  background: #fff0c9;
  color: #725400;
}

.planner-message.error {
  background: #ffe0e0;
  color: #941e1e;
}

@media (max-width: 1000px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .employee-pool {
    position: relative;
    top: auto;
    max-height: 430px;
  }

  .employee-group h3 {
    top: 0;
  }
}

/* ==========================================================
   VERFÜGBARKEITEN UND WUNSCHFREI V1
   ========================================================== */

.employee-availability-link {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.employee-card .employee-availability-link {
  color: #a3155a;
}

.availability-rule-hard {
  color: #a52222;
  font-weight: 850;
}
