/* Admin-Übersicht (Designblock 2026-11-01, Runde 2) – gilt ausschließlich für #overviewTab.
   Farben aus dem bestehenden Admin-Theme: Navy #142f4d, Text #274663,
   gedämpft #7890a8, Rahmen #e0eaf3, Primär #0879e8. Keine Verläufe, keine Animationen. */
#overviewTab .ct-ov {
  --ov-navy: #142f4d;
  --ov-text: #274663;
  --ov-muted: #7890a8;
  --ov-line: #e0eaf3;
  --ov-line-soft: #edf2f7;
  --ov-head: #f7fafd;
  --ov-blue: #0879e8;
  --ov-blue-soft: #edf5ff;
  --ov-plan: #0d5cb6;
  --ov-green: #1f9d63;
  --ov-green-soft: #e8f7ef;
  --ov-orange: #d97a1e;
  --ov-orange-soft: #fff3e6;
  --ov-grey: #b3c1cf;
  --ov-grey-soft: #f0f4f8;
  --ov-shadow: 0 2px 8px rgba(36, 74, 110, .05);
  display: grid;
  gap: 14px;
  color: var(--ov-text);
}

#overviewTab .ct-ov p {
  margin: 0;
}

#overviewTab .ct-ov-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Obere Karten ---------- */
#overviewTab .ct-ov-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#overviewTab .ct-ov-card,
#overviewTab .ct-ov-panel {
  background: #fff;
  border: 1px solid var(--ov-line);
  border-radius: 12px;
  box-shadow: var(--ov-shadow);
}

#overviewTab .ct-ov-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: inherit;
}

#overviewTab .ct-ov-card--link {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#overviewTab .ct-ov-card--link:hover,
#overviewTab .ct-ov-card--link:focus-visible {
  border-color: #b9d5f3;
  box-shadow: 0 4px 12px rgba(8, 121, 232, .10);
  outline: none;
}

#overviewTab .ct-ov-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

#overviewTab .ct-ov-card-title {
  color: var(--ov-navy);
  font-size: 14px;
  font-weight: 700;
}

#overviewTab .ct-ov-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ov-blue-soft);
  color: var(--ov-blue);
}

#overviewTab .ct-ov-icon svg,
#overviewTab .ct-ov-chevron svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#overviewTab .ct-ov-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--ov-grey-soft);
  color: #5e7892;
}

#overviewTab .ct-ov-card--link:hover .ct-ov-chevron {
  background: var(--ov-blue-soft);
  color: var(--ov-blue);
}

#overviewTab .ct-ov-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ov-navy);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
}

#overviewTab .ct-ov-value small {
  color: var(--ov-muted);
  font-size: 14px;
  font-weight: 600;
}

#overviewTab .ct-ov-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#overviewTab .ct-ov-stats li,
#overviewTab .ct-ov-stat {
  display: block;
  color: var(--ov-text);
  font-size: 13px;
  line-height: 1.35;
}

#overviewTab .ct-ov-stats li[hidden] {
  display: none;
}

#overviewTab .ct-ov-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ov-grey);
}

#overviewTab .ct-ov-stats .ct-ov-dot {
  margin: 0 8px 1px 0;
  vertical-align: middle;
}

#overviewTab .ct-ov-dot--green { background: var(--ov-green); }
#overviewTab .ct-ov-dot--orange { background: var(--ov-orange); }
#overviewTab .ct-ov-dot--blue { background: var(--ov-blue); }
#overviewTab .ct-ov-dot--grey { background: var(--ov-grey); }

/* Planwoche: hervorgehobene blaue Karte */
#overviewTab .ct-ov-card--plan {
  border-color: var(--ov-plan);
  background: var(--ov-plan);
  color: #fff;
}

#overviewTab .ct-ov-card--plan .ct-ov-card-title {
  color: #fff;
}

#overviewTab .ct-ov-card--plan .ct-ov-icon {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

#overviewTab .ct-ov-plan-week {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

#overviewTab .ct-ov-plan-range {
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
  font-weight: 600;
}

#overviewTab .ct-ov-card-foot {
  margin-top: auto !important;
}

/* Status-Badge: veröffentlicht grün, Entwurf neutral blau, sonst grau */
#overviewTab .ct-ov-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ov-grey-soft);
  color: #5e7892;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

#overviewTab .ct-ov-badge[data-tone="green"] {
  background: var(--ov-green-soft);
  color: #17804f;
}

#overviewTab .ct-ov-badge[data-tone="green"]::before {
  content: "✓";
  font-weight: 800;
}

#overviewTab .ct-ov-badge[data-tone="orange"] {
  background: #e9f1fa;
  color: #2b5a88;
}

#overviewTab .ct-ov-card--plan .ct-ov-badge {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

