/* Baukasten — Oberfläche der Verwaltung (Kundenbereich und IDO-Verwaltung).
   Aufbau wie in den anderen IDO-Plattformen: ruhige Fläche, eine
   Akzentfarbe, Statusfarben nur für Zustände. */

:root {
  --e-bg: #F5F6FA;
  --e-surface: #FFFFFF;
  --e-surface-2: #EBECF3;
  --e-ink: #1A1C26;
  --e-muted: #5B5F72;
  --e-line: #DDDEE8;
  --e-accent: #4A44D4;
  --e-accent-soft: #ECEBFB;
  --e-danger: #B3382E;
  --e-ok: #1F7A4D;
  --e-warn: #A4700F;
  --e-shadow: 0 1px 2px rgba(20,22,35,.06), 0 8px 24px rgba(20,22,35,.08);
}

* { box-sizing: border-box; }

body.bk-admin {
  margin: 0;
  background: var(--e-bg);
  color: var(--e-ink);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.hint { color: var(--e-muted); font-size: .85rem; line-height: 1.55; margin: 6px 0; }
.muted { color: var(--e-muted); }
.sub { color: var(--e-muted); }
a { color: var(--e-accent); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--e-accent); outline-offset: 2px; }

.btng, .btnp, .btn {
  border: 1px solid var(--e-line); background: var(--e-surface); color: var(--e-ink);
  border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 500;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btng:hover, .btn:hover { border-color: var(--e-accent); color: var(--e-accent); }
.btnp, .btn.primary { background: var(--e-accent); border-color: var(--e-accent); color: #fff; font-weight: 600; }
.btnp:hover, .btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn-danger, .btn.danger { color: var(--e-danger); }
.btn-danger:hover, .btn.danger:hover { border-color: var(--e-danger); color: var(--e-danger); }
.btn-sm, .btn.tiny { padding: 4px 10px; font-size: .8rem; }
.linkbtn { border: 0; background: none; color: var(--e-muted); cursor: pointer; font: inherit; text-decoration: underline; }
.inline { display: inline; }

/* ============ Verwaltung (Dashboard, Einstellungen) ============ */

.admin-head {
  background: var(--e-surface); border-bottom: 1px solid var(--e-line);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.admin-logo {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.05rem;
  display: flex; align-items: center; gap: 9px; color: var(--e-ink); text-decoration: none;
}
.admin-logo .mark { width: 20px; height: 20px; border-radius: 6px; background: var(--e-accent); }
.admin-user { display: flex; align-items: center; gap: 12px; color: var(--e-muted); font-size: .88rem; }
.admin-user form { margin: 0; }
.admin-main { max-width: 940px; margin: 0 auto; padding: 26px 24px 60px; }
.admin-main h1 { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.7rem; margin: 0 0 18px; }

.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: .9rem; }
.alert-ok { background: #E3F4EA; color: var(--e-ok); border: 1px solid #BFE3CE; }
.alert-error { background: #FBE9E7; color: var(--e-danger); border: 1px solid #F1C9C4; }

.auth-card { max-width: 470px; margin: 34px auto; background: var(--e-surface); border: 1px solid var(--e-line); border-radius: 14px; padding: 30px; }
.auth-card h1 { font-family: "Bricolage Grotesque", sans-serif; margin: 0 0 4px; font-size: 1.5rem; }

.form { display: grid; gap: 14px; margin: 20px 0 12px; }
.form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 500; }
.form label.checkbox { grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; font-weight: 400; color: var(--e-muted); }
.form input[type="text"], .form input[type="email"], .form input[type="password"],
.form input[type="tel"], .form input[type="file"], .form select, .form textarea {
  border: 1px solid var(--e-line); border-radius: 8px; padding: 9px 12px;
  font: inherit; background: var(--e-bg); color: var(--e-ink); width: 100%;
}
.form textarea { resize: vertical; }
.form-sep { border: 0; border-top: 1px solid var(--e-line); margin: 4px 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix code { color: var(--e-muted); white-space: nowrap; font-size: .82rem; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.inline-form input, .inline-form select {
  border: 1px solid var(--e-line); border-radius: 8px; padding: 8px 12px;
  font: inherit; background: var(--e-bg); color: var(--e-ink); flex: 1 1 170px; min-width: 0;
}

.admin-card { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.admin-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-card h2 { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.22rem; }
.card-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.plan { border-radius: 999px; padding: 2px 12px; font-size: .74rem; font-weight: 600; background: var(--e-surface-2); color: var(--e-muted); }
.plan-business, .plan-pro { background: var(--e-accent-soft); color: var(--e-accent); }
.status { border-radius: 999px; padding: 1px 10px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.status-pending { background: #F7EEDA; color: var(--e-warn); }
.status-verified, .status-active { background: #E3F4EA; color: var(--e-ok); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.metric { background: var(--e-bg); border-radius: 10px; padding: 12px 14px; }
.metric b { display: block; font-size: 1.5rem; font-family: "Bricolage Grotesque", sans-serif; line-height: 1.2; }
.metric span { font-size: .76rem; color: var(--e-muted); }
.metric a { text-decoration: none; }

.section-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--e-muted); margin: 22px 0 6px; }
.row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.page-list { list-style: none; margin: 8px 0 0; padding: 0; }
.page-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--e-line); flex-wrap: wrap;
}
.page-list small { color: var(--e-muted); }
.page-list code { color: var(--e-muted); font-size: .8rem; }

.dns-box { background: var(--e-bg); border: 1px solid var(--e-line); border-radius: 10px; padding: 14px 16px; margin-top: 12px; overflow-x: auto; }
.dns-table { border-collapse: collapse; font-family: ui-monospace, monospace; font-size: .82rem; white-space: nowrap; }
.dns-table th { text-align: left; font-weight: 500; color: var(--e-muted); padding: 2px 24px 6px 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.dns-table td { padding: 3px 24px 3px 0; }

.upsell { background: var(--e-accent-soft); border-radius: 10px; padding: 14px 16px; margin-top: 12px; }
.upsell b { color: var(--e-accent); }
.upsell .hint { margin: 4px 0 0; }

.tabs-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs-nav a {
  border: 1px solid var(--e-line); border-radius: 999px; padding: 6px 15px;
  text-decoration: none; color: var(--e-muted); background: var(--e-surface); font-size: .86rem;
}
.tabs-nav a.active { border-color: var(--e-accent); color: var(--e-accent); background: var(--e-accent-soft); font-weight: 600; }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin: 16px 0 6px; }
.chart-bar { flex: 1; background: var(--e-accent-soft); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.chart-bar span { position: absolute; inset: auto 0 -20px; text-align: center; font-size: .6rem; color: var(--e-muted); }
.chart-bar.peak { background: var(--e-accent); }
.chart-legend { display: flex; justify-content: space-between; font-size: .72rem; color: var(--e-muted); margin-top: 22px; }

.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--e-muted); padding: 6px 10px 6px 0; }
.data-table td { padding: 9px 10px 9px 0; border-top: 1px solid var(--e-line); vertical-align: top; }
.submission-fields { display: grid; gap: 3px; }
.submission-fields b { font-weight: 600; }

.media-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 12px; }
.media-manage figure { margin: 0; border: 1px solid var(--e-line); border-radius: 10px; overflow: hidden; background: var(--e-surface); }
.media-manage img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.media-manage figcaption { padding: 8px; font-size: .74rem; color: var(--e-muted); display: grid; gap: 6px; }

/* ---- Kopfzeile und Grundlayout ---- */

.tb {
  background: var(--e-surface); border-bottom: 1px solid var(--e-line);
  padding: 11px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.tb-left, .brand { display: flex; align-items: center; gap: 9px; }
.brand {
  font-weight: 700; font-size: 1.05rem; color: var(--e-ink); text-decoration: none;
}
.brand .mark { width: 20px; height: 20px; border-radius: 6px; background: var(--e-accent); display: block; }
.tbr { display: flex; align-items: center; gap: 12px; color: var(--e-muted); font-size: .88rem; }
.tbr form { margin: 0; }
.av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--e-accent-soft); color: var(--e-accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem;
}
.main { max-width: 940px; margin: 0 auto; padding: 26px 24px 60px; }
.main.wide { max-width: 1180px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { font-size: 1.6rem; margin: 0; }
.pagehead .sub { margin: 2px 0 0; }

.impersonate-banner {
  background: #FFF4D6; border-bottom: 1px solid #EBD9A0; color: #7A5B12;
  padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem;
}

/* ---- Karten und Zeilen ---- */

.card { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: 14px; margin-bottom: 18px; }
.card.pad { padding: 22px; }
.card h1, .card h2 { margin: 0; font-size: 1.2rem; }
.ctitle { font-weight: 600; margin-bottom: 12px; }
.chead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 22px 0; }
.chead .grow { flex: 1; }
.row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 22px; border-top: 1px solid var(--e-line);
}
.card > .row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 200px; }
.rname { font-weight: 600; }
.rname a { text-decoration: none; color: var(--e-ink); }
.rname a:hover { color: var(--e-accent); }
.rsub { color: var(--e-muted); font-size: .84rem; }
.empty { color: var(--e-muted); padding: 22px; margin: 0; }

.pill, .plan {
  border-radius: 999px; padding: 2px 11px; font-size: .74rem; font-weight: 600;
  background: var(--e-surface-2); color: var(--e-muted); white-space: nowrap;
}
.pok { background: #E3F4EA; color: var(--e-ok); }
.pwarn { background: #F7EEDA; color: var(--e-warn); }
.pred { background: #FBE9E7; color: var(--e-danger); }
.pacc, .plan-business, .plan-pro { background: var(--e-accent-soft); color: var(--e-accent); }
.pmut { background: var(--e-surface-2); color: var(--e-muted); }

.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: .9rem; }
.flash-ok { background: #E3F4EA; color: var(--e-ok); border: 1px solid #BFE3CE; }
.flash-error { background: #FBE9E7; color: var(--e-danger); border: 1px solid #F1C9C4; }

/* ---- Formulare ---- */

.formrow, .form { display: grid; gap: 14px; }
.formrow label, .form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 500; }
.form label.checkbox { grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; font-weight: 400; color: var(--e-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="file"], input[type="number"], select, textarea {
  border: 1px solid var(--e-line); border-radius: 8px; padding: 9px 12px;
  font: inherit; background: var(--e-bg); color: var(--e-ink); width: 100%;
}
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { flex: 1 1 170px; min-width: 0; }
.suffix { display: flex; align-items: center; gap: 8px; }
.suffix code { color: var(--e-muted); white-space: nowrap; font-size: .82rem; }
.hr { border: 0; border-top: 1px solid var(--e-line); margin: 6px 0; }

/* ---- Kennzahlen, Tabellen, Diagramm ---- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 0 22px 18px; }
.kpi { background: var(--e-bg); border-radius: 10px; padding: 12px 14px; }
.kpi b { display: block; font-size: 1.5rem; line-height: 1.2; }
.kpi span { font-size: .76rem; color: var(--e-muted); }
.kpi a { text-decoration: none; }

.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--e-muted); padding: 10px 22px; }
.tbl td { padding: 11px 22px; border-top: 1px solid var(--e-line); vertical-align: top; }
.tbl code { color: var(--e-muted); font-size: .8rem; }

.dnsbox { background: var(--e-bg); border: 1px solid var(--e-line); border-radius: 10px; padding: 14px 16px; margin: 12px 22px 18px; overflow-x: auto; }
.dnstbl { border-collapse: collapse; font-family: ui-monospace, monospace; font-size: .82rem; white-space: nowrap; }
.dnstbl th { text-align: left; font-weight: 500; color: var(--e-muted); padding: 2px 24px 6px 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.dnstbl td { padding: 3px 24px 3px 0; }

.upsell { background: var(--e-accent-soft); border-radius: 10px; padding: 14px 16px; margin: 12px 22px 18px; }
.upsell b { color: var(--e-accent); }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin: 18px 22px 4px; }
.chart-bar { flex: 1; background: var(--e-accent-soft); border-radius: 3px 3px 0 0; min-height: 2px; }
.chart-bar.peak { background: var(--e-accent); }
.chart-legend { display: flex; justify-content: space-between; font-size: .72rem; color: var(--e-muted); margin: 0 22px 18px; }

.medien { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 18px 22px; }
.medien figure { margin: 0; border: 1px solid var(--e-line); border-radius: 10px; overflow: hidden; background: var(--e-bg); }
.medien img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.medien figcaption { padding: 8px; font-size: .74rem; color: var(--e-muted); display: grid; gap: 6px; }

.authcard { max-width: 460px; margin: 40px auto; background: var(--e-surface); border: 1px solid var(--e-line); border-radius: 14px; padding: 30px; }
.authcard h1 { font-size: 1.45rem; margin: 0 0 4px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a {
  border: 1px solid var(--e-line); border-radius: 999px; padding: 6px 15px;
  text-decoration: none; color: var(--e-muted); background: var(--e-surface); font-size: .86rem;
}
.tabs a.on { border-color: var(--e-accent); color: var(--e-accent); background: var(--e-accent-soft); font-weight: 600; }
