/* Oberfläche «Redaktion» in den Farben von Las Perlitas (Brand-Skill, Designrichtlinie v2.2).
   Kein reines Schwarz/Weiss. Schriften: Futura PT / Kudryashev Display über Adobe Fonts (yul3hnv). */

:root {
  --primaer: #1E1418;       /* Warm-Graphit: Text, Headlines, Buttons, Fokus */
  --sekundaer: #4A3840;     /* zweite Textebene, Hover, kleine Sublines */
  --rose-greige: #7A6068;   /* Linien, Labels; als Text erst ab 24px */
  --puder: #C0ACB4;         /* nur dekorativ */
  --hellrose: #EDE0E4;      /* Flächen */
  --hintergrund: #F5EEF0;   /* Seitenhintergrund */
  --fast-weiss: #FCF9FA;    /* Karten, Boxen, Tabellenzeilen */
  --rot: #8E2F3C;
  --gelb: #8A6A1E;
  --gruen: #3F6B4E;
  --serif: "kudryashev-d-contrast", Georgia, serif;
  --sans: "futura-pt", "Century Gothic", "Tw Cen MT", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--hintergrund); color: var(--primaer); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--primaer); }
a:hover { color: var(--sekundaer); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: 2.2rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
:focus-visible { outline: 2px solid var(--primaer); outline-offset: 2px; }

.kopf { display: flex; align-items: center; gap: 2rem; padding: 0.75rem 1.5rem; border-bottom: 0.5px solid var(--rose-greige); background: var(--hintergrund); position: sticky; top: 0; z-index: 5; }
.kopf .marke { font-family: var(--serif); font-size: 1.6rem; text-decoration: none; }
.kopf nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.kopf nav a { text-decoration: none; font-weight: 500; }
.kopf nav a:hover { text-decoration: underline; }
.abmelden { margin-left: auto; display: flex; gap: 0.75rem; align-items: center; color: var(--sekundaer); }
main { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

.karte { background: var(--fast-weiss); border: 0.5px solid var(--puder); border-radius: 6px; padding: 1.25rem; margin-bottom: 1.25rem; }
.karte.schmal { max-width: 420px; margin: 4rem auto; }
.unterzeile { color: var(--sekundaer); margin-top: -0.5rem; }
.raster2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.25rem; }
.raster3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }

label { display: block; margin-bottom: 0.75rem; font-weight: 500; color: var(--sekundaer); }
label.haken { display: inline-flex; gap: 0.35rem; margin-right: 1rem; font-weight: 400; color: var(--primaer); }
input, select, textarea { font: inherit; color: var(--primaer); background: var(--fast-weiss); border: 0.5px solid var(--rose-greige); border-radius: 4px; padding: 0.45rem 0.6rem; width: 100%; margin-top: 0.2rem; }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { min-height: 6rem; }
textarea.gross { min-height: 22rem; font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; }
fieldset { border: 0.5px solid var(--puder); border-radius: 4px; margin: 0 0 0.75rem; }
button, .knopf { font: inherit; font-weight: 500; cursor: pointer; border-radius: 4px; padding: 0.4rem 0.9rem; border: 0.5px solid var(--primaer); background: var(--fast-weiss); color: var(--primaer); text-decoration: none; display: inline-block; }
button.haupt, .knopf.haupt { background: var(--primaer); color: var(--fast-weiss); }
button.haupt:hover { background: var(--sekundaer); }
button.link { border: none; background: none; padding: 0; text-decoration: underline; color: var(--sekundaer); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
form.inline { display: inline; }

.meldung { background: var(--hellrose); border-left: 3px solid var(--gruen); padding: 0.6rem 1rem; }
.fehler { background: var(--hellrose); border-left: 3px solid var(--rot); padding: 0.6rem 1rem; white-space: pre-line; }
.warnung { color: var(--rot); font-weight: 500; }
.leer, .klein { color: var(--sekundaer); font-size: 0.9rem; }
.bericht { background: var(--hellrose); padding: 0.75rem; white-space: pre-wrap; font-size: 0.9rem; }
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: 0.5rem 0; border-bottom: 0.5px solid var(--puder); }
.liste li:last-child { border-bottom: none; }

