.sccyp-frontend {
  --border: rgba(255,255,255,0.10);
  --muted: #9ca3af;

  /* Dark UI Grundflächen */
  --bg: #141414;
  --bg-soft: #1f1f1f;
  --panel: #1b1b1b;
  --header: #262626;

  /* Aktueller Monat: Fläche + Linie (ruhiger) */
  --current-fill: rgba(255, 214, 102, 0.10);
  --current-line: rgba(255, 159, 28, 0.60);

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Filter */
.sccyp-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px 0;
  color: #e5e7eb;
}

.sccyp-filters label {
  font-weight: 600;
}

.sccyp-filters select,
.sccyp-filters button {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: #f3f4f6;
}

.sccyp-filters button {
  cursor: pointer;
  font-weight: 700;
}

/* Legende */
.sccyp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 16px 0;
}

.sccyp-legend-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #e5e7eb;
  font-weight: 500;
}

.sccyp-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.22);
}

/* Header Grid */
.sccyp-grid {
  display: grid;
  grid-template-columns: 260px repeat(12, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
}

.sccyp-grid--header .sccyp-cell {
  padding: 10px 8px;
  font-weight: 800;
  font-size: 13px;
  border-right: 1px solid var(--border);
  background: var(--header);
  color: #f3f4f6;
}

.sccyp-cell--title {
  color: #f9fafb;
}

.sccyp-cell--month {
  color: #d1d5db;
  font-weight: 700;
  text-align: center;
}

.sccyp-grid--header .sccyp-cell--month.is-current {
  background: var(--current-fill);
  color: #111827;
}

/* Body Wrap */
.sccyp-grid-wrap {
  position: relative;
  margin-top: 10px;
}

/* Overlay: aktuelle Monatsspalte als Fläche + Linie */
.sccyp-current-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  display: grid;
  grid-template-columns: 260px repeat(12, 1fr);
  pointer-events: none;
  z-index: 3;
}

.sccyp-current-overlay::before {
  content: "";
  grid-column: var(--current-col);
  grid-row: 1 / -1;
  background: var(--current-fill);
}

.sccyp-current-overlay::after {
  content: "";
  grid-column: var(--current-col);
  grid-row: 1 / -1;
  border-left: 2px solid var(--current-line);
  opacity: 0.9;
}

/* Rows */
.sccyp-row-grid {
  position: relative;
  display: grid;
  grid-template-columns: 260px repeat(12, 1fr);
  min-height: 54px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.sccyp-row-title {
  padding: 12px 12px;
  border-right: 1px solid var(--border);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: #f9fafb;
  background: var(--bg-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.sccyp-row-cell {
  border-right: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.sccyp-row-cell.is-current {
  background: var(--current-fill);
}

/* Balken Grundstyle */
.sccyp-bar {
  position: relative;
  z-index: 4;
  margin: 10px 6px;
  border-radius: 999px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  text-decoration: none;
  display: flex;
  align-items: center;
  overflow: hidden;

  /* default fallback */
  background: rgba(107, 114, 128, 0.85);
  color: #ffffff;
  font-weight: 700;

  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.sccyp-bar-label {
  font-size: 13px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover */
.sccyp-bar:hover {
  filter: brightness(1.06);
}

/* ===== Bereichsfarben (sanitize_title(Bereichsname)) ===== */

/* Marketing */
.sccyp-area-marketing {
  background: rgba(59, 130, 246, 0.92);
  border-color: rgba(29, 78, 216, 0.95);
}

/* Technik */
.sccyp-area-technik {
  background: rgba(99, 102, 241, 0.92);
  border-color: rgba(67, 56, 202, 0.95);
}

/* Finanzen */
.sccyp-area-finanzen {
  background: rgba(22, 163, 74, 0.92);
  border-color: rgba(21, 128, 61, 0.95);
}

/* Außenminister (Umlaut-Variante + ss-Variante) */
.sccyp-area-außenminister,
.sccyp-area-aussenminister {
  background: rgba(13, 148, 136, 0.92);
  border-color: rgba(15, 118, 110, 0.95);
}

/* Innenminister */
.sccyp-area-innenminister {
  background: rgba(147, 51, 234, 0.92);
  border-color: rgba(126, 34, 206, 0.95);
}

/* Wirtschaft */
.sccyp-area-wirtschaft {
  background: rgba(245, 158, 11, 0.92);
  border-color: rgba(217, 119, 6, 0.95);
}

/* Essen */
.sccyp-area-essen {
  background: rgba(220, 38, 38, 0.92);
  border-color: rgba(185, 28, 28, 0.95);
}

/* DGH Manager */
.sccyp-area-dgh-manager {
  background: rgba(100, 116, 139, 0.92);
  border-color: rgba(71, 85, 105, 0.95);
}

/* Anderes */
.sccyp-area-anderes {
  background: rgba(107, 114, 128, 0.92);
  border-color: rgba(75, 85, 99, 0.95);
}
