/* Gewerkschmiede – arbeitsorientiertes, ruhiges Design. Systemschriften, keine Assets. */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d8dee6;
  --border-strong: #b9c3cf;
  --text: #16202b;
  --text-muted: #5b6b7c;
  --accent: #1f5f8b;
  --accent-strong: #17496b;
  --hot: #b3261e;
  --hot-bg: #fdeceb;
  --warm: #9a5b00;
  --warm-bg: #fdf3e3;
  --discovery: #1f5f8b;
  --discovery-bg: #e9f2f9;
  --supply: #0f6b5c;
  --supply-bg: #e6f4f1;
  --ok: #1c6b3a;
  --ok-bg: #e8f4ec;
  --warn: #8a6100;
  --warn-bg: #fdf6e3;
  --danger: #a01f16;
  --danger-bg: #fbeceb;
  --muted-bg: #eef1f4;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(22, 32, 43, 0.06), 0 8px 24px rgba(22, 32, 43, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

body {
  padding-bottom: 48px;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
  line-height: 1.25;
}

h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 16px;
}

a {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 12px;
}

.mono {
  font-family: var(--mono);
}

.strong {
  font-weight: 600;
}

/* ---------------------------------------------------------------- Kopfzeile */

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-header__mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.app-header__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.app-header__subtitle {
  color: var(--text-muted);
  font-size: 12px;
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-header__user-name {
  font-weight: 600;
}

.app-header__user-role {
  font-size: 12px;
}

.info-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.info-toggle:hover {
  color: var(--text);
}

.info-toggle input {
  margin: 0;
}

.info-toggle__label {
  white-space: nowrap;
}

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  padding: 8px 20px;
  background: var(--warn-bg);
  color: #5f4300;
  border-bottom: 1px solid #e6d9ac;
  font-size: 13px;
}

.app-nav {
  position: sticky;
  top: 51px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.app-nav__link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
}

.app-nav__link:hover {
  background: #eaeff4;
}

.app-nav__link[aria-current="page"] {
  background: var(--surface);
  border-color: var(--border-strong);
  font-weight: 600;
}

.stream-status {
  padding: 6px 20px;
  font-size: 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.stream-status[data-kind="connected"] {
  color: var(--ok);
}

.stream-status[data-kind="reconnecting"] {
  color: var(--warn);
}

/* ------------------------------------------------------------------ Layout */

.view {
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.page__head-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page__title {
  font-size: 22px;
  margin: 0;
}

.page__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.card__title {
  font-size: 15px;
  margin: 0;
}

.card__subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 90ch;
}

.card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.card__body {
  padding: 14px 16px 16px;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  gap: 16px;
  align-items: start;
}

.detail-columns > .card:first-child,
.detail-columns > .card:nth-child(3) {
  grid-column: 1 / -1;
}

/* ------------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: #eef2f6;
}

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

.btn--primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #fff;
}

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

.btn--ghost {
  background: transparent;
  border-color: var(--border);
}

.btn--small {
  padding: 3px 8px;
  font-size: 12px;
}

.action-bar,
.filter-actions,
.form-actions,
.row-actions,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.action-bar {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ------------------------------------------------------------------- Filter */

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 12px;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

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

.filter label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-pair {
  display: flex;
  gap: 6px;
}

.filter-pair input {
  flex: 1 1 auto;
}

select,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

textarea {
  resize: vertical;
}

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

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.form-hint {
  margin: 6px 0 0;
  font-size: 12px;
}

.form-error {
  margin: 8px 0;
  padding: 8px 10px;
  background: var(--danger-bg);
  border: 1px solid #e7c4c1;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
}

.notice {
  margin: 8px 0;
  padding: 8px 10px;
  background: var(--discovery-bg);
  border: 1px solid #cfe0ee;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.notice--warn {
  background: var(--warn-bg);
  border-color: #e6d9ac;
  color: #6a4c00;
}

/* ------------------------------------------------------------------ Tabellen */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

table.data thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 8px 10px;
  background: #eef2f6;
  border-bottom: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  color: #3c4a58;
  white-space: nowrap;
}

