:root {
  --bg: #07111f;
  --bg-2: #0b1627;
  --panel: rgba(13, 25, 43, 0.92);
  --panel-2: rgba(17, 31, 51, 0.94);
  --panel-3: rgba(8, 17, 30, 0.92);
  --line: rgba(151, 169, 214, 0.16);
  --line-strong: rgba(151, 169, 214, 0.3);
  --text: #edf4ff;
  --muted: #98a6c5;
  --muted-strong: #c6d3f2;
  --gold: #ffbc6b;
  --cyan: #74d7ff;
  --green: #2dd4bf;
  --amber: #ffb347;
  --red: #ff7b88;
  --blue: #7d95ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.22);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 188, 107, 0.14), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(116, 215, 255, 0.14), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(125, 149, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #0a1322 0%, #07111f 46%, #050b16 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(12px);
}

body::before {
  top: 118px;
  right: 6%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 215, 255, 0.12), transparent 70%);
}

body::after {
  bottom: 8%;
  left: 4%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 188, 107, 0.1), transparent 72%);
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 96%);
}

.public-shell {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  padding: 32px 24px 56px;
  display: grid;
  gap: 20px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(12, 23, 40, 0.96), rgba(6, 13, 24, 0.98)),
    radial-gradient(circle at top left, rgba(116, 215, 255, 0.08), transparent 36%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar-left {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 6px 2px;
}

.brand-shell {
  display: grid;
  gap: 10px;
  max-width: none;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold), #ffe3bb);
  box-shadow: 0 0 0 7px rgba(255, 188, 107, 0.12);
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.38rem;
  color: #fff;
  letter-spacing: -0.05em;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-intro {
  max-width: 52ch;
  color: rgba(198, 211, 242, 0.78);
  font-size: 0.92rem;
  line-height: 1.65;
}

.topbar-ribbon {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(112px, max-content))
    minmax(240px, 1.45fr)
    minmax(180px, 1fr)
    minmax(108px, 0.6fr);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(151, 169, 214, 0.12);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.topbar-ribbon > * {
  min-width: 0;
}

.workspace-pill,
.header-status {
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(151, 169, 214, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workspace-pill {
  display: grid;
  align-content: center;
  gap: 4px;
}

.workspace-pill-wide {
  min-width: 0;
}

.workspace-label,
.workspace-meta {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-pill strong,
.header-status {
  font-size: 0.98rem;
  font-weight: 700;
}

.workspace-pill-accent strong {
  color: var(--green);
}

.workspace-pill-compact {
  align-items: center;
  text-align: center;
}

.header-status {
  min-width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  color: var(--muted-strong);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 12px;
  border-radius: 999px;
  border-color: rgba(116, 215, 255, 0.16);
  background: rgba(116, 215, 255, 0.06);
  box-shadow: none;
  backdrop-filter: none;
  opacity: 1;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.action-bar .btn {
  min-width: 112px;
  min-height: 72px;
  padding: 12px 18px;
  border-radius: 22px;
  font-size: 0.84rem;
  font-weight: 600;
}

.topbar-ribbon .btn-primary,
.topbar-ribbon .btn-secondary {
  justify-content: flex-start;
  border: 1px solid rgba(151, 169, 214, 0.14);
  color: #f3f7ff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.topbar-ribbon .btn-primary {
  border-color: rgba(125, 149, 255, 0.24);
  background: linear-gradient(180deg, rgba(125, 149, 255, 0.18), rgba(125, 149, 255, 0.09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0 0 1px rgba(125, 149, 255, 0.08);
}

.topbar-ribbon .btn-primary:hover {
  opacity: 1;
  border-color: rgba(125, 149, 255, 0.36);
  background: linear-gradient(180deg, rgba(125, 149, 255, 0.24), rgba(125, 149, 255, 0.12));
}

.topbar-ribbon .btn-secondary {
  color: rgba(237, 244, 255, 0.86);
}

.topbar-ribbon .btn-secondary:hover {
  border-color: rgba(116, 215, 255, 0.28);
  background: linear-gradient(180deg, rgba(116, 215, 255, 0.08), rgba(116, 215, 255, 0.03));
}

.topbar-metric {
  min-width: 0;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 22px;
  border-color: rgba(151, 169, 214, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.topbar-metric-wide {
  min-width: 0;
}

.topbar-metric-compact {
  min-width: 0;
}

.queue-inline {
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid rgba(151, 169, 214, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  display: grid;
  align-content: center;
  gap: 2px;
}

.queue-inline span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.queue-inline strong {
  font-size: 0.94rem;
  line-height: 1.3;
}

.topbar-ribbon .queue-inline strong,
.topbar-ribbon .workspace-pill strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.topbar-ribbon .workspace-label,
.topbar-ribbon .workspace-meta,
.topbar-ribbon .queue-inline span {
  letter-spacing: 0.1em;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
}

.summary-card,
.latest-card {
  min-height: 100%;
}

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

.summary-item {
  padding: 18px;
  border: 1px solid rgba(151, 169, 214, 0.14);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  display: grid;
  gap: 8px;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.74rem;
}

.summary-item strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.verify-card,
.query-card,
.latest-card,
.execute-card,
.history-card {
  box-shadow: var(--shadow-soft);
}

.verify-card .verify-form,
.query-card .track-form {
  margin-bottom: 0;
}

.verify-card .verify-result,
.query-card .track-result {
  margin-top: 14px;
}

.execute-card {
  scroll-margin-top: 24px;
}

.verify-card,
.query-card {
  scroll-margin-top: 24px;
}

.workspace-modal-card {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.workspace-modal-card .modal-head {
  margin-bottom: 14px;
}

.modal-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
}

.compact-status-row {
  margin-bottom: 12px;
}

.hero-card,
.panel-card,
.workbench-shell,
.command-dock,
.modal-card,
.stat-card,
.notice-chip,
.alert-banner,
.recovery,
.table-shell,
.receipt,
.timeline,
.status-strip,
.failure-pill,
.delivery-card,
.next-actions,
.support-entry,
.follow-up-panel,
.receipt-placeholder,
.dispatch-hint,
.execute-rules {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.hero-card,
.panel-card,
.workbench-shell,
.command-dock,
.modal-card,
.stat-card,
.notice-chip,
.alert-banner,
.recovery,
.receipt,
.timeline,
.status-strip,
.failure-pill,
.delivery-card,
.next-actions,
.support-entry,
.follow-up-panel,
.receipt-placeholder,
.dispatch-hint,
.execute-rules {
  background: linear-gradient(180deg, rgba(18, 32, 52, 0.92), rgba(7, 14, 27, 0.98));
}

.hero-card,
.workbench-shell,
.command-dock,
.modal-card {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -72px -120px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 149, 255, 0.24), transparent 72%);
}

.hero-card-main {
  display: grid;
  align-content: space-between;
  gap: 20px;
}

.hero-eyebrow,
.dispatch-label,
.workbench-eyebrow,
.dock-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(116, 215, 255, 0.22);
  background: rgba(116, 215, 255, 0.08);
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-copy h2 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.35rem, 4.8vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p,
.dispatch-head p,
.workbench-head p,
.panel-head p,
.panel-head-inline p,
.modal-head p,
.alert-copy p,
.command-dock-copy span,
.next-action-copy,
.support-entry p,
.timeline-copy span,
.notice-chip span,
.text-muted,
.empty,
.table-footer {
  color: var(--muted);
  line-height: 1.72;
}

.hero-actions,
.hero-tags,
.row,
.row-wrap,
.track-actions,
.recent-actions,
.next-actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.verify-hint span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.8rem;
}

.hero-card-side {
  display: grid;
}

.dispatch-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
}

.dispatch-head {
  display: grid;
  gap: 8px;
}

.dispatch-head strong {
  font-size: 1.38rem;
  letter-spacing: -0.04em;
}

.flow-tabs {
  display: grid;
  gap: 12px;
}

.flow-tab {
  width: 100%;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  color: var(--muted-strong);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.flow-tab:hover:not(:disabled),
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.flow-tab.is-active {
  border-color: rgba(125, 149, 255, 0.46);
  background: linear-gradient(180deg, rgba(125, 149, 255, 0.22), rgba(42, 212, 191, 0.08));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.flow-tab:disabled {
  opacity: 0.45;
}

.flow-tab-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.88rem;
}

.flow-tab-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.flow-tab-label {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.flow-tab-copy span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.dispatch-actions {
  display: grid;
  gap: 12px;
}

.dispatch-hint {
  padding: 16px;
  border-radius: 18px;
}

.dispatch-hint span,
.summary-label,
.receipt-meta dt,
.verify-detail-item dt,
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dispatch-hint strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.66;
}

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

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 72%);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.stat-card:nth-child(1) strong { color: #ffffff; }
.stat-card:nth-child(2) strong { color: var(--cyan); }
.stat-card:nth-child(3) strong { color: var(--green); }
.stat-card:nth-child(4) strong { color: var(--red); }

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

.notice-chip {
  padding: 16px 18px;
  border-radius: 22px;
  display: grid;
  gap: 8px;
}

.notice-chip strong {
  font-size: 0.96rem;
}

.notice-chip-info {
  border-color: rgba(116, 215, 255, 0.22);
}

.notice-chip-warning {
  border-color: rgba(255, 188, 107, 0.26);
}

.notice-chip-warning strong,
.alert-copy strong,
.alert-icon {
  color: var(--gold);
}

.alert-banner {
  padding: 22px 24px;
  border-radius: 26px;
  border-color: rgba(255, 188, 107, 0.24);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.alert-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 188, 107, 0.12);
  font-weight: 700;
}

.workbench-shell {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.workbench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.workbench-head h3 {
  margin: 10px 0 6px;
  font-size: 1.55rem;
  letter-spacing: -0.05em;
}

.recovery {
  padding: 14px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.recovery-text {
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.7;
}

.command-dock {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.command-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.command-dock-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.command-dock-copy {
  display: grid;
  gap: 4px;
}

.command-dock-copy strong {
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.workspace-stage {
  display: grid;
  gap: 18px;
}

.query-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 18px;
}

.panel-card {
  padding: 24px;
  border-radius: 26px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.panel-card.is-focus,
.public-shell[data-focus="verify"] #verifyCard,
.public-shell[data-focus="execute"] #submitCard,
.public-shell[data-focus="query"] #queryCard {
  border-color: rgba(125, 149, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(125, 149, 255, 0.16), var(--shadow-soft);
}

.panel-frame-head,
.panel-head,
.panel-head-inline,
.modal-head {
  margin-bottom: 16px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  border: 1px solid rgba(116, 215, 255, 0.16);
  background: rgba(116, 215, 255, 0.06);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker-warning {
  border-color: rgba(255, 188, 107, 0.22);
  background: rgba(255, 188, 107, 0.08);
  color: var(--gold);
}

.panel-head h3,
.panel-head-inline h3,
.modal-head h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verify-form,
.track-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

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

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

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 10, 20, 0.34);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

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

input::placeholder,
textarea::placeholder {
  color: #61708f;
}

button:focus-visible,
.btn:focus-visible,
.flow-tab:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(116, 215, 255, 0.9);
  outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(116, 215, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(116, 215, 255, 0.12);
}

.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #79d9ff, #6886ff);
  border: none;
  color: #04111e;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.96;
}

.btn-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(151, 169, 214, 0.12);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(151, 169, 214, 0.22);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
}

.btn-xs {
  min-height: 34px;
  padding: 0 12px;
}

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

.execute-card.is-locked .submit-form {
  opacity: 0.74;
}

.execute-card.is-locked input,
.execute-card.is-locked textarea {
  background: rgba(255, 255, 255, 0.035);
}

.gate-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 188, 107, 0.22);
  background: linear-gradient(90deg, rgba(255, 188, 107, 0.12), rgba(255, 188, 107, 0.03));
  color: #ffd7a5;
  line-height: 1.7;
}

.execute-rules {
  padding: 16px;
  border-radius: 18px;
}

.execute-rules strong {
  display: block;
  margin-bottom: 8px;
}

.execute-rules ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.72;
}

.track-actions {
  margin-top: 12px;
}

.receipt-placeholder {
  padding: 22px 20px;
  border-radius: 20px;
  line-height: 1.72;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.history-card {
  display: grid;
  gap: 14px;
}

.recent-list {
  min-height: 240px;
  padding-top: 4px;
  overflow-x: auto;
}

.recent-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.recent-status-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-strong);
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.recent-status-tab.is-active {
  border-color: rgba(125, 149, 255, 0.5);
  background: rgba(125, 149, 255, 0.14);
  color: #fff;
}

.receipt {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
}

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

.receipt-token code {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(3, 10, 20, 0.48);
  color: var(--cyan);
  font-size: 0.9rem;
}

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

.receipt-meta div,
.verify-detail-item,
.status-strip,
.failure-pill,
.delivery-card,
.next-actions,
.support-entry,
.follow-up-panel,
.timeline {
  padding: 14px 16px;
  border-radius: 18px;
}

.receipt-meta dd,
.verify-detail-item dd {
  margin: 0;
  line-height: 1.66;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success {
  background: rgba(45, 212, 191, 0.16);
  color: #7bf5df;
}

.badge-warning {
  background: rgba(255, 179, 71, 0.15);
  color: #ffd28b;
}

.badge-error {
  background: rgba(255, 123, 136, 0.15);
  color: #ffb5bd;
}

.badge-info {
  background: rgba(125, 149, 255, 0.16);
  color: #bfcbff;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 7px;
  background: #51617f;
}

.timeline-dot.is-active {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(125, 149, 255, 0.14);
}

.timeline-dot.is-done {
  background: var(--green);
}

.timeline-dot.is-failed {
  background: var(--red);
}

.timeline-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.recent-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.recent-toolbar input {
  min-width: 220px;
  flex: 1 1 260px;
}

.recent-toolbar select {
  min-width: 150px;
}

.table-shell {
  border-radius: 24px;
  background: rgba(10, 18, 31, 0.7);
  overflow: hidden;
}

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

.table-shell-terminal {
  margin-top: 14px;
}

.recent-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.recent-table th,
.recent-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(151, 169, 214, 0.1);
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}

.recent-table th {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.02);
}

.recent-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.recent-table tbody tr:hover {
  background: transparent;
}

.recent-empty-row:hover,
.recent-empty-row:hover td {
  background: transparent !important;
}

.recent-table-terminal tbody tr:last-child td {
  border-bottom: none;
}

.table-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(151, 169, 214, 0.1);
  font-size: 0.78rem;
}

.recent-table-empty {
  height: 236px;
  text-align: center;
  color: var(--muted-strong);
  font-size: 1rem;
  font-weight: 600;
}

.empty {
  padding: 40px 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100dvh;
  padding: 16px;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(3, 8, 16, 0.8);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.modal-card {
  width: min(720px, calc(100vw - 32px));
  padding: 24px;
}

body.modal-open {
  overflow: hidden;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  min-width: 240px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(22, 34, 56, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast-success {
  border-color: rgba(45, 212, 191, 0.38);
}

.toast-error {
  border-color: rgba(255, 123, 136, 0.38);
}

.hidden-meta {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .topbar-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-grid,
  .query-stage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .public-shell {
    padding: 22px 14px 40px;
  }

  .topbar,
  .workbench-head,
  .command-dock-head,
  .command-dock-title {
    display: grid;
    gap: 14px;
  }

  .action-bar {
    width: 100%;
  }

  .workspace-pill,
  .header-status,
  .queue-inline {
    width: 100%;
    max-width: none;
  }

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

  .receipt-meta,
  .verify-detail,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-card,
  .workbench-shell,
  .command-dock,
  .panel-card,
  .modal-card {
    padding: 18px;
    border-radius: 22px;
  }

  .verify-form,
  .track-form,
  .stats-grid,
  .alert-banner,
  .topbar-ribbon {
    grid-template-columns: 1fr;
  }

  .action-bar .btn,
  .row-wrap .btn,
  .track-actions .btn {
    width: 100%;
  }

  .recovery {
    display: grid;
  }

  .recent-status-tabs {
    gap: 8px;
  }

  .recent-status-tab {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

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