:root {
  --bg: #f5f1e7;
  --bg-alt: #eef4f1;
  --shell: #103744;
  --shell-2: #18505f;
  --shell-3: #2d6a76;
  --gold: #d6b15a;
  --gold-strong: #c59a32;
  --gold-soft: #f3e2ab;
  --gold-deep: #c59a32;
  --text: #17303e;
  --muted: #617889;
  --line: rgba(20, 52, 63, 0.12);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-soft: #f3f7f6;
  --surface-tint: rgba(16, 55, 68, 0.05);
  --success: #2f7c61;
  --warn: #9e7424;
  --danger: #b14848;
  --shadow-sm: 0 12px 24px rgba(15, 43, 54, 0.08);
  --shadow: 0 22px 50px rgba(15, 43, 54, 0.12);
  --shadow-lg: 0 36px 80px rgba(15, 43, 54, 0.16);
  --radius-2xl: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(214, 177, 90, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(24, 80, 95, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3,
.brand-name,
.topbar-title,
.primary-btn,
.secondary-btn,
.ghost-btn,
.nav-item {
  font-family: "Segoe UI Variable Display", "Avenir Next", "Segoe UI", sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background:
    radial-gradient(circle at 10% 15%, rgba(214, 177, 90, 0.08), transparent 24%),
    linear-gradient(180deg, #eff4f3, #f7f3e9 55%, #eef4f1);
}

.app-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(215, 180, 91, 0.18), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(29, 84, 100, 0.2), transparent 30%),
    linear-gradient(140deg, #f9faf8, #eef3f6);
}

.login-screen.is-hidden {
  display: none;
}

.login-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 26px 70px rgba(16, 37, 49, 0.14);
}

.login-logo {
  width: 190px;
  display: block;
  margin-bottom: 22px;
}

.login-card h1 {
  margin: 8px 0 10px;
  font-size: 42px;
}

.login-copy {
  color: var(--muted);
  line-height: 1.55;
}

.login-error {
  margin-top: 14px;
  color: var(--danger);
  font-weight: 700;
}

.login-secondary-actions {
  margin-top: 12px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--shell);
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.text-btn:hover,
.text-btn:focus-visible {
  outline: none;
  color: var(--gold-strong);
}

.full-width {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
}

.compact-btn {
  min-height: 40px;
  padding: 0 14px;
}

.pending-assignment-banner {
  margin: 18px 0 4px;
  border: 1px solid rgba(197, 154, 50, 0.28);
  background: rgba(243, 226, 171, 0.28);
  color: var(--shell);
}

.signup-dialog-card {
  max-width: 580px;
}

.signup-step {
  display: grid;
  gap: 14px;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(16, 55, 68, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.user-menu-trigger:hover,
.user-menu-trigger:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(197, 154, 50, 0.34);
  box-shadow: 0 18px 32px rgba(15, 43, 54, 0.12);
  outline: none;
}

.user-menu.is-open .user-menu-trigger {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(197, 154, 50, 0.34);
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  color: #17313f;
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 auto;
}

.user-badge {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  max-width: 320px;
}

.user-badge strong {
  display: block;
}

.user-menu-caret {
  font-size: 13px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.user-menu.is-open .user-menu-caret {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 10px;
  display: grid;
  gap: 6px;
  border-radius: 24px;
  border: 1px solid rgba(16, 55, 68, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  z-index: 12;
}

.user-menu-item {
  min-height: 48px;
  width: 100%;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.user-menu-item:hover,
.user-menu-item:focus-visible,
.user-menu-item.is-active {
  outline: none;
  background: rgba(16, 55, 68, 0.06);
  border-color: rgba(16, 55, 68, 0.08);
}

.user-menu-item.is-active {
  background: rgba(214, 177, 90, 0.16);
  border-color: rgba(197, 154, 50, 0.24);
  color: var(--shell);
}

.user-menu-item-danger {
  color: var(--danger);
}

.user-menu-item-danger:hover,
.user-menu-item-danger:focus-visible {
  background: rgba(177, 72, 72, 0.08);
  border-color: rgba(177, 72, 72, 0.12);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.admin-primary-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-tab {
  border: 1px solid rgba(16, 55, 68, 0.12);
  background: #f4f7f8;
  color: var(--shell);
  text-align: center;
  padding: 12px 18px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-tab:hover,
.admin-tab:focus-visible {
  outline: none;
  background: #fff;
  border-color: rgba(16, 55, 68, 0.2);
}

.admin-tab.is-active {
  background: linear-gradient(135deg, rgba(214, 177, 90, 0.28), rgba(214, 177, 90, 0.16));
  border-color: rgba(214, 177, 90, 0.42);
  color: var(--shell);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.admin-toolbar-card,
.admin-panel,
.admin-detail-panel,
.admin-metric-card,
.admin-detail-page {
  border: 1px solid rgba(16, 55, 68, 0.12);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 43, 54, 0.08);
}

.admin-toolbar-card,
.admin-panel,
.admin-detail-panel,
.admin-detail-page {
  padding: 18px 20px;
  min-width: 0;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.admin-filter {
  display: grid;
  gap: 8px;
}

.admin-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-filter input,
.admin-filter select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(16, 55, 68, 0.14);
  border-radius: 16px;
  background: #f8fafb;
  padding: 12px 14px;
  color: var(--text);
  box-shadow: none;
}

.admin-filter select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--shell) 50%),
    linear-gradient(135deg, var(--shell) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.admin-metric-card {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-metric-card:hover,
.admin-metric-card:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(16, 55, 68, 0.22);
  box-shadow: 0 18px 42px rgba(15, 43, 54, 0.12);
}

.admin-metric-card.is-active {
  background: linear-gradient(135deg, rgba(214, 177, 90, 0.18), rgba(214, 177, 90, 0.08));
  border-color: rgba(214, 177, 90, 0.44);
}

.admin-metric-card strong {
  display: block;
  font-size: 36px;
  line-height: 1;
  color: var(--shell);
}

.admin-metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.role-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 55, 68, 0.025), rgba(255, 255, 255, 0.98));
  cursor: pointer;
}

.role-option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.role-option-title {
  color: var(--shell);
  font-weight: 800;
  line-height: 1.25;
}

.role-option-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.role-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  justify-self: end;
}

.role-option:has(input:checked) {
  border-color: rgba(214, 177, 90, 0.44);
  background: linear-gradient(135deg, rgba(214, 177, 90, 0.14), rgba(255, 255, 255, 0.98));
}

.role-option:has(input:disabled) {
  opacity: 0.68;
  cursor: not-allowed;
}

.field-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-checkbox span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-inline-stats {
  margin: 16px 0;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--shell);
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--gold-deep);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  table-layout: fixed;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.admin-row {
  cursor: pointer;
  transition: background 0.18s ease;
}

.admin-row:hover {
  background: rgba(16, 55, 68, 0.035);
}

.admin-row.is-selected {
  background: rgba(214, 177, 90, 0.14);
}

.admin-row:focus-within {
  outline: 2px solid rgba(214, 177, 90, 0.28);
  outline-offset: -2px;
}

.admin-panel .empty-state {
  padding: 12px 0 2px;
}

.admin-detail-panel {
  position: sticky;
  top: 22px;
  min-height: 280px;
  max-width: 100%;
  overflow: hidden;
  display: none;
}

.admin-detail-panel.empty-state {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.admin-detail-page {
  display: grid;
  gap: 18px;
}

.admin-detail-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 4px;
}

.admin-back-btn {
  min-height: 42px;
  padding: 0 16px;
}

.admin-detail-page-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-detail-page-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.admin-detail-page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-detail-page-sections {
  display: grid;
  gap: 18px;
}

.admin-detail-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 55, 68, 0.025), rgba(255, 255, 255, 0.98));
}

