@font-face {
  font-family: "Martian Grotesk";
  src:
    local("MartianGrotesk-StdRg"),
    local("Martian Grotesk Std Regular"),
    local("Martian Grotesk Regular");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Grotesk";
  src:
    local("MartianGrotesk-StdMd"),
    local("Martian Grotesk Std Medium"),
    local("Martian Grotesk Medium");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Grotesk";
  src:
    local("MartianGrotesk-StdBd"),
    local("Martian Grotesk Std Bold"),
    local("Martian Grotesk Bold");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: oklch(89.6% 0.006 240);
  --shell: oklch(98.8% 0.003 240);
  --surface: oklch(99.4% 0.002 240);
  --surface-raised: oklch(99.8% 0.002 240);
  --surface-soft: oklch(96.7% 0.004 240);
  --surface-selected: oklch(96.4% 0.027 255);
  --text: #21262B;
  --muted: oklch(54% 0.014 245);
  --muted-soft: oklch(68% 0.01 245);
  --border: oklch(91% 0.006 245);
  --border-strong: oklch(84% 0.011 245);
  --brand: #0068CF;
  --brand-dark: oklch(39% 0.135 255);
  --brand-soft: oklch(95.6% 0.032 255);
  --brand-selected: oklch(94.3% 0.045 255);
  --danger: oklch(55% 0.18 29);
  --warning: oklch(63% 0.13 77);
  --ok: oklch(58% 0.12 156);
  --focus: rgba(0, 104, 207, 0.22);
  --shadow-shell: 0 28px 70px rgba(33, 38, 43, 0.12), 0 2px 8px rgba(33, 38, 43, 0.04);
  --shadow-panel: 0 1px 2px rgba(33, 38, 43, 0.05), 0 14px 30px rgba(33, 38, 43, 0.055);
  --shadow-button: 0 1px 2px rgba(33, 38, 43, 0.08);
  --radius-shell: 28px;
  --radius-panel: 18px;
  --radius-control: 12px;
  --font-ui: "Martian Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.46;
}

[hidden] {
  display: none !important;
}

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

button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-raised);
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition-duration: 150ms;
  transition-property: transform, box-shadow, background-color, border-color, color;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

button:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(33, 38, 43, 0.08), 0 10px 24px rgba(33, 38, 43, 0.08);
}

button:active {
  transform: scale(0.96);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

button.primary,
form button[type="submit"] {
  color: oklch(98.8% 0.004 255);
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 2px 5px rgba(0, 104, 207, 0.18), 0 12px 26px rgba(0, 104, 207, 0.2);
}

button.danger {
  color: oklch(98% 0.006 29);
  border-color: var(--danger);
  background: var(--danger);
}

button:disabled {
  opacity: 0.48;
  cursor: default;
  transform: none;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(33, 38, 43, 0.02);
  transition-duration: 150ms;
  transition-property: border-color, box-shadow, background-color;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: stretch;
  padding: 0;
}

.admin-panel,
.login-panel {
  width: min(100%, 1580px);
  border-radius: var(--radius-shell);
  background: var(--shell);
  box-shadow: var(--shadow-shell);
  overflow: hidden;
}

.login-panel {
  display: grid;
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
}

.login-brand {
  margin-bottom: 22px;
}

.brand-logo {
  display: block;
  width: 132px;
  height: auto;
}

.brand-logo-login {
  width: 154px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.error-line,
.danger-text {
  color: var(--danger);
}

.admin-panel {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  border-radius: 0;
  background: var(--surface-soft);
  box-shadow: none;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 28px 22px 20px;
  background: var(--surface);
  box-shadow: 1px 0 0 rgba(33, 38, 43, 0.07);
}

.section-nav {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-nav button {
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
  border-color: transparent;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

.section-nav button:hover {
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: none;
}

.section-nav button.active {
  color: var(--brand);
  border-color: transparent;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 104, 207, 0.08);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  box-shadow: 0 -1px 0 rgba(33, 38, 43, 0.08);
}

.sidebar-footer p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer button {
  width: 100%;
  justify-content: flex-start;
}

.main-panel {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface-soft);
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 28px 12px;
  background: var(--surface-soft);
}

.topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 34px;
  letter-spacing: 0;
  text-wrap: balance;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

.topbar-actions,
.row-actions,
.form-row,
.filter-bar,
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions,
.row-actions,
.form-row {
  flex-wrap: wrap;
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(400px, 44%) minmax(0, 1fr);
  background: var(--surface-soft);
}

.list-pane,
.detail-pane {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.list-pane {
  background: var(--surface-soft);
  box-shadow: 1px 0 0 rgba(33, 38, 43, 0.07);
}

.detail-pane {
  background: var(--surface-soft);
}

.filter-bar {
  align-items: end;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-bar label {
  min-width: 154px;
}

.empty-state {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-control);
  color: var(--muted);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(33, 38, 43, 0.055);
}

.list-view {
  display: grid;
  gap: 10px;
}

.list-row {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: stretch;
  justify-items: start;
  gap: 12px;
  overflow: hidden;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-panel);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  text-align: left;
}

.list-row > span {
  min-width: 0;
}

.list-row:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(33, 38, 43, 0.06), 0 16px 34px rgba(33, 38, 43, 0.08);
}

.list-row.active {
  border-color: rgba(0, 104, 207, 0.48);
  background: var(--brand-selected);
  box-shadow: 0 0 0 2px rgba(0, 104, 207, 0.18), 0 16px 34px rgba(0, 104, 207, 0.14);
}

.list-row.active .row-title {
  color: var(--brand-dark);
}

.overview-row:hover {
  border-color: transparent;
  box-shadow: var(--shadow-panel);
}

.row-title {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 700;
  letter-spacing: 0;
}

.row-meta,
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.row-meta {
  display: block;
  max-width: 100%;
  white-space: normal;
}

.row-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--muted);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(33, 38, 43, 0.055);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.badge.ok {
  color: var(--ok);
  background: oklch(95.8% 0.04 156);
}

