/* Goetz-Tools — schlichtes, kontrastreiches Design für die Zielgruppe 50+.
   Große Schaltflächen, klare Sprache, viel Weißraum. */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c2330;
  --muted: #5b6472;
  --line: #d6dae1;
  --primary: #1f5fa8;
  --primary-dark: #174a85;
  --warn-bg: #fff4d6;
  --warn-ink: #7a5800;
  --error-bg: #fde2e1;
  --error-ink: #9b1c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: var(--card);
  border-bottom: 2px solid var(--line);
}
.brand { font-size: 1.4rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 1rem; }
.who { color: var(--muted); }
.navlink { color: var(--primary); text-decoration: none; font-weight: 600; }
.navlink:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }

.content { max-width: 1000px; margin: 2rem auto; padding: 0 1.5rem; }
.footer { max-width: 1000px; margin: 2rem auto; padding: 1rem 1.5rem; color: var(--muted); font-size: 0.9rem; }

h1 { font-size: 1.8rem; margin: 0 0 0.5rem; }
.subtitle { color: var(--muted); margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2rem;
}
.card-centered { max-width: 440px; margin: 3rem auto; }

.form { display: flex; flex-direction: column; gap: 0.4rem; }
.form label { font-weight: 600; margin-top: 0.8rem; }
.form input {
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
}
.form input:focus { outline: none; border-color: var(--primary); }

