:root {
  color-scheme: light;
  --bg: #F6F7F4;
  --ink: #13261C;
  --ink-2: #1E2A2D;
  --muted: #647067;
  --green: #1F7A4D;
  --bright: #29A45B;
  --gold: #B0820F;
  --gold-soft: #FAEED3;
  --terracotta: #C9463F;
  --terracotta-soft: #F7DEDB;
  --green-soft: #E8F4EC;
  --hairline: #E4E8E3;
  --status-bg: #F1F3F0;
  --white: #FFFFFF;
  --shadow: 0 18px 45px rgba(19, 38, 28, 0.10);
  --radius: 16px;
  --rail: 56px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only,
.sr-only-controls {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(41, 164, 91, 0.35);
  outline-offset: 2px;
}

.page,
.shell {
  min-height: 100vh;
}

.ops-shell {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
}

.topbar {
  height: 56px;
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(260px, 420px) minmax(280px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 20;
}

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

.mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
}

.brand strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.env-chip,
.top-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.env-chip {
  color: var(--gold);
  background: var(--gold-soft);
}

.env-chip.good {
  color: var(--green);
  background: var(--green-soft);
}

.global-search {
  width: 100%;
  max-width: 420px;
  height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 10px;
}

.global-search:focus-within {
  border-color: rgba(31, 122, 77, 0.35);
  background: var(--white);
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.global-search span {
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--white);
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.gate-chip {
  background: var(--gold-soft);
  color: var(--gold);
}

.exposure-chip {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.dashboard {
  height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) minmax(360px, 40%);
  grid-template-rows: 44px minmax(0, 1fr);
  grid-template-areas:
    "rail kpis kpis"
    "rail list detail";
  gap: 12px;
  padding: 12px 12px 12px 0;
  min-width: 0;
}

.dashboard.is-locked {
  opacity: 0.35;
  filter: blur(1px);
  pointer-events: none;
}

.icon-rail {
  grid-area: rail;
  width: var(--rail);
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  background: var(--white);
  border-right: 1px solid var(--hairline);
}

.sidebar-nav-group,
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.rail-button {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  display: grid;
  place-items: center;
}

.rail-icon {
  font-size: 19px;
  line-height: 1;
}

.rail-button.active {
  background: var(--green);
  color: var(--white);
}

.rail-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--terracotta);
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  border: 2px solid var(--white);
}

.command-strip {
  grid-area: kpis;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kpi-chip,
.sort-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.kpi-chip b {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.kpi-payout {
  color: var(--green);
}

.kpi-disputes {
  color: var(--terracotta);
}

.kpi-active {
  color: var(--ink);
}

.kpi-backlog {
  color: var(--gold);
}

.sort-chip {
  color: var(--ink-2);
  font-weight: 800;
}

.sort-chip select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  outline: 0;
  font-weight: 800;
  max-width: 156px;
}

.ops-column {
  grid-area: list;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel,
.queue,
.detail,
.card,
.auth-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.command-list-panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
}

.queue {
  height: 100%;
  overflow: auto;
  box-shadow: 0 1px 0 rgba(19, 38, 28, 0.04);
}

.queue-table {
  min-width: 0;
}

.queue-table-head,
.queue-row {
  display: grid;
  grid-template-columns: 92px 106px minmax(0, 1fr) 102px 130px 64px;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.queue-table-head {
  height: 36px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.queue-table-head span,
.queue-row > span {
  min-width: 0;
  padding: 0 10px;
}

.queue-row {
  height: 42px;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--hairline);
  background: var(--white);
  color: var(--ink);
}

.queue-row:hover {
  background: var(--bg);
}

.queue-row.active {
  background: var(--green-soft);
  border-left-color: var(--green);
}

.queue-risk,
.risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.queue-risk i,
.risk-chip i,
.priority-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--muted);
}

.risk-money i,
.command-priority-money::before {
  background: var(--terracotta);
}

.risk-safety i,
.command-priority-safety::before {
  background: var(--gold);
}

.risk-support i {
  background: var(--green);
}

.queue-case,
.queue-amount,
.queue-age {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--status-bg);
  border: 1px solid transparent;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status.good,
.status.approved,
.status.captured,
.status.authorized,
.status.succeeded,
.status.delivered,
.status.delivered_or_accepted {
  color: var(--green);
}

