:root {
  color-scheme: light;

  /* Neutral */
  --bg: #fafaf9;
  --surface: #ffffff;
  --border: #eeedec;
  --border-soft: #f5f5f4;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --faint: #a8a29e;

  /* Header-Chrome (anthrazit) */
  --header: #2b2b2b;
  --header-text: #ffffff;
  --header-muted: #9a9a9a;
  --header-line: #4a4a4a;

  /* Marke (R2BIKE-Orange) */
  --accent: #ef7800;
  --accent-hover: #cc6600;
  --accent-bg: #fff7ed;
  --accent-border: #fed7aa;
  --accent-text: #cc6600;
  --accent-on-dark: #fdba74;

  /* Status */
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --ok-bd: #bbf7d0;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --warn-bd: #fde68a;
  --crit: #dc2626;
  --crit-bg: #fef2f2;
  --crit-bd: #fecaca;
  --note: #57534e;
  --note-bg: #f5f5f4;
  --note-bd: #e7e5e4;

  /* Balken */
  --bar-green: #16a34a;
  --bar-amber: #f59e0b;
  --bar-red: #dc2626;
  --bar-gray: #d6d3d1;

  --r-card: 12px;
  --r-ctrl: 4px;
  --r-pill: 99px;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.num {
  font-family: "Roboto Mono", monospace;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header-Chrome (top, R2BIKE-Signatur) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header);
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 68px;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  justify-self: start;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-mark {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.brand-fallback .brand-logo {
  display: none;
}

.brand-fallback .brand-mark {
  display: flex;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  justify-self: end;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 44px;
  padding: 0 24px;
  border-top: 1px solid var(--header-line);
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 100%;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--header-muted);
  cursor: pointer;
  white-space: nowrap;
}

.nav-item:hover {
  color: #fff;
}

.nav-item.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.nav-item.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.nav-item.is-disabled:hover {
  color: var(--header-muted);
}

.main {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
}

.chrome-search {
  display: flex;
  align-items: center;
  width: 380px;
  height: 38px;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-ctrl);
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.chrome-search span:first-child {
  flex: 1;
  padding: 0 12px;
  color: var(--faint);
  font-size: 12.5px;
  text-align: left;
  font-family: "Roboto", sans-serif;
}

.chrome-kbd {
  padding-right: 8px;
  font-size: 10px;
  color: var(--faint);
}

.chrome-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  background: var(--accent);
  flex: 0 0 auto;
}

.chrome-chip {
  flex: 0 0 auto;
  border: 1px solid var(--header-line);
  border-radius: var(--r-ctrl);
  padding: 7px 12px;
  font-size: 11.5px;
  color: #b0b0b0;
  white-space: nowrap;
}

/* ---------- Content ---------- */

.content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 40px;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.2;
}