.badge.warn {
  color: var(--warning);
  background: oklch(96% 0.046 77);
}

.badge.danger {
  color: var(--danger);
  background: oklch(96% 0.034 29);
}

.detail-pane {
  display: grid;
  align-content: start;
  gap: 18px;
}

.detail-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.detail-section h2,
.detail-section h3 {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

.detail-section h2 {
  font-size: 22px;
  line-height: 28px;
}

.detail-section h3 {
  font-size: 16px;
  line-height: 22px;
}

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

.section-heading h3 {
  margin: 0;
}

.report-preview {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.report-preview-frame {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 0;
  background: var(--surface-raised);
}

.report-preview-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.feedback-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.feedback-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.feedback-summary-chip.positive {
  background: oklch(96% 0.028 156);
  border-color: oklch(84% 0.052 156);
}

.feedback-summary-chip.negative {
  background: oklch(96% 0.035 29);
  border-color: oklch(84% 0.068 29);
}

.issue-feedback-list {
  display: grid;
  gap: 12px;
}

.issue-feedback-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
}

.issue-feedback-card.rated-positive {
  background: oklch(98% 0.013 156);
  border-color: oklch(84% 0.052 156);
}

.issue-feedback-card.rated-negative {
  background: oklch(98% 0.016 29);
  border-color: oklch(84% 0.068 29);
}

.issue-feedback-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.issue-feedback-head span:first-child {
  min-width: 0;
}

.issue-feedback-head strong,
.issue-feedback-head em {
  display: block;
  overflow-wrap: anywhere;
}

.issue-feedback-head em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.feedback-rating-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.feedback-rating-badge.positive {
  color: oklch(38% 0.08 156);
  border-color: oklch(78% 0.07 156);
  background: oklch(94.5% 0.04 156);
}

.feedback-rating-badge.negative {
  color: oklch(43% 0.13 29);
  border-color: oklch(78% 0.09 29);
  background: oklch(95% 0.045 29);
}

.issue-feedback-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.issue-feedback-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.issue-feedback-copy div {
  min-width: 0;
}

.issue-feedback-copy dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.issue-feedback-copy dd {
  display: grid;
  gap: 3px;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
}

.issue-feedback-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.issue-feedback-shot {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.issue-feedback-shot-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.issue-feedback-shot-frame {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.issue-feedback-shot-frame .issue-shot {
  position: relative;
  min-height: 160px;
  margin: 0;
  overflow: hidden;
  background: var(--surface-raised);
}

.issue-feedback-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.issue-feedback-shot-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.issue-feedback-shot-frame.is-error .issue-feedback-shot-state {
  color: var(--danger);
}

.issue-highlight-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hl-problem {
  color: #ff4d3a;
}

.hl-reference {
  color: #1677ff;
}

.hl-detail {
  opacity: 0.9;
}

.hl-fill {
  fill: currentColor;
  fill-opacity: 0.06;
}

.hl-stroke,
.hl-corner {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-opacity: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.hl-measure {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-opacity: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.hl-guide {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
  stroke-opacity: 0.88;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}

.hl-arrow {
  fill: currentColor;
  stroke: none;
}

.hl-stroke-subtle {
  stroke-width: 2;
  stroke-opacity: 1;
}

.hl-dashed {
  stroke-dasharray: 6 5;
}

.hl-label-bg {
  fill: currentColor;
  fill-opacity: 1;
}

.hl-label {
  fill: #fffdfa;
  font: 400 11px "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  text-anchor: middle;
  dominant-baseline: central;
}

.hl-ghost {
  fill: #1677ff;
  fill-opacity: 0.08;
}

.issue-feedback-details div {
  min-width: 0;
}

.issue-feedback-details dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.issue-feedback-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
}

.issue-feedback-empty {
  margin: 0;
}

.overview-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: 0;
  text-wrap: balance;
}

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

.metric-card {
  min-width: 0;
  min-height: 108px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px rgba(33, 38, 43, 0.055);
}

.metric-label,
.metric-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  text-wrap: pretty;
}

.metric-card strong {
  color: var(--text);
  font-size: 28px;
  line-height: 34px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.compact-list {
  gap: 8px;
}

.compact-list .list-row {
  min-height: 52px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(33, 38, 43, 0.045);
}

.invite-control-panel,
.invite-token-panel,
.invite-token-reveal {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.invite-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.invite-create-form button {
  justify-self: start;
}

.switch-control {
  position: relative;
  min-height: 40px;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 9px;
  color: var(--text);
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-control span {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(33, 38, 43, 0.12);
  transition-duration: 150ms;
  transition-property: background-color, box-shadow;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.switch-control span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-raised);
  box-shadow: 0 1px 4px rgba(33, 38, 43, 0.22);
  transition: transform 150ms cubic-bezier(0.2, 0, 0, 1);
}

.switch-control input:checked + span {
  background: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.switch-control input:checked + span::after {
  transform: translateX(18px);
}

.switch-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.switch-control em {
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.invite-token-panel code,
.invite-token-reveal code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 14px;
  padding: 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 104, 207, 0.08);
}

.chart-panel {
  gap: 16px;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 260px;
  padding: 0;
}

.chart-canvas-wrap canvas {
  width: 100%;
  height: 260px;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.chart-legend span,
.funnel-row,
.reason-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
}

.chart-dot-brand {
  background: var(--brand);
}

.chart-dot-ok {
  background: var(--ok);
}

.chart-dot-danger {
  background: var(--danger);
}

.chart-dot-warning {
  background: var(--warning);
}

.chart-dot-muted {
  background: var(--muted-soft);
}

.chart-fallback {
  margin: 0;
  padding: 8px 0 0;
}

.chart-fallback[hidden] {
  display: none;
}

.funnel-list,
.reason-list,
.timeline {
  display: grid;
  gap: 8px;
}

.funnel-row,
.reason-row {
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.reason-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.reason-row div {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(33, 38, 43, 0.075);
}

.reason-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 10px 0;
  box-shadow: 0 1px 0 rgba(33, 38, 43, 0.075);
}

.timeline span,
.timeline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.kv-grid div {
  min-width: 0;
}

.kv-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kv-grid dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(33, 38, 43, 0.07);
}

.data-table th,
.data-table td {
  border-bottom: 1px solid rgba(33, 38, 43, 0.07);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  background: var(--surface-soft);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.json-block {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  color: oklch(94% 0.005 250);
  background: #21262B;
  font-size: 12px;
  line-height: 18px;
  box-shadow: inset 0 0 0 1px rgba(245, 247, 249, 0.08);
  font-variant-numeric: tabular-nums;
}

.report-link {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.report-link a {
  font-variant-numeric: tabular-nums;
}

.pager {
  justify-content: flex-end;
  margin-top: 12px;
}

.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    padding: 0;
  }

  .admin-panel {
    grid-template-columns: 212px minmax(0, 1fr);
  }

  .workspace {
    grid-template-columns: minmax(340px, 48%) minmax(0, 1fr);
  }

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

@media (max-width: 860px) {
  .app-shell {
    padding: 0;
  }

  .admin-panel {
    height: auto;
    min-height: 100vh;
    width: 100%;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    overflow: visible;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 14px 14px 10px;
    box-shadow: 0 1px 0 rgba(33, 38, 43, 0.08);
  }

  .brand-logo {
    width: 122px;
  }

  .section-nav {
    grid-column: 1 / -1;
    min-width: 0;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .section-nav::-webkit-scrollbar {
    display: none;
  }

  .section-nav button {
    width: auto;
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .sidebar-footer {
    justify-self: end;
    min-width: 0;
    grid-row: 1;
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    box-shadow: none;
  }

  .sidebar-footer p {
    max-width: 180px;
    display: none;
  }

  .sidebar-footer button {
    width: auto;
    min-height: 36px;
    padding: 0 12px;
  }

  .topbar {
    min-height: auto;
    padding: 18px 16px 14px;
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 30px;
  }

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

  .list-pane,
  .detail-pane {
    padding: 14px;
    overflow: visible;
  }

  .list-pane {
    box-shadow: 0 1px 0 rgba(33, 38, 43, 0.075);
  }

  .filter-bar {
    align-items: stretch;
  }

  .filter-bar label {
    min-width: min(100%, 180px);
    flex: 1 1 150px;
  }

  .kv-grid,
  .metric-grid,
  .issue-feedback-copy,
  .issue-feedback-details,
  .issue-feedback-shots,
  .invite-create-form {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .chart-canvas-wrap {
    min-height: 210px;
  }

  .chart-canvas-wrap canvas {
    height: 184px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .login-panel {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    align-content: center;
  }

  .brand-logo {
    width: 116px;
  }

  .topbar {
    display: grid;
    gap: 10px;
  }

  .topbar p {
    max-width: 32ch;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-bar label {
    min-width: 0;
  }

  .overview-panel,
  .detail-section,
  .list-row {
    border-radius: 16px;
  }

  .list-row {
    grid-template-columns: 1fr;
  }

  .list-row .badge {
    justify-self: start;
  }

  .metric-card {
    min-height: 92px;
  }

  .metric-card strong {
    font-size: 26px;
    line-height: 32px;
  }

  .panel-heading {
    display: grid;
  }

  .row-actions,
  .form-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
