body { font-family: Arial, sans-serif; background:#f5f6f8; margin:0; padding:20px; }
.card { max-width: 520px; margin: 0 auto; background:white; padding:18px; border-radius:12px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.card.wide { max-width: 1100px; }
h1 { margin:0 0 6px 0; font-size: 22px; }
p { margin: 6px 0; color:#333; }
.row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.stack { display:flex; flex-direction:column; gap:10px; }
.input { width:100%; padding:10px 12px; border:1px solid #ccd1d8; border-radius:10px; font-size:16px; }
.input.small { width:90px; }
.btn { display:inline-block; background:#1f6feb; color:white; border:none; padding:10px 12px; border-radius:10px; font-size:16px; text-decoration:none; cursor:pointer; }
.btn.secondary { background:#6b7280; }
.btn.danger { background:#b91c1c; }
.btn.tiny { padding:8px 10px; font-size:14px; border-radius:10px; }
.error { background:#fee2e2; color:#991b1b; padding:10px; border-radius:10px; margin:10px 0; }
.info { background:#e0f2fe; color:#075985; padding:10px; border-radius:10px; margin-top:12px; }
.tablewrap { overflow-x:auto; margin-top:12px; }
table { border-collapse:collapse; width:100%; min-width: 980px; }
th, td { border:1px solid #e5e7eb; padding:8px; font-size:14px; vertical-align:middle; }
th { background:#f9fafb; text-align:left; }
.totals { margin-top:12px; display:flex; flex-wrap:wrap; gap:14px; }
.submitbar { margin-top:14px; }
/* =========================
   Excel-Look (Web)
   ========================= */

/* ===== Kopfbereich ===== */
table.xl-head {
  border-collapse: collapse;
  width: 100%;
  margin: 15px 0 20px 0;
  table-layout: fixed;
}

table.xl-head td {
  border: 1px solid #000;
  padding: 6px 8px;
  font-size: 14px;
  background: #fff;
}

table.xl-head td.label { font-weight: 700; }
table.xl-head td.value { font-weight: 700; }

/* Spaltenbreiten Kopf */
table.xl-head col.cA { width: 8%; }
table.xl-head col.cB { width: 6%; }
table.xl-head col.cC { width: 20%; }
table.xl-head col.cD { width: 6%; }
table.xl-head col.cE { width: 10%; }
table.xl-head col.cF { width: 6%; }
table.xl-head col.cG { width: 20%; }
table.xl-head col.cH { width: 6%; }

/* ===== Haupttabelle ===== */
table.xl-main {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

table.xl-main th,
table.xl-main td {
  border: 1px solid #000;
  padding: 4px 6px;
  font-size: 14px;
  background: #fff;
  vertical-align: middle;
}

table.xl-main thead th {
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid #000;
}

td.num {
  text-align: right;
  font-weight: 700;
}

/* Excel-Inputs */
input.xl,
select.xl {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 0;
  margin: 0;
}

/* Spaltenbreiten Haupttabelle */
table.xl-main col.cTag   { width: 55px; }
table.xl-main col.cVon   { width: 85px; }
table.xl-main col.cBis   { width: 85px; }
table.xl-main col.cTaet  { width: auto; }
table.xl-main col.cNorm  { width: 95px; }
table.xl-main col.cPause { width: 95px; }
table.xl-main col.cUrl   { width: 95px; }
table.xl-main col.cKrank { width: 95px; }
table.xl-main col.cNote  { width: 140px; }

/* ===== Totals ===== */
table.xl-totals {
  border-collapse: collapse;
  width: 100%;
  margin-top: 12px;
  table-layout: fixed;
}

table.xl-totals td {
  border: 1px solid #000;
  padding: 6px 8px;
  font-size: 14px;
}

table.xl-totals .label {
  font-weight: 700;
}

table.xl-totals .num {
  text-align: right;
  font-weight: 700;
}
table.xl-main td select.xl,
table.xl-main td input.xl {
  margin-bottom: 4px;
}

table.xl-main td input.xl:last-child {
  margin-bottom: 0;
}

/* ===== Mobile-only Verbesserungen ohne Desktop kaputt zu machen ===== */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .mobile-actions {
    width: 100%;
  }

  .mobile-actions .btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    text-align: center;
  }

  .tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  .xl-main {
    min-width: 1150px;
  }

  .xl-main input,
  .xl-main select {
    min-height: 38px;
    font-size: 16px;
  }

  .submitbar .btn {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .xl-head td,
  .xl-totals td {
    font-size: 13px;
  }
}

/* ===== Deutliche Mobile-Ansicht nur für kleine Displays ===== */
@media screen and (max-width: 768px) {
  body {
    padding: 6px !important;
  }

  .card.wide {
    padding: 10px !important;
  }

  .row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .mobile-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .mobile-actions .btn {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
  }

  .tablewrap {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 2px solid #bbb !important;
    border-radius: 8px !important;
    background: #fff !important;
    padding-bottom: 8px !important;
  }

  .xl-main {
    min-width: 1300px !important;
  }

  .xl-main th,
  .xl-main td {
    white-space: nowrap !important;
  }

  .xl-main input,
  .xl-main select {
    min-height: 42px !important;
    font-size: 16px !important;
    min-width: 90px !important;
    padding: 6px 8px !important;
  }

  .submitbar .btn {
    width: 100% !important;
    min-height: 46px !important;
    font-size: 16px !important;
  }
}

/* ===== Mobile Fix: Kopf/Fuß gleiche Breite wie Hauptfeld + Tätigkeit sauber untereinander ===== */
@media screen and (max-width: 768px) {
  /* Alle drei Bereiche gleich breit und scrollbar */
  .xl-head,
  .tablewrap,
  .xl-totals {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  .xl-head table,
  .xl-totals table {
    min-width: 1300px !important;
  }

  /* Falls xl-head / xl-totals direkt Tabellen sind */
  .xl-head,
  .xl-totals {
    min-width: 1300px !important;
    border-collapse: collapse !important;
  }

  .xl-main {
    min-width: 1300px !important;
  }

  /* Tätigkeitsspalte deutlich breiter */
  .xl-main th:nth-child(4),
  .xl-main td:nth-child(4) {
    min-width: 260px !important;
    width: 260px !important;
    vertical-align: top !important;
    overflow: hidden !important;
  }

  /* Der TD-Container MUSS untereinander sein */
  .activity-cell {
    vertical-align: top !important;
  }

  .activity-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .activity-stack .activity-select,
  .activity-stack .activity-note,
  .activity-cell select,
  .activity-cell input[name="note"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }

  /* Zusatzfeld explizit unterhalb halten */
  .activity-cell input[name="note"] {
    margin-top: 4px !important;
    clear: both !important;
  }

  /* Stundenfelder schmal und sauber */
  .xl-main th:nth-child(5),
  .xl-main th:nth-child(6),
  .xl-main th:nth-child(7),
  .xl-main th:nth-child(8),
  .xl-main td:nth-child(5),
  .xl-main td:nth-child(6),
  .xl-main td:nth-child(7),
  .xl-main td:nth-child(8) {
    min-width: 85px !important;
    width: 85px !important;
  }

  .xl-main td:nth-child(5) input,
  .xl-main td:nth-child(6) input,
  .xl-main td:nth-child(7) input,
  .xl-main td:nth-child(8) input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ===== Mobile Fix: Zusatzfeld darf nicht in Nachbarspalten hineinragen ===== */
@media screen and (max-width: 768px) {
  /* Zelleninhalt sauber in der Zelle halten */
  .xl-main td,
  .xl-main th {
    overflow: hidden !important;
  }

  /* Tätigkeitsspalte etwas breiter und oben ausrichten */
  .xl-main th:nth-child(4),
  .xl-main td:nth-child(4) {
    min-width: 240px !important;
    width: 240px !important;
    vertical-align: top !important;
    overflow: hidden !important;
  }

  /* Container in der Tätigkeitsspalte wirklich untereinander */
  .activity-cell {
    vertical-align: top !important;
    overflow: hidden !important;
  }

  .activity-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Select und Zusatzfeld strikt auf Zellbreite begrenzen */
  .activity-cell select,
  .activity-cell input[name="note"],
  .activity-select,
  .activity-note {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Stunden-Spalten bewusst kompakt halten */
  .xl-main th:nth-child(5),
  .xl-main th:nth-child(6),
  .xl-main th:nth-child(7),
  .xl-main th:nth-child(8),
  .xl-main td:nth-child(5),
  .xl-main td:nth-child(6),
  .xl-main td:nth-child(7),
  .xl-main td:nth-child(8) {
    min-width: 82px !important;
    width: 82px !important;
    overflow: hidden !important;
  }

  .xl-main td:nth-child(5) input,
  .xl-main td:nth-child(6) input,
  .xl-main td:nth-child(7) input,
  .xl-main td:nth-child(8) input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ===== Sticky Header für die Haupttabelle ===== */
.tablewrap {
  position: relative;
}

.xl-main thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  box-shadow: 0 1px 0 #bdbdbd;
}

/* Erste Spalte optional ebenfalls fixiert */
.xl-main thead th:first-child {
  z-index: 25;
}

.xl-main th:first-child,
.xl-main td:first-child {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 10;
}

.xl-main thead th:first-child {
  z-index: 30;
}

/* ===== Save-State in Tag-Zelle ===== */
.tag-cell {
  vertical-align: middle;
}

.tag-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tag-number {
  display: inline-block;
}

.save-state {
  display: inline-block;
  min-width: 60px;
  max-width: 70px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 6px;
  text-align: center;
}

.save-state:empty {
  display: none;
}

.save-state.saving {
  background: #fff3cd;
  color: #8a6d3b;
}

.save-state.saved {
  background: #d1e7dd;
  color: #0f5132;
}

.save-state.error {
  background: #f8d7da;
  color: #842029;
}

@media screen and (max-width: 768px) {
  .tag-wrap {
    gap: 3px;
  }

  .save-state {
    min-width: 52px;
    max-width: 60px;
    font-size: 10px;
    padding: 2px 5px;
  }
}

/* ===== Monatsabschluss Status ===== */
.sheet-submit-status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

.sheet-submit-status.sending {
  color: #8a6d3b;
}

.sheet-submit-status.success {
  color: #0f5132;
}

.sheet-submit-status.error {
  color: #842029;
}

.sheet-submit-actions {
  margin-top: 12px;
}

.sheet-submit-actions .btn {
  display: inline-block;
}

@media screen and (max-width: 768px) {
  .sheet-submit-actions .btn {
    width: 100%;
    text-align: center;
  }
}

.month-target-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 14px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d0d7de;
  background: #f8f9fa;
  font-size: 14px;
}

.month-target-box div {
  min-width: 120px;
  flex: 1 1 120px;
}

/* ===== Layout fix für Stundennachweis oben ===== */
.card.wide > .row,
.card.wide > .month-target-box,
.card.wide > .tablewrap,
.card.wide > .submitbar,
.card.wide > .info {
  display: block;
  width: 100%;
  max-width: 100%;
  clear: both;
}

.month-target-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 14px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d0d7de;
  background: #f8f9fa;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.month-target-box div {
  min-width: 120px;
  flex: 1 1 120px;
}

.tablewrap {
  display: block;
  width: 100%;
  max-width: 100%;
  clear: both;
  box-sizing: border-box;
}

/* ===== Monatsdashboard ===== */
.dashboard-page {
  max-width: 980px;
  margin: 18px auto;
}

.dashboard-header {
  margin-bottom: 14px;
}

.dashboard-header h1 {
  margin-bottom: 6px;
}

.dashboard-subtitle {
  margin: 0;
  color: #333;
  font-size: 18px;
  line-height: 1.35;
}

.month-picker {
  margin: 18px 0 18px 0;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d7dde5;
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.dashboard-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-label {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}

.dashboard-box.dashboard-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.dashboard-box.dashboard-open {
  background: #fffbeb;
  border-color: #fde68a;
}

.dashboard-box.dashboard-over {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.dashboard-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.leader-card.leader-checked {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.leader-card.leader-open {
  background: #fffbeb;
  border-color: #fde68a;
}

.sheet-status {
  background: #e5e7eb;
  color: #374151;
}

.month-actions {
  margin-top: 18px;
}

.month-actions .btn {
  min-width: 220px;
}

@media screen and (max-width: 768px) {
  .dashboard-page {
    margin: 8px auto;
  }

  .dashboard-subtitle {
    font-size: 16px;
  }

  .month-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-box {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    padding: 14px;
    gap: 12px;
  }

  .dashboard-value {
    font-size: 22px;
  }

  .month-actions .btn {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
}

/* ===== Schönes Dashboard ===== */
.dashboard-page {
  max-width: 1100px;
  margin: 18px auto;
}

.dashboard-header {
  margin-bottom: 14px;
}

.dashboard-header h1 {
  margin-bottom: 6px;
}

.dashboard-subtitle {
  margin: 0;
  color: #333;
  font-size: 18px;
  line-height: 1.35;
}

.month-picker {
  margin: 18px 0 18px 0;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d7dde5;
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.dashboard-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-label {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}

.dashboard-box.dashboard-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.dashboard-box.dashboard-minus {
  background: #fef2f2;
  border-color: #fecaca;
}

.dashboard-box.dashboard-plus {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.dashboard-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.badge-ok {
  background: #d1fae5;
  color: #065f46;
}

.badge-minus {
  background: #fee2e2;
  color: #991b1b;
}

.badge-plus {
  background: #dcfce7;
  color: #166534;
}

.sheet-status {
  background: #e5e7eb;
  color: #374151;
}

.diff-ok {
  color: #065f46;
}

.diff-minus {
  color: #b91c1c;
}

.diff-plus {
  color: #15803d;
}

.year-overview {
  margin-top: 24px;
}

.year-overview h2 {
  margin-bottom: 12px;
}

.year-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.year-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #d7dde5;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow: hidden;
}

.year-card.month-ok,
.leader-card.leader-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.year-card.month-minus,
.leader-card.leader-missing {
  background: #fef2f2;
  border-color: #fecaca;
}

.year-card.month-plus {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.leader-card.leader-returned {
  background: #fffbeb;
  border-color: #fde68a;
}

.leader-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 330px;
}

.leader-card .year-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.leader-card .year-card-title {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
}

.leader-card-meta {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #4b5563;
}

.leader-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-bottom: 12px;
}

.leader-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.leader-stat span {
  font-size: 12px;
  line-height: 1.2;
  color: #6b7280;
}

.leader-stat strong {
  font-size: 14px;
  line-height: 1.2;
  color: #111827;
}

.leader-card-actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: flex-start;
}

.leader-card-actions .btn {
  width: auto;
  min-width: 140px;
  text-align: center;
  padding: 8px 16px;
}

.leader-card .stack {
  width: 100%;
  gap: 8px;
  margin-top: 10px;
}

.leader-card form {
  width: 100%;
  margin: 0;
}

.leader-card form .input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
}

.leader-card .dashboard-badge {
  white-space: nowrap;
  margin-left: 8px;
}

@media screen and (max-width: 1100px) {
  .year-cards {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .year-cards {
    grid-template-columns: 1fr;
  }

  .leader-stats-grid {
    grid-template-columns: 1fr;
  }
}

.leader-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px 0;
}

.leader-filters .btn {
  min-width: 130px;
  text-align: center;
}

.value-negative {
  color: #dc2626 !important;
  font-weight: 700;
}

.value-positive {
  color: #16a34a !important;
  font-weight: 700;
}

.value-warning {
  color: #d97706 !important;
  font-weight: 700;
}

.leader-priority-box {
  margin: 16px 0 10px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d7dde5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.leader-priority-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.leader-priority-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
}

.leader-priority-label {
  font-size: 13px;
  color: #475569;
}

.leader-priority-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.priority-missing {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.priority-review {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.priority-returned {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.priority-done {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.leader-priority-message {
  font-size: 14px;
  color: #334155;
}

@media screen and (max-width: 768px) {
  .leader-priority-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

@media screen and (max-width: 768px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-edit-box {
  width: 100%;
}

.admin-edit-box summary {
  list-style: none;
}

.admin-edit-box summary::-webkit-details-marker {
  display: none;
}

.admin-edit-box[open] {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 10px;
}

.admin-edit-box form {
  margin-top: 10px;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.admin-inline-form .btn {
  width: auto;
}

@media screen and (max-width: 900px) {
  .admin-inline-form {
    grid-template-columns: 1fr;
  }
}

.management-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 28px 0;
}

.management-filters .btn {
  min-width: 140px;
  text-align: center;
}

.year-overview {
  margin-top: 28px;
}

.year-overview h2,
.year-overview h3 {
  display: block;
  width: 100%;
}

.year-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
}

@media (max-width: 1100px) {
  .year-cards {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .management-filters {
    flex-direction: column;
  }

  .management-filters .btn {
    width: 100%;
  }

  .year-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== Status-Badges ===== */
.dashboard-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.badge-ok {
  background: #dcfce7;
  color: #166534;
}

.badge-checked {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-open {
  background: #fef3c7;
  color: #92400e;
}

.badge-minus {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-secondary {
  background: #e5e7eb;
  color: #374151;
}

/* ===== Kartenfarben nach Workflow ===== */
.leader-card.leader-ok {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.leader-card.leader-checked {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.leader-card.leader-open {
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.leader-card.leader-returned {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.leader-card.leader-missing {
  background: #f9fafb;
  border: 1px solid #d1d5db;
}

/* ===== Leader / Management Prioritäten ===== */
.leader-priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.leader-priority-item {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
}

.leader-priority-label {
  display: block;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 6px;
}

.leader-priority-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.priority-missing {
  background: #f9fafb;
  border-color: #d1d5db;
}

.priority-review {
  background: #fffbeb;
  border-color: #fcd34d;
}

.priority-checked {
  background: #eff6ff;
  border-color: #93c5fd;
}

.priority-returned {
  background: #fef2f2;
  border-color: #fca5a5;
}

.priority-done {
  background: #f0fdf4;
  border-color: #86efac;
}

.leader-priority-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