.status.warn,
.status.pending,
.status.queued,
.status.sent,
.status.requires_capture,
.status.submitted {
  color: var(--gold);
}

.status.hot,
.status.failed,
.status.expired,
.status.disputed,
.status.refunded,
.status.rejected,
.status.revoked,
.status.cancelled {
  color: var(--terracotta);
}

.status.neutral,
.status.no_payment,
.status.unknown {
  color: var(--muted);
}

.detail {
  grid-area: detail;
  position: sticky;
  top: 68px;
  height: calc(100vh - 80px);
  min-width: 0;
  overflow: auto;
  padding: 18px;
}

.detail-close {
  display: none;
  margin-left: auto;
  margin-bottom: 10px;
}

.case-detail-condensed,
.gate-detail-condensed {
  display: grid;
  gap: 14px;
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.risk-chip {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--status-bg);
}

.case-detail-condensed h2,
.gate-detail-condensed h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.detail-meta-grid,
.impact,
.ops-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-meta-grid div,
.impact div,
.ops-proof-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg);
}

.detail-meta-grid span,
.impact span,
.ops-proof-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-meta-grid b,
.impact strong,
.ops-proof-grid b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.media-thumb {
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--hairline);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-card {
  padding: 12px;
  border-radius: 14px;
  background: var(--bg);
}

.timeline-card h3,
.card h3,
.history-head h3 {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.2;
}

.timeline {
  display: grid;
  gap: 8px;
}

.event,
.timeline > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.event time,
.timeline b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.event span,
.timeline p,
.timeline span {
  min-width: 0;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.money-caution {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.detail-actions-panel,
.money-actions-panel,
.decision-panel,
.drawer,
.audit-panel,
.insurance-history-card,
.marketplace-admin-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--hairline);
}

.hero-panel,
.compliance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.45fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
}

.hero-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.hero-copy h2,
.hero-copy h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.case-state,
.rail-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-scorecard,
.review-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ops-scorecard div,
.review-flow div {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg);
}

.ops-scorecard b,
.review-flow b {
  display: block;
  color: var(--green);
  font-size: 18px;
}

.ops-scorecard span,
.review-flow span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.command-queue,
.workspace-gate-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.gate-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--hairline);
}

.gate-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.gate-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

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

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

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

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  padding: 9px 10px;
}

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

.actions,
.inline-actions,
.row-actions,
.wrap-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.primary,
.secondary,
.ghost,
.danger,
.link-action,
.button-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: normal;
  text-align: center;
}

.primary {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
}

.secondary {
  border: 1px solid var(--gold);
  background: var(--white);
  color: var(--gold);
}

.ghost {
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--ink-2);
}

.danger {
  border: 1px solid var(--terracotta);
  background: var(--white);
  color: var(--terracotta);
}

.link-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding-inline: 4px;
}

.top-signout {
  min-height: 32px;
}

.gate-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gate-checklist {
  display: grid;
  gap: 8px;
}

.gate-check-row {
  display: grid;
  grid-template-columns: 24px 104px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
}

.gate-check-row b {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  font-size: 11px;
}

.gate-check-row strong,
.gate-check-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty,
.centered-empty,
.command-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

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

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.card {
  padding: 14px;
  min-width: 0;
}

.kv {
  display: grid;
  gap: 8px;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}

.kv b,
code {
  overflow-wrap: anywhere;
}

.command-table {
  display: grid;
  gap: 8px;
}

.command-table-head,
.command-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1.6fr) 110px 120px 120px 94px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.command-table-head {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-row {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--white);
}

.command-row-main,
.history-main {
  min-width: 0;
}