table.data td {
  padding: 7px 10px;
  border-bottom: 1px solid #e7ebf0;
  vertical-align: top;
}

table.data tbody tr:nth-child(even) td {
  background: #fbfcfd;
}

table.data tbody tr:hover td {
  background: #eef6fb;
}

table.data tbody tr[tabindex] {
  cursor: pointer;
}

table.data .empty-cell {
  padding: 18px 12px;
  color: var(--text-muted);
  text-align: center;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.col-type,
.col-score,
.col-phone {
  white-space: nowrap;
}

.col-company {
  min-width: 160px;
}

.col-trades,
.col-demand {
  min-width: 130px;
}

.col-location {
  min-width: 120px;
}

.col-age {
  min-width: 160px;
}

.col-next {
  min-width: 150px;
}

.col-actions {
  min-width: 150px;
}

.col-field,
.col-origin {
  min-width: 180px;
}

.col-value {
  max-width: 420px;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Detailtabellen dürfen im Kartenrahmen horizontal scrollen statt zu stauchen. */
.table-wrap--wide table.data {
  min-width: 600px;
}

.row-actions {
  flex-wrap: nowrap;
}

/* -------------------------------------------------------------------- Badges */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--muted-bg);
  color: #3c4a58;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Der Feed hat bewusst viele Spalten: erst ab dieser Breite wird gestaucht. */
.table-wrap--feed table.data {
  min-width: 1150px;
}

.badge[data-kind="hot"] {
  background: var(--hot-bg);
  color: var(--hot);
  border-color: #f0c9c6;
}

.badge[data-kind="warm"] {
  background: var(--warm-bg);
  color: var(--warm);
  border-color: #eadfc0;
}

.badge[data-kind="discovery"] {
  background: var(--discovery-bg);
  color: var(--discovery);
  border-color: #cfe0ee;
}

.badge[data-kind="supply"] {
  background: var(--supply-bg);
  color: var(--supply);
  border-color: #c6e3dd;
}

.badge[data-kind="ok"] {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: #c8e2d1;
}

.badge[data-kind="info"] {
  background: var(--discovery-bg);
  color: var(--discovery);
  border-color: #cfe0ee;
}

.badge[data-kind="warn"] {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: #eadfc0;
}

.badge[data-kind="danger"] {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #f0c9c6;
}

.badge[data-kind="muted"],
.badge[data-kind="neutral"] {
  background: var(--muted-bg);
  color: #4a5765;
  border-color: #dde3ea;
}

/* -------------------------------------------------------------------- Felder */

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
}

.field__label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.field__value {
  word-break: break-word;
}

