:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --bg-muted: #f1f3f6;
  --bg-code: #0e1622;
  --line: #e5e8ec;
  --line-strong: #d3d9e0;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --accent: #0d8a7e;
  --accent-strong: #0a6f64;
  --accent-soft: #e6f4f1;
  --warn: #b45309;
  --warn-soft: #fdf3e1;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --ok: #15803d;
  --ok-soft: #e7f5ec;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--bg-muted);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-soft);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* Layout shell */

.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d8a7e 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(13, 138, 126, 0.28);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-item:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.nav-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
  width: fit-content;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

.status-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.footer-note {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

/* Main */

.main {
  display: grid;
  gap: 28px;
  align-content: start;
  padding: 36px 40px 56px;
  max-width: 1200px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 4px;
}

.topbar-text {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* Buttons */

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(13, 138, 126, 0.3);
}

.primary-button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.primary-button:active {
  transform: translateY(1px);
}

.ghost-button {
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--text);
}

.ghost-button:hover {
  background: var(--bg-muted);
  border-color: var(--muted);
}

.ghost-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.danger-button {
  border: 1px solid #f0c2c2;
  background: #fff4f4;
  color: var(--danger);
}

.danger-button:hover {
  background: #fde8e8;
  border-color: #e6a5a5;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: saturate(0.6);
}

/* Cards */

.card {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.card-head,
.section-head {
  display: grid;
  gap: 8px;
}

.card-head-split,
.section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 16px;
}

.section-head .timestamp,
.card-head-split .status-pill {
  align-self: start;
}

.timestamp {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* Status pills */

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.status-pill.ghost {
  background: transparent;
}

.status-pill.ok {
  background: var(--ok-soft);
  border-color: #cdebd8;
  color: var(--ok);
}

.status-pill.blocked {
  background: var(--danger-soft);
  border-color: #f5cfcf;
  color: var(--danger);
}

.status-pill.pending {
  background: var(--warn-soft);
  border-color: #f1d8a3;
  color: var(--warn);
}

/* Connection card */

.connection-card .connection-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(200px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input {
  height: 38px;
  padding: 0 12px;
}

textarea {
  min-height: 132px;
  padding: 11px 12px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 138, 126, 0.16);
}

input:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: var(--muted);
}

.connection-action {
  display: flex;
}

.connection-action .primary-button {
  width: 100%;
}

/* Sections */

.section {
  display: grid;
  gap: 16px;
}

/* Metrics grid */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.metric-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.metric-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.metric-warn .metric-value {
  color: var(--warn);
}

.metric-wide {
  grid-column: span 2;
}

/* Overview split */

.overview-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

/* Check list */

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-muted);
}

.check:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.check-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

.check-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.check strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.check p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 2px;
}

/* Runtime list */

.runtime {
  display: grid;
  gap: 0;
  margin: 0;
}

.runtime-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg-muted);
}

.runtime-row:last-child {
  border-bottom: 0;
}

.runtime dt {
  color: var(--muted);
  font-size: 12.5px;
}

.runtime dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Demo */

.demo {
  gap: 20px;
}

.demo-actions,
.gmail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(160px, 0.5fr) minmax(160px, 0.5fr);
  gap: 16px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.summary-cell {
  display: grid;
  gap: 8px;
  align-content: start;
}

.summary-cell strong {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.entity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.entity-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.flow-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.flow-num {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.flow-head h3 {
  font-size: 13.5px;
}

.flow-head p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 2px;
}

.flow-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.flow-tag.ok {
  background: var(--ok-soft);
  border-color: #cdebd8;
  color: var(--ok);
}

.flow-tag.blocked {
  background: var(--danger-soft);
  border-color: #f5cfcf;
  color: var(--danger);
}

/* Anwendungen (Tabs) */

.apps {
  gap: 18px;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tab-btn {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: var(--bg-elev);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: grid;
  gap: 14px;
}

.tab-panel[hidden] {
  display: none;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full-width {
  grid-column: 1 / -1;
}

.form-action {
  display: flex;
}

.form-action .primary-button {
  min-width: 160px;
}

.muted.small {
  font-size: 12.5px;
}

/* Setup-Hint (z.B. Gmail) */

.setup-hint {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.setup-hint h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.setup-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.setup-steps li {
  padding-left: 4px;
}

.setup-steps pre {
  margin-top: 8px;
  min-height: auto;
  max-height: none;
}

.setup-hint[hidden] {
  display: none;
}

/* Insights-Banner */

.insights-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-soft) 120%);
  box-shadow: var(--shadow-sm);
}

.insight {
  display: grid;
  gap: 4px;
  align-content: start;
}

.insight-label {
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.insight-value {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.insight-window .insight-value {
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.insight-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1080px) {
  .insights-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Vorlagen-Bar */

.template-bar {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.template-select-field {
  flex: 1 1 220px;
  min-width: 200px;
}

.template-actions {
  display: flex;
  gap: 8px;
}

select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 138, 126, 0.16);
}

@media (max-width: 640px) {
  .template-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .template-actions {
    flex-wrap: wrap;
  }
}

/* Verlauf */

.history {
  gap: 18px;
}

.history-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.history-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
  gap: 16px;
}

.history-list {
  display: grid;
  align-content: start;
}

.history-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow-y: auto;
}

.history-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.history-item:hover {
  border-color: var(--muted);
  background: var(--bg-muted);
}

.history-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.history-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-workflow {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}

.history-time {
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.history-detail {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  align-content: start;
}

.history-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.history-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-detail h3 {
  font-size: 15px;
  letter-spacing: -0.005em;
}

.history-detail dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.history-detail dt {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.history-detail dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 1080px) {
  .history-filters {
    grid-template-columns: 1fr;
  }

  .history-grid {
    grid-template-columns: 1fr;
  }
}

/* Settings */

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-card .form-action {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#settings-saved-hint {
  color: var(--ok);
  font-weight: 600;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Code blocks */

pre {
  margin: 0;
  min-height: 180px;
  max-height: 380px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  color: #d4dce5;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Footer */

.page-footer {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 720px;
}

/* Responsive */

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

  .sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    height: auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .main {
    padding: 24px 22px 56px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-wide {
    grid-column: span 2;
  }

  .overview-split,
  .demo-summary,
  .flow-steps,
  .draft-form,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .connection-card .connection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 24px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric-wide {
    grid-column: span 1;
  }

  .card-head-split {
    grid-template-columns: 1fr;
  }

  .card-head-split .status-pill {
    justify-self: start;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .nav-item {
    white-space: nowrap;
  }
}

/* ── Admin-Datentabellen (Audit, Platzhalter, Nutzer & Modelle) ── */
.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted, #6b7280);
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 120, 140, 0.25);
  white-space: nowrap;
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 120, 140, 0.12);
  vertical-align: top;
}

.data-table code {
  font-size: 0.8rem;
}

.subhead {
  margin: 18px 0 4px;
  font-size: 0.95rem;
}

.stats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 2px;
}

.stat-pill {
  border: 1px solid rgba(120, 120, 140, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
}