.admin-detail-section .admin-section-title {
  margin: 0;
}

.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-detail-header h3 {
  margin: 0;
}

.admin-detail-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-section-title {
  margin: 18px 0 10px;
  color: var(--shell);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-role-grid {
  display: grid;
  gap: 10px;
}

.admin-primary-action {
  min-width: 170px;
}

.admin-danger-btn {
  border-color: rgba(177, 72, 72, 0.16);
  color: var(--danger);
}

.admin-danger-btn:hover,
.admin-danger-btn:focus-visible {
  background: rgba(177, 72, 72, 0.08);
  border-color: rgba(177, 72, 72, 0.22);
}

.admin-ghost-btn {
  background: #f7f9fa;
}

.admin-toolbar .is-hidden {
  display: none;
}

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

@media (max-width: 760px) {
  .admin-toolbar {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(214, 177, 90, 0.18), transparent 26%),
    linear-gradient(180deg, #103744, #174d5c 62%, #123f4c 100%);
  color: #fff;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  width: 154px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 10px 18px rgba(7, 22, 29, 0.18));
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: radial-gradient(circle at 35% 35%, #f2d178, var(--gold-deep));
  color: #173f4d;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-cta {
  background: var(--gold);
  color: #214251;
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  font-weight: 700;
  cursor: pointer;
}

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

.nav-item {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  padding: 12px 13px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-item[disabled],
.nav-item.is-disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.nav-item[disabled]:hover,
.nav-item.is-disabled:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(214, 177, 90, 0.22), rgba(255, 255, 255, 0.1));
  color: #fff;
  border-color: rgba(214, 177, 90, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-badge {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-meta {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.app-footer {
  padding: 0 24px 24px;
  background: #fbfcfd;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-logo {
  width: 120px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.footer-brand-name {
  color: var(--shell);
  font-weight: 800;
}

.footer-brand-subtitle {
  color: var(--gold-deep);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-legal {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.main-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: 84px minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 251, 244, 0.86);
  backdrop-filter: blur(18px);
  color: var(--text);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(16, 55, 68, 0.08);
}

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

.topbar-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.header-pill,
.status-badge,
.mini-pill,
.service-stage,
.copy-btn,
.ghost-btn {
  border-radius: 999px;
}

.header-pill,
.status-badge,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.header-pill.neutral,
.status-badge.neutral,
.mini-pill.neutral {
  background: rgba(16, 55, 68, 0.08);
  color: var(--shell);
}

.status-badge.success,
.mini-pill.success {
  background: rgba(47, 124, 97, 0.12);
  color: var(--success);
}

.status-badge.error,
.mini-pill.error {
  background: rgba(177, 72, 72, 0.12);
  color: var(--danger);
}

.status-badge.warn,
.mini-pill.warn {
  background: rgba(179, 127, 33, 0.12);
  color: var(--warn);
}

.workspace {
  padding: 28px;
  overflow: auto;
  background: transparent;
  scroll-padding-top: 120px;
}

.view-panel {
  display: none;
  background: transparent;
}

.view-panel.is-active {
  display: block;
}

.home-view-panel.is-active {
  display: grid;
  gap: 18px;
}

.home-view-panel > * {
  margin: 0;
}

.recent-activity-card {
  margin-top: 0;
}

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

.panel-kicker {
  margin: 0 0 6px;
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-head h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
}

.button-row,
.sticky-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.case-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0 14px;
}

.workspace-action-trigger {
  display: inline-flex;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.copy-btn {
  border: 1px solid transparent;
  cursor: pointer;
  border-radius: 18px;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 0 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  color: #17313f;
  box-shadow: 0 14px 30px rgba(197, 154, 50, 0.22);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.84);
  color: var(--shell);
  border-color: rgba(16, 55, 68, 0.14);
  box-shadow: var(--shadow-sm);
}

.ghost-btn {
  background: rgba(16, 55, 68, 0.08);
  color: var(--shell);
  border-color: rgba(16, 55, 68, 0.08);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15, 43, 54, 0.16);
}

.secondary-btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.stack-lg {
  display: grid;
  gap: 14px;
}

.section-card,
.summary-card,
.terminal-card,
.verify-form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.section-card {
  padding: 18px;
}

.group-card {
  background: linear-gradient(180deg, rgba(16, 55, 68, 0.03), rgba(214, 177, 90, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.section-note {
  padding: 16px 18px;
  line-height: 1.6;
}

.group-card h3,
.array-item-title,
.flow-card h3 {
  margin: 0;
}

.group-card h3 {
  margin-bottom: 14px;
  font-size: 20px;
}

.group-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.legal-party-grid .party-field-address1,
.legal-party-grid .party-field-address2 {
  grid-column: 1 / -1;
}

.legal-party-grid .party-layout-spacer {
  min-height: 0;
}

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

.field span {
  font-size: 13px;
  font-weight: 700;
  color: #24424f;
}

.field-optional {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.checkbox-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(16, 55, 68, 0.08);
  border-radius: 18px;
  background: rgba(16, 55, 68, 0.03);
}

.checkbox-field-copy {
  display: grid;
  gap: 4px;
}

.checkbox-field-copy strong {
  color: var(--shell);
  font-size: 16px;
  font-weight: 700;
}

.checkbox-field-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.checkbox-field-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkbox-field-control input[type="checkbox"] {
  width: 26px;
  height: 26px;
  margin: 0;
  accent-color: var(--gold-strong);
  cursor: pointer;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(16, 55, 68, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  padding: 13px 14px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.18s ease, color 0.18s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  outline: none;
  background: rgba(16, 55, 68, 0.06);
  color: var(--shell);
}

.password-toggle-icon {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(214, 177, 90, 0.24);
  border-color: var(--gold-strong);
  box-shadow: 0 0 0 4px rgba(214, 177, 90, 0.08);
}

.array-item {
  border: 1px solid rgba(33, 79, 93, 0.1);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
}

.array-item + .array-item {
  margin-top: 12px;
}

.array-item-title {
  color: var(--shell);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.radio-group {
  display: grid;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(33, 79, 93, 0.12);
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
}

.radio-option input {
  accent-color: var(--shell);
}

.table-group-card {
  overflow: hidden;
}

.dynamic-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid rgba(33, 79, 93, 0.12);
  border-radius: 16px;
  overflow: hidden;
}

.dynamic-table th,
.dynamic-table td {
  border-bottom: 1px solid rgba(33, 79, 93, 0.08);
  border-right: 1px solid rgba(33, 79, 93, 0.08);
  padding: 10px;
  vertical-align: top;
}

.dynamic-table th:last-child,
.dynamic-table td:last-child {
  border-right: 0;
}

.dynamic-table thead th {
  background: rgba(33, 79, 93, 0.08);
  color: var(--shell);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.dynamic-table td input,
.dynamic-table td select {
  width: 100%;
  border: 1px solid #d3dbe2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
}

.dynamic-table td input:focus,
.dynamic-table td select:focus {
  outline: 2px solid rgba(215, 180, 91, 0.25);
  border-color: var(--gold);
}

.table-readonly {
  background: var(--surface-soft) !important;
  color: var(--muted);
  font-weight: 700;
}

.table-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

.table-remove-btn {
  border: 0;
  background: rgba(177, 72, 72, 0.12);
  color: var(--danger);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

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

.summary-card,
.verify-form-card {
  padding: 18px;
}

.verify-intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.info-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  background: var(--surface);
}

.info-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

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

.value-text {
  margin: 0;
  line-height: 1.5;
  word-break: break-word;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  background: rgba(16, 55, 68, 0.08);
  color: var(--shell);
  font-size: 12px;
  font-weight: 700;
  border-color: rgba(16, 55, 68, 0.08);
}

.signature-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.provider-progress-flow {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.flow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 100%;
}

.provider-progress-flow .flow-card {
  min-height: 0;
}

.accent-card {
  background: linear-gradient(180deg, rgba(33, 79, 93, 0.96), rgba(33, 79, 93, 0.9));
  color: #fff;
}

.accent-card p,
.accent-card h3 {
  color: #fff;
}

.flow-step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(215, 180, 91, 0.18);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
}

.flow-card h3 {
  font-size: 17px;
  font-weight: 700;
}

.flow-card p {
  color: var(--muted);
  line-height: 1.55;
}

.flow-content {
  margin-top: 14px;
}

.flow-card--signed .flow-content {
  display: grid;
  gap: 18px;
}

.service-stage {
  margin-top: 14px;
  display: inline-flex;
  padding: 8px 12px;
  font-weight: 700;
  border-radius: 999px;
}

.service-stage.pending {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.service-stage.active {
  background: rgba(215, 180, 91, 0.18);
  color: #fff1c8;
}

.service-stage.done {
  background: rgba(47, 124, 97, 0.18);
  color: #d8f3e8;
}

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

.sealguard-hero {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(189, 151, 57, 0.22);
  background:
    radial-gradient(circle at top right, rgba(215, 180, 91, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(29, 84, 100, 0.06), rgba(255, 255, 255, 0.96) 42%);
  box-shadow: 0 22px 40px rgba(16, 37, 49, 0.08);
}

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

.sealguard-logo {
  width: 112px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.sealguard-brand-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--shell);
}

.sealguard-brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sealguard-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.sealguard-badge {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.sealguard-badge-ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 35%, #f0d383, var(--gold-deep));
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.54),
    0 18px 30px rgba(189, 151, 57, 0.24);
}

.sealguard-check {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #3b8f70, #2f7c61);
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(47, 124, 97, 0.28);
}

.sealguard-badge-label {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sealguard-kicker {
  margin: 0 0 8px;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sealguard-copy h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  color: #173f4d;
}

.sealguard-message {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.sealguard-meta {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sealguard-meta-item {
  border: 1px solid rgba(33, 79, 93, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
}

.sealguard-meta-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.sealguard-meta-item strong {
  color: var(--text);
  line-height: 1.5;
}

.legal-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(33, 79, 93, 0.04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.result-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(16, 55, 68, 0.08);
  color: var(--shell);
  font-weight: 700;
  border: 1px solid rgba(16, 55, 68, 0.08);
}

.verify-form-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-submit-btn {
  width: fit-content;
  min-width: 210px;
  min-height: 42px;
  padding: 0 18px;
  margin-top: 4px;
}

.form-card-head {
  margin-bottom: 4px;
}

.form-card-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.form-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.bundle-artifact-card {
  display: grid;
  gap: 16px;
}

.bundle-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16, 55, 68, 0.03), rgba(214, 177, 90, 0.06));
  padding: 18px;
}

.bundle-panel h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.bundle-panel-copy {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.bundle-hero-note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(16, 55, 68, 0.94), rgba(36, 93, 108, 0.92));
  color: #fff;
}

.bundle-hero-note strong {
  font-size: 17px;
  font-weight: 700;
}

.bundle-hero-note span {
  color: rgba(255, 255, 255, 0.8);
}

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

.flow-card--signed .bundle-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bundle-overview-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 55, 68, 0.08);
  display: grid;
  gap: 8px;
  min-width: 0;
}

.bundle-overview-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bundle-overview-item strong {
  color: var(--text);
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

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

.flow-card--signed .bundle-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

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

.signing-telemetry-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.signing-telemetry-item span {
  color: var(--muted);
  font-size: 12px;
}

.signing-telemetry-item strong {
  color: var(--text);
  font-size: 13px;
}

.signing-milestones {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.signing-milestone {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.signing-milestone strong,
.signing-milestone span {
  display: block;
}

.signing-milestone span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.signing-milestone-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.signing-milestone.is-ready .signing-milestone-marker {
  background: rgba(47, 124, 97, 0.14);
  color: var(--success);
}

.signing-milestone.is-pending .signing-milestone-marker {
  background: rgba(179, 127, 33, 0.12);
  color: var(--warn);
}

.bundle-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 14px;
  flex-wrap: wrap;
}

.bundle-list-item > div:first-child {
  min-width: 0;
  flex: 1;
}

.bundle-list-item strong {
  display: block;
  margin-bottom: 3px;
}

.bundle-list-item span {
  color: var(--muted);
  font-size: 12px;
}

.bundle-link {
  color: var(--shell);
  font-weight: 700;
  text-decoration: none;
  flex: 0 0 auto;
}

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

.flow-card--signed .bundle-guidance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bundle-guidance-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 55, 68, 0.1);
  box-shadow: var(--shadow-sm);
}

.bundle-guidance-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.bundle-guidance-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.field-hint {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.readonly-lite {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
}

.readiness-card {
  display: grid;
  gap: 12px;
}

.readiness-head {
  display: grid;
  gap: 6px;
}

.readiness-head strong {
  color: var(--shell);
}

.readiness-head span {
  color: var(--muted);
  line-height: 1.5;
}

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

.readiness-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.readiness-item strong,
.readiness-item span {
  display: block;
}

.readiness-item span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.readiness-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.readiness-item.is-ready .readiness-marker {
  background: rgba(47, 124, 97, 0.14);
  color: #2f7c61;
}

.readiness-item.is-blocked .readiness-marker {
  background: rgba(177, 72, 72, 0.12);
  color: var(--danger);
}

.readiness-issues {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(177, 72, 72, 0.18);
  background: rgba(177, 72, 72, 0.05);
}

.readiness-issues strong {
  display: block;
  margin-bottom: 8px;
}

.readiness-issues ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.readiness-issues li + li {
  margin-top: 6px;
}

.readiness-summary-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.readiness-summary-pill,
.readiness-summary-blocker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.readiness-summary-pill.success {
  background: rgba(47, 124, 97, 0.12);
  color: var(--success);
}

.readiness-summary-pill.warn {
  background: rgba(177, 72, 72, 0.1);
  color: var(--danger);
}

.readiness-summary-blocker {
  background: rgba(16, 55, 68, 0.06);
  color: var(--shell);
}

.readiness-details {
  border-top: 1px solid rgba(16, 55, 68, 0.08);
  padding-top: 10px;
}

.readiness-details summary {
  cursor: pointer;
  color: var(--shell);
  font-weight: 700;
}

.verify-mode-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(179, 127, 33, 0.25);
  background: rgba(215, 180, 91, 0.08);
  color: var(--text);
  line-height: 1.6;
}

.leaf-result-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.leaf-result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 14px;
}

.leaf-result-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.leaf-result-card.is-valid {
  border-color: rgba(47, 124, 97, 0.25);
}

.leaf-result-card.is-invalid {
  border-color: rgba(177, 72, 72, 0.25);
}

.inline-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.terminal-card {
  margin-top: 18px;
  overflow: hidden;
  background: #101c22;
  border-color: #1d3742;
}

.terminal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #1d3742;
  color: #e1e7eb;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-output {
  height: 420px;
  overflow: auto;
  padding: 14px 16px 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #d9e4ea;
  white-space: pre-wrap;
}

.terminal-line {
  margin: 0 0 6px;
}

.terminal-line.info {
  color: #d9e4ea;
}

.terminal-line.warn {
  color: #f4d58b;
}

.terminal-line.error {
  color: #f4aaaa;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 220px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #173842;
  color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #1c5a47;
}

.toast.error {
  background: #7f3333;
}

.public-home {
  min-height: 100vh;
  padding: 32px 28px 40px;
  background:
    radial-gradient(circle at 12% 10%, rgba(214, 177, 90, 0.24), transparent 22%),
    radial-gradient(circle at 90% 14%, rgba(24, 80, 95, 0.18), transparent 26%),
    linear-gradient(145deg, #f8f1df, #eef5f2 42%, #f7fbfb 100%);
}

.public-home.is-hidden {
  display: none;
}

.public-verify-screen {
  padding-bottom: 56px;
}

.public-nav,
.public-hero,
.product-section,
.trust-strip {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.public-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 52px;
  gap: 18px;
}

.public-nav-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.public-nav-brand img {
  width: 260px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  box-shadow: 0 24px 40px rgba(16, 55, 68, 0.16);
}

.public-nav-brand-copy {
  display: grid;
  gap: 4px;
}

.public-nav-brand-copy span {
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.public-nav-brand-copy strong {
  color: var(--shell);
  font-size: 20px;
  line-height: 1.1;
}

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 430px);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.product-login-card,
.feature-card,
.product-section,
.trust-strip,
.product-hero-card,
.overview-card,
.case-card,
.case-header,
.workspace-section,
.case-dialog {
  border: 1px solid rgba(33, 79, 93, 0.12);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: var(--radius-2xl);
  padding: 52px;
  background:
    radial-gradient(circle at top right, rgba(214, 177, 90, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(16, 55, 68, 0.98), rgba(22, 73, 86, 0.96));
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-copy h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(50px, 7vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.hero-lede {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.8;
}

.hero-footnote {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(29, 66, 80, 0.72);
  font-size: 14px;
  line-height: 1.65;
}

.hero-metrics {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-metrics div {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 15px;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.public-verify-layout {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: start;
}

.public-verify-hero,
.public-verify-workbench {
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(33, 79, 93, 0.12);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.public-verify-hero {
  padding: 38px;
}

.public-verify-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
}

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

.public-verify-intro-grid {
  margin-top: 28px;
}

.public-verify-guardrails {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.public-verify-guardrails div {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(16, 55, 68, 0.04);
  padding: 16px 18px;
}

.public-verify-guardrails strong {
  display: block;
  margin-bottom: 4px;
}

.public-verify-guardrails span {
  color: var(--muted);
  font-size: 14px;
}

.public-verify-summary {
  min-height: 220px;
}

.public-verify-result-copy {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.7;
}

.public-verify-result.is-match {
  border-color: rgba(47, 124, 97, 0.22);
}

.public-verify-result.is-mismatch {
  border-color: rgba(177, 72, 72, 0.2);
}

.product-login-card {
  border-radius: var(--radius-2xl);
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  display: grid;
  align-content: start;
  gap: 10px;
}

.product-login-card .stack-lg {
  gap: 16px;
}

.product-login-card .primary-btn {
  width: 100%;
}

.feature-grid,
.overview-grid,
.case-grid,
.case-prepare-grid {
  display: grid;
  gap: 16px;
}

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

.product-section {
  margin-top: 28px;
  border-radius: var(--radius-2xl);
  padding: 32px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
}

.feature-card {
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(214, 177, 90, 0.16);
  color: var(--gold-strong);
  font-weight: 800;
  margin-bottom: 18px;
}

.feature-card h3,
.product-login-card h2 {
  margin-top: 0;
}

.product-login-card h2 {
  margin-bottom: 8px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.trust-strip {
  margin-top: 28px;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background:
    linear-gradient(145deg, rgba(16, 55, 68, 0.96), rgba(24, 80, 95, 0.92));
  color: #fff;
}

.trust-strip div {
  padding: 10px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-strip div:first-child {
  border-left: 0;
}

.trust-strip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-soft);
  font-size: 15px;
}

.trust-strip span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.product-hero-card {
  border-radius: var(--radius-2xl);
  padding: 32px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(214, 177, 90, 0.16), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 244, 0.92));
}

.product-hero-card h1 {
  margin: 6px 0 10px;
  font-size: 40px;
  font-weight: 700;
}

.contact-hero-card,
.introduction-hero-card {
  margin-bottom: 0;
}

.billing-plans-section,
.billing-overview-card,
.billing-manage-grid,
.billing-faq-card {
  margin-top: 0;
}

.billing-grid,
.billing-proof-grid,
.billing-manage-grid,
.contact-grid {
  display: grid;
  gap: 18px;
}

.billing-section-head,
.billing-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.billing-section-head h1,
.billing-overview-head h2 {
  margin: 6px 0 0;
}

.billing-section-copy,
.billing-overview-copy {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.billing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.billing-overview-card {
  padding: 28px 30px;
}

.billing-overview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.billing-inline-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(197, 154, 50, 0.12);
  color: var(--shell);
}

.billing-card {
  padding: 28px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100%;
}

.billing-card.is-featured {
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.98), rgba(255, 255, 255, 0.94));
  border-color: rgba(197, 154, 50, 0.28);
  transform: translateY(-6px);
}

.billing-card-starter {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.94));
}

.billing-card-pro {
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.98), rgba(255, 255, 255, 0.96));
  border-color: rgba(197, 154, 50, 0.22);
}

.billing-card-enterprise {
  background: linear-gradient(180deg, rgba(245, 248, 250, 0.98), rgba(255, 255, 255, 0.95));
  border-color: rgba(16, 55, 68, 0.14);
}

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

.billing-card-head h3,
.billing-faq-item strong,
.contact-card strong {
  margin: 0;
}

.billing-card-head p,
.billing-faq-item p,
.contact-card p {
  margin: 0;
  color: var(--muted);
}

.billing-price-block strong {
  display: block;
  font-size: 42px;
  line-height: 1;
  color: var(--shell);
}

.billing-price-block {
  padding: 18px;
  border-radius: 22px;
  background: rgba(16, 55, 68, 0.04);
}

.billing-price-block-secondary {
  background: rgba(197, 154, 50, 0.08);
}

.billing-price-block span {
  color: var(--muted);
  font-size: 13px;
}

.billing-plan-meta {
  display: grid;
  gap: 10px;
}

.billing-plan-meta div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.billing-plan-meta strong {
  color: var(--shell);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.billing-plan-meta span {
  color: var(--text);
}

.billing-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  flex: 1;
}

.billing-feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
}

.billing-feature-list li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--success);
  font-weight: 800;
}

.billing-cta-btn {
  width: 100%;
  white-space: nowrap;
  justify-content: center;
  min-height: 58px;
}

.billing-manage-grid {
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.billing-manage-card {
  padding: 26px;
  display: grid;
  gap: 14px;
}

.billing-manage-card-primary {
  background:
    radial-gradient(circle at top right, rgba(214, 177, 90, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(16, 55, 68, 0.98), rgba(22, 73, 86, 0.96));
  color: #fff;
}

.billing-manage-card-primary .panel-kicker,
.billing-manage-card-primary .billing-ops-head h2,
.billing-manage-card-primary p {
  color: #fff;
}

.billing-manage-card-primary p {
  color: rgba(255, 255, 255, 0.82);
}

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

.billing-ops-head h2 {
  margin: 0;
  font-size: 19px;
}

.billing-manage-card p {
  margin: 0;
  color: var(--muted);
}

.billing-ops-btn {
  width: 100%;
}

.billing-faq-card {
  padding: 30px;
}

.billing-faq-head {
  margin-bottom: 18px;
}

.billing-faq-list {
  display: grid;
  gap: 16px;
}

.billing-faq-item {
  padding: 20px;
  border-radius: 22px;
  background: rgba(16, 55, 68, 0.04);
}

.introduction-trust-strip {
  margin-top: 0;
}

.introduction-note-card,
.introduction-guide-section,
.introduction-step-card {
  padding: 24px;
}

.introduction-note-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--shell);
}

.introduction-note-card p,
.introduction-step-card p,
.introduction-guide-section p,
.introduction-guide-card p {
  margin: 0;
  color: var(--muted);
}

.introduction-quickstart {
  display: grid;
  gap: 18px;
}

.introduction-panel-head {
  margin-bottom: 0;
}

.introduction-step-grid,
.introduction-guide-card-grid {
  display: grid;
  gap: 18px;
}

.introduction-step-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.introduction-step-card {
  display: grid;
  gap: 12px;
}

.introduction-step-card span {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(214, 177, 90, 0.16);
  color: var(--gold-strong);
  font-weight: 800;
}

.introduction-step-card h3,
.introduction-guide-section h2,
.introduction-guide-card h3 {
  margin: 0;
}

.introduction-guide-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.introduction-guide-nav {
  position: sticky;
  top: 104px;
  padding: 22px;
}

.introduction-guide-nav h3 {
  margin: 0 0 16px;
}

.introduction-guide-nav-list,
.introduction-guide-content {
  display: grid;
  gap: 12px;
}

.introduction-guide-link {
  text-align: left;
  padding: 10px 0;
}

.introduction-guide-content {
  gap: 18px;
}

.introduction-guide-section {
  display: grid;
  gap: 16px;
}

.introduction-guide-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--text);
}