.raw-block {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* Vertriebs-Kurzfassung im Lead-Detail (Modelltext bzw. belegte Eckdaten). */
.summary-text {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  word-break: break-word;
}

.raw-block summary {
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 600;
}

.raw-text {
  margin: 0;
  padding: 10px;
  max-height: 380px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.reason-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.reason-list li {
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------ Kennzahlen */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.metric {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric__value {
  font-size: 20px;
  font-weight: 700;
}

.metric__label {
  font-size: 12px;
  color: var(--text-muted);
}

.metric-group {
  margin-top: 12px;
}

.metric-group__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------- Alerts */

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
}

.alert--unread {
  border-left: 3px solid var(--accent);
  background: #fbfdff;
}

.alert__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.alert__title {
  flex: 1 1 220px;
}

.alert__time {
  font-size: 12px;
}

.alert__body {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.alert__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ Zustände */

.empty-state,
.error-state {
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: center;
}

.error-state {
  border-style: solid;
  border-color: #e7c4c1;
  background: var(--danger-bg);
  color: #6b1a13;
  text-align: left;
}

.empty-state__title,
.error-state__title {
  font-weight: 600;
  margin: 0 0 4px;
}

.empty-state__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state__action {
  margin-top: 10px;
}

.spinner-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  color: var(--text-muted);
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.feed-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.api-notes {
  margin: 0;
  padding: 10px 16px 10px 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12.5px;
}

.live-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--border-strong);
  vertical-align: middle;
}

.live-dot--connected::before {
  background: var(--ok);
}

.live-dot--reconnecting::before,
.live-dot--connecting::before {
  background: var(--warn);
}

/* ----------------------------------------------------------- Erklärungsmodus */
/*
 * Sichtbarkeit steuert ausschließlich die erste Regel: Ohne body.info-mode ist
 * jedes Infofeld ausgeblendet. Die Seiten bauen die Panels unabhängig vom
 * Schalterzustand auf; beim Umschalten ist kein Neu-Rendern nötig.
 */
.info-panel {
  display: none;
}

body.info-mode .info-panel {
  display: block;
}

.info-panel {
  margin: 0 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.info-panel__summary {
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--accent-strong);
  border-radius: var(--radius-sm);
}

.info-panel__summary:hover {
  background: var(--muted-bg);
}

.info-panel__body {
  padding: 0 12px 10px;
}

.info-panel__purpose {
  margin: 0;
}

.info-panel__role {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.info-panel__body h4 {
  margin: 10px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.info-panel__body ol,
.info-panel__body ul {
  margin: 0;
  padding-left: 20px;
}

.info-panel__body li {
  margin: 2px 0;
}

/* --------------------------------------------------------------------- Pager */

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

.pager__info {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ------------------------------------------- Browser-Übernahme (REQ-086) */

/* Der Screenshot ist die einzige Sicht auf die isolierte Session: Er wird
   auf die verfügbare Breite skaliert, Klicks werden relativ umgerechnet. */
.browser-shot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.browser-shot__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.browser-panel__step {
  margin: 16px 0 6px;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.browser-panel__status {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.browser-panel__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------- Modals */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 24, 33, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 60px rgba(16, 24, 33, 0.28);
}

.modal--sm {
  width: min(420px, 100%);
}

.modal--lg {
  width: min(900px, 100%);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.modal__title {
  font-size: 15px;
  margin: 0;
}

.modal__close,
.toast__close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.modal__body {
  padding: 14px 16px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* -------------------------------------------------------------------- Toasts */

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  max-height: 60vh;
  overflow: auto;
}

.toast {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast[data-kind="success"] {
  border-left-color: var(--ok);
}

.toast[data-kind="warn"] {
  border-left-color: var(--warn);
}

.toast[data-kind="error"] {
  border-left-color: var(--danger);
  background: #fffafa;
}

.toast__body {
  flex: 1 1 auto;
  min-width: 0;
}

.toast__title {
  font-weight: 700;
}

.toast__meta {
  color: var(--text-muted);
  font-size: 12px;
}

.toast__actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.link-external {
  word-break: break-all;
}

/* ---------------------------------------------------------------------- Login */

.login-layout {
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.login-card__title {
  font-size: 20px;
}

.noscript {
  padding: 16px;
  background: var(--warn-bg);
}

/* ----------------------------------------------- Paketzuweisung (REQ-070) */

.col-select {
  width: 34px;
  text-align: center;
}

.col-select input[type='checkbox'] {
  cursor: pointer;
}

.feed-selection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
}

.dist-target-row {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) 130px auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}

.dist-target-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dist-target-field label {
  font-size: 12px;
  color: var(--text-muted);
}

.dist-target-actions {
  margin-bottom: 8px;
}

.dist-result {
  margin-top: 10px;
}

.dist-result h3 {
  margin: 10px 0 6px;
  font-size: 14px;
}

.dist-counts {
  margin: 6px 0;
  padding-left: 18px;
  font-size: 13px;
}

.dist-warnings {
  margin: 8px 0;
  padding: 8px 10px;
  background: var(--warn-bg);
  border: 1px solid #e6d9ac;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.dist-warnings h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
}

.form-row--inline {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.form-row--inline label {
  font-size: 13px;
}

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

@media (max-width: 1100px) {
  .detail-columns {
    grid-template-columns: 1fr;
  }
  .detail-columns > .card {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .filter--wide {
    grid-column: span 1;
  }
  .col-phone,
  .col-age,
  .col-score {
    display: none;
  }
}

@media (max-width: 700px) {
  .view {
    padding: 12px 10px 32px;
  }
  .app-header {
    position: static;
  }
  .app-nav {
    top: 0;
  }
  .col-company,
  .col-location {
    min-width: 110px;
  }
}
