/* ============================================================
   thaeven-portal — Admin-Dashboard Styles (Phase 1)
   Dark / Platin. App-Layout: fixe Sidebar links + Content rechts.
   Ruhig, hohe Lesbarkeit, dünne Hairlines, keine schweren Schatten.
   ============================================================ */

:root {
  --bg: #08080A;
  --bg-2: #0E0E12;
  --panel: #15161B;
  --ink: #F4F4F2;
  --muted: rgba(244, 244, 242, .46);
  --muted-2: rgba(244, 244, 242, .30);
  --line: rgba(244, 244, 242, .10);
  --line-soft: rgba(244, 244, 242, .06);
  --accent: #CFE0E6; /* Platin */

  /* Status-Töne */
  --ok: #5BD08A;
  --ok-bg: rgba(91, 208, 138, .12);
  --platin: #CFE0E6;
  --platin-bg: rgba(207, 224, 230, .12);
  --danger: #F0726A;
  --danger-bg: rgba(240, 114, 106, .12);
  --gold: #E0C067;
  --gold-bg: rgba(224, 192, 103, .12);
  --neutral: rgba(244, 244, 242, .55);
  --neutral-bg: rgba(244, 244, 242, .07);

  --sidebar-w: 248px;
  --radius: 12px;
  --radius-sm: 8px;
  --pad: 28px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------ Layout */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 22px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.brand img { width: 26px; height: 26px; }
.brand .brand-name { font-weight: 600; letter-spacing: .04em; font-size: 16px; }
.brand .brand-sub { display: block; font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 1px; }

.nav {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--line-soft); color: var(--ink); }
.nav a.active { background: var(--panel); color: var(--ink); }
.nav a.active .nav-ico { color: var(--accent); }
.nav-ico { width: 18px; height: 18px; flex: 0 0 18px; color: var(--muted-2); }
.nav a.active .nav-ico, .nav a:hover .nav-ico { color: var(--accent); }

.sidebar-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: .03em;
}

/* Content */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(8, 8, 10, .82);
  backdrop-filter: blur(10px);
  z-index: 30;
}
.topbar h1 { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .crumb a:hover { color: var(--ink); }
.topbar .spacer { flex: 1; }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--bg-2);
}
.demo-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}

.menu-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  width: 38px; height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

.main { padding: var(--pad); flex: 1; }

/* ------------------------------------------------------------ Cards / Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-pad { padding: 22px; }
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: .01em; }
.panel-head .sub { color: var(--muted); font-size: 12.5px; }
.panel-head .spacer { flex: 1; }

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 30px 0 12px;
  font-weight: 600;
}
.section-title:first-child { margin-top: 0; }

/* ------------------------------------------------------------ KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.kpi .kpi-label {
  font-size: 12px; color: var(--muted);
  letter-spacing: .03em;
  display: flex; align-items: center; gap: 7px;
}
.kpi .kpi-value { font-size: 26px; font-weight: 600; margin-top: 9px; letter-spacing: -.02em; }
.kpi .kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi .kpi-sub.warn { color: var(--danger); }

/* ------------------------------------------------------------ Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ------------------------------------------------------------ Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge--ok      { color: var(--ok);      background: var(--ok-bg); }
.badge--platin  { color: var(--platin);  background: var(--platin-bg); }
.badge--danger  { color: var(--danger);  background: var(--danger-bg); }
.badge--gold    { color: var(--gold);    background: var(--gold-bg); }
.badge--neutral { color: var(--neutral); background: var(--neutral-bg); }

/* ------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.tbl thead th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr.row-link { cursor: pointer; transition: background .12s; }
table.tbl tbody tr.row-link:hover { background: rgba(244, 244, 242, .035); }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .strong { font-weight: 600; }
table.tbl .muted { color: var(--muted); }
table.tbl tfoot td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
.cell-main { display: flex; flex-direction: column; gap: 2px; }
.cell-main .cell-sub { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------ Toolbar (filter/search) */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.toolbar .grow { flex: 1; min-width: 180px; }
.input, .select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.input::placeholder { color: var(--muted-2); }
.input:focus, .select:focus { outline: none; border-color: rgba(207, 224, 230, .4); }
.select { width: auto; cursor: pointer; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  transition: all .12s;
}
.pill:hover { color: var(--ink); border-color: rgba(244,244,242,.2); }
.pill.active { background: var(--panel); color: var(--ink); border-color: rgba(207,224,230,.4); }

.empty-row td { text-align: center; color: var(--muted); padding: 30px 16px; }