.introduction-guide-list-ordered {
  padding-left: 24px;
}

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

.introduction-guide-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(16, 55, 68, 0.04);
  border: 1px solid rgba(16, 55, 68, 0.06);
  display: grid;
  gap: 10px;
}

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

.contact-card {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.contact-card a,
.contact-card span:not(.panel-kicker) {
  font-size: 20px;
  font-weight: 700;
  color: var(--shell);
  word-break: break-word;
}

.contact-card a:hover {
  color: var(--gold-deep);
}

.overview-card {
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
}

.overview-card span,
.case-meta,
.case-card-head,
.case-header-meta,
.step {
  color: var(--muted);
  font-size: 12px;
}

.overview-card strong {
  display: block;
  margin-top: 10px;
  color: var(--shell);
  font-size: 38px;
}

.summary-card,
.verify-form-card,
.section-note,
.bundle-panel,
.info-item,
.case-card,
.overview-card {
  backdrop-filter: blur(8px);
}

.activity-list,
.case-grid {
  display: grid;
  gap: 12px;
}

.activity-list button,
.case-card {
  text-align: left;
  border-radius: 20px;
}

.activity-list button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.activity-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.case-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.case-toolbar input,
.case-toolbar select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.92);
}

.case-toolbar input {
  flex: 1;
}