h3 {
  margin: 24px 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.subline,
.panel-heading p,
.table-header p,
.dropzone span,
.source-status,
.kpi small {
  color: var(--muted);
}

.subline {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

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

.btn-primary {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 0;
  border-radius: var(--r-ctrl);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 18px;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary.compact,
.btn-secondary.compact {
  height: 36px;
  padding: 0 12px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1px solid #e7e5e4;
  border-radius: var(--r-ctrl);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 500;
  font-size: 12.5px;
  padding: 0 16px;
}

.btn-secondary:hover {
  background: var(--border-soft);
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.import-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.dropzone,
.source-status,
.panel,
.kpi {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}

.dropzone {
  display: grid;
  gap: 6px;
  min-height: 82px;
  align-content: center;
  padding: 18px;
  border-style: dashed;
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.dropzone strong {
  font-size: 13px;
}

.dropzone span {
  font-size: 12.5px;
}

.dropzone b {
  width: fit-content;
  margin-top: 6px;
  border-radius: var(--r-ctrl);
  background: var(--accent-bg);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
}

.dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.source-status {
  display: grid;
  min-width: 260px;
  align-content: center;
  gap: 4px;
  padding: 16px;
  font-size: 12.5px;
}

.source-status span:first-child {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- KPI ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 128px;
  padding: 18px 20px;
}

.kpi .lbl {
  display: block;
  min-height: 30px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
}

.kpi .val {
  display: block;
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.kpi .dlt {
  font-size: 12px;
}

.kpi-hero {
  background: #1c1917;
  border-color: #1c1917;
  color: #fafaf9;
}

.kpi-hero .lbl {
  color: var(--faint);
}

.kpi-hero .val {
  color: #fafaf9;
}

.kpi-hero .dlt {
  color: var(--accent-on-dark);
}

.kpi-accent {
  background: var(--accent-bg);
  border-color: var(--accent-border);
}

.kpi-accent .lbl,
.kpi-accent .dlt {
  color: var(--accent-text);
}

.kpi-accent .val {
  color: var(--accent);
}

/* ---------- Panels / charts ---------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  padding: 20px;
}

.panel-heading,
.table-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-heading p,
.table-header p {
  margin-bottom: 0;
  font-size: 12.5px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  padding-bottom: 10px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  height: 230px;
  align-items: end;
  padding-top: 14px;
}

.bar {
  display: grid;
  height: 100%;
  align-items: end;
  gap: 8px;
}

.bar-fill {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px 6px 2px 2px;
  color: white;
  font-weight: 600;
  font-size: 12.5px;
  font-family: "Roboto Mono", monospace;
}

.bar-label {
  min-height: 34px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-family: "Roboto Mono", monospace;
}

.issue-chart {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.issue-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}

.issue-row span:first-child {
  color: var(--ink-2);
  font-weight: 500;
}

.issue-row strong {
  font-family: "Roboto Mono", monospace;
  text-align: right;
}

.issue-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-soft);
}

.issue-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

/* ---------- SEO / GEO ---------- */

.seo-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seo-grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.comparison-chart {
  display: grid;
  gap: 18px;
  padding: 10px 0 4px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}

.comparison-row span:first-child {
  color: var(--ink-2);
  font-weight: 600;
}

.comparison-row strong {
  text-align: right;
  font-family: "Roboto Mono", monospace;
  font-weight: 600;
}

.comparison-track {
  height: 18px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-soft);
}

.comparison-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.comparison-fill.geo {
  background: #1c1917;
}

.meta-preview {
  display: grid;
  gap: 4px;
  max-width: 240px;
}

.meta-preview strong {
  color: var(--ink-2);
  font-weight: 600;
}

.meta-preview span {
  color: var(--muted);
  font-size: 11.5px;
}

.llm-signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}

/* ---------- Team ---------- */

.team-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.team-bars,
.team-score-list {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.team-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}

.team-bar-row span {
  color: var(--ink-2);
  font-weight: 600;
}

.team-bar-row strong {
  text-align: right;
}

.team-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-soft);
}

.team-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.team-quality-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  padding: 2px 0 12px;
}

.team-quality-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.team-quality-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-quality-row strong {
  color: var(--ink);
  font-size: 13px;
}

.team-quality-row span:not(.score-pill) {
  color: var(--muted);
  font-size: 11.5px;
}

.dlt {
  color: var(--muted);
  font-size: 11.5px;
}

/* ---------- Filters / table ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filters input,
.filters select {
  height: 38px;
  min-width: 145px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12.5px;
}

.filters input {
  min-width: 210px;
}

.table-panel {
  padding: 0;
  padding-bottom: 8px;
}

.table-header {
  padding: 20px 22px 0;
  margin-bottom: 6px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 22px;
  text-align: left;
  vertical-align: top;
}

th {
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.select-col {
  width: 46px;
}

.select-cell {
  width: 46px;
}

.select-cell input,
.select-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.sort-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 14px 0 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  position: relative;
  text-align: left;
}

.sort-btn::after {
  content: "↕";
  position: absolute;
  right: 0;
  color: var(--faint);
  opacity: 0.55;
}

.sort-btn.is-active {
  color: var(--ink);
}

.sort-btn.is-active::after {
  content: "↑";
  opacity: 1;
}

.sort-btn.is-active[data-direction="desc"]::after {
  content: "↓";
}

td {
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: var(--bg);
}

td:first-child,
td:nth-child(6) {
  font-family: "Roboto Mono", monospace;
}

td[data-label]::before {
  content: none;
}

.btn-danger,
.icon-action {
  border: 1px solid rgba(220, 38, 38, 0.24);
  background: #fff1f1;
  color: #c01616;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger {
  min-height: 38px;
  border-radius: var(--r-pill);
  padding: 0 14px;
}

.btn-danger:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.icon-action {
  min-height: 30px;
  border-radius: var(--r-pill);
  padding: 5px 10px;
  font-size: 11px;
}

.icon-action:hover,
.btn-danger:not(:disabled):hover {
  background: #ffe5e5;
}

/* ---------- Pills ---------- */

.score-pill,
.status-pill {
  display: inline-flex;
  min-width: 62px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid;
  font-weight: 600;
  font-size: 11px;
  font-family: "Roboto Mono", monospace;
  padding: 3px 9px;
}

.score-good,
.status-good {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-bd);
}

.score-warning,
.status-warning {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-bd);
}

.score-critical,
.status-critical {
  background: var(--crit-bg);
  color: var(--crit);
  border-color: var(--crit-bd);
}