/* ------------------------------------------------------------ Chart (inline SVG bars) */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 150px;
  padding-top: 8px;
}
.chart .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.chart .bar {
  width: 100%;
  max-width: 46px;
  background: linear-gradient(180deg, var(--accent), rgba(207, 224, 230, .35));
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  position: relative;
}
.chart .bar .bar-val {
  position: absolute;
  top: -19px; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart .bar-label { font-size: 11px; color: var(--muted); }

/* ------------------------------------------------------------ Activity feed */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.feed-item:last-child { border-bottom: none; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; }
.feed-dot.onboarding { background: var(--platin); }
.feed-dot.lead { background: var(--gold); }
.feed-dot.zahlung { background: var(--danger); }
.feed-body { flex: 1; min-width: 0; }
.feed-body .feed-text { font-size: 13.5px; }
.feed-body .feed-ts { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------ Attention list */
.att-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.att-item:last-child { border-bottom: none; }
.att-item .att-body { flex: 1; min-width: 0; }
.att-item .att-title { font-size: 14px; font-weight: 500; }
.att-item .att-title a:hover { color: var(--accent); }
.att-item .att-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.att-empty { color: var(--muted); font-size: 13.5px; padding: 8px 0; }

/* ------------------------------------------------------------ Detail page */
.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.detail-head .dh-main { flex: 1; min-width: 0; }
.detail-head h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.02em; }
.detail-head .dh-sub { color: var(--muted); font-size: 14px; }
.detail-head .dh-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; font-size: 14px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; }
.kv dd a:hover { color: var(--accent); text-decoration: underline; }

.site-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: block;
  background: var(--bg-2);
}
.thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.thumb-placeholder svg { width: 26px; height: 26px; opacity: .5; }

.mini-stats { display: flex; gap: 26px; margin-top: 16px; }
.mini-stat .ms-val { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.mini-stat .ms-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

.tech-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}

/* Intern-Block */
.intern {
  border: 1px solid var(--gold-bg);
  background: rgba(224, 192, 103, .05);
  border-radius: var(--radius);
}
.intern .panel-head { border-bottom-color: rgba(224, 192, 103, .14); }
.intern-flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--gold);
  letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
}
.intern-note { font-size: 14px; line-height: 1.6; }
.intern-warn { margin-top: 14px; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.intern-warn svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: var(--gold); }

.empty-state {
  padding: 26px 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty-state .es-icon { display: flex; justify-content: center; margin-bottom: 10px; }
.empty-state svg { width: 30px; height: 30px; opacity: .4; }

/* ------------------------------------------------------------ Website grid */
.web-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.web-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.web-card:hover { border-color: rgba(244,244,242,.2); }
.web-card .wc-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--bg-2); }
.web-card .wc-body { padding: 14px 16px; }
.web-card .wc-title { font-weight: 600; font-size: 15px; }
.web-card .wc-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.web-card .wc-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.web-card .wc-stat { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------ Misc */
.link-ext { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.link-ext svg { width: 13px; height: 13px; }
.link-ext:hover { text-decoration: underline; }
.placeholder-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 70px 22px; color: var(--muted);
}
.placeholder-page svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 16px; }
.placeholder-page h2 { color: var(--ink); font-size: 18px; margin: 0 0 8px; }
.placeholder-page p { max-width: 420px; font-size: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 15px; height: 15px; }

.gift { color: var(--ok); font-size: 12.5px; }

/* ------------------------------------------------------------ Responsive */
.scrim { display: none; }

@media (max-width: 980px) {
  :root { --pad: 18px; }
  .grid-2, .grid-2-eq, .detail-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: none;
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(0,0,0,.001); }
  body.nav-open .scrim {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(0,0,0,.5);
  }
  .content { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 540px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .mini-stats { gap: 18px; flex-wrap: wrap; }
}

/* ============================================================
   KUNDEN-PORTAL (Phase 2) — eigene Komponenten, gleiche Designsprache
   ============================================================ */

/* Kunden-Sidebar: gleiche Optik, dezenter platin-Akzent am aktiven Punkt */
.sidebar--portal .brand .brand-sub { color: var(--accent); opacity: .85; }
.sidebar-foot .who { color: var(--ink); font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.sidebar-foot .who-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.sidebar-foot .who-proto { margin-top: 10px; color: var(--muted-2); }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: rgba(244,244,242,.22); }
.btn svg { width: 15px; height: 15px; }
.btn--primary {
  background: var(--accent);
  color: #0A0A0C;
  border-color: var(--accent);
}
.btn--primary:hover { background: #fff; border-color: #fff; }
.btn--ghost { background: var(--bg-2); }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
.btn--disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
.soon {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold);
  background: var(--gold-bg);
  border-radius: 999px;
  padding: 2px 7px;
}
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.text-link { color: var(--accent); font-size: 13.5px; }
.text-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------ Form fields */
.fld { display: block; margin-bottom: 16px; }
.fld-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.textarea { width: 100%; resize: vertical; line-height: 1.55; }
.select--block { width: 100%; }