.command-row-main strong,
.command-row-main span,
.marketplace-row strong,
.marketplace-row p {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.command-priority {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
}

.command-priority::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.command-assignee {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.insurance-panel,
.ops-overview {
  height: 100%;
  overflow: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.insurance-head,
.panel-head,
.history-head,
.case-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.insurance-queue,
.insurance-history,
.marketplace-rows,
.history-list,
.decision-ledger-list {
  display: grid;
  gap: 12px;
}

.insurance-card,
.history-row,
.marketplace-row,
.ledger-event {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--white);
  min-width: 0;
}

.proof-banner {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
}

.proof-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.review-checks,
.eligibility-impact,
.marketplace-row-meta,
.ledger-meta,
.ledger-links,
.desk-evidence-checklist,
.anomaly-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.review-checks span,
.marketplace-row-meta span,
.ledger-links span,
.desk-evidence-checklist span,
.anomaly-steps span {
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.proof-fallback {
  border: 1px solid var(--green);
  color: var(--green);
  background: var(--white);
}

.operator-drill {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.media-failure-strip {
  display: grid;
  gap: 8px;
}

.media-failure-strip article {
  padding: 10px;
  border-radius: 12px;
  background: var(--terracotta-soft);
  color: var(--ink);
}

.user-access-impact {
  border-color: rgba(201, 70, 63, 0.25);
}

.marketplace-media-proof,
.marketplace-route-proof,
.marketplace-text-proof,
.marketplace-notification-proof,
.marketplace-restriction-proof {
  overflow-wrap: anywhere;
}

.signed-media-list {
  display: grid;
  gap: 8px;
}

.signed-media-link,
.signed-media-open {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.signed-media-link {
  padding: 10px;
  border-radius: 12px;
  background: var(--bg);
}

.signed-media-open {
  color: var(--green);
  text-decoration: none;
}

.anomaly-operator-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  min-width: 0;
}

.anomaly-row {
  border-left: 3px solid var(--terracotta);
}

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

.sensitive-action-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(19, 38, 28, 0.28);
}

.sensitive-action-drawer[hidden] {
  display: none;
}

.sensitive-action-card {
  width: min(640px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(560px, calc(100vw - 32px));
  display: none;
  gap: 18px;
  align-self: center;
  justify-self: center;
  padding: 22px;
  box-shadow: var(--shadow);
}

.auth-card.show {
  display: grid;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  transform: translate(-50%, 16px);
  opacity: 0;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.skeleton-row {
  pointer-events: none;
}

.skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: var(--hairline);
}

.skeleton-line.short {
  width: 64px;
}

.skeleton-line.amount {
  width: 74px;
}

.skeleton-line.age {
  width: 38px;
}

.queue-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(2, minmax(120px, 0.7fr));
  gap: 10px;
}

@media (max-width: 1100px) {
  .dashboard {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    grid-template-areas:
      "rail kpis"
      "rail list";
    padding-right: 12px;
  }

  .detail {
    position: fixed;
    top: 56px;
    right: 0;
    bottom: 0;
    z-index: 30;
    width: min(430px, calc(100vw - var(--rail)));
    height: auto;
    border-radius: 16px 0 0 16px;
    transform: translateX(100%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  .dashboard.detail-open .detail {
    transform: translateX(0);
  }

  .detail-close {
    display: inline-flex;
  }
}

@media (max-width: 1080px) {
  .command-table-head,
  .command-row {
    grid-template-columns: 90px minmax(0, 1fr) 96px 112px;
  }

  .command-assignee,
  .command-row-action,
  .command-table-head span:nth-child(5),
  .command-table-head span:nth-child(6) {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: minmax(128px, auto) minmax(0, 1fr);
    gap: 8px;
  }

  .top-actions {
    display: none;
  }

  .command-strip {
    align-items: flex-start;
    height: auto;
    min-height: 44px;
  }

  .kpi-chips {
    overflow: hidden;
  }

  .kpi-chip {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  .sort-chip {
    display: none;
  }

  .queue-table-head,
  .queue-row {
    grid-template-columns: 74px 74px minmax(0, 1fr) 74px 92px 44px;
  }

  .queue-table-head span,
  .queue-row > span {
    padding: 0 6px;
  }

  .queue-case,
  .queue-amount,
  .queue-age,
  .queue-item {
    font-size: 12px;
  }

  .detail-meta-grid,
  .impact,
  .ops-proof-grid,
  .form-grid,
  .compact-form,
  .hero-panel,
  .compliance-hero,
  .ops-scorecard,
  .review-flow,
  .grid,
  .ops-evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gate-check-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .gate-check-row span {
    grid-column: 2;
  }

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

  .anomaly-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding-inline: 10px;
  }

  .brand strong,
  .env-chip {
    display: none;
  }

  .dashboard {
    gap: 8px;
    padding: 8px 8px 8px 0;
  }

  .queue-table-head,
  .queue-row {
    grid-template-columns: 66px 64px minmax(0, 1fr) 66px 80px 40px;
  }

  .status {
    padding-inline: 6px;
    font-size: 10px;
  }

  .detail {
    width: calc(100vw - var(--rail));
    padding: 14px;
  }
}