.status-pill {
  min-width: 74px;
  font-family: "Roboto", sans-serif;
  font-size: 11.5px;
}

.problem-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 340px;
}

.problem-chip {
  border-radius: var(--r-pill);
  background: var(--note-bg);
  border: 1px solid var(--note-bd);
  color: var(--note);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
}

/* ---------- Detail modal ---------- */

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(28, 25, 23, 0.35);
  padding: 24px;
  z-index: 20;
}

.drawer.is-open {
  display: flex;
}

.drawer-content {
  width: min(980px, 100%);
  max-height: min(86vh, 860px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 30px 80px rgba(28, 25, 23, 0.22);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 16px;
}

.drawer-head h2 {
  margin-bottom: 0;
}

.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  padding-top: 18px;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  background: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-2);
}

.icon-button:hover {
  background: var(--border-soft);
}

.drawer-score {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.drawer-score span {
  font-size: 32px;
  font-weight: 600;
}

.score-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border-soft);
}

.score-track div {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  margin: 0;
}

.detail-list dt {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 2px;
}

.detail-list dd {
  margin: 0;
  font-size: 13px;
}

.issue-list {
  display: grid;
  gap: 9px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-2);
}

.revision-list li span {
  color: var(--faint);
  font-size: 12px;
}

.attribute-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.text-detail {
  display: grid;
  align-content: start;
  gap: 14px;
}

.text-detail h3 {
  margin: 0;
}

.text-detail h3:not(:first-child) {
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
  padding-top: 14px;
}

.text-detail article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-ctrl);
  background: var(--bg);
  padding: 12px;
}

.text-detail article span {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.text-detail article p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.edit-detail label {
  display: grid;
  gap: 6px;
}

.edit-detail label span {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.edit-detail input,
.edit-detail textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  resize: vertical;
}

.edit-detail input:focus,
.edit-detail textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(218, 26, 50, 0.12);
}

.edit-status {
  min-height: 18px;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .chrome-search {
    display: none;
  }
}

@media (max-width: 780px) {
  .content {
    width: 100%;
    padding: 20px 16px 32px;
  }

  .drawer {
    align-items: stretch;
    padding: 12px;
  }

  .drawer-content {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-head,
  .panel-heading,
  .table-header,
  .import-panel {
    display: grid;
  }

  .source-status {
    min-width: 0;
  }

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

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

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

  .filters {
    justify-content: stretch;
  }

  .filters input,
  .filters select {
    width: 100%;
    min-width: 0;
  }

  .table-panel {
    background: transparent;
    border: 0;
    padding: 0;
  }

  .table-header {
    border: 1px solid var(--border);
    border-radius: var(--r-card) var(--r-card) 0 0;
    background: var(--surface);
    padding: 18px;
  }

  .table-wrap {
    overflow-x: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    display: grid;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background: var(--surface);
    overflow: hidden;
  }

  tbody tr:hover {
    background: var(--surface);
  }

  td {
    display: grid;
    grid-template-columns: minmax(104px, 34%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 14px;
    font-size: 12.5px;
  }

  td:last-child {
    border-bottom: 0;
  }

  td[data-label]::before {
    content: attr(data-label);
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: "Roboto", sans-serif;
  }

  td:first-child,
  td:nth-child(6) {
    font-family: "Roboto", sans-serif;
  }

  td:first-child {
    background: var(--bg);
  }

  .select-cell {
    width: 100%;
  }

  .icon-action {
    width: fit-content;
  }

  td:first-child strong,
  td[data-label="Produktname"] strong,
  td[data-label="Mitarbeiter"] strong {
    font-size: 13.5px;
  }

  .problem-list,
  .llm-signal-list,
  .meta-preview {
    max-width: none;
  }

  .bar-chart {
    height: 190px;
  }

  .chrome-chip {
    display: none;
  }
}

@media (max-width: 520px) {
  .kpi-grid,
  .seo-kpi-grid,
  .team-kpi-grid,
  .bar-chart {
    grid-template-columns: 1fr;
  }

  .bar-chart {
    height: auto;
  }

  .bar {
    grid-template-columns: 90px 1fr;
    align-items: center;
  }

  .bar-fill {
    height: 34px !important;
    align-items: center;
    padding-top: 0;
  }

  .bar-label {
    min-height: 0;
    text-align: left;
  }

  .issue-row {
    grid-template-columns: 1fr 1fr 28px;
  }

  .team-bar-row {
    grid-template-columns: 1fr 1fr 32px;
  }

  td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  td[data-label]::before {
    margin-bottom: 0;
  }

  .score-pill,
  .status-pill {
    width: fit-content;
  }
}