/* ------------------------------------------------------------ Login / Auth */
.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(207,224,230,.06), transparent 70%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 32px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-brand img { width: 26px; height: 26px; }
.auth-brand-name { font-weight: 600; letter-spacing: .04em; font-size: 17px; }
.auth-title { font-size: 22px; margin: 0 0 8px; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; line-height: 1.55; }
.auth-form { margin-bottom: 6px; }
.auth-forgot { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.auth-forgot:hover { color: var(--ink); }

.auth-demo {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.auth-demo-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600;
}
.auth-demo-flag {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold); background: var(--gold-bg);
  border-radius: 999px; padding: 3px 9px;
}
.auth-demo-note { color: var(--muted); font-size: 12.5px; margin: 8px 0 14px; line-height: 1.5; }
.auth-demo-list { display: flex; flex-direction: column; gap: 8px; }
.demo-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.demo-btn:hover { border-color: rgba(207,224,230,.4); }
.demo-btn-name { font-weight: 600; font-size: 14px; }
.demo-btn-sub { color: var(--muted); font-size: 12.5px; margin-left: 8px; flex: 1; }
.demo-btn-go { width: 16px; height: 16px; color: var(--muted); transform: scaleX(-1); }
.demo-btn:hover .demo-btn-go { color: var(--accent); }
.auth-foot { margin-top: 22px; color: var(--muted-2); font-size: 11.5px; letter-spacing: .04em; }

/* ------------------------------------------------------------ Home greeting */
.hello h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; }
.hello-sub { color: var(--muted); font-size: 14px; margin: 0; }
.hello-line { color: var(--muted); font-size: 13.5px; margin: 12px 0 0; max-width: 640px; line-height: 1.55; }

/* Stat cards (Kunden-Zahlen, ruhig) */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.stat-card .stat-val { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.stat-card .stat-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.quiet-hint { color: var(--muted); font-size: 13px; line-height: 1.55; }

.site-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.site-row + .text-link { display: inline-block; margin-top: 12px; }
.site-thumb--lg { aspect-ratio: 16 / 9; max-height: 420px; }

/* Bau-Zustand */
.building { display: flex; gap: 16px; align-items: flex-start; }
.building-icon {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--platin-bg); color: var(--platin);
}
.building-icon svg { width: 22px; height: 22px; }
.building-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.building-text { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 12px; }

