/* Dashboard - Gestaltung. Farben, Schrift, Radien, Schatten und Hell/Dunkel kommen
   aus design.css (geteilt mit ankauf, webseite, ebay-inv-sync). Hier nur die Bauteile. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 16px; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: 1rem; }
code { font-family: var(--font-mono); font-size: .88em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 24px; padding-bottom: 60px; }
form.inline { display: inline; }
.unsichtbar { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Kopf */
.top { background: var(--header-bg); color: var(--header-ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--header-ink); text-decoration: none; font-size: 1.05rem; }
.top nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.top nav a, .top .abmelden { color: var(--header-muted); text-decoration: none; font-size: .92rem; }
.top nav a:hover, .top nav a.aktiv { color: var(--header-ink); }
.top nav a.aktiv { font-weight: 600; }

/* Karten, Felder, Knoepfe */
.karte { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.karte.schmal { max-width: 380px; margin: 40px auto; }
.hinweis { color: var(--muted); font-size: var(--text-sm); font-weight: 400; }
label.feld { display: block; font-weight: 600; font-size: var(--text-sm); margin: 14px 0 6px; }
label.feld:first-of-type { margin-top: 0; }
input[type=text], input[type=password], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.zaehler { text-align: right; font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }
.zaehler.zu-lang { color: var(--error); font-weight: 600; }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; border-radius: var(--radius-sm); padding: 10px 16px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.knopf.haupt { background: var(--accent); color: var(--accent-ink); }
.knopf.haupt:hover { background: var(--accent-hover); }
.knopf.zweit { background: var(--surface); color: var(--ink); border-color: var(--line); }
.knopf.zweit:hover { background: var(--surface-hover); }
.knopf.gefahr { background: var(--surface); color: var(--error); border-color: var(--error-line); }
.knopf.klein { padding: 5px 9px; font-size: var(--text-sm); }
.knopf.breit { width: 100%; margin-top: 14px; }
.knopf:disabled { opacity: .45; cursor: default; }
.linkknopf { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.gefahr-text { color: var(--error); font-size: var(--text-sm); }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.meldung { border-radius: var(--radius-sm); padding: 10px 12px; font-size: .92rem; margin: 0 0 14px; border: 1px solid transparent; }
.meldung.fehler { background: var(--error-soft); color: var(--error); border-color: var(--error-line); }
.meldung.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.meldung.warn, .meldung.info { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.meldung.klein { font-size: var(--text-xs); padding: 6px 9px; margin: 6px 0; }

.badge { display: inline-block; border-radius: var(--radius-pill); padding: 2px 9px; font-size: var(--text-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; white-space: nowrap; }
.badge.geplant, .badge.laeuft, .badge.ziel-laeuft { background: var(--accent-soft); color: var(--accent); }
.badge.veroeffentlicht, .badge.ziel-fertig { background: var(--ok-soft); color: var(--ok); }
.badge.teilweise { background: var(--warn-soft); color: var(--warn); }
.badge.fehler, .badge.ziel-fehler { background: var(--error-soft); color: var(--error); white-space: normal; }
.fehlertext { color: var(--error); font-size: var(--text-sm); margin-top: 4px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-pill); padding: 5px 12px; text-decoration: none; color: var(--ink); font-size: var(--text-sm); }
.chip small { color: var(--muted); margin-left: 2px; }
.chip.aktiv { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.aktiv small { color: inherit; opacity: .7; }

.tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabelle th { text-align: left; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; }
.tabelle td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabelle .r { text-align: right; white-space: nowrap; }

/* Plattform-Marken */
.marke { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; color: #fff; vertical-align: middle; }
.marke.instagram { background: #c13584; }
.marke.facebook { background: #1877f2; }
.marke.youtube { background: #e00000; }
.marke.tiktok { background: #111; box-shadow: inset 0 0 0 1px #25f4ee; }
.ziel-marke { display: inline-block; margin-right: 3px; position: relative; }
.ziel-marke.fertig::after, .ziel-marke.fehler::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--surface); }
.ziel-marke.fertig::after { background: var(--ok-strong); }
.ziel-marke.fehler::after { background: var(--error-strong); }

/* Uebersicht */
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kopfzeile h1 { margin: 0; }
.abschnitt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 10px; }
section:first-of-type .abschnitt { margin-top: 6px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.kacheln .karte { margin-bottom: 0; }
.kachel-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.kachel-kopf h3 { margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.werte { margin: 0; display: grid; gap: 6px; }
.werte div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; border-bottom: 1px dashed var(--line); padding-bottom: 5px; }
.werte div:last-child { border-bottom: 0; }
.werte dt { color: var(--ink-2); }
.werte dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.werte .warn dd { color: var(--warn); }
.werte .ok dd { color: var(--ok); }
.werte .fehler dt, .werte .fehler dd { color: var(--error); font-weight: 400; font-size: var(--text-sm); }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: var(--muted); }
.punkt.fehler { background: var(--error-strong); }
.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 18px; }

.liste-karte { padding: 6px 8px; }
.liste-karte .leer { padding: 10px 12px; margin: 0; color: var(--muted); }
.zeile { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.zeile + .zeile { border-top: 1px solid var(--line); }
.zeile:hover { background: var(--surface-hover); }
.zeile .inhalt { display: flex; flex-direction: column; min-width: 0; }
.zeile b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile small { color: var(--muted); font-size: var(--text-xs); }
.vorschaubild { width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.vorschaubild img { width: 100%; height: 100%; object-fit: cover; }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.medien { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.medium { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.medium img, .medium video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.medium-info { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.medium-info small { font-size: var(--text-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medium-info .warnung { color: var(--warn); white-space: normal; }
.medium-knoepfe { display: flex; gap: 4px; }
.ablage { display: block; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 10px; font-size: var(--text-sm); }
.ablage.aktiv, .ablage:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.ablage input { display: block; margin: 0 auto 8px; }
.konto-wahl { padding: 10px 0; border-bottom: 1px solid var(--line); }
.konto-wahl:last-child { border-bottom: 0; }
.haken { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.haken input { width: 17px; height: 17px; accent-color: var(--accent); }
.hinweisliste { margin: 6px 0 0; padding-left: 20px; color: var(--error); font-size: var(--text-sm); }
.eigener-text summary { cursor: pointer; color: var(--muted); font-size: var(--text-sm); margin-top: 6px; }
.eigener-text textarea { margin-top: 6px; }
.vorschau-text { white-space: pre-wrap; margin: 0 0 14px; }
.kopierbar { display: inline-block; word-break: break-all; user-select: all; background: var(--surface-2); padding: 3px 6px; border-radius: 5px; margin-top: 4px; }

@media (max-width: 900px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .karte { padding: 16px; }
  .zwei-spalten { grid-template-columns: minmax(0, 1fr); }
  .tabelle { font-size: .88rem; }
  .tabelle th:nth-child(3), .tabelle td:nth-child(3) { display: none; }
}