.chip { display: inline-block; font-size: 0.8rem; font-weight: 500; padding: 0.05rem 0.5rem; border-radius: 999px; border: 1px solid var(--akzent); color: var(--primaer); background: var(--fast-weiss); }
.status { font-size: 0.8rem; padding: 0.05rem 0.45rem; border-radius: 3px; background: var(--hellrose); }
.status-freigegeben, .status-geplant { background: #DCE8DF; }
.status-veroeffentlicht { background: #D6E2EA; }
.status-pruefung { background: #F3E6C8; }

.tabelle { width: 100%; border-collapse: collapse; background: var(--fast-weiss); }
.tabelle th, .tabelle td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 0.5px solid var(--puder); vertical-align: top; }
.tabelle th { font-weight: 500; color: var(--sekundaer); background: var(--hellrose); }

/* Redaktionsplan */
.planleiste { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.umschalter a, .blaettern a { margin-right: 0.5rem; text-decoration: none; padding: 0.2rem 0.6rem; border-radius: 4px; }
.umschalter a.aktiv { background: var(--primaer); color: var(--fast-weiss); }
.blaettern span { font-family: var(--serif); font-size: 1.4rem; margin: 0 0.5rem; }
.filter { display: flex; gap: 0.5rem; margin: 0.75rem 0 1rem; flex-wrap: wrap; }
.filter select { width: auto; }
.planbereich { display: grid; grid-template-columns: 1fr 290px; gap: 1.25rem; }
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 0.5px solid var(--puder); border-top: 0.5px solid var(--puder); background: var(--fast-weiss); margin-bottom: 1.25rem; }
.kopfzelle { padding: 0.3rem 0.5rem; font-weight: 500; color: var(--sekundaer); background: var(--hellrose); border-right: 0.5px solid var(--puder); border-bottom: 0.5px solid var(--puder); }
.tag { min-height: 7.5rem; padding: 0.3rem; border-right: 0.5px solid var(--puder); border-bottom: 0.5px solid var(--puder); }
.kalender.woche .tag { min-height: 22rem; }
.tag.fremd { background: var(--hintergrund); color: var(--sekundaer); }
.tag.heute { box-shadow: inset 0 0 0 2px var(--primaer); }
.tag.saison { background-image: linear-gradient(var(--hellrose), var(--hellrose)); background-size: 100% 4px; background-repeat: no-repeat; }
.tag.ablage-ziel { background: var(--hellrose); }
.tagnr { font-size: 0.85rem; color: var(--sekundaer); }
.termin { font-size: 0.75rem; padding: 0 0.3rem; margin: 0.1rem 0; border-left: 2px solid var(--rose-greige); color: var(--sekundaer); }
.termin-feiertage_zh { border-left-color: var(--rot); }
.termin-standesamt { border-left-color: var(--gelb); }
.eintrag { display: block; font-size: 0.85rem; padding: 0.2rem 0.35rem; margin: 0.2rem 0; border-radius: 3px; background: var(--hintergrund); border-left: 3px solid var(--akzent); text-decoration: none; cursor: grab; }
.eintrag small, .idee small { display: block; color: var(--sekundaer); font-size: 0.72rem; }
.aufgabe { display: block; font-size: 0.78rem; padding: 0.15rem 0.3rem; margin: 0.2rem 0; border: 1px dashed var(--rot); border-radius: 3px; text-decoration: none; }
.luecke { color: var(--rot); }
.ideenleiste { background: var(--fast-weiss); border: 0.5px solid var(--puder); border-radius: 6px; padding: 1rem; align-self: start; position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); overflow: auto; }
.ideenleiste .schnell { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem; }
.ideenleiste .schnell select { grid-column: 1 / 2; }
.ideen { list-style: none; padding: 0; }
.idee { padding: 0.4rem 0.5rem; margin: 0.3rem 0; background: var(--hintergrund); border-radius: 4px; cursor: grab; font-size: 0.9rem; }
dialog { border: 0.5px solid var(--rose-greige); border-radius: 6px; background: var(--fast-weiss); color: var(--primaer); }

/* Eintrag, Varianten, Befunde */
.kopfzeile { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.variante { border-top: 1px solid var(--rose-greige); padding-top: 1rem; margin-top: 1.5rem; }
.variante-raster { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.25rem; }
.zaehler { font-size: 0.8rem; color: var(--sekundaer); float: right; }
.zaehler.zuviel { color: var(--rot); font-weight: 700; }
.ampel { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; vertical-align: middle; margin-right: 0.3rem; }
.ampel-rot { background: var(--rot); } .ampel-gelb { background: #D1A93C; } .ampel-gruen { background: var(--gruen); }
.befund { padding: 0.5rem; margin: 0.4rem 0; border-left: 3px solid var(--puder); background: var(--hintergrund); font-size: 0.9rem; }
.befund.fehler-befund { border-left-color: var(--rot); }
.befund.hinweis-befund { border-left-color: #D1A93C; }
.befund.erledigt { opacity: 0.6; }
.befund .stelle { font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; background: var(--fast-weiss); padding: 0 0.25rem; }
.befund form { display: inline-flex; gap: 0.35rem; margin-top: 0.3rem; }
.befund input { width: 16rem; margin: 0; padding: 0.2rem 0.4rem; }
.hindernisse { color: var(--rot); }

/* Vorschau (vereinfacht) */
.vorschau { background: var(--fast-weiss); border: 0.5px solid var(--puder); border-radius: 8px; padding: 0.75rem; max-width: 420px; }
.vorschau img { width: 100%; display: block; border-radius: 4px; }
.vorschau .mehr { color: var(--sekundaer); }
.vorschau .ad-titel { color: #1A3E8C; font-size: 1.1rem; }
.vorschau .ad-url { font-size: 0.85rem; }

/* Mediathek */
.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.bild { background: var(--fast-weiss); border: 0.5px solid var(--puder); border-radius: 6px; padding: 0.6rem; }
.bild img { width: 100%; height: 180px; object-fit: contain; background: var(--hintergrund); }
.alt-status { font-size: 0.8rem; }
.alt-status.leer, .alt-status.vorschlag { color: var(--rot); }
.alt-status.freigegeben { color: var(--gruen); }
.zuschnitte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.zuschnitte img { width: 100%; height: 120px; object-fit: contain; background: var(--hintergrund); }

@media (max-width: 900px) {
  .planbereich, .variante-raster { grid-template-columns: 1fr; }
  .ideenleiste { position: static; max-height: none; }
  .kalender .tag { min-height: 5rem; font-size: 0.8rem; }
}
.volles-bild { width: 100%; max-height: 520px; object-fit: contain; background: var(--hintergrund); }