.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  background: #e9edf3;
  color: var(--ink);
}
.btn:hover { filter: brightness(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-big { width: 100%; padding: 1rem; font-size: 1.2rem; margin-top: 1.5rem; }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

.alert { padding: 0.9rem 1.1rem; border-radius: 8px; margin: 1rem 0; }
.alert-error { background: var(--error-bg); color: var(--error-ink); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert a { color: inherit; font-weight: 700; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tile h2 { font-size: 1.2rem; margin: 0 0 1rem; }
.tile-disabled { opacity: 0.7; }
.badge {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  background: #eef1f5;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: top; }
.table th { background: #eef1f5; }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; white-space: nowrap; }
.bignum { font-size: 2.2rem; font-weight: 700; margin: 0.3rem 0 0; }
.rowlink { color: var(--primary); font-weight: 600; text-decoration: none; }
.rowlink:hover { text-decoration: underline; }

/* Produktdaten-Manager */
.page-head { margin-bottom: 1rem; }
.ro-tag {
  font-size: 0.8rem; font-weight: 700; vertical-align: middle;
  background: #eef1f5; color: var(--muted); padding: 0.2rem 0.6rem; border-radius: 999px;
}
.searchbar { display: flex; gap: 0.6rem; margin: 1rem 0; flex-wrap: wrap; }
.searchbar input[type=text] {
  flex: 1; min-width: 220px; padding: 0.75rem 1rem; font-size: 1.05rem;
  border: 2px solid var(--line); border-radius: 8px;
}
.filterbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.chip {
  padding: 0.45rem 0.9rem; border-radius: 999px; text-decoration: none;
  background: #eef1f5; color: var(--ink); font-weight: 600; border: 2px solid transparent;
}
.chip:hover { filter: brightness(0.97); }
.chip-active { background: var(--primary); color: #fff; }
.chip-disabled { opacity: 0.5; cursor: not-allowed; }

.badge-ok { background: #d8f0dd; color: #1c6b34; }
.badge-off { background: #f0e0e0; color: #8a3a3a; }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge-alert { background: var(--error-bg); color: var(--error-ink); }

/* Bestelltool: Artikel-Erfassung */
.catalog-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.catalog-form input, .catalog-form select {
  padding: 0.6rem 0.7rem; font-size: 1rem; border: 2px solid var(--line); border-radius: 8px;
}
.catalog-form input[name="name"] { flex: 1; min-width: 200px; }
details > summary { cursor: pointer; }
details.card > summary { font-size: 1.1rem; margin-bottom: 0.5rem; }

.pager { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.pager-info { color: var(--muted); }
.btn-disabled { opacity: 0.5; cursor: default; }

.detail { margin: 1.25rem 0; }
.detail h2 { font-size: 1.2rem; margin: 0 0 1rem; border-bottom: 2px solid var(--line); padding-bottom: 0.5rem; }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 0.4rem 1rem; margin: 0; }
.kv dt { font-weight: 700; color: var(--muted); }
.kv dd { margin: 0; }
.rich { line-height: 1.6; }
.rich img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.opt { margin-bottom: 1rem; }
.opt ul { margin: 0.4rem 0 0; }
.imggrid { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.imggrid img { max-width: 200px; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.imggrid code { background: #eef1f5; padding: 0.3rem 0.5rem; border-radius: 6px; font-size: 0.85rem; }

/* --- Landingpage-CMS (interne Verwaltung) --- */
.text-in {
  width: 100%; padding: 0.6rem 0.7rem; font-size: 1rem;
  border: 2px solid var(--line); border-radius: 8px; background: #fff;
}
.text-in:focus { outline: none; border-color: var(--primary); }
.form-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 180px; font-weight: 600; }
.alert-ok { background: #e3f1e4; color: #1c6b34; }
.editor-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .editor-cols { grid-template-columns: 1fr; } }
.editor-cols form label { display: block; margin-bottom: 0.8rem; font-weight: 600; }
.editor-cols form label .text-in { margin-top: 0.3rem; font-weight: 400; }
.section-list { margin: 0.5rem 0; padding-left: 1.2rem; }
.section-list li { margin: 0.3rem 0; }
.row-actions { display: flex; gap: 0.4rem; white-space: nowrap; }
.btn-danger { background: #f0e0e0; color: #8a3a3a; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.sep { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ------------------------------------------------------------------ */
/* Goetz Social — Ergänzungen zum Toolkit-Stil.                        */
/* Eigene Akzentfarbe, damit auf einen Blick erkennbar ist, in welchem */
/* System man gerade arbeitet (Cockpit = blau, Social = violett).      */
/* ------------------------------------------------------------------ */
:root {
  --primary: #6a3fa0;
  --primary-dark: #55307f;
  --ok-bg: #e3f4e5;
  --ok-ink: #1b5e20;
}

.status-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.status-table th,
.status-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.status-table th { width: 34%; font-weight: 600; color: var(--muted); }

.pill {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill-error { background: var(--error-bg); color: var(--error-ink); }

.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }

.hint { color: var(--muted); font-size: 0.95rem; margin-top: 1.2rem; }

.tile-soon { opacity: 0.75; }
.tile p { color: var(--muted); margin: 0.3rem 0 1rem; }

.small { font-size: 0.9rem; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wrap-list { columns: 2; column-gap: 2rem; }
@media (max-width: 700px) { .wrap-list { columns: 1; } }

/* Auswahlfelder wie Eingabefelder gestalten (Zugangsverwaltung). */
.form select {
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.form select:focus { outline: none; border-color: var(--primary); }
details summary { cursor: pointer; font-weight: 600; color: var(--primary); }

/* ---------------- Medienbibliothek und Editor ---------------- */
.filterzeile {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  margin: 1rem 0;
}
.filterzeile input, .filterzeile select {
  padding: 0.6rem 0.8rem; font-size: 1rem;
  border: 2px solid var(--line); border-radius: 8px; background: #fff;
}

.galerie {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin: 1rem 0;
}
.kachel {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit;
}
.kachel:hover { border-color: var(--primary); }
.kachel-bild {
  aspect-ratio: 1 / 1; background: #eceff3;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; }
.kachel-leer::after { content: "wird erzeugt …"; color: var(--muted); font-size: 0.9rem; }
.kachel-text { padding: 0.7rem 0.8rem; }
.kachel-text .btn { margin-top: 0.5rem; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

.vorschau-reihe {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.5rem 0;
}
.vorschau-reihe figure { margin: 0; max-width: 320px; }
.vorschau-reihe img {
  max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}

.form textarea {
  padding: 0.85rem 1rem; font-size: 1.05rem; font-family: inherit;
  border: 2px solid var(--line); border-radius: 8px; resize: vertical;
}
.form textarea:focus { outline: none; border-color: var(--primary); }

.tile-warn { border-color: var(--error-ink); }

/* ---------------- Kalender ---------------- */
.kalenderkopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.kalenderkopf h1 { margin: 0; }
.kalender { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.kalender th {
  text-align: left; padding: 0.5rem; font-size: 0.85rem; color: var(--muted);
  border-bottom: 2px solid var(--line);
}
.kalender td {
  border: 1px solid var(--line); vertical-align: top;
  height: 6.5rem; width: 14.28%; padding: 0.35rem;
}
.kalender td.fremd { background: #f0f2f5; color: var(--muted); }
.kalender td.heute { border-color: var(--primary); border-width: 2px; }
.tagnummer { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; }
.kalendereintrag {
  display: block; font-size: 0.82rem; line-height: 1.25;
  padding: 0.25rem 0.4rem; margin-bottom: 0.25rem; border-radius: 6px;
  background: #ece5f5; color: var(--ink); text-decoration: none;
}
.kalendereintrag:hover { background: #ddd0ee; }
.kalendereintrag.status-published { background: var(--ok-bg); }
.kalendereintrag.status-failed { background: var(--error-bg); }

pre { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 700px) {
  .kalender td { height: auto; font-size: 0.8rem; }
  .content { padding: 0 0.8rem; }
}