/* Schnellaktionen */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.qa {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color .15s;
}
.qa:hover { border-color: rgba(207,224,230,.35); }
.qa-ico {
  flex: 0 0 38px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--panel); color: var(--accent);
}
.qa-ico svg { width: 18px; height: 18px; }
.qa-body { display: flex; flex-direction: column; gap: 2px; }
.qa-title { font-weight: 600; font-size: 14px; }
.qa-sub { color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------------------ Abo page */
.plan-head { display: flex; align-items: center; gap: 12px; }
.plan-name { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.plan-price { margin-top: 14px; }
.plan-price .pp-amount { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.plan-price .pp-unit { color: var(--muted); font-size: 15px; margin-left: 6px; }
.plan-sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.incl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.incl-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.incl-ico { width: 18px; height: 18px; flex: 0 0 18px; color: var(--ok); }

.upsell { margin-top: 18px; border-color: rgba(207,224,230,.18); background: rgba(207,224,230,.04); }
.upsell-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.upsell-body > div { flex: 1; min-width: 240px; }
.upsell-title { font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.upsell-text { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }

/* ------------------------------------------------------------ Änderung / confirm */
.narrow { max-width: 720px; }
.confirm { display: flex; gap: 16px; align-items: flex-start; }
.confirm-icon {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--ok-bg); color: var(--ok);
}
.confirm-icon svg { width: 22px; height: 22px; }
.confirm-title { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.confirm-text { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 16px; }
.confirm-echo {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 13.5px;
  display: flex; flex-direction: column; gap: 5px;
}
.confirm-echo-desc { color: var(--muted); white-space: pre-wrap; margin-top: 4px; }

@media (max-width: 540px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Phase 3 — Auth-Fehler, Hinweise, Formulare, Kunde-anlegen
   ============================================================ */

/* Login-Fehlermeldung */
.auth-error {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: #ffd9d4;
  background: rgba(220, 80, 70, .12);
  border: 1px solid rgba(220, 80, 70, .35);
}

/* Allgemeine Hinweis-Banner (Detailseite, Formular) */
.notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--panel);
}
.notice strong { color: var(--ink); }
.notice--ok {
  background: rgba(120, 190, 140, .10);
  border-color: rgba(120, 190, 140, .32);
  color: #d7f0de;
}
.notice--danger {
  background: rgba(220, 80, 70, .10);
  border-color: rgba(220, 80, 70, .32);
  color: #ffd9d4;
}

/* Zugangsdaten-Box (einmalig angezeigtes Passwort) */
.cred-box {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.cred-box > div { display: flex; align-items: center; gap: 12px; }
.cred-k {
  display: inline-block;
  min-width: 72px;
  color: var(--muted);
  font-size: 12px;
}
.cred-box code {
  font-size: 13.5px;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 9px;
  letter-spacing: .03em;
}

/* Seitenkopf mit Aktion (z. B. "Neuer Kunde"-Button) */
.page-head {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

/* Formular: zweispaltige Felder + Aktionsleiste */
.form-grid { display: grid; gap: 18px; max-width: 880px; }
.fld-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.fld-row .fld { margin-bottom: 16px; }
.form-hint { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0 0 14px; }
.fld-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.fld-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  max-width: 880px;
}

/* Logout-Link in der Admin-Sidebar */
.sidebar-logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-logout:hover { color: var(--ink); }
.sidebar-logout svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .fld-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Owner-Feedback-Runde 1 — Admin-Übersicht „krasser" (edler/tiefer/lebendiger)
   Bleibt strikt in der dark/platin-Token-Welt. Kein neues Theme, keine grellen
   Farben — nur mehr Tiefe, dezente Glows und klarere Hierarchie.
   ============================================================ */

/* Subtile Aurora hinter dem Content-Header der Übersicht.
   Liegt hinter dem Inhalt (Pseudo-Element), bricht kein Layout, kein Overflow. */
.main--aurora { position: relative; isolation: isolate; }
.main--aurora::before {
  content: "";
  position: absolute;
  inset: -10% -6% auto -6%;
  height: 360px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 300px at 16% -8%, rgba(207, 224, 230, .10), transparent 70%),
    radial-gradient(520px 280px at 88% -14%, rgba(207, 224, 230, .07), transparent 72%);
  filter: saturate(108%);
}

/* KPI-Karten: mehr Tiefe + edlere Hover-States. Die große Zahl markanter. */
.kpi {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(150% 100% at 0% 0%, rgba(207, 224, 230, .045), transparent 58%),
    linear-gradient(180deg, rgba(244, 244, 242, .02), transparent 40%),
    var(--panel);
  box-shadow: 0 1px 0 rgba(244, 244, 242, .03) inset, 0 10px 28px -22px rgba(0, 0, 0, .8);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
/* dünne Lichtkante oben */
.kpi::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(207, 224, 230, .35), transparent);
  opacity: .5;
}
.kpi:hover {
  border-color: rgba(207, 224, 230, .26);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(244, 244, 242, .04) inset, 0 22px 40px -26px rgba(0, 0, 0, .9);
}
.kpi .kpi-value {
  font-size: 30px;
  letter-spacing: -.025em;
  background: linear-gradient(180deg, #FFFFFF, rgba(244, 244, 242, .72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hervorgehobene Leit-KPI (Monatlicher Umsatz): dezenter Platin-Glow. */
.kpi--accent {
  border-color: rgba(207, 224, 230, .22);
  background:
    radial-gradient(150% 120% at 0% 0%, rgba(207, 224, 230, .10), transparent 56%),
    linear-gradient(180deg, rgba(207, 224, 230, .04), transparent 42%),
    var(--panel);
}
.kpi--accent::after { opacity: .9; }
.kpi--accent .kpi-value {
  background: linear-gradient(180deg, #FFFFFF, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Panels der Übersicht: minimal mehr Tiefe (greift nur, wo gezielt gesetzt). */
.panel--chart {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(207, 224, 230, .04), transparent 60%),
    var(--panel);
}

/* Trend-Indikator „+X % seit Januar" */
.trend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid transparent;
}
.trend--up { color: var(--ok); background: var(--ok-bg); border-color: rgba(91, 208, 138, .22); }
.trend--down { color: var(--danger); background: var(--danger-bg); border-color: rgba(240, 114, 106, .22); }
.trend::before { content: ""; width: 0; height: 0; }
.trend--up::before { border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid currentColor; }
.trend--down::before { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 6px solid currentColor; }

/* ------------------------------------------------------------ Area-Chart (Monatlicher Umsatz) */
.areachart { width: 100%; }
.areachart svg {
  display: block;
  width: 100%;
  height: 168px;
  overflow: visible;
}
.areachart .area-val {
  font-size: 11px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}
.area-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}
.area-axis span {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 540px) {
  .areachart svg { height: 150px; }
  .area-axis span { font-size: 10px; }
}