#overviewTab .ct-ov-card--plan .ct-ov-badge[data-tone="green"] {
  background: var(--ov-green-soft);
  color: #17804f;
}

/* ---------- Panels ---------- */
#overviewTab .ct-ov-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#overviewTab .ct-ov-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#overviewTab .ct-ov-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--ov-line-soft);
  background: var(--ov-head);
}

#overviewTab .ct-ov-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ov-navy);
  font-size: 15px;
  font-weight: 800;
}

#overviewTab .ct-ov-panel-title::after {
  content: none !important;
}

#overviewTab .ct-ov-head-link {
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--ov-blue);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#overviewTab .ct-ov-head-link:hover,
#overviewTab .ct-ov-head-link:focus-visible {
  text-decoration: underline;
}

#overviewTab .ct-ov-lines,
#overviewTab .ct-ov-hints {
  margin: 0;
  padding: 0;
  list-style: none;
}

#overviewTab .ct-ov-lines {
  padding: 4px 16px 6px;
}

#overviewTab .ct-ov-lines li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ov-line-soft);
  font-size: 14px;
}

#overviewTab .ct-ov-lines li:last-child {
  border-bottom: 0;
}

#overviewTab .ct-ov-lines strong {
  margin-left: auto;
  min-width: 2ch;
  color: var(--ov-navy);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#overviewTab .ct-ov-line-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ov-grey-soft);
  color: #7d90a4;
}

#overviewTab .ct-ov-line-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#overviewTab .ct-ov-line-icon--green {
  background: var(--ov-green-soft);
  color: var(--ov-green);
}

#overviewTab .ct-ov-line-icon--orange {
  background: var(--ov-orange-soft);
  color: var(--ov-orange);
}

#overviewTab .ct-ov-panel-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px 14px;
}

#overviewTab .ct-ov-label {
  color: var(--ov-muted);
  font-size: 12.5px;
  font-weight: 600;
}

#overviewTab .ct-ov-plan-line {
  color: var(--ov-navy);
  font-size: 16px;
  font-weight: 800;
}

#overviewTab .ct-ov-plan-status {
  margin-top: 2px !important;
}

#overviewTab .ct-ov-note {
  color: var(--ov-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

#overviewTab .ct-ov-note:empty {
  display: none;
}

#overviewTab .ct-ov-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- Hinweise & Aufgaben ---------- */
/* Kopfzeile per Grid; die Anzahl wird per CSS-Zähler aus den vorhandenen Hinweisen gebildet. */
#overviewTab .ct-ov-panel--hints {
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  align-items: center;
  column-gap: 10px;
  counter-reset: ct-ov-hints;
}

#overviewTab .ct-ov-panel--hints::before {
  content: "";
  grid-row: 1;
  grid-column: 1 / -1;
  align-self: stretch;
  border-bottom: 1px solid var(--ov-line-soft);
  background: var(--ov-head);
}

#overviewTab .ct-ov-panel--hints > .ct-ov-panel-title {
  grid-row: 1;
  grid-column: 1;
  z-index: 1;
  min-height: 48px;
  padding: 8px 0 8px 16px;
}

#overviewTab .ct-ov-count {
  grid-row: 1;
  grid-column: 2;
  z-index: 1;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ov-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

#overviewTab .ct-ov-count::after {
  content: counter(ct-ov-hints);
}

#overviewTab .ct-ov-panel--hints:not(:has(.ct-ov-hint)) .ct-ov-count {
  display: none;
}

#overviewTab .ct-ov-hints {
  grid-row: 2;
  grid-column: 1 / -1;
  padding: 2px 16px 4px;
}

#overviewTab .ct-ov-hints li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ov-line-soft);
  font-size: 14px;
}

#overviewTab .ct-ov-hints li.ct-ov-hint {
  counter-increment: ct-ov-hints;
}

#overviewTab .ct-ov-hints li:last-child {
  border-bottom: 0;
}

#overviewTab .ct-ov-hint-text {
  flex: 1 1 auto;
  min-width: 0;
}

#overviewTab .ct-ov-hint-link {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: var(--ov-blue);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

#overviewTab .ct-ov-hint-link::after {
  content: " ›";
}

#overviewTab .ct-ov-hint-link:hover,
#overviewTab .ct-ov-hint-link:focus-visible {
  border-color: #9fc4ea;
  background: var(--ov-blue-soft);
  outline: none;
}

#overviewTab .ct-ov-hints li.ct-ov-hint-empty {
  color: var(--ov-muted);
  font-size: 13.5px;
}

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  #overviewTab .ct-ov-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #overviewTab .ct-ov-cards,
  #overviewTab .ct-ov-row {
    grid-template-columns: 1fr;
  }

  #overviewTab .ct-ov-hints li {
    flex-wrap: wrap;
  }
}