.case-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.case-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.96);
}

.case-card h3 {
  margin: 14px 0 8px;
}

.case-card-head,
.case-meta,
.case-header,
.case-header-meta {
  display: flex;
  gap: 10px;
}

.case-card-head,
.case-meta {
  justify-content: space-between;
}

.case-card .primary-btn {
  margin-top: 16px;
}

.case-header {
  justify-content: space-between;
  align-items: flex-start;
  border-radius: var(--radius-2xl);
  padding: 22px 24px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.94);
}

.case-header-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.case-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
}

.case-header-meta {
  flex-direction: column;
  align-items: flex-end;
}

.case-tx-strip {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 16px;
  background: linear-gradient(145deg, rgba(16, 55, 68, 0.06), rgba(24, 80, 95, 0.02));
}

.case-tx-strip.is-available {
  border-color: rgba(47, 124, 97, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.case-tx-strip.is-pending {
  border-style: dashed;
}

.case-tx-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.case-tx-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-tx-value {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--shell);
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.case-tx-copy-btn {
  width: auto;
  min-width: 86px;
}

.case-tx-help,
.case-tx-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.workspace-stepper-shell {
  margin: 0 0 14px;
  padding: 8px 0 12px;
  position: relative;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(16, 55, 68, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.workspace-stepper-shell.is-pinned .stepper {
  position: fixed;
  z-index: 7;
}

.step {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.step span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #edf2f6;
  color: var(--shell);
  flex: 0 0 auto;
}

.step strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.step.is-complete {
  border-color: rgba(47, 124, 97, 0.22);
  background: rgba(47, 124, 97, 0.06);
  color: var(--success);
}

.step.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 180, 91, 0.16);
}

.step.is-muted {
  opacity: 0.66;
}

.workspace-section {
  border-radius: var(--radius-2xl);
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  scroll-margin-top: 120px;
  position: relative;
}

.workspace-section + .workspace-section {
  margin-top: 14px;
}

.case-prepare-grid {
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}

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

.workspace-stage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(16, 55, 68, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.workspace-stage-summary-row {
  display: grid;
  gap: 4px;
}

.workspace-stage-summary-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.workspace-stage-note {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

#templateDisplayInput[readonly] {
  background: rgba(245, 248, 250, 0.96);
  color: var(--shell);
  font-weight: 600;
}

.workspace-stage-actions {
  gap: 8px;
}

.workspace-action-hint {
  position: absolute;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(179, 127, 33, 0.22);
  background: rgba(215, 180, 91, 0.08);
  max-width: 820px;
  z-index: 8;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.workspace-action-hint-copy {
  display: grid;
  gap: 4px;
}

.workspace-action-hint-copy span {
  color: var(--shell);
  font-size: 13px;
  line-height: 1.45;
}

.workspace-compact-grid {
  display: grid;
  gap: 12px;
}

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

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

.workspace-mini-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 55, 68, 0.08);
  background: rgba(16, 55, 68, 0.03);
}

.workspace-mini-grid strong {
  font-size: 14px;
}

.workspace-mini-grid span {
  color: var(--muted);
  font-size: 12px;
}

.compact-form-card-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.signer-card {
  display: grid;
  gap: 12px;
}

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

.signer-card-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.signer-order-pill {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(215, 180, 91, 0.16);
  color: var(--gold-strong);
  font-weight: 800;
  flex: 0 0 auto;
}

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

.signer-inline-errors {
  display: grid;
  gap: 6px;
}

.signer-inline-error {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(177, 72, 72, 0.07);
  border: 1px solid rgba(177, 72, 72, 0.16);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.signer-card-actions {
  gap: 8px;
}

.dev-tools {
  border: 1px dashed rgba(179, 127, 33, 0.42);
  border-radius: 18px;
  padding: 14px;
  background: rgba(215, 180, 91, 0.06);
}

.dev-tools summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--warn);
}

.case-dialog {
  width: min(620px, calc(100% - 32px));
  border-radius: var(--radius-2xl);
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
}

.email-preview-dialog {
  width: min(980px, calc(100% - 32px));
}

.case-dialog::backdrop {
  background: rgba(12, 35, 45, 0.48);
}

.registry-table tbody tr {
  cursor: pointer;
}

.registry-table tbody tr:hover {
  background: rgba(33, 79, 93, 0.04);
}

.workspace-note {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.workspace-note-compact {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.external-link-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.external-link-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px 20px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 55, 68, 0.03);
}

.external-link-row strong,
.external-link-row span {
  display: block;
}

.external-link-row span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.external-link-row .bundle-list,
.external-link-row .workspace-note {
  grid-column: 1 / -1;
}

.external-link-row .bundle-list-item {
  background: rgba(255, 255, 255, 0.9);
}

.email-preview-card {
  padding: 18px 20px;
}

.email-preview-header {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.email-preview-header p {
  margin: 0;
}

.email-preview-body {
  margin: 0;
  min-height: 260px;
  max-height: 52vh;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(33, 79, 93, 0.12);
  background: rgba(245, 248, 250, 0.92);
  color: #183742;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.compact-wrap {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.external-link-url {
  display: block;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 55, 68, 0.04);
  color: var(--shell);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.external-verify-context .info-grid {
  margin-top: 18px;
}

.external-verify-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

@media (max-width: 1200px) {
  .public-hero,
  .public-verify-layout,
  .feature-grid,
  .overview-grid,
  .trust-strip,
  .case-prepare-grid,
  .stepper {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .signature-flow,
  .verify-intro-grid,
  .leaf-result-grid,
  .sealguard-meta,
  .fields-grid {
    grid-template-columns: 1fr;
  }

  .legal-party-grid .party-layout-spacer {
    display: none;
  }

  .legal-party-grid .party-field-name,
  .legal-party-grid .party-field-address1,
  .legal-party-grid .party-field-address2 {
    grid-column: 1 / -1;
  }

  .workspace-stage-summary,
  .workspace-mini-grid,
  .workspace-compact-grid--controls {
    grid-template-columns: 1fr;
  }

  .signing-telemetry {
    grid-template-columns: 1fr;
  }

  .bundle-overview-grid,
  .bundle-guidance-grid {
    grid-template-columns: 1fr;
  }

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

  .accent-card {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    z-index: 4;
  }

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

  .topbar {
    padding: 16px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    padding: 18px;
  }

  .public-home {
    padding: 22px 16px 28px;
  }

  .public-nav {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }

  .public-nav-brand {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .public-nav-brand img {
    width: min(280px, 100%);
  }

  .public-nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .public-verify-hero,
  .public-verify-workbench,
  .hero-copy,
  .product-login-card,
  .product-section,
  .workspace-section,
  .case-header,
  .product-hero-card {
    padding: 22px;
  }

  .hero-copy h1,
  .product-login-card h2,
  .product-hero-card h1,
  .panel-head h1,
  .case-header h1 {
    font-size: clamp(30px, 8vw, 48px);
  }

  .sealguard-body {
    grid-template-columns: 1fr;
  }

  .result-header {
    align-items: flex-start;
  }

  .case-header,
  .case-tx-value-row {
    flex-direction: column;
  }

  .case-header-meta {
    align-items: flex-start;
  }

  .compact-form-card-head,
  .signer-card-head {
    flex-direction: column;
  }

  .billing-grid,
  .billing-manage-grid,
  .contact-grid,
  .introduction-step-grid,
  .introduction-guide-card-grid,
  .introduction-guide-shell {
    grid-template-columns: 1fr;
  }

  .billing-card.is-featured {
    transform: none;
  }

  .billing-price-grid {
    grid-template-columns: 1fr;
  }

  .billing-section-head,
  .billing-overview-head,
  .billing-ops-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .introduction-guide-nav {
    position: static;
  }
}

@media (max-width: 640px) {
  .button-row,
  .sticky-actions,
  .hero-actions,
  .public-nav-actions,
  .topbar-right,
  .case-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .result-link,
  .copy-btn {
    width: 100%;
  }

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

  .user-menu,
  .user-menu-trigger,
  .user-menu-dropdown {
    width: 100%;
  }

  .user-menu-dropdown {
    right: auto;
    left: 0;
  }
}
