:root {
  color-scheme: light;
  --canvas: #edf1f7;
  --surface: #ffffff;
  --surface-muted: #f2f5f9;
  --surface-strong: #e7ecf3;
  --surface-subtle: #fafbfd;
  --ink: #111318;
  --ink-soft: #343a43;
  --ink-muted: #626b77;
  --ink-faint: #676f7b;
  --border: #d8e0e9;
  --border-strong: #c3ccd8;
  --control-border: #858f9b;
  --brand: #15181d;
  --brand-hover: #252a31;
  --accent: #4357e6;
  --accent-soft: #eef0ff;
  --success: #147a58;
  --success-soft: #e9f6f0;
  --warning: #9b6116;
  --warning-soft: #fff4df;
  --danger: #bd3949;
  --danger-soft: #fdecef;
  --info: #2969b1;
  --info-soft: #eaf2fb;
  --glass-surface: rgba(255, 255, 255, 0.78);
  --glass-surface-strong: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(255, 255, 255, 0.82);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --radius-control: 12px;
  --radius-card: 18px;
  --radius-panel: 24px;
  --shadow-card: 0 1px 2px rgba(20, 27, 39, 0.025), 0 10px 28px rgba(20, 27, 39, 0.055), 0 28px 64px rgba(53, 67, 91, 0.035);
  --shadow-card-hover: 0 2px 4px rgba(20, 27, 39, 0.035), 0 16px 36px rgba(20, 27, 39, 0.08), 0 34px 72px rgba(53, 67, 91, 0.055);
  --shadow-float: 0 28px 80px rgba(17, 22, 31, 0.18), 0 8px 24px rgba(17, 22, 31, 0.08);
  --shadow-menu: 0 18px 46px rgba(17, 22, 31, 0.13), 0 3px 10px rgba(17, 22, 31, 0.06);
  --shadow-shell: 0 20px 56px rgba(31, 42, 61, 0.1), 0 3px 12px rgba(31, 42, 61, 0.045);
  --shadow-dock: 0 18px 48px rgba(24, 32, 47, 0.16), 0 4px 14px rgba(24, 32, 47, 0.08);
  --ease-ui: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 160ms;
  --motion-page: 220ms;
  --sidebar-width: 232px;
  --header-height: 70px;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  background: var(--canvas);
  overflow-x: clip;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 14px);
  scroll-padding-bottom: 82px;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 0%, rgba(76, 94, 235, 0.14), transparent 34rem),
    radial-gradient(circle at 92% 6%, rgba(92, 168, 185, 0.1), transparent 38rem),
    radial-gradient(circle at 70% 94%, rgba(150, 125, 216, 0.07), transparent 32rem),
    linear-gradient(180deg, #f8faff 0%, var(--canvas) 44%, #edf1f6 100%);
  font-size: 14px;
  line-height: 1.5;
}

body.dialog-open {
  overflow: hidden;
}

body.operation-busy {
  cursor: progress;
}

body.operation-busy::after {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 34%;
  height: 3px;
  content: "";
  background: var(--accent);
  box-shadow: 0 1px 8px rgba(64, 84, 216, 0.35);
  animation: operation-progress 1.15s ease-in-out infinite;
}

@keyframes operation-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}

#app {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
}

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

button,
a,
select,
input[type="checkbox"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.75rem, 2.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h3 {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

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

.skip-link {
  position: fixed;
  z-index: 999;
  top: calc(10px + env(safe-area-inset-top));
  left: calc(10px + env(safe-area-inset-left));
  padding: 10px 14px;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius-control);
  transform: translateY(-150%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.deployment-indicator {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 6px;
  color: #70440d;
  background: #fff4df;
  border: 1px solid #e8c98f;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  box-shadow: 0 6px 18px rgba(112, 68, 13, 0.12);
  font-size: 10px;
  letter-spacing: 0.015em;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.deployment-indicator[hidden] {
  display: none;
}

.deployment-indicator strong {
  font-size: inherit;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 3px solid #3347c8;
  outline-offset: 2px;
}

.boot-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}

.boot-copy {
  display: grid;
  gap: 2px;
}

.boot-copy strong {
  font-size: 17px;
}

.boot-copy span {
  color: var(--ink-muted);
}

.brand-mark {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  background: #55585b;
  border: 1px solid rgba(17, 19, 24, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(17, 19, 24, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: scale(1.34);
}

.brand-mark--large {
  width: 72px;
  height: 72px;
  border-radius: 19px;
}

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

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 550;
}

/* Login */
.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.72fr);
  background: var(--surface);
}

.login-brand-panel {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  color: #f7f8f9;
  background:
    radial-gradient(circle at 75% 25%, rgba(118, 126, 139, 0.25), transparent 30%),
    radial-gradient(circle at 25% 88%, rgba(83, 104, 245, 0.18), transparent 28%),
    #111318;
}

.login-brand-panel::after {
  position: absolute;
  right: -145px;
  bottom: -150px;
  width: 560px;
  height: 420px;
  content: "";
  background: url("/assets/avenox-logo-ui.png") center / cover no-repeat;
  border-radius: 64px;
  opacity: 0.055;
  transform: rotate(-8deg);
  pointer-events: none;
}

.login-brand-panel .brand-copy small {
  color: #aeb5be;
}

.login-brand-message {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 80px 0;
}

.login-eyebrow {
  margin-bottom: 18px;
  color: #aeb6c0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-brand-message h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 620;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.login-brand-message p {
  max-width: 540px;
  margin-bottom: 0;
  color: #b9c0c8;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}

.login-proof {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-proof span {
  padding: 7px 10px;
  color: #cbd0d6;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vw, 84px);
  background:
    radial-gradient(circle at 92% 4%, rgba(67, 87, 230, 0.11), transparent 28rem),
    radial-gradient(circle at 8% 96%, rgba(132, 151, 180, 0.13), transparent 30rem),
    #f4f7fa;
}

.login-card {
  width: min(100%, 470px);
  padding: clamp(26px, 3.6vw, 38px);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  box-shadow: var(--glass-highlight), var(--shadow-float);
}

.login-card h2 {
  margin-bottom: 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.login-card > p {
  margin-bottom: 28px;
  color: var(--ink-muted);
  font-size: 15px;
}

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

.login-workspace-option {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 13px;
  transition: border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui);
}

.login-workspace-option:hover,
.login-workspace-option:focus-visible {
  color: var(--ink);
  border-color: #c7cbd4;
  box-shadow: 0 8px 22px rgba(21, 24, 30, 0.07);
}

.login-workspace-option.is-active {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink), 0 10px 24px rgba(17, 19, 24, 0.08);
}

.login-workspace-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
}

.login-workspace-option strong,
.login-workspace-option small {
  display: block;
}

.login-workspace-option strong {
  font-size: 12px;
}

.login-workspace-option small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.35;
}

.login-card > .login-role-note {
  margin-bottom: 18px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.45;
}

.auth-setup-notice {
  display: grid;
  gap: 7px;
  padding: 14px;
  color: #6b4a0a;
  background: var(--warning-soft);
  border: 1px solid #ead7ac;
  border-radius: 12px;
}

.auth-setup-notice strong {
  color: #402e0c;
  font-size: 12px;
}

.auth-setup-notice p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.auth-setup-notice code {
  overflow-wrap: anywhere;
  color: #5a430f;
  font-family: var(--font-mono);
  font-size: 9px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  background: rgba(240, 243, 247, 0.92);
  border: 1px solid rgba(156, 166, 179, 0.34);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 750;
}

.login-footnote {
  margin-top: 22px;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

.login-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 9px;
  padding-top: 20px;
  margin-top: 22px;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.login-secondary a {
  color: var(--accent);
  font-weight: 680;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.auth-provider-button {
  width: 100%;
  min-height: 46px;
  font-size: 13px;
}

.google-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #365ec9;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 10px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  content: "";
  background: var(--border);
}

.auth-help {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
  text-align: center;
}

.auth-email-summary {
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  background: var(--surface-muted);
  border-radius: 10px;
  font-size: 12px;
}

.auth-email-summary span {
  color: var(--ink-muted);
  font-size: 10px;
}

.auth-code-input {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
  text-align: center;
}

.auth-callback-card {
  display: grid;
  width: min(100%, 440px);
  justify-items: center;
  padding: 36px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-menu);
}

.auth-callback-card h1 {
  margin-top: 20px;
}

.auth-callback-card p {
  margin: 0;
  color: var(--ink-muted);
}

.application-card {
  width: min(100%, 560px);
}

.application-card .form-actions {
  margin-top: 0;
}

.application-identity-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.application-verification {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
}

.application-verification[hidden] {
  display: none;
}

.application-verification .field {
  margin: 0;
}

.application-verification .code-input {
  max-width: 190px;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}

.application-verification .button {
  justify-self: start;
}

.application-privacy {
  margin: 18px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

.application-success {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  place-items: center;
}

.application-success-card {
  width: min(100%, 520px);
  padding: 38px;
  text-align: center;
}

.application-success-card p {
  margin: 0 auto 24px;
  color: var(--ink-muted);
}

.success-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  place-items: center;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
}

/* App shell */
.app-shell {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  padding: 18px 14px;
  overflow-x: clip;
  background: transparent;
  border: 0;
  isolation: isolate;
}

.sidebar::before {
  position: absolute;
  z-index: -1;
  inset: 10px;
  content: "";
  background: rgba(250, 251, 253, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 25px;
  box-shadow: var(--glass-highlight), var(--shadow-shell);
  pointer-events: none;
}

.sidebar-brand {
  padding: 0 7px 25px;
}

.side-nav {
  display: grid;
  gap: 3px;
}

.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  color: var(--ink-muted);
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 570;
  transition: color var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui), border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui);
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.7);
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(31, 42, 61, 0.075), inset 0 1px 0 #fff;
  font-weight: 660;
}

.nav-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: currentColor;
  font-size: 14px;
  border-radius: 8px;
  transition: color var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui);
}

.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  overflow: visible;
}

.nav-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.login-workspace-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.topbar-signout .ui-icon {
  width: 9px;
  height: 9px;
}

.nav-link[aria-current="page"] .nav-icon {
  color: #fff;
  background: linear-gradient(145deg, #6271ef 0%, #4053dd 100%);
  box-shadow: 0 6px 14px rgba(67, 87, 230, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.account-menu {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  cursor: pointer;
  background: transparent;
  border-radius: 11px;
  text-align: left;
  transition: background-color 130ms ease, transform 130ms ease;
}

.account-menu:hover {
  background: var(--surface-muted);
}

.account-menu:active {
  transform: translateY(1px);
}

.account-menu-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.account-menu-copy strong,
.account-menu-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-copy strong {
  font-size: 12px;
}

.account-menu-copy span {
  color: var(--ink-muted);
  font-size: 10px;
  text-transform: capitalize;
}

.account-caret {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 650;
}

.app-main {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 40px;
  background: transparent;
  border: 0;
  isolation: isolate;
}

.topbar::before {
  position: absolute;
  z-index: -1;
  inset: 8px 24px 0;
  content: "";
  background: rgba(249, 251, 254, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: var(--glass-highlight), var(--shadow-shell);
  pointer-events: none;
}

.app-shell.is-route-loading .topbar::after {
  position: absolute;
  right: 24px;
  bottom: 0;
  left: 24px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent 0%, var(--accent) 45%, transparent 100%);
  transform: translateX(-100%);
  animation: route-progress 900ms ease-in-out infinite;
}

@keyframes route-progress {
  to { transform: translateX(100%); }
}

.topbar-title {
  min-width: 0;
}

.topbar-title strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title span {
  display: block;
  color: var(--ink-muted);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-account {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  padding: 6px;
  place-items: center;
  cursor: pointer;
  background: transparent;
  border-radius: 50%;
  transition: background-color 130ms ease, transform 130ms ease;
}

.topbar-account:hover {
  background: var(--surface-strong);
}

.topbar-account:active {
  transform: translateY(1px);
}

.topbar-signout {
  position: absolute;
  right: 1px;
  bottom: 1px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border: 2px solid var(--canvas);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
}

.mobile-brand,
.mobile-nav {
  display: none;
}

.mobile-nav-link {
  transition: color 130ms ease, background-color 130ms ease, transform 130ms ease;
}

.mobile-nav-link small {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.mobile-nav-link:active {
  transform: translateY(1px);
}

.page {
  width: 100%;
  max-width: 1600px;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  min-width: 0;
  padding: 40px 40px 80px;
  margin: 0 auto;
  opacity: 1;
  transition: opacity var(--motion-fast) var(--ease-ui);
}

.app-shell.is-route-loading .page {
  opacity: 1;
  pointer-events: none;
}

.page--entering {
  animation: page-enter var(--motion-page) var(--ease-ui) both;
}

@keyframes page-enter {
  from {
    transform: translateY(7px);
  }

  to {
    transform: translateY(0);
  }
}

#main-content,
#main-content h1,
.dialog-error,
.form-error {
  scroll-margin-top: calc(var(--header-height) + 14px);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.page-header-copy {
  min-width: 0;
}

.page-header-copy h1,
.lead-title-line {
  min-width: 0;
  overflow-wrap: anywhere;
}

.page-header-copy p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--ink-muted);
  color: #525da3;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.section-heading > div {
  min-width: 0;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.section-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.section-link:hover {
  text-decoration: underline;
}

.stack {
  display: grid;
  gap: 22px;
}

.stack--tight {
  display: grid;
  gap: 12px;
}

.space-top {
  margin-top: 16px;
}

.panel-gap {
  margin-bottom: 15px;
}

.panel-gap-lg {
  margin-bottom: 18px;
}

.section-heading--flush {
  margin: 0;
}

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

.empty-inline {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 24px;
}

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

.lead-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 360px);
  align-items: start;
  gap: 24px;
}

.lead-layout > * {
  min-width: 0;
}

.lead-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: grid;
  min-width: 0;
  gap: 16px;
}

.release-workflow {
  display: grid;
  gap: 18px;
}

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

.release-step {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.release-step.is-current {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px rgba(19, 24, 33, 0.06);
}

.release-step.is-complete {
  background: var(--success-soft);
  border-color: #cce8dc;
}

.release-step.is-locked {
  color: var(--ink-muted);
}

.release-step-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.release-step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.release-step.is-complete .release-step-number {
  color: var(--success);
  border-color: #b8ddce;
}

.release-step-heading strong,
.release-owner strong {
  display: block;
  font-size: 13px;
}

.release-step-heading p,
.release-locked p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.release-owner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.release-owner small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 11px;
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

.card {
  border-radius: var(--radius-card);
}

.panel {
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius-panel);
}

.panel--flush {
  padding: 0;
  overflow: hidden;
}

.panel-section {
  padding: 20px;
}

.panel-section + .panel-section {
  border-top: 1px solid var(--border);
}

/* Controls */
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 670;
  line-height: 1;
  transition: background-color var(--motion-fast) var(--ease-ui), border-color var(--motion-fast) var(--ease-ui), color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui);
}

.button:active:not([disabled]) {
  transform: translateY(0);
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.button--primary {
  color: #fff;
  background: linear-gradient(145deg, #2b3039 0%, #171a20 58%, #242944 100%);
  border-color: var(--brand);
  box-shadow: 0 7px 18px rgba(17, 19, 24, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button--primary:hover:not([disabled]) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: 0 10px 24px rgba(17, 19, 24, 0.21), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button--secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 4px 12px rgba(17, 19, 24, 0.045);
}

.button--secondary:hover:not([disabled]) {
  background: var(--surface-muted);
}

.button--ghost {
  color: var(--ink-muted);
  background: transparent;
}

.button--ghost:hover:not([disabled]) {
  color: var(--ink);
  background: var(--surface-muted);
}

.button--danger {
  color: var(--danger);
  background: rgba(255, 255, 255, 0.92);
  border-color: #e9bbc1;
}

.button--small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.button--full {
  width: 100%;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-muted);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 12px rgba(17, 19, 24, 0.045);
  transition: color var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui), border-color var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui);
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-muted);
  border-color: var(--border-strong);
}

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

.field label,
.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 680;
}

.input,
.select,
.textarea {
  width: 100%;
  color: var(--ink);
  background: #fcfdff;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  box-shadow: inset 0 1px 2px rgba(17, 19, 24, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.76);
  transition: border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui);
}

.input,
.select {
  min-height: 41px;
  padding: 8px 11px;
}

.select {
  cursor: pointer;
}

.textarea {
  min-height: 112px;
  padding: 10px 11px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: #69727e;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(67, 87, 230, 0.13), inset 0 1px 2px rgba(17, 19, 24, 0.025);
}

.field-help {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.field-error {
  margin: 0;
  color: #9d2637;
  font-size: 11px;
  font-weight: 650;
}

.field-error[hidden] {
  display: none;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: #c33b4f;
}

.input[aria-invalid="true"]:focus,
.select[aria-invalid="true"]:focus,
.textarea[aria-invalid="true"]:focus {
  border-color: #b72f43;
  box-shadow: 0 0 0 3px rgba(183, 47, 67, 0.12);
}

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

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

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.search-field {
  position: relative;
}

.search-field .input {
  padding-left: 36px;
}

.search-field::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  content: "⌕";
  color: var(--ink-muted);
  font-size: 17px;
  transform: translateY(-52%);
  pointer-events: none;
}

/* Status */
.status-badge,
.stage-badge,
.assignment-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.status-badge::before,
.assignment-badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status--neutral,
.assignment-badge {
  color: #616a75;
  background: #edf0f2;
}

.status--info,
.assignment-badge--assigned {
  color: var(--info);
  background: var(--info-soft);
}

.status--success {
  color: var(--success);
  background: var(--success-soft);
}

.status--warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.status--danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.stage-badge {
  color: #464f5a;
  background: #eef0f3;
  text-transform: capitalize;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.lock-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 11px;
  font-size: 12px;
}

.notice {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-radius: 11px;
  font-size: 12px;
}

.lock-banner {
  color: #7b2733;
  background: var(--danger-soft);
  border: 1px solid #f3cbd0;
}

.lock-banner--closed {
  color: #11664a;
  background: var(--success-soft);
  border-color: #cce8dc;
}

.lock-banner + .lead-layout,
.lock-banner + .queue-navigator {
  margin-top: 16px;
}

.notice--warning {
  color: #6c4812;
  background: var(--warning-soft);
  border: 1px solid #efddb8;
}

.notice--info {
  color: #24588e;
  background: var(--info-soft);
  border: 1px solid #cee0f4;
}

.notice--danger {
  color: #7b2733;
  background: var(--danger-soft);
  border: 1px solid #f3cbd0;
}

.notice strong,
.lock-banner strong {
  display: block;
  margin-bottom: 2px;
}

/* Compact, keyboard-native seller disclosures */
.sales-disclosure {
  min-width: 0;
}

.sales-disclosure > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.sales-disclosure > summary::-webkit-details-marker {
  display: none;
}

.sales-disclosure > summary::after {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  content: "⌄";
  color: var(--ink-muted);
  background: rgba(17, 19, 24, 0.045);
  border-radius: 999px;
  font-size: 15px;
  line-height: 1;
  transform: rotate(0deg);
  transition: color 130ms ease, background-color 130ms ease, transform 130ms ease;
}

.sales-disclosure[open] > summary::after {
  transform: rotate(180deg);
}

.sales-disclosure > summary:hover::after {
  color: var(--ink);
  background: rgba(17, 19, 24, 0.08);
}

.sales-disclosure > summary:focus-visible {
  outline: 3px solid rgba(78, 100, 228, 0.28);
  outline-offset: -3px;
  border-radius: 11px;
}

.sales-disclosure-heading,
.sales-disclosure > summary > span:first-child {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.sales-disclosure-heading > strong,
.sales-disclosure > summary > span:first-child > strong {
  font-size: 15px;
  line-height: 1.25;
}

.sales-disclosure-heading > small,
.sales-disclosure > summary > span:first-child > small {
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.sales-disclosure-status {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.sales-disclosure-body {
  padding: 14px 15px 16px;
  border-top: 1px solid rgba(36, 88, 142, 0.12);
}

.sales-disclosure-body > :first-child {
  margin-top: 0;
}

.sales-disclosure-body > :last-child {
  margin-bottom: 0;
}

.seller-commission-disclosure {
  color: #24588e;
  background: var(--info-soft);
  border: 1px solid #cee0f4;
  border-radius: 11px;
}

.seller-commission-disclosure > summary {
  color: #24588e;
}

.seller-commission-disclosure > summary::after {
  color: #24588e;
  background: rgba(36, 88, 142, 0.08);
}

.seller-commission-disclosure .sales-disclosure-body {
  font-size: 12px;
  line-height: 1.55;
}

.seller-lead-optional-details {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.seller-lead-optional-details[open] > summary {
  border-bottom: 0;
}

/* Dashboard */
.action-count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.action-count {
  position: relative;
  display: grid;
  min-height: 128px;
  align-content: space-between;
  padding: 17px;
  overflow: hidden;
  cursor: default;
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
  transition: border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui);
}

a.action-count {
  cursor: pointer;
}

a.action-count::after {
  position: absolute;
  top: 0;
  right: 14px;
  left: 14px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(67, 87, 230, 0.7), transparent);
  border-radius: 0 0 999px 999px;
  opacity: 0.72;
  pointer-events: none;
}

a.action-count:hover,
a.action-count:focus-visible {
  border-color: rgba(161, 171, 184, 0.48);
  box-shadow: var(--glass-highlight), var(--shadow-card-hover);
}

.action-count-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 650;
}

.action-count-value {
  margin-top: 18px;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1;
}

.action-count-foot {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 11px;
}

.money-overview {
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

.money-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.money-overview-heading h2 {
  margin: 0;
  font-size: 14px;
}

.money-overview-heading p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
}

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

.money-overview-metric {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 104px;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border-right: 1px solid var(--border);
  transition: background-color var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui);
}

.money-overview-metric:last-child {
  border-right: 0;
}

.money-overview-metric::before {
  position: absolute;
  top: 0;
  left: 18px;
  width: 28px;
  height: 2px;
  content: "";
  background: var(--ink-faint);
  border-radius: 0 0 2px 2px;
}

.money-overview-metric--collected::before,
.money-overview-metric--paid::before {
  background: var(--success);
}

.money-overview-metric--refunded::before {
  background: var(--danger);
}

.money-overview-metric--payable::before {
  background: var(--accent);
}

.money-overview-metric:hover {
  background: rgba(247, 249, 252, 0.82);
}

.money-overview-label,
.money-overview-detail {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.money-overview-label {
  font-weight: 680;
}

.money-overview-metric strong {
  overflow: hidden;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.money-overview-arrow {
  position: absolute;
  right: 15px;
  bottom: 13px;
  color: var(--ink-faint);
  font-size: 12px;
  transition: color 130ms ease, transform 130ms ease;
}

.money-overview-metric:hover .money-overview-arrow {
  color: var(--ink);
}

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

/* Salesperson onboarding */
.onboarding-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(24px, 4vw, 42px);
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(64, 84, 216, 0.08), transparent 34%),
    var(--surface);
}

.onboarding-hero-copy {
  max-width: 720px;
}

.onboarding-hero-copy h2 {
  margin-bottom: 9px;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}

.onboarding-hero-copy > p {
  max-width: 620px;
  margin-bottom: 18px;
  color: var(--ink-muted);
}

.onboarding-hero-action {
  display: grid;
  min-width: 190px;
  gap: 8px;
  text-align: center;
}

.onboarding-hero-action small {
  max-width: 300px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

.boundary-panel {
  max-width: 760px;
}

.boundary-panel > p {
  max-width: 660px;
  color: var(--ink-muted);
}

.lead-import-form {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.onboarding-hero-action span {
  color: var(--ink-faint);
  font-size: 10px;
}

.onboarding-progress-summary {
  display: grid;
  width: min(220px, 100%);
  gap: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.onboarding-progress-summary strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1;
}

.onboarding-progress-summary strong span {
  color: var(--ink-faint);
  font-size: 14px;
}

.onboarding-progress-summary small {
  color: var(--ink-muted);
  font-size: 10px;
}

.onboarding-progress-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-strong);
  border: 0;
  border-radius: 999px;
}

.onboarding-progress-track::-webkit-progress-bar {
  background: var(--surface-strong);
  border-radius: inherit;
}

.onboarding-progress-track::-webkit-progress-value {
  background: var(--accent);
  border-radius: inherit;
}

.onboarding-progress-track::-moz-progress-bar {
  background: var(--accent);
  border-radius: inherit;
}

.onboarding-progress-panel {
  margin-bottom: 18px;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.onboarding-step {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  padding: 15px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: 12px;
}

.onboarding-step.is-current {
  background: var(--warning-soft);
  border-color: #efddb8;
}

.onboarding-step.is-complete {
  background: var(--success-soft);
}

.onboarding-step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}

.onboarding-step strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.onboarding-step p {
  margin: 3px 0 10px;
  color: var(--ink-muted);
  font-size: 10px;
}

.onboarding-step .status-badge {
  grid-column: 2;
  justify-self: start;
}

.onboarding-task-panel {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 18px;
}

.onboarding-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.onboarding-task-head h2 {
  margin-bottom: 7px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.onboarding-task-head p {
  max-width: 690px;
  margin: 0;
  color: var(--ink-muted);
}

.onboarding-task-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.secure-provider-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.secure-provider-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #635bff;
  border-radius: 11px;
  font-size: 17px;
  font-weight: 800;
}

.secure-provider-card strong,
.secure-provider-card p {
  display: block;
}

.secure-provider-card p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.secure-provider-card small {
  display: block;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.onboarding-task-actions {
  display: flex;
  min-width: min(280px, 100%);
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.onboarding-task-actions .button {
  flex: 1 1 132px;
}

.onboarding-task-actions small {
  max-width: 240px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.payout-return-notice,
.payout-action-feedback,
.stripe-admin-account {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.payout-return-notice .button,
.payout-action-feedback .button,
.stripe-admin-account .button {
  justify-self: end;
}

.payout-boundary-note {
  border-style: dashed;
}

.weekly-payout-schedule p {
  margin: 0;
  line-height: 1.55;
}

.payout-checking {
  display: grid;
  min-height: 220px;
  place-content: center;
  gap: 7px;
  text-align: center;
}

.payout-checking p,
.stripe-admin-account span,
.stripe-admin-account code {
  color: var(--ink-muted);
}

.stripe-admin-account {
  margin-top: 16px;
}

.stripe-admin-account span,
.stripe-admin-account code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.stripe-admin-account code {
  width: fit-content;
  padding: 3px 6px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 5px;
}

.payout-record-content {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.payout-record-actions {
  flex-wrap: wrap;
  margin-top: 0;
}

.onboarding-confirm-form,
.agreement-sign-form,
.training-quiz {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

/* W9_WORKFLOW_APPROVAL:styles-base:begin */
.w9-form {
  display: grid;
  width: 100%;
  max-width: 940px;
  gap: 14px;
  margin-inline: auto;
}

.w9-wizard-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.w9-wizard-progress > span {
  display: grid;
  min-width: 0;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: var(--ink-muted);
  border-radius: 10px;
}

.w9-wizard-progress b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
}

.w9-wizard-progress small {
  overflow: hidden;
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w9-wizard-progress > .is-current {
  color: var(--ink);
  background: var(--accent-soft);
}

.w9-wizard-progress > .is-current b {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.w9-wizard-progress > .is-complete b {
  color: var(--success);
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 25%, var(--border));
}

.w9-wizard-panel {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2.5vw, 24px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.w9-wizard-panel[hidden] {
  display: none;
}

.w9-step-heading {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.w9-step-heading > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.w9-step-heading h4 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.w9-step-heading p,
.w9-help-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.w9-help-grid > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.w9-help-grid strong {
  font-size: 12px;
}

.w9-approved-name > span {
  display: block;
  line-height: 1.5;
}

.w9-approved-name .w9-approved-name-value {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.w9-individual-guidance {
  display: grid;
  gap: 5px;
  padding: 14px;
  color: var(--ink-soft);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.w9-individual-guidance strong {
  color: var(--ink);
  font-size: 12px;
}

.w9-individual-guidance p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

.w9-individual-guidance[hidden],
.w9-backup-hold-warning[hidden] {
  display: none;
}

.w9-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.w9-wizard-actions > span {
  margin-right: auto;
  color: var(--ink-muted);
  font-size: 12px;
}

.w9-form-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  color: #fff;
  background: #171b22;
  border-radius: 14px;
}

.w9-form-kicker {
  display: block;
  margin-bottom: 7px;
  color: #c9ced8;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.w9-form-intro h3 {
  max-width: 620px;
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(1.15rem, 2.3vw, 1.7rem);
  line-height: 1.12;
}

.w9-form-intro p {
  margin: 0;
  color: #c9ced8;
  font-size: 12px;
}

.w9-reference-links {
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  justify-items: end;
}

.w9-reference-links a {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.w9-section,
.w9-certification {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: clamp(18px, 3vw, 25px);
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.w9-section > legend {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.w9-section > legend > span {
  display: inline-grid;
  min-width: 34px;
  min-height: 24px;
  padding: 4px 7px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
}

.w9-section-help {
  margin: -4px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.w9-inline-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.w9-stacked-choices {
  display: grid;
  gap: 8px;
}

.w9-choice {
  display: grid;
  min-height: 46px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.w9-choice:hover {
  border-color: var(--border-strong);
}

.w9-choice:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(83, 104, 245, 0.12);
}

.w9-choice:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.w9-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.w9-conditional[hidden] {
  display: none;
}

.w9-conditional {
  padding: 14px;
  background: var(--surface-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
}

.w9-form-grid {
  align-items: start;
}

.w9-address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr);
  align-items: start;
  gap: 12px;
}

.w9-requester {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border-radius: 9px;
  font-size: 12px;
}

.w9-requester strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.w9-tin-input,
.w9-signature-input {
  font-variant-numeric: tabular-nums;
}

.w9-tin-input {
  max-width: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.w9-backup-note {
  min-height: 18px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 650;
}

.w9-entry-review {
  display: grid;
  gap: 12px;
  padding: clamp(16px, 2.5vw, 22px);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.w9-entry-review .section-heading {
  margin-bottom: 0;
}

.w9-entry-review .section-heading h4,
.w9-entry-review .section-heading p {
  margin: 0;
}

.w9-review-edit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.w9-entry-review .section-heading p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.w9-entry-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.w9-entry-review-grid > div {
  min-width: 0;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.w9-entry-review-grid dt {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.w9-entry-review-grid dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 670;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.w9-certification {
  padding: clamp(20px, 3vw, 28px);
  color: #1c2129;
  background: #fcfcfa;
  border-color: #aeb4bd;
  box-shadow: inset 0 0 0 4px #f2f2ef;
}

.w9-certification-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 2px solid #252931;
}

.w9-certification-head > span {
  align-self: start;
  padding: 5px 8px;
  color: #fff;
  background: #1c2129;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.w9-certification-head h4,
.w9-certification-head p {
  margin: 0;
}

.w9-certification-head h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.w9-certification-head p {
  margin-top: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.w9-certification ol {
  display: grid;
  gap: 9px;
  padding-left: 24px;
  margin: 0;
}

.w9-certification li {
  padding-left: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.55;
}

.w9-certification li.is-crossed-out span {
  color: #7e4149;
  text-decoration: line-through 2px;
}

.w9-certification-instructions,
.w9-us-person-definition {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.w9-signature-block {
  display: grid;
  gap: 13px;
  padding-top: 18px;
  border-top: 2px solid #252931;
}

.w9-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.w9-submit-row > span {
  color: var(--ink-muted);
  font-size: 12px;
}

.w9-summary-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.w9-summary-card .section-heading {
  margin-bottom: 0;
}

.w9-summary-card h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.w9-summary-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.w9-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.w9-summary-card .w9-protected-note {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  line-height: 1.5;
}

.w9-sensitive-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.w9-sensitive-action strong {
  display: block;
  font-size: 12px;
}

.w9-record-content {
  display: grid;
  gap: 14px;
  padding: 0 12px 12px;
}

.w9-correction-disclosure {
  border: 1px solid var(--border);
  border-radius: 11px;
}

.w9-correction-disclosure > summary {
  padding: 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.w9-correction-disclosure > .w9-form {
  padding: 0 12px 12px;
}

.w9-form .field-help,
.w9-form .field-error {
  font-size: 12px;
  line-height: 1.5;
}
/* W9_WORKFLOW_APPROVAL:styles-base:end */

.attestation-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.attestation-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 12px;
}

.attestation-list li::before {
  position: absolute;
  left: 2px;
  content: "✓";
  color: var(--success);
  font-weight: 800;
}

.onboarding-receipt {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 15px;
  color: #0d5b42;
  background: var(--success-soft);
  border: 1px solid #cce8db;
  border-radius: 12px;
}

.onboarding-receipt > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  font-weight: 800;
}

.onboarding-receipt p,
.onboarding-receipt time {
  display: block;
  margin: 3px 0 0;
  color: #39715e;
  font-size: 10px;
}

.agreement-document {
  max-height: 520px;
  padding: clamp(20px, 3vw, 34px);
  overflow-y: auto;
  color: #20242a;
  background: #fcfcfb;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: inset 0 0 0 5px #f5f5f3;
  scroll-padding-top: 20px;
}

.agreement-document header {
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 2px solid #252931;
}

.agreement-document header > span {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.agreement-document h3 {
  margin: 7px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.agreement-document header small {
  color: var(--ink-muted);
}

.agreement-document section + section {
  margin-top: 22px;
}

.agreement-document h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.agreement-document p {
  margin: 0 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.7;
}

.agreement-transcript {
  margin: 0;
  overflow: visible;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.legal-document-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.legal-document-card {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 24px);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(18, 22, 30, 0.05);
}

.legal-document-card.is-signed {
  border-color: #bddfce;
  box-shadow: 0 12px 30px rgba(21, 117, 84, 0.06);
}

.legal-document-card.is-locked {
  background: var(--surface-muted);
}

.legal-document-head,
.legal-document-actions,
.admin-legal-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.legal-document-head {
  align-items: flex-start;
}

.legal-document-head h3 {
  margin: 5px 0 3px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.legal-document-head p,
.admin-legal-record span,
.admin-legal-record small {
  display: block;
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
}

.legal-document-sequence {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-document-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.legal-document-review {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.legal-document-review summary {
  padding: 13px 15px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 720;
}

.legal-document-review .agreement-document {
  max-height: 470px;
  margin: 0 12px 12px;
}

.legal-document-card .agreement-sign-form {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.legal-signature-boundary {
  margin-top: 14px;
}

.legal-record-boundary {
  padding: 0 14px 14px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.legal-document-card > .legal-record-boundary {
  padding: 0;
}

.legal-document-list--correction {
  padding: 0 12px 12px;
}

.admin-legal-records {
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.admin-legal-records .section-heading {
  margin-bottom: 0;
}

.admin-legal-records .section-heading h3 {
  margin: 0 0 3px;
}

.legal-document-list--admin {
  gap: 9px;
  margin-top: 14px;
}

.admin-legal-record {
  flex-wrap: wrap;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.admin-legal-record > .agreement-sign-form,
.admin-legal-record > .notice {
  width: 100%;
  flex: 1 0 100%;
}

.admin-legal-record > .agreement-sign-form {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-legal-record.is-signed {
  border-color: #cce8db;
}

.admin-legal-record strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.admin-legal-record small {
  margin-top: 3px;
  font-size: 9px;
}

.agreement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -10px;
}

.agreement-toolbar span {
  color: var(--ink-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.electronic-consent {
  padding: 14px;
  color: var(--ink-soft);
  background: var(--info-soft);
  border: 1px solid #ccdef0;
  border-radius: 11px;
}

.electronic-consent p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.55;
}

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

.training-lessons article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.training-lessons article > span,
.training-question legend > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 750;
}

.training-lessons p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
}

.training-question {
  padding: 16px;
  margin: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.training-question legend {
  display: grid;
  width: 100%;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.training-question > div {
  display: grid;
  gap: 7px;
}

.training-question label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  transition: background-color var(--motion-fast) var(--ease-ui), border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui);
}

.training-question label:hover {
  border-color: var(--border-strong);
}

.training-question label:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 87, 230, 0.12);
}

.training-question label:has(input:checked) {
  background: var(--accent-soft);
  border-color: #cdd3ff;
}

.training-question input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.onboarding-submit-panel {
  justify-items: center;
  padding-block: clamp(34px, 6vw, 64px);
  text-align: center;
}

.success-mark--neutral {
  color: var(--accent);
  background: var(--accent-soft);
}

.onboarding-submit-panel > p {
  max-width: 620px;
  margin: -12px 0 4px;
  color: var(--ink-muted);
}

.onboarding-package-summary {
  display: grid;
  width: min(100%, 760px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.onboarding-package-summary > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 13px 9px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.onboarding-package-summary > div > span {
  color: var(--success);
  font-weight: 800;
}

.onboarding-package-summary strong {
  font-size: 10px;
}

.onboarding-package-summary small {
  color: var(--ink-faint);
  font-size: 8px;
}

.privacy-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.privacy-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 12px;
}

.privacy-list li::before {
  position: absolute;
  left: 1px;
  content: "✓";
  color: var(--success);
  font-weight: 800;
}

.confirmation-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 13px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease-ui), border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui);
}

.confirmation-check:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(67, 87, 230, 0.12);
}

.confirmation-check:has(input:checked) {
  background: var(--accent-soft);
  border-color: #cdd3ff;
}

.confirmation-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.confirmation-check strong,
.confirmation-check small {
  display: block;
}

.confirmation-check small {
  margin-top: 2px;
  color: var(--ink-muted);
  line-height: 1.45;
}

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

.admin-review-gate {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 11px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f3ccd2;
  border-radius: 10px;
}

.admin-review-gate.is-complete {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cce8db;
}

.admin-review-gate > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  font-weight: 800;
}

.admin-review-gate strong,
.admin-review-gate small {
  display: block;
}

.admin-review-gate strong {
  color: var(--ink);
  font-size: 11px;
}

.admin-review-gate small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 9px;
}

.agreement-review-disclosure {
  border: 1px solid var(--border);
  border-radius: 11px;
}

.agreement-review-disclosure summary {
  padding: 13px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.agreement-review-disclosure .agreement-document {
  max-height: 340px;
  margin: 0 12px 12px;
}

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

.onboarding-record-list .training-lessons {
  padding: 0 12px 12px;
}

.onboarding-record-list .onboarding-receipt {
  margin: 0 12px 12px;
}

.onboarding-record-list .form-actions {
  padding: 0 12px 12px;
  margin-top: 0;
}

.signature-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 0 14px 14px;
  color: var(--ink-muted);
  font-size: 9px;
}

.signature-evidence strong {
  color: var(--ink);
}

.team-onboarding-actions {
  flex-wrap: wrap;
}

.offboarding-panel--complete {
  border-color: #edc6cb;
}

.offboarding-record-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.offboarding-reason {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  margin-top: 17px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.offboarding-reason span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.offboarding-reason p,
.offboarding-danger-zone p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
}

.offboarding-effect-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 17px;
}

.offboarding-effect {
  display: grid;
  min-width: 0;
  min-height: 90px;
  align-content: space-between;
  gap: 10px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.offboarding-effect span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 650;
}

.offboarding-effect strong {
  font-size: 24px;
  line-height: 1;
}

.offboarding-retention-note {
  margin-top: 17px;
}

.offboarding-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 17px;
  margin-top: 17px;
  border-top: 1px solid var(--border);
}

.offboarding-danger-zone > div {
  min-width: 0;
}

.offboarding-danger-zone > div > strong {
  display: block;
  margin-bottom: 3px;
}

.offboarding-danger-zone p {
  max-width: 720px;
  font-size: 12px;
}

.offboarding-danger-zone .button {
  flex: 0 0 auto;
}

.offboarding-impact-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.offboarding-impact-list li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.offboarding-impact-list strong {
  color: var(--ink);
}

.offboarding-impact-list span {
  color: var(--ink-muted);
}

.onboarding-admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.attention-list,
.compact-list,
.timeline,
.evidence-list,
.script-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.attention-item,
.compact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 69px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.attention-item:last-child,
.compact-item:last-child {
  border-bottom: 0;
}

.attention-item:hover {
  background: #fafbfb;
}

.item-main {
  min-width: 0;
}

.item-title {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 11px;
}

/* Billing */
.billing-setup-notice,
.billing-settlement-warning {
  margin-bottom: 16px;
}

.billing-counts {
  margin-bottom: 16px;
}

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

.billing-section > .empty-inline {
  padding: 26px 20px;
  margin: 0;
  border-top: 1px solid var(--border);
}

.billing-tabs .tab {
  gap: 7px;
}

.billing-tabs .tab strong {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  place-items: center;
  background: rgba(17, 19, 24, 0.07);
  border-radius: 999px;
  font-size: 9px;
}

.billing-list {
  display: grid;
  border-top: 1px solid var(--border);
}

.seller-invoices-disclosure > summary,
.seller-ledger-disclosure > summary,
.seller-deal-history .sales-disclosure > summary {
  padding: 17px 20px;
}

.seller-invoices-disclosure[open] > summary,
.seller-ledger-disclosure[open] > summary,
.seller-deal-history .sales-disclosure[open] > summary {
  border-bottom: 1px solid var(--border);
}

.seller-invoices-disclosure .sales-disclosure-content > .billing-list,
.seller-ledger-disclosure .sales-disclosure-content > .billing-list {
  border-top: 0;
}

.seller-ledger-disclosure .sales-disclosure-content > .empty-inline {
  padding: 26px 20px;
  margin: 0;
}

.seller-invoices-disclosure .invoice-commission-boundary {
  border-top: 1px solid var(--border);
}

.seller-deal-history .compact-list {
  border-top: 0;
}

@media (max-width: 640px) {
  .sales-disclosure > summary {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .sales-disclosure > summary::after {
    order: 2;
    margin-left: auto;
  }

  .sales-disclosure-status {
    width: 100%;
    order: 3;
    justify-content: flex-start;
    margin-left: 0;
  }

  .seller-invoices-disclosure > summary,
  .seller-ledger-disclosure > summary,
  .seller-deal-history .sales-disclosure > summary {
    padding: 15px 16px;
  }
}

.billing-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(172px, auto);
  align-items: center;
  gap: 24px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.billing-row:last-child {
  border-bottom: 0;
}

.billing-row-main {
  display: grid;
  min-width: 0;
  gap: 15px;
}

.billing-row-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.billing-row-heading > div {
  min-width: 0;
}

.billing-row-heading h3 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.billing-row-heading p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.billing-kicker {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 730;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
}

.billing-candidate-row .billing-summary-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.billing-summary-grid--commission {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.pay-run-review-section {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.pay-run-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pay-run-review-heading > div {
  min-width: 0;
}

.pay-run-review-heading h3 {
  margin: 0;
  font-size: 13px;
}

.pay-run-review-heading p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.pay-run-review-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.pay-run-review-item,
.pay-run-decision-record {
  align-items: start;
}

.pay-run-record-ref {
  display: block;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.pay-run-decision-reason {
  padding: 9px 10px;
  margin-top: 9px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.pay-run-decision-reason span {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pay-run-decision-reason p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pay-run-decision-attestations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.pay-run-decision-attestations .status-badge {
  max-width: 100%;
  white-space: normal;
}

.pay-run-payment-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.pay-run-payment-steps > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-content: start;
  gap: 3px 9px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.pay-run-payment-steps > div > span {
  display: grid;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.pay-run-payment-steps strong {
  font-size: 11px;
}

.pay-run-payment-steps p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.pay-run-confirmation-list {
  display: grid;
  gap: 10px;
}

.pay-run-confirmation-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(110px, 0.55fr) minmax(170px, 1fr);
  align-items: end;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}

.dialog:has(.pay-run-confirmation-row) {
  width: min(94vw, 760px);
}

.pay-run-confirmation-person strong,
.pay-run-confirmation-person span,
.pay-run-confirmation-person small,
.pay-run-confirmation-row label > span {
  display: block;
}

.pay-run-confirmation-person strong {
  font-size: 11px;
}

.pay-run-confirmation-person span,
.pay-run-confirmation-person small,
.pay-run-confirmation-row label > span {
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 9px;
}

.pay-run-confirmation-person .pay-run-destination-hint {
  padding: 6px 8px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-weight: 680;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pay-run-destination-hint > span {
  margin-bottom: 2px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pay-run-confirmation-row .input[readonly] {
  color: var(--ink);
  background: var(--surface-muted);
  font-weight: 760;
}

.dialog:has(.pay-run-exact-destinations) {
  width: min(94vw, 820px);
}

.pay-run-exact-destination-list {
  display: grid;
  gap: 12px;
}

.pay-run-exact-destination {
  display: grid;
  gap: 13px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
}

.pay-run-exact-account {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.pay-run-exact-account > span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 720;
}

.pay-run-exact-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pay-run-exact-account code {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 720;
}

.pay-run-exact-destination-warning {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.pay-run-paid-receipt {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f7fcf9;
  border: 1px solid #bddfce;
  border-radius: 13px;
}

.pay-run-paid-receipt.needs-reconciliation {
  background: #fffaf0;
  border-color: #ead39b;
}

.pay-run-paid-receipt.is-legacy {
  background: #fffaf0;
  border-color: #ead39b;
}

.pay-run-paid-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pay-run-payment-receipts {
  overflow: hidden;
  background: #fff;
  border: 1px solid #cce8db;
  border-radius: 11px;
}

.pay-run-recheck-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.pay-run-provider-reference {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 5px 7px;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border-radius: 6px;
  font-size: 9px;
}

.seller-pay-run-item.is-paid {
  border-color: #cce8db;
  background: #fbfefc;
}

.seller-pay-run-item.needs-reconciliation {
  border-color: #ead39b;
  background: #fffaf0;
}

.billing-fact {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 3px;
  padding: 11px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.billing-fact span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 680;
}

.billing-fact strong,
.billing-fact small {
  overflow-wrap: anywhere;
}

.billing-fact strong {
  font-size: 11px;
}

.billing-fact small {
  color: var(--ink-muted);
  font-size: 9px;
}

.billing-scope {
  padding: 12px 14px;
  background: #fafbfb;
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
}

.billing-scope span {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.billing-scope p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.billing-blockers ul {
  padding-left: 18px;
  margin: 6px 0 0;
}

.billing-row-actions {
  display: flex;
  max-width: 270px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.billing-action-note {
  max-width: 190px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

.invoice-commission-boundary {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
}

.invoice-commission-boundary strong {
  display: block;
  font-size: 11px;
}

.invoice-commission-boundary p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.invoice-review-dialog,
.invoice-detail-dialog {
  gap: 16px;
}

.invoice-review-total {
  padding: 18px;
  color: #fff;
  background: #171b22;
  border-radius: 13px;
}

.invoice-review-total > span {
  display: block;
  color: #c9ced8;
  font-size: 9px;
  font-weight: 730;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-review-total > strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-variant-numeric: tabular-nums;
}

.invoice-review-total > strong small {
  color: #c9ced8;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.invoice-review-total p {
  margin: 5px 0 0;
  color: #c9ced8;
  font-size: 10px;
}

.invoice-confirmations {
  display: grid;
  gap: 8px;
}

.metric-list {
  display: grid;
  gap: 11px;
}

.metric-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(92px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 12px;
}

.metric-row span {
  color: var(--ink-muted);
  font-size: 12px;
}

.metric-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-align: right;
}

.person-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.person-row + .person-row {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.person-copy {
  display: grid;
  min-width: 0;
}

.person-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-copy span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-count {
  text-align: right;
}

.person-count strong {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.person-count span {
  color: var(--ink-muted);
  font-size: 9px;
  text-transform: uppercase;
}

/* Discovery jobs */
.discovery-search {
  margin-bottom: 16px;
}

.discovery-search-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(150px, 0.42fr);
  align-items: start;
  gap: 12px;
}

.discovery-search .form-error {
  margin-top: 14px;
}

.discovery-current {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.discovery-job-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.discovery-job-heading {
  min-width: 0;
}

.discovery-job-heading h2 {
  margin: 10px 0 3px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.discovery-job-heading > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.discovery-job-time {
  color: var(--ink-muted);
  font-size: 10px;
}

.discovery-job-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.discovery-progress-block {
  display: grid;
  gap: 12px;
}

.discovery-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

.discovery-progress-copy span {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.discovery-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  background: var(--surface-strong);
  border: 0;
  border-radius: 999px;
}

.discovery-progress::-webkit-progress-bar {
  background: var(--surface-strong);
  border-radius: 999px;
}

.discovery-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

.discovery-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

.discovery-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: #fafbfb;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.discovery-count {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
}

.discovery-count + .discovery-count {
  border-left: 1px solid var(--border);
}

.discovery-count span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-count strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.discovery-result-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.discovery-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.discovery-result:last-child {
  border-bottom: 0;
}

.discovery-result-status {
  margin-top: 9px;
}

.discovery-result-note {
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.discovery-results-empty {
  padding: 18px 0 4px;
}

.discovery-poll-notice {
  margin: 0;
}

.discovery-recent-list {
  border-top: 1px solid var(--border);
}

.discovery-recent-row .table-actions {
  flex-wrap: wrap;
}

.discovery-empty {
  display: flex;
  min-height: 142px;
  align-items: center;
  gap: 15px;
}

.discovery-empty-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border-radius: 13px;
  font-size: 19px;
}

.discovery-empty h2 {
  margin-bottom: 4px;
}

.discovery-empty p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

/* Tabs, filters and tables */
.tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: rgba(226, 232, 240, 0.66);
  border: 1px solid rgba(177, 188, 202, 0.26);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px rgba(17, 19, 24, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  scrollbar-color: #b7bdc6 transparent;
  scrollbar-width: thin;
}

.tabs--workspace {
  margin-bottom: 0;
}

.tabs--workspace .tab {
  flex: 1 1 0;
}

.seller-lead-tabs .tab {
  flex: 1 1 0;
}

.approval-tabs .tab {
  gap: 8px;
}

.approval-tabs .tab strong {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  place-items: center;
  background: rgba(17, 19, 24, 0.07);
  border-radius: 999px;
  font-size: 10px;
}

.approval-row {
  align-items: flex-start;
}

.approval-note {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.approval-note--clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.application-answer {
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.application-answer > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.application-answer p {
  margin: 0;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
  background: #b7bdc6;
  border-radius: 999px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.panel--flush > .pagination {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}

.pagination > div {
  display: flex;
  gap: 8px;
}

.pagination [aria-disabled="true"] {
  cursor: default;
  opacity: 0.45;
}

.tab {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  color: var(--ink-muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition: color var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), transform var(--motion-fast) var(--ease-ui);
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(172, 182, 197, 0.28), inset 0 1px 0 #fff, 0 5px 14px rgba(17, 19, 24, 0.075);
}

.filter-panel {
  padding: 15px;
  margin-bottom: 15px;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(140px, 0.72fr)) auto;
  align-items: end;
  gap: 10px;
}

.filter-grid--search {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.filter-grid--team {
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.45fr) auto;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 13px;
  color: var(--ink-muted);
  font-size: 11px;
}

.data-table-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.32);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

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

.data-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  table-layout: auto;
}

.data-table th {
  padding: 11px 14px;
  color: var(--ink-muted);
  background: #f5f8fc;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: #f5f7ff;
}

.table-primary {
  display: grid;
  min-width: 190px;
}

.table-primary a,
.table-primary strong {
  overflow: hidden;
  max-width: 320px;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-primary a:hover {
  color: var(--accent);
}

.table-primary a {
  color: #3348cc;
  text-decoration: underline;
  text-decoration-color: rgba(51, 72, 204, 0.34);
  text-underline-offset: 2px;
}

.table-primary span {
  overflow: hidden;
  max-width: 320px;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.mobile-card-list {
  display: none;
}

.lead-mobile-card {
  padding: 15px;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

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

.lead-mobile-head > .person-row {
  min-width: 0;
  flex: 1;
}

.lead-mobile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 13px 0;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mini-value {
  display: grid;
}

.mini-value span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.mini-value strong {
  margin-top: 2px;
  font-size: 11px;
}

.lead-mobile-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.queue-navigator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

.queue-navigator > div:first-child {
  display: grid;
}

.queue-navigator span:first-child {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.queue-navigator strong {
  font-size: 13px;
}

.queue-navigator-actions {
  display: flex;
  gap: 8px;
}

.queue-navigator [aria-disabled="true"] {
  cursor: default;
  opacity: 0.45;
}

/* Lead workspace */
.lead-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 13px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 630;
}

.back-link:hover {
  color: var(--ink);
}

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

.info-item {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.info-item span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.info-item strong,
.info-item a {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 580;
}

.info-item a:hover {
  color: var(--accent);
}

.info-item a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 10px;
}

.sales-ai-seller,
.sales-ai-conversation-kit {
  border-color: color-mix(in srgb, var(--accent, #2f6f64) 32%, var(--border));
}

.sales-ai-seller {
  display: grid;
  gap: 0.85rem;
}

.sales-ai-callout {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--surface-subtle, #f7f8f7);
}

.sales-ai-callout > span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sales-ai-callout p,
.sales-ai-script-boundary p {
  margin: 0;
  white-space: pre-line;
}

.sales-ai-conversation-kit .script-card-editor {
  white-space: pre-wrap;
}

.sales-ai-script-boundary {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--warning, #a76b10);
  background: var(--surface-subtle, #f7f8f7);
}

.info-grid + .signal-grid,
.evidence-list + .signal-grid {
  margin-top: 22px;
}

.signal-card {
  padding: 14px;
  background: #fafbfb;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.signal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 660;
}

.signal-card strong {
  display: block;
  margin: 8px 0 9px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.signal-track {
  height: 5px;
  overflow: hidden;
  background: #e7e9ec;
  border-radius: 999px;
}

.signal-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.signal-fill--0 { width: 0; }
.signal-fill--10 { width: 10%; }
.signal-fill--20 { width: 20%; }
.signal-fill--30 { width: 30%; }
.signal-fill--40 { width: 40%; }
.signal-fill--50 { width: 50%; }
.signal-fill--60 { width: 60%; }
.signal-fill--70 { width: 70%; }
.signal-fill--80 { width: 80%; }
.signal-fill--90 { width: 90%; }
.signal-fill--100 { width: 100%; }

.evidence-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.evidence-item:last-child {
  border-bottom: 0;
}

.evidence-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.evidence-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.evidence-copy p {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.evidence-measurement {
  display: grid;
  width: fit-content;
  max-width: 100%;
  grid-template-columns: minmax(0, auto) auto;
  align-items: baseline;
  gap: 3px 12px;
  padding: 10px 12px;
  margin: 8px 0 10px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-radius: 10px;
}

.evidence-measurement > span,
.evidence-measurement > small,
.evidence-measurement > em {
  color: var(--ink-muted);
  font-size: 9px;
  font-style: normal;
}

.evidence-measurement > b {
  font-size: 15px;
}

.evidence-measurement > small,
.evidence-measurement > em {
  grid-column: 1 / -1;
}

.evidence-explanation {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
}

.evidence-explanation > div {
  display: grid;
  grid-template-columns: minmax(105px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.evidence-explanation dt {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.evidence-explanation dd {
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.verified-opener-note {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(83, 104, 245, 0.1), rgba(92, 208, 178, 0.1));
  border: 1px solid rgba(83, 104, 245, 0.18);
  border-radius: 11px;
}

.verified-opener-note > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--accent);
  background: #fff;
  border-radius: 50%;
}

.verified-opener-note strong,
.verified-opener-note p,
.verified-opener-note small {
  display: block;
}

.verified-opener-note p {
  margin: 3px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.verified-opener-note small {
  color: var(--ink-muted);
  font-size: 9px;
}

.peer-benchmark {
  display: grid;
  gap: 14px;
}

.peer-benchmark--compact {
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 13px;
}

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

.peer-metric {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-strong);
  border-radius: 10px;
}

.peer-metric--better { border-top-color: var(--success); }
.peer-metric--worse { border-top-color: var(--warning); }
.peer-metric--about_the_same { border-top-color: var(--accent); }

.peer-metric > span,
.peer-metric > small {
  color: var(--ink-muted);
  font-size: 9px;
}

.peer-metric > strong {
  margin-top: 3px;
  font-size: 17px;
}

.peer-metric p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.peer-benchmark-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 10px;
}

.check-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fafbfb;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
}

.check-item > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.check-item strong {
  font-size: 12px;
  font-weight: 620;
  line-height: 1.35;
}

.check-item small {
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.check-state {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
}

.check-state--pass {
  color: var(--success);
  background: var(--success-soft);
}

.check-state--fail {
  color: var(--danger);
  background: var(--danger-soft);
}

.check-state--unknown {
  color: var(--ink-muted);
  background: var(--surface-strong);
}

.readiness-summary {
  display: grid;
  gap: 14px;
}

.readiness-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--success-soft);
  border: 1px solid #cce8dc;
  border-radius: 12px;
}

.readiness-result > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--success);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  font-weight: 800;
}

.readiness-result strong {
  display: block;
  font-size: 13px;
}

.readiness-result p {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.readiness-result--fail {
  background: var(--danger-soft);
  border-color: #f1cbd0;
}

.readiness-result--fail > span {
  color: var(--danger);
}

.readiness-result--unknown {
  background: var(--surface-muted);
  border-color: var(--border);
}

.readiness-result--unknown > span {
  color: var(--ink-muted);
}

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

.readiness-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}

.readiness-action > div {
  min-width: 0;
}

.readiness-action strong {
  display: block;
  font-size: 13px;
}

.readiness-action p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.readiness-action .button {
  flex: 0 0 auto;
}

.customer-review-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(22px, 5vw, 64px) clamp(16px, 4vw, 40px);
  background:
    radial-gradient(circle at 14% 0%, rgba(67, 87, 230, 0.13), transparent 30rem),
    radial-gradient(circle at 92% 12%, rgba(20, 122, 88, 0.09), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #edf1f5 100%);
}

.customer-review-shell {
  display: grid;
  width: min(100%, 980px);
  margin: 0 auto;
  gap: 20px;
}

.customer-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px 8px;
}

.customer-review-header .brand-lockup,
.customer-review-message .brand-lockup,
.customer-review-loading .brand-lockup {
  width: max-content;
}

.customer-review-hero {
  max-width: 720px;
  padding: clamp(18px, 3vw, 32px) 2px 4px;
}

.customer-review-hero h1,
.customer-review-message h1,
.customer-review-loading h1 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.customer-review-hero p,
.customer-review-message > p,
.customer-review-loading > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.customer-record,
.customer-review-agreement,
.customer-response-panel {
  padding: clamp(20px, 4vw, 34px);
}

.customer-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.customer-record-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.customer-record-heading > strong {
  color: var(--ink);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.customer-record-heading > strong small {
  color: var(--ink-muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.customer-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.customer-record-fact {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 15px 16px;
  background: var(--surface-subtle);
}

.customer-record-fact span,
.customer-record-scope > span,
.customer-deliverables > span,
.customer-quote-items-head > span,
.customer-quote-items-total > span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.customer-record-fact strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.customer-record-scope,
.customer-deliverables {
  padding: 18px;
  background: var(--surface-muted);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
}

.customer-quote-items {
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.customer-bundle-savings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  overflow: hidden;
  background: #d9e1ea;
  border: 1px solid #d9e1ea;
  border-radius: 13px;
}

.customer-bundle-savings > div {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  background: var(--surface-muted);
}

.customer-bundle-savings span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.customer-bundle-savings strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.customer-bundle-savings-highlight {
  color: #176849;
  background: #eaf8f1 !important;
}

.customer-quote-items-head,
.customer-quote-items-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 15px;
  background: var(--surface-muted);
}

.customer-quote-items-head strong {
  font-size: 10px;
}

.customer-quote-items ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.customer-quote-items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 15px;
  border-top: 1px solid var(--border);
}

.customer-quote-items li strong,
.customer-quote-items li b {
  font-size: 13px;
}

.customer-quote-items li b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.customer-quote-items li p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.customer-quote-items-total {
  border-top: 1px solid var(--border);
}

.customer-quote-items-total strong {
  margin-left: auto;
  font-size: 16px;
}

.customer-quote-items-total small {
  max-width: 360px;
  color: var(--danger);
  font-size: 9px;
}

.customer-record-scope p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.customer-deliverables {
  margin-top: 12px;
  border-left-color: var(--success);
}

.customer-deliverables ul {
  padding-left: 20px;
  margin: 8px 0 0;
}

.customer-legal-statement {
  margin: 20px 0 0;
  padding: clamp(18px, 3vw, 26px);
  color: var(--ink-soft);
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 0 13px 13px 0;
  font-size: 13px;
  font-weight: 570;
  line-height: 1.7;
  white-space: pre-line;
}

.customer-response-confirmations {
  display: grid;
  gap: 10px;
}

.customer-response-actions {
  display: flex;
  justify-content: flex-end;
}

.customer-response-actions .button {
  width: min(100%, 320px);
}

.customer-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 4px 24px;
  color: var(--ink-muted);
  font-size: 12px;
}

.customer-review-footer a,
.customer-review-help a {
  color: var(--accent);
  font-weight: 650;
}

.customer-review-loading,
.customer-review-message {
  width: min(100%, 680px);
  min-height: min(620px, calc(100dvh - 80px));
  align-content: center;
  justify-items: center;
  padding: clamp(28px, 7vw, 64px);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow-float), var(--glass-highlight);
}

.customer-review-loading .route-spinner {
  margin-top: 30px;
}

.customer-review-message-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin-top: 24px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
}

.customer-review-message-mark--success {
  color: var(--success);
  background: var(--success-soft);
}

.customer-review-help {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--surface-muted);
  border-radius: 12px;
}

.customer-receipt-facts {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0 0;
  overflow: hidden;
  text-align: left;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.customer-receipt-facts > div {
  display: grid;
  gap: 3px;
  padding: 14px;
  background: var(--surface);
}

.customer-receipt-facts dt {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.customer-receipt-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.customer-lifecycle-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.customer-lifecycle-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.customer-lifecycle-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 760;
}

.customer-lifecycle-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.customer-lifecycle-title strong {
  font-size: 12px;
}

.customer-lifecycle-item p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
}

.customer-lifecycle-item small {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.invoice-fulfillment-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  background: var(--info-soft);
  border: 1px solid #c9ddf4;
  border-radius: 11px;
}

.invoice-fulfillment-status > div {
  min-width: 0;
}

.invoice-fulfillment-status span:first-child {
  display: block;
  color: var(--info);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invoice-fulfillment-status strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.invoice-fulfillment-status p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
}

.billing-installment-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  background: var(--surface-muted);
  border-color: var(--border);
}

.billing-installment-status > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.billing-installment-status span:first-child {
  color: var(--ink-muted);
}

.customer-payment-schedule .customer-bundle-savings-highlight {
  color: var(--info);
  background: var(--info-soft) !important;
}

@media (max-width: 639px) {
  .readiness-action {
    align-items: stretch;
    flex-direction: column;
  }

  .readiness-action .button {
    width: 100%;
  }

  .customer-review-page {
    padding: 14px 10px 30px;
  }

  .customer-review-header,
  .customer-record-heading,
  .customer-review-footer,
  .invoice-fulfillment-status {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-review-header .status-badge {
    width: max-content;
  }

  .customer-record-heading > strong {
    white-space: normal;
  }

  .customer-record-grid,
  .customer-receipt-facts {
    grid-template-columns: 1fr;
  }

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

  .billing-installment-status > div + div {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .customer-review-agreement .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-review-agreement .button {
    width: 100%;
  }

  .customer-review-help {
    align-items: flex-start;
    flex-direction: column;
  }
}

.check-disclosure {
  border-top: 1px solid var(--border);
}

.check-disclosure summary {
  padding: 13px 2px 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.check-disclosure[open] summary {
  margin-bottom: 12px;
}

.script-card {
  padding: 15px;
  background: #fafbfb;
  border: 1px solid var(--border);
  border-radius: 11px;
}

.script-card + .script-card {
  margin-top: 10px;
}

.script-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.script-card-head strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.script-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.script-card-editor {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
}

.script-card-note {
  display: block;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 11px;
}

.question-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  margin: 0;
}

.question-list li {
  padding-left: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 26px;
  bottom: 0;
  left: 13px;
  width: 1px;
  content: "";
  background: var(--border);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 10px;
}

.timeline-copy strong {
  display: block;
  font-size: 12px;
}

.timeline-copy p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.timeline-copy time {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.offer-summary {
  padding: 14px;
  background: #f5f6ff;
  border: 1px solid #dde1ff;
  border-radius: 11px;
}

.offer-summary span {
  display: block;
  color: #626ba4;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.offer-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.offer-summary p {
  margin: 6px 0 0;
  color: #5d6386;
  font-size: 10px;
}

.activity-composer {
  display: grid;
  gap: 13px;
}

.button--space-top {
  margin-top: 15px;
}

.compact-item--flush {
  padding-right: 0;
  padding-left: 0;
}

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

.autosave-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 10px;
}

.autosave-status::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--success);
  border-radius: 50%;
}

.sticky-mobile-actions {
  display: none;
}

/* Empty, loading and errors */
.empty-state,
.error-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 32px;
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(171, 182, 197, 0.3);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-highlight), var(--shadow-card);
}

.empty-state-inner,
.error-state-inner {
  max-width: 430px;
}

.empty-icon,
.error-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 13px;
  font-size: 18px;
}

.empty-icon {
  color: var(--ink-muted);
  background: var(--surface-muted);
}

.error-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state h2,
.error-state h2 {
  margin-bottom: 7px;
}

.empty-state p,
.error-state p {
  margin-bottom: 17px;
  color: var(--ink-muted);
  font-size: 12px;
}

.panel > .empty-state,
.panel--flush > .empty-state {
  min-height: 170px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

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

.skeleton {
  position: relative;
  overflow: hidden;
  background: #e9ebee;
  border-radius: 9px;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}

.skeleton-card {
  height: 126px;
  border-radius: var(--radius-card);
}

.skeleton-line {
  height: 13px;
  margin-bottom: 10px;
}

.skeleton-line--sm { width: 35%; }
.skeleton-line--md { width: 60%; }
.skeleton-line--lg { width: 75%; }

.skeleton-line:last-child {
  width: 65%;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Dialog and toasts */
.dialog {
  width: min(92vw, 520px);
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-float);
  overscroll-behavior: contain;
}

.dialog[open] {
  animation: dialog-enter 160ms ease-out both;
}

.dialog::backdrop {
  background: rgba(15, 17, 21, 0.46);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.dialog[open]::backdrop {
  animation: dialog-backdrop-enter 160ms ease-out both;
}

@keyframes dialog-enter {
  from {
    transform: translateY(8px) scale(0.985);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes dialog-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialog-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 20px 14px;
  background: var(--surface);
  border-bottom: 1px solid rgba(216, 224, 233, 0.72);
}

.dialog-head h2 {
  margin: 0;
}

.dialog-head p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.dialog-body {
  padding: 16px 20px 20px;
}

.service-item-picker {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 0;
  margin: 0;
  border: 0;
}

.service-item-picker > legend {
  padding: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.service-item-picker > p {
  margin: -5px 0 2px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

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

.service-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.28fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
  opacity: 0.72;
  transition: opacity 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.service-item-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: 0 8px 22px rgba(24, 31, 52, 0.05);
  opacity: 1;
}

.service-item-choice {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.service-item-choice > input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.service-item-choice > span,
.service-item-picker--approval .service-item-choice {
  min-width: 0;
}

.service-item-picker--approval .service-item-choice {
  grid-template-columns: 1fr;
}

.service-item-choice strong,
.service-item-choice small,
.service-item-choice p {
  display: block;
}

.service-item-choice strong {
  font-size: 11px;
}

.service-item-choice small {
  width: fit-content;
  padding: 2px 6px;
  margin-top: 4px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 760;
}

.service-item-choice p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.service-item-price {
  display: grid;
  gap: 5px;
}

.service-item-price > span:first-child {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 740;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.money-input {
  position: relative;
  display: block;
}

.money-input > b {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  color: var(--ink-muted);
  font-size: 11px;
  transform: translateY(-50%);
}

.money-input > .input {
  padding-left: 27px;
}

.service-item-total,
.bundle-price-summary {
  color: #fff;
  background: #171b22;
  border-radius: 10px;
}

.bundle-price-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #343a45;
}

.bundle-price-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #171b22;
}

.bundle-price-summary__savings strong {
  color: #9be0bd;
}

.bundle-price-summary__net {
  text-align: right;
}

.service-item-total span,
.bundle-price-summary span {
  color: #c9ced8;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.service-item-total strong,
.bundle-price-summary strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.bundle-discount-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.42fr);
  align-items: end;
  gap: 13px 16px;
  padding: 15px;
  background: linear-gradient(135deg, #f5f7ff, #f8fbff);
  border: 1px solid #d9defe;
  border-radius: 12px;
}

.bundle-discount-card__copy span,
.bundle-discount-card__choice > span {
  display: block;
  color: #6670a8;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bundle-discount-card__copy strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.bundle-discount-card__copy p,
.bundle-discount-card__status {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.bundle-discount-card__choice {
  display: grid;
  gap: 6px;
}

.bundle-discount-card__status {
  grid-column: 1 / -1;
  padding-top: 10px;
  margin: 0;
  border-top: 1px solid rgba(95, 107, 168, 0.17);
}

.bundle-discount-card--admin {
  align-items: start;
}

.bundle-discount-card--admin .bundle-price-summary {
  grid-column: 1 / -1;
}

.bundle-price-summary--light {
  color: var(--ink);
  background: #dde3ed;
}

.bundle-price-summary--light > div {
  background: rgba(255, 255, 255, 0.9);
}

.bundle-price-summary--light span {
  color: var(--ink-muted);
}

.service-item-price > strong {
  padding: 9px 11px;
  text-align: right;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.service-item-price .input[readonly] {
  color: var(--ink-soft);
  background: #eef2f7;
  cursor: default;
}

.dialog-actions {
  position: sticky;
  z-index: 3;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  padding: 14px 20px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 28px rgba(31, 42, 61, 0.045);
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-muted);
  cursor: pointer;
  background: transparent;
  border-radius: 8px;
  transition: color 130ms ease, background-color 130ms ease, transform 130ms ease;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.dialog-close:active {
  transform: scale(0.96);
}

.dialog-error,
.form-error {
  color: #7b2733;
  background: var(--danger-soft);
  border: 1px solid #f3cbd0;
  border-radius: 10px;
  font-size: 12px;
}

.dialog-error {
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  margin: 0 20px 14px;
}

.form-error {
  padding: 11px 13px;
}

.form-error[hidden] {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(380px, calc(100vw - 36px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 13px 14px;
  color: #f8f9fa;
  background: rgba(28, 31, 37, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  box-shadow: var(--shadow-menu);
  animation: toast-in 170ms ease both;
  pointer-events: auto;
}

.toast--leaving {
  animation: toast-out 140ms ease-in both;
  pointer-events: none;
}

.toast--error {
  background: #742d36;
}

.toast-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  font-size: 10px;
}

.toast strong {
  display: block;
  font-size: 11px;
}

.toast p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.toast button {
  display: grid;
  width: 32px;
  height: 32px;
  margin: -4px -5px 0 0;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  background: transparent;
  border-radius: 50%;
}

.toast button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.toast button:focus-visible {
  outline-color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}

/* Responsive */
@media (min-width: 1280px) {
  .billing-row {
    padding: 22px 24px;
  }
}

@media (max-width: 1279px) {
  :root {
    --sidebar-width: 232px;
  }

  .sidebar {
    padding: 16px 12px;
    overflow-y: auto;
  }

  .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .page {
    padding: 30px 28px 64px;
  }

  .sidebar-brand {
    padding: 0 6px 20px;
  }

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

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

  .filter-grid .button {
    width: 100%;
  }

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

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

  .money-overview-metric:nth-child(2) {
    border-right: 0;
  }

  .money-overview-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .filter-grid:not(.filter-grid--search) > .button:last-child,
  .discovery-search-grid > .button:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1079px) {
  .lead-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead-sidebar {
    position: static;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-layout > .stack {
    grid-row: 1;
  }

  .release-workflow-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1279px) {
  .data-table-scroll {
    display: none;
  }

  .mobile-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 12px;
  }

  .data-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .lead-mobile-head .table-primary {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 1099px) {
  :root {
    --sidebar-width: 0px;
    --header-height: calc(60px + env(safe-area-inset-top));
  }

  html {
    scroll-padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: 0;
  }

  .sidebar {
    display: none;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    min-height: var(--header-height);
    padding: calc(9px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) 9px calc(24px + env(safe-area-inset-left));
  }

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

  .mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
  }

  .mobile-brand strong {
    font-size: 12px;
  }

  .topbar-title {
    display: none;
  }

  .topbar-account {
    display: grid;
  }

  .topbar-account .avatar {
    width: 32px;
    height: 32px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 66px;
    grid-auto-columns: minmax(64px, 120px);
    grid-auto-flow: column;
    justify-content: center;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border);
  }

  .mobile-nav-link {
    display: grid;
    min-height: 53px;
    place-content: center;
    gap: 1px;
    color: var(--ink-muted);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 650;
    text-align: center;
  }

  .mobile-nav-link .nav-icon {
    margin: 0 auto;
  }

  .mobile-nav-link[aria-current="page"] {
    color: var(--ink);
    background: var(--surface-muted);
  }

  .app-shell[data-shell-key^="admin:"] .mobile-nav {
    grid-template-columns: none;
    grid-auto-columns: minmax(64px, 1fr);
    grid-auto-flow: column;
    justify-content: start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .app-shell[data-shell-key^="admin:"] .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .app-shell[data-shell-key^="admin:"] .mobile-nav-link {
    min-width: 0;
    font-size: 11px;
    scroll-snap-align: start;
  }

  .page {
    padding: 28px calc(24px + env(safe-area-inset-right)) calc(94px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  }

  .toast-region {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

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

@media (min-width: 1024px) and (max-width: 1279px) {
  .onboarding-steps,
  .onboarding-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-summary-grid {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }

  .billing-candidate-row .billing-summary-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 899px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 360px;
    padding: calc(32px + env(safe-area-inset-top)) calc(32px + env(safe-area-inset-right)) 32px calc(32px + env(safe-area-inset-left));
  }

  .login-brand-message {
    margin: 54px 0 30px;
  }

  .login-brand-message h1 {
    max-width: 560px;
    font-size: clamp(2.45rem, 10vw, 4.3rem);
  }

  .login-form-panel {
    padding: 46px calc(24px + env(safe-area-inset-right)) calc(60px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  }

  .grid-2,
  .lead-layout {
    grid-template-columns: 1fr;
  }

  .lead-sidebar {
    position: static;
  }

  .billing-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
  }

  .billing-summary-grid {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }

  .billing-candidate-row .billing-summary-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .billing-row-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .billing-action-note {
    max-width: none;
    text-align: left;
  }

}

@media (max-height: 600px) and (max-width: 899px) {
  .login-brand-panel {
    min-height: auto;
    padding: calc(18px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) 18px calc(24px + env(safe-area-inset-left));
  }

  .login-brand-message {
    margin: 20px 0 0;
  }

  .login-brand-message h1 {
    margin-bottom: 0;
    font-size: clamp(1.9rem, 7vw, 2.6rem);
  }

  .login-brand-message p,
  .login-proof {
    display: none;
  }

  .login-form-panel {
    align-items: flex-start;
    padding-top: 24px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: calc(60px + env(safe-area-inset-top));
  }

  body {
    padding-bottom: 0;
  }

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

  .login-workspace-option {
    min-height: 66px;
  }

  .sidebar {
    display: none;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    min-height: var(--header-height);
    padding: calc(9px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 9px calc(16px + env(safe-area-inset-left));
  }

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

  .mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
  }

  .mobile-brand strong {
    font-size: 12px;
  }

  .topbar-title {
    display: none;
  }

  .topbar-actions .button--secondary {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 66px;
    grid-template-columns: none;
    grid-auto-columns: minmax(56px, 120px);
    grid-auto-flow: column;
    justify-content: center;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border);
  }

  .mobile-nav-link {
    display: grid;
    min-height: 53px;
    place-content: center;
    gap: 1px;
    color: var(--ink-muted);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 650;
    text-align: center;
  }

  .mobile-nav-link .nav-icon {
    margin: 0 auto;
  }

  .mobile-nav-link[aria-current="page"] {
    color: var(--ink);
    background: var(--surface-muted);
  }

  .app-shell[data-shell-key^="admin:"] .mobile-nav {
    grid-template-columns: none;
    grid-auto-columns: minmax(64px, 1fr);
    grid-auto-flow: column;
    justify-content: start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .app-shell[data-shell-key^="admin:"] .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .app-shell[data-shell-key^="admin:"] .mobile-nav-link {
    min-width: 0;
    font-size: 11px;
    scroll-snap-align: start;
  }

  .page {
    padding: 22px calc(16px + env(safe-area-inset-right)) calc(90px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  }

  .page-header {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .button {
    flex: 1;
  }

  .onboarding-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .onboarding-hero-action {
    width: 100%;
  }

  .onboarding-hero-action small {
    max-width: none;
    text-align: left;
  }

  .onboarding-progress-summary {
    width: 100%;
  }

  .onboarding-task-head {
    display: grid;
    gap: 12px;
  }

  .onboarding-task-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-task-actions {
    width: 100%;
  }

  .onboarding-task-actions .button,
  .payout-return-notice .button,
  .payout-action-feedback .button,
  .stripe-admin-account .button,
  .payout-record-actions .button {
    width: 100%;
  }

  .payout-return-notice,
  .payout-action-feedback,
  .stripe-admin-account {
    grid-template-columns: 1fr;
  }

  .payout-return-notice .button,
  .payout-action-feedback .button,
  .stripe-admin-account .button {
    justify-self: stretch;
  }

  .onboarding-task-actions small {
    max-width: none;
  }

  /* W9_WORKFLOW_APPROVAL:styles-mobile-layout:begin */
  .w9-form-intro,
  .w9-submit-row,
  .w9-sensitive-action {
    align-items: stretch;
    flex-direction: column;
  }

  .w9-reference-links {
    justify-items: start;
  }

  .w9-choice-grid,
  .w9-address-grid,
  .w9-help-grid,
  .w9-entry-review-grid {
    grid-template-columns: 1fr;
  }

  .w9-review-edit-actions,
  .w9-review-edit-actions .button {
    width: 100%;
  }

  .w9-wizard-progress {
    grid-template-columns: repeat(5, 32px);
    justify-content: space-between;
  }

  .w9-wizard-progress > span {
    display: grid;
    grid-template-columns: 1fr;
    padding: 3px;
    place-items: center;
  }

  .w9-wizard-progress small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .w9-wizard-panel {
    padding: 15px;
  }

  .w9-wizard-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .w9-wizard-actions .button {
    width: 100%;
  }

  .w9-wizard-actions > span {
    margin-right: 0;
  }
  /* W9_WORKFLOW_APPROVAL:styles-mobile-layout:end */

  .evidence-explanation > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

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

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

  .service-item-price {
    padding-left: 28px;
  }

  /* W9_WORKFLOW_APPROVAL:styles-mobile-actions:begin */
  .w9-submit-row .button,
  .w9-sensitive-action .button {
    width: 100%;
  }

  .w9-correction-disclosure > .w9-form {
    padding: 0 8px 8px;
  }
  /* W9_WORKFLOW_APPROVAL:styles-mobile-actions:end */

  .training-lessons {
    grid-template-columns: 1fr;
  }

  .admin-checklist-review {
    grid-template-columns: 1fr;
  }

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

  .agreement-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-document-head,
  .admin-legal-record {
    align-items: stretch;
    flex-direction: column;
  }

  .legal-document-actions .button,
  .admin-legal-record .button {
    width: 100%;
  }

  .legal-document-review .agreement-document {
    margin: 0 7px 7px;
  }

  .admin-legal-records {
    padding: 14px;
  }

  .onboarding-steps,
  .onboarding-admin-grid {
    grid-template-columns: 1fr;
  }

  .team-onboarding-actions {
    align-items: stretch;
  }

  .team-onboarding-actions .button {
    width: 100%;
  }

  .offboarding-record-meta {
    grid-template-columns: 1fr;
  }

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

  .offboarding-danger-zone {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .offboarding-danger-zone .button {
    width: 100%;
  }

  .bulk-bar .section-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .bulk-bar .page-actions {
    width: 100%;
    flex: 0 1 auto;
    flex-wrap: wrap;
  }

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

  .action-count {
    min-height: 112px;
    padding: 14px;
  }

  .action-count-value {
    font-size: 26px;
  }

  .billing-row {
    padding: 16px;
  }

  .billing-row-heading {
    display: grid;
    gap: 9px;
  }

  .billing-row-heading .status-badge {
    justify-self: start;
  }

  .billing-summary-grid,
  .billing-candidate-row .billing-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pay-run-payment-steps,
  .pay-run-confirmation-row,
  .pay-run-paid-summary {
    grid-template-columns: 1fr;
  }

  .pay-run-confirmation-row {
    align-items: stretch;
  }

  .pay-run-exact-account-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pay-run-exact-account-row .button {
    width: 100%;
  }

  .billing-row-actions .button,
  .billing-row-actions > a {
    flex: 1 1 132px;
  }

  .invoice-review-facts {
    grid-template-columns: 1fr;
  }

  .grid-equal,
  .form-grid,
  .form-grid--2,
  .filter-grid,
  .discovery-search-grid,
  .composer-top {
    grid-template-columns: 1fr;
  }

  .discovery-job-head {
    display: grid;
    gap: 16px;
  }

  .discovery-job-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .discovery-job-actions .button {
    flex: 1 1 180px;
  }

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

  .discovery-count:nth-child(3) {
    border-left: 0;
  }

  .discovery-count:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .discovery-result,
  .discovery-recent-row {
    grid-template-columns: 1fr;
  }

  .discovery-result .table-actions,
  .discovery-recent-row .table-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .panel,
  .panel-section {
    padding: 16px;
  }

  .lead-sidebar {
    grid-row: 2;
    grid-template-columns: 1fr;
  }

  .lead-layout > .stack {
    grid-row: 1;
  }

  .queue-navigator {
    display: grid;
  }

  .queue-navigator-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .approval-row .table-actions {
    width: 100%;
  }

  .approval-row .button {
    flex: 1;
  }

  .data-table-scroll {
    display: none;
  }

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

  .data-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .tabs {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
    background: transparent;
    border-radius: 0;
  }

  .tab {
    background: #e9ebee;
  }

  .tab[aria-current="page"] {
    color: var(--ink);
    background: var(--surface);
    box-shadow: inset 0 0 0 1px rgba(172, 182, 197, 0.3), 0 5px 14px rgba(17, 19, 24, 0.08);
  }

  .filter-panel {
    padding: 13px;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .contact-actions {
    grid-template-columns: 1fr;
  }

  .dialog {
    width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 15px;
  }

  .toast-region {
    right: calc(12px + env(safe-area-inset-right));
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: auto;
  }

  .sticky-mobile-actions {
    position: sticky;
    z-index: 16;
    bottom: calc(76px + env(safe-area-inset-bottom));
    display: flex;
    gap: 8px;
    padding: 10px;
    margin: 15px -5px -5px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(17, 19, 24, 0.12);
  }

  .sticky-mobile-actions .button {
    flex: 1;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .deployment-indicator {
    display: none !important;
  }

  .agreement-document,
  .agreement-document * {
    visibility: visible;
  }

  .agreement-document {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 480px) {
  .login-brand-panel {
    min-height: auto;
    padding: calc(20px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 20px calc(20px + env(safe-area-inset-left));
  }

  .login-brand-message {
    margin: 28px 0 0;
  }

  .login-brand-message h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .login-brand-message p {
    font-size: 14px;
    line-height: 1.5;
  }

  .login-page:not(.application-page) .login-brand-message p,
  .login-proof {
    display: none;
  }

  .login-form-panel {
    align-items: flex-start;
    padding-top: 28px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    padding-right: calc(18px + env(safe-area-inset-right));
    padding-left: calc(18px + env(safe-area-inset-left));
  }

  .action-count-grid {
    grid-template-columns: 1fr;
  }

  .money-overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-actions .button,
  .dialog-actions > a,
  .form-actions .button,
  .form-actions > a {
    flex: 1 1 140px;
  }

  .money-overview-grid {
    grid-template-columns: 1fr;
  }

  .money-overview-metric,
  .money-overview-metric:nth-child(2) {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .money-overview-metric:last-child {
    border-bottom: 0;
  }

  .action-count {
    min-height: 102px;
  }

  .offboarding-effect-grid {
    grid-template-columns: 1fr;
  }

  .offboarding-effect {
    min-height: 76px;
  }

  .offboarding-impact-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .billing-summary-grid,
  .billing-candidate-row .billing-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .billing-row-actions .button,
  .billing-row-actions > a {
    width: 100%;
  }

  .topbar-actions .status-badge {
    display: none;
  }
}

/* Floating workspace polish keeps layout geometry stable while visually lifting the chrome. */
@media screen and (min-width: 1100px) {
  .sidebar {
    padding: 22px 20px;
  }

  .sidebar-brand {
    padding-right: 4px;
    padding-left: 4px;
  }

  .page {
    padding-top: 34px;
  }
}

@media screen and (max-width: 1099px) {
  :root {
    --mobile-dock-clearance: 102px;
  }

  .topbar::before {
    inset: calc(6px + env(safe-area-inset-top)) 10px 0;
    border-radius: 18px;
  }

  .app-shell.is-route-loading .topbar::after {
    right: 10px;
    left: 10px;
  }

  .mobile-nav {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    min-height: 62px;
    padding: 5px 6px;
    background: rgba(250, 251, 253, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: var(--glass-highlight), var(--shadow-dock);
  }

  .mobile-nav-link {
    min-height: 50px;
    border-radius: 14px;
  }

  .mobile-nav-link[aria-current="page"] {
    color: #3347c8;
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(67, 87, 230, 0.08);
  }

  .mobile-nav-link[aria-current="page"] .nav-icon {
    color: #fff;
    background: linear-gradient(145deg, #6271ef 0%, #4053dd 100%);
    border-radius: 8px;
    box-shadow: 0 5px 12px rgba(67, 87, 230, 0.2);
  }

  .page {
    padding-bottom: calc(var(--mobile-dock-clearance) + env(safe-area-inset-bottom));
  }

  .toast-region,
  .sticky-mobile-actions {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .button:hover:not([disabled]),
  .icon-button:hover,
  .login-workspace-option:hover,
  a.action-count:hover {
    transform: translateY(-1px);
  }

  .money-overview-metric:hover .money-overview-arrow {
    transform: translateX(2px);
  }
}

@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;
  }

  body.operation-busy::after {
    width: 100%;
    opacity: 0.72;
    animation: none !important;
    transform: none;
  }

  .app-shell.is-route-loading .topbar::after {
    background: var(--accent);
    animation: none !important;
    transform: none;
  }

  .skeleton::after {
    background: rgba(255, 255, 255, 0.38);
    animation: none !important;
    transform: none;
  }

  .mobile-nav {
    scroll-snap-type: none !important;
  }

  .button,
  .icon-button,
  .login-workspace-option,
  .nav-link,
  .nav-icon,
  .mobile-nav-link,
  .tab,
  .action-count,
  .money-overview-arrow,
  .topbar-account,
  .account-menu,
  .dialog-close {
    transform: none !important;
  }
}

@media (pointer: coarse) {
  .button,
  .tab,
  .dialog-close,
  .topbar-account,
  .toast button,
  .section-link,
  .back-link {
    min-width: 44px;
    min-height: 44px;
  }

  .section-link,
  .back-link {
    display: inline-flex;
    align-items: center;
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }

  .sidebar::before,
  .topbar::before,
  .mobile-nav,
  .sticky-mobile-actions,
  .login-card,
  .panel,
  .card,
  .action-count,
  .money-overview,
  .filter-panel,
  .data-table-wrap,
  .dialog,
  .toast {
    background: Canvas !important;
    border: 1px solid CanvasText !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .button--primary,
  .nav-link[aria-current="page"] .nav-icon,
  .mobile-nav-link[aria-current="page"] .nav-icon {
    color: ButtonText !important;
    background: ButtonFace !important;
    border: 1px solid ButtonText !important;
    box-shadow: none !important;
  }

  .tab[aria-current="page"],
  .nav-link[aria-current="page"],
  .mobile-nav-link[aria-current="page"],
  .login-workspace-option.is-active {
    border: 2px solid Highlight;
    box-shadow: none;
  }

  .sales-disclosure,
  .sales-disclosure > summary::after {
    color: CanvasText !important;
    background: Canvas !important;
    border: 1px solid CanvasText !important;
  }
}

/* Team chat */
.team-chat-page {
  min-width: 0;
}

.team-chat-page .page-header {
  margin-bottom: 16px;
}

.chat-workspace {
  display: grid;
  height: clamp(560px, calc(100dvh - 188px), 780px);
  min-height: 0;
  grid-template-columns: minmax(260px, 272px) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(31, 42, 61, 0.09);
}

.chat-rooms-panel,
.chat-conversation {
  min-width: 0;
  min-height: 0;
}

.chat-rooms-panel {
  display: flex;
  flex-direction: column;
  background: #f7f8fb;
  border-right: 1px solid var(--border);
}

.chat-rooms-heading,
.chat-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-rooms-heading {
  min-height: 70px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.chat-rooms-heading h2,
.chat-conversation-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.chat-room-list {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-room-list-empty {
  padding: 18px 10px;
  margin: 0;
  color: var(--ink-muted);
  text-align: center;
}

.chat-room-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background-color var(--motion-fast) var(--ease-ui), border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui);
}

.chat-room-item:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--border);
}

.chat-room-item.is-selected {
  color: var(--ink);
  background: #efedff;
  border-color: rgba(109, 69, 229, 0.15);
  box-shadow: inset 3px 0 0 #6d45e5;
}

.chat-room-avatar,
.chat-message-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #7b5cf0, #33206e);
  border-radius: 13px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.chat-room-avatar {
  width: 40px;
  height: 40px;
  font-size: 12px;
}

.chat-room-copy,
.chat-room-title {
  min-width: 0;
}

.chat-room-copy {
  display: grid;
  gap: 4px;
}

.chat-room-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-room-title strong,
.chat-room-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-title strong {
  font-size: 13.5px;
}

.chat-room-copy small,
.chat-room-item > time {
  color: var(--ink-muted);
  font-size: 10.5px;
}

.chat-room-item > time {
  align-self: start;
  padding-top: 2px;
  white-space: nowrap;
}

.chat-unread-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 760;
}

.chat-conversation {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  background: #fbfcfe;
}

.chat-conversation--empty {
  display: grid;
  padding: 24px;
  place-items: center;
}

.chat-conversation-header {
  grid-row: 1;
  min-height: 70px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
}

.chat-room-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.chat-room-identity > div {
  min-width: 0;
}

.chat-room-identity h2,
.chat-room-identity p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-identity p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 10.5px;
}

.chat-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 10.5px;
  font-weight: 680;
  white-space: nowrap;
}

.chat-live-indicator i {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--success-soft);
}

.chat-live-indicator.is-paused {
  color: var(--danger);
}

.chat-live-indicator.is-paused i {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.chat-pins {
  display: grid;
  grid-row: 2;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f6f3ff;
  border-bottom: 1px solid #e3dcff;
}

.chat-pins[hidden] {
  display: none;
}

.chat-pins-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f35a4;
  font-size: 10.5px;
}

.chat-pins-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  color: #4f35a4;
  background: #e9e3ff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 760;
}

.chat-pin-list {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.chat-pin-preview {
  display: flex;
  min-width: 180px;
  max-width: 330px;
  align-items: baseline;
  gap: 6px;
  padding: 6px 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(109, 69, 229, 0.14);
  border-radius: 9px;
  font-size: 10.5px;
  white-space: nowrap;
}

.chat-pin-preview strong {
  flex: 0 0 auto;
}

.chat-pin-preview span {
  overflow: hidden;
  color: var(--ink-muted);
  text-overflow: ellipsis;
}

.chat-poll-error {
  display: flex;
  grid-row: 3;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  color: #7b2733;
  background: var(--danger-soft);
  border-bottom: 1px solid #f3cbd0;
  font-size: 11px;
}

.chat-poll-error[hidden] {
  display: none;
}

.chat-message-scroll {
  grid-row: 4;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(109, 69, 229, 0.045), transparent 260px),
    #fbfcfe;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.chat-history-action {
  min-height: 28px;
  text-align: center;
}

.chat-history-action [hidden] {
  display: none;
}

.chat-message-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chat-message-empty {
  display: grid;
  min-height: 270px;
  place-content: center;
  color: var(--ink-muted);
  text-align: center;
}

.chat-message-empty > span {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 14px;
  font-size: 17px;
}

.chat-message-empty strong {
  color: var(--ink);
}

.chat-message-empty p {
  margin: 4px 0 0;
  font-size: 12px;
}

.chat-message {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 8px;
}

.chat-message.is-own {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 31px;
  height: 31px;
  border-radius: 11px;
  font-size: 9px;
}

.chat-message.is-own .chat-message-avatar {
  display: none;
}

.chat-message-bubble {
  width: fit-content;
  max-width: min(72%, 680px);
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 6px;
  box-shadow: 0 6px 18px rgba(31, 42, 61, 0.05);
}

.chat-message.is-own .chat-message-bubble {
  color: #fff;
  background: #17192a;
  border-color: #17192a;
  border-radius: 16px 16px 6px;
  box-shadow: 0 8px 22px rgba(23, 25, 42, 0.14);
}

.chat-message.is-pinned .chat-message-bubble {
  box-shadow: inset 3px 0 0 #8b6cf3, 0 6px 18px rgba(31, 42, 61, 0.05);
}

.chat-message-bubble > header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-message-bubble > header > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.chat-message-bubble header strong {
  font-size: 11.5px;
}

.chat-message-bubble header time {
  color: var(--ink-muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.chat-message.is-own .chat-message-bubble header strong,
.chat-message.is-own .chat-message-text {
  color: #fff;
}

.chat-message.is-own .chat-message-bubble header time {
  color: rgba(255, 255, 255, 0.64);
}

.chat-message-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chat-pinned-label {
  color: #6c51cf;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.chat-pin-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--ink-muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.chat-pin-button:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.chat-pin-button[aria-pressed="true"] {
  color: #5d40bd;
  background: #eee9ff;
  border-color: #d9ceff;
}

.chat-pin-button .ui-icon {
  width: 14px;
  height: 14px;
}

.chat-message.is-own .chat-pinned-label {
  color: #c8baff;
}

.chat-message.is-own .chat-pin-button {
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.chat-message-text {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: normal;
}

.chat-link-cards {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.chat-link-card {
  display: grid;
  min-width: 240px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.chat-link-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px rgba(31, 42, 61, 0.08);
}

.chat-link-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.chat-link-card strong,
.chat-link-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-link-card strong {
  font-size: 11px;
}

.chat-link-card small {
  color: var(--ink-muted);
  font-size: 9px;
}

.chat-link-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
}

.chat-link-card--meet .chat-link-mark {
  background: #188038;
}

.chat-link-card--zoom .chat-link-mark {
  background: #2d5bff;
}

.chat-link-card--teams .chat-link-mark {
  background: #5b5fc7;
}

.chat-link-arrow {
  color: var(--ink-muted);
  font-size: 14px;
}

.chat-composer {
  display: grid;
  grid-row: 5;
  gap: 7px;
  padding: 12px 16px 14px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
}

.chat-composer-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 7px 7px 7px 13px;
  background: #f8f9fc;
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: border-color var(--motion-fast) var(--ease-ui), box-shadow var(--motion-fast) var(--ease-ui), background-color var(--motion-fast) var(--ease-ui);
}

.chat-composer-control:focus-within {
  background: #fff;
  border-color: rgba(109, 69, 229, 0.44);
  box-shadow: 0 0 0 4px rgba(109, 69, 229, 0.1);
}

.chat-composer-input {
  min-height: 48px;
  max-height: 140px;
  padding: 8px 0 6px;
  resize: vertical;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.chat-composer-input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.chat-composer-send {
  min-width: 92px;
  min-height: 44px;
  gap: 7px;
  padding-inline: 16px;
  border-radius: 13px;
}

.chat-composer-send .ui-icon {
  width: 15px;
  height: 15px;
}

.chat-composer-footer {
  display: flex;
  align-items: center;
  min-height: 16px;
}

.chat-composer-footer > span {
  color: var(--ink-muted);
  font-size: 9.5px;
}

.chat-member-fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.chat-member-fieldset legend {
  padding: 0;
  font-size: 12px;
  font-weight: 680;
}

.chat-member-fieldset > p {
  margin: 3px 0 9px;
  color: var(--ink-muted);
  font-size: 11px;
}

.chat-member-picker {
  display: grid;
  max-height: 280px;
  gap: 6px;
  padding: 7px;
  overflow-y: auto;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.chat-member-option {
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 10px;
}

.chat-member-option:has(input:checked) {
  background: var(--accent-soft);
  border-color: rgba(67, 87, 230, 0.2);
}

.chat-member-option .chat-room-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.chat-member-option > span:last-child {
  display: grid;
  min-width: 0;
}

.chat-member-option strong,
.chat-member-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-member-option small {
  color: var(--ink-muted);
  font-size: 10px;
}

@media (max-width: 1099px) {
  .app-shell[data-shell-key*=",chat,"] .mobile-nav {
    grid-template-columns: none;
    grid-auto-columns: minmax(68px, 1fr);
    grid-auto-flow: column;
    justify-content: start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .app-shell[data-shell-key*=",chat,"] .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .chat-workspace {
    height: clamp(560px, calc(100dvh - 168px), 760px);
    grid-template-columns: minmax(230px, 250px) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .team-chat-page .page-header {
    margin-bottom: 14px;
  }

  .team-chat-page .page-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-chat-page .page-actions:has(:only-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-chat-page .page-actions .button {
    width: 100%;
  }

  .chat-workspace {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .chat-rooms-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  }

  .chat-rooms-heading {
    min-height: 62px;
    padding: 12px 14px 8px;
    border-bottom: 0;
  }

  .chat-room-list {
    display: flex;
    gap: 7px;
    padding: 4px 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .chat-room-list::-webkit-scrollbar {
    display: none;
  }

  .chat-room-item {
    min-width: min(218px, 74vw);
    scroll-snap-align: start;
  }

  .chat-conversation {
    min-height: min(620px, calc(100dvh - 180px));
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  }

  .chat-conversation-header {
    min-height: 68px;
    padding: 11px 13px;
  }

  .chat-pins {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px 12px;
  }

  .chat-message-scroll {
    min-height: 46vh;
    max-height: 58vh;
    padding: 12px 11px 16px;
  }

  .chat-message-bubble {
    max-width: 88%;
  }

  .chat-link-card {
    min-width: 0;
  }

  .chat-composer {
    position: sticky;
    z-index: 2;
    bottom: calc(78px + env(safe-area-inset-bottom));
    padding: 10px 11px 11px;
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  }

  .chat-composer-control {
    gap: 7px;
    padding: 6px 6px 6px 11px;
  }

  .chat-composer-send {
    min-width: 82px;
    padding-inline: 13px;
  }

  .chat-composer-footer {
    padding-inline: 2px;
  }

  .chat-composer-footer > span {
    max-width: 100%;
  }
}

@media (pointer: coarse) {
  .chat-pin-button {
    width: 44px;
    height: 44px;
  }
}

@media (forced-colors: active) {
  .chat-workspace,
  .chat-room-item,
  .chat-message-bubble,
  .chat-link-card,
  .chat-composer,
  .chat-composer-control,
  .chat-member-option,
  .chat-pins {
    color: CanvasText;
    background: Canvas;
    border: 1px solid CanvasText;
    box-shadow: none;
  }

  .chat-room-avatar,
  .chat-message-avatar,
  .chat-link-mark,
  .chat-unread-count {
    color: CanvasText;
    background: Canvas;
    border: 1px solid CanvasText;
  }
}

/* Restrained glass is progressive enhancement; every surface above remains opaque without blur support. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .sidebar::before {
    background: rgba(249, 251, 253, 0.76);
    border-color: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    backdrop-filter: blur(26px) saturate(145%);
  }

  .topbar::before {
    background: rgba(246, 248, 251, 0.7);
    border-color: rgba(255, 255, 255, 0.76);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    backdrop-filter: blur(24px) saturate(145%);
  }

  .mobile-nav,
  .sticky-mobile-actions {
    background: rgba(249, 251, 253, 0.82);
    border-color: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    backdrop-filter: blur(22px) saturate(145%);
  }

  .mobile-nav {
    box-shadow: var(--glass-highlight), var(--shadow-dock);
  }

  .login-card {
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
    backdrop-filter: blur(24px) saturate(135%);
  }

  .panel,
  .card,
  .action-count,
  .money-overview,
  .filter-panel,
  .lead-mobile-card,
  .queue-navigator,
  .empty-state,
  .error-state,
  .auth-callback-card,
  .customer-review-loading,
  .customer-review-message {
    background: var(--glass-surface-strong);
    border-color: var(--glass-border);
  }

  .data-table-wrap {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--glass-border);
  }

  .dialog {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(26px) saturate(135%);
    backdrop-filter: blur(26px) saturate(135%);
  }

  .toast {
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    backdrop-filter: blur(20px) saturate(135%);
  }

  .agreement-document,
  .legal-document-card,
  .w9-form,
  .input,
  .select,
  .textarea,
  .notice,
  .lock-banner {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body {
    background: var(--canvas);
  }

  .sidebar::before,
  .topbar::before,
  .mobile-nav,
  .sticky-mobile-actions,
  .login-card,
  .panel,
  .card,
  .action-count,
  .money-overview,
  .filter-panel,
  .data-table-wrap,
  .lead-mobile-card,
  .queue-navigator,
  .empty-state,
  .error-state,
  .auth-callback-card,
  .dialog,
  .toast {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .sidebar::before,
  .topbar::before,
  .mobile-nav,
  .sticky-mobile-actions,
  .login-card,
  .panel,
  .card,
  .action-count,
  .money-overview,
  .filter-panel,
  .data-table-wrap,
  .lead-mobile-card,
  .queue-navigator,
  .empty-state,
  .error-state,
  .auth-callback-card,
  .customer-review-loading,
  .customer-review-message,
  .dialog {
    background: var(--surface);
  }
}

@media (max-width: 899px) {
  .login-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Seller lead workspace: paused assignments stay clear without looking broken. */
.seller-lead-workspace {
  width: 100%;
  max-width: 1420px;
  margin-inline: auto;
}

.seller-lead-workspace .page-header {
  align-items: flex-end;
  margin-bottom: 20px;
}

.seller-lead-workspace .page-header-copy {
  max-width: min(100%, 1080px);
}

.seller-lead-workspace .page-header-copy h1 {
  font-size: clamp(2rem, 2.5vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.seller-lead-workspace .page-header-copy p {
  max-width: 900px;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.seller-lead-workspace .lead-title-line > span:first-child {
  min-width: 0;
}

#main-content h1[tabindex="-1"]:focus {
  outline: none;
}

.seller-lead-workspace .queue-navigator {
  min-height: 72px;
  padding: 14px 18px;
  margin: 16px 0 20px;
}

.seller-lead-workspace .lead-layout {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
  gap: 20px;
}

.seller-lead-workspace .lead-sidebar {
  gap: 14px;
}

.seller-access-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 17px 18px;
  color: #684512;
  background: linear-gradient(135deg, rgba(255, 248, 226, 0.98), rgba(255, 252, 242, 0.9));
  border: 1px solid #ead49f;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(117, 78, 18, 0.07);
}

.seller-access-banner--danger {
  color: #7b2733;
  background: var(--danger-soft);
  border-color: #f3cbd0;
}

.seller-access-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #8a5a0b;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(188, 137, 48, 0.23);
  border-radius: 13px;
  font-size: 19px;
  font-weight: 760;
}

.seller-access-banner--danger .seller-access-icon {
  color: var(--danger);
  border-color: #f3cbd0;
}

.seller-access-copy {
  min-width: 0;
}

.seller-access-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}

.seller-access-title strong {
  font-size: 15px;
  line-height: 1.25;
}

.seller-access-copy p {
  margin: 5px 0 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.seller-access-copy small {
  display: block;
  margin-top: 7px;
  color: #775824;
  color: color-mix(in srgb, currentColor 76%, transparent);
  font-size: 12px;
  line-height: 1.45;
}

.seller-access-banner--compact {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  margin: 14px 0;
  border-radius: 12px;
  box-shadow: none;
}

.seller-access-banner--compact .seller-access-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 15px;
}

.seller-access-banner--compact .seller-access-title {
  display: block;
}

.seller-access-banner--compact .status-badge {
  display: none;
}

.seller-paused-panel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 28px;
  overflow: hidden;
}

.seller-paused-panel--danger {
  border-color: #f3cbd0;
}

.seller-paused-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #4457c5;
  background: #eef1ff;
  border: 1px solid #d8defe;
  border-radius: 16px;
  font-size: 21px;
  font-weight: 760;
}

.seller-paused-panel--danger .seller-paused-mark {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f3cbd0;
}

.seller-paused-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.seller-paused-panel p {
  max-width: 740px;
  margin-bottom: 18px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.seller-unlock-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.seller-unlock-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  background: rgba(247, 249, 252, 0.82);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.seller-unlock-steps li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--ink-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 760;
}

.seller-unlock-steps li.is-current {
  background: #fff8e7;
  border-color: #e7cd8d;
}

.seller-unlock-steps li.is-current > span {
  color: #fff;
  background: #a56b0c;
  border-color: #a56b0c;
}

.seller-unlock-steps li.is-complete {
  background: var(--success-soft);
  border-color: #cce8dc;
}

.seller-unlock-steps li.is-complete > span {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.seller-unlock-steps strong,
.seller-unlock-steps small {
  display: block;
  overflow-wrap: anywhere;
}

.seller-unlock-steps strong {
  font-size: 12px;
  line-height: 1.3;
}

.seller-unlock-steps small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.35;
}

.seller-contact-locked {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.seller-contact-lock-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #5363bb;
  background: #f0f2ff;
  border: 1px solid #dde2ff;
  border-radius: 13px;
  font-size: 18px;
}

.seller-contact-locked h2 {
  margin-bottom: 7px;
  font-size: 18px;
}

.seller-contact-locked p,
.seller-contact-locked small {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

.seller-contact-location {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.seller-contact-location span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seller-contact-location strong {
  font-size: 12px;
  line-height: 1.45;
}

.admin-audit-refresh {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: #684512;
  background: linear-gradient(135deg, #fff7df, #fffdf6);
  border: 1px solid #ead49f;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(117, 78, 18, 0.07);
}

.admin-audit-refresh-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #8a5a0b;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ead49f;
  border-radius: 13px;
  font-size: 19px;
  font-weight: 760;
}

.admin-audit-refresh p {
  margin: 4px 0 0;
  color: #76551f;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1079px) {
  .seller-lead-workspace .lead-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .seller-lead-workspace .lead-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seller-lead-workspace .customer-lifecycle-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .seller-lead-workspace .page-header {
    gap: 12px;
  }

  .seller-lead-workspace .page-header-copy h1 {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }

  .seller-lead-workspace .lead-title-line {
    align-items: flex-start;
    gap: 9px;
  }

  .seller-access-banner,
  .seller-paused-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .seller-access-title {
    align-items: flex-start;
  }

  .seller-unlock-steps,
  .seller-lead-workspace .lead-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .seller-paused-panel {
    gap: 15px;
    padding: 20px;
  }

  .seller-unlock-steps {
    gap: 8px;
  }

  .admin-audit-refresh {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-audit-refresh .button {
    width: 100%;
  }

  .bundle-discount-card,
  .bundle-price-summary,
  .customer-bundle-savings {
    grid-template-columns: minmax(0, 1fr);
  }

  .bundle-price-summary__net {
    text-align: left;
  }
}

@media (forced-colors: active) {
  .seller-access-banner,
  .seller-paused-panel,
  .seller-contact-locked,
  .admin-audit-refresh,
  .seller-unlock-steps li,
  .seller-contact-location {
    color: CanvasText;
    background: Canvas;
    border: 1px solid CanvasText;
    box-shadow: none;
  }

  .seller-access-icon,
  .seller-paused-mark,
  .seller-contact-lock-icon,
  .admin-audit-refresh-icon,
  .seller-unlock-steps li > span {
    color: CanvasText;
    background: Canvas;
    border: 1px solid CanvasText;
  }
}

/* Balanced hybrid workspace
 *
 * Carries the public Avenox paper, ink, and violet language into the authenticated
 * product without changing workflow geometry or document surfaces. The body rule
 * only activates while the admin or seller shell exists, so public customer,
 * application, W-9, and legal-document pages retain their purpose-built styling.
 */
.app-shell,
body:has(.app-shell) {
  --canvas: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #f1f2f5;
  --surface-strong: #e8e9ee;
  --surface-subtle: #fbfbfc;
  --ink: #08090d;
  --ink-soft: #2a2b32;
  --ink-muted: #60636a;
  --ink-faint: #666971;
  --border: rgba(31, 31, 43, 0.1);
  --border-strong: rgba(31, 31, 43, 0.17);
  --control-border: #858f9b;
  --brand: #111218;
  --brand-hover: #22242c;
  --accent: #552fca;
  --accent-bright: #6963ec;
  --accent-soft: #efedff;
  --glass-surface: rgba(255, 255, 255, 0.78);
  --glass-surface-strong: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.84);
  --radius-control: 11px;
  --radius-card: 18px;
  --radius-panel: 22px;
  --shadow-card: 0 1px 2px rgba(20, 20, 30, 0.025), 0 14px 38px rgba(43, 42, 67, 0.065);
  --shadow-card-hover: 0 2px 5px rgba(20, 20, 30, 0.035), 0 20px 48px rgba(43, 42, 67, 0.09);
  --shadow-float: 0 32px 88px rgba(20, 20, 30, 0.2), 0 8px 24px rgba(20, 20, 30, 0.08);
  --shadow-shell: 0 18px 48px rgba(43, 42, 67, 0.08), 0 3px 10px rgba(43, 42, 67, 0.035);
  --shadow-dock: 0 18px 48px rgba(24, 25, 38, 0.15), 0 4px 14px rgba(24, 25, 38, 0.07);
  --sidebar-width: 220px;
  --header-height: 68px;
  font-family: Geist, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:has(.app-shell) {
  background:
    radial-gradient(circle at 18% -8%, rgba(142, 124, 246, 0.15), transparent 34rem),
    radial-gradient(circle at 96% 7%, rgba(113, 163, 224, 0.09), transparent 38rem),
    radial-gradient(rgba(65, 61, 110, 0.055) 0.65px, transparent 0.75px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fafbfc 0%, var(--canvas) 48%, #f4f5f8 100%);
}

.app-shell .sidebar {
  padding: 18px 13px;
}

.app-shell .sidebar::before {
  inset: 11px 9px;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(31, 31, 43, 0.065);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), var(--shadow-shell);
}

.app-shell .sidebar-brand {
  padding: 2px 8px 27px;
}

.app-shell .brand-lockup {
  gap: 10px;
}

.app-shell .brand-mark {
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 22px rgba(20, 20, 30, 0.14);
}

.app-shell .side-nav {
  gap: 4px;
}

.app-shell .nav-link {
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 620;
}

.app-shell .nav-link:hover {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(31, 31, 43, 0.05);
}

.app-shell .nav-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(31, 31, 43, 0.075);
  box-shadow: inset 0 1px 0 #fff, 0 9px 24px rgba(43, 42, 67, 0.07);
}

.app-shell .nav-link[aria-current="page"] .nav-icon {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(105, 99, 236, 0.08);
}

.app-shell .account-menu {
  border: 1px solid transparent;
  border-radius: 13px;
}

.app-shell .account-menu:hover {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(31, 31, 43, 0.06);
}

.app-shell .topbar {
  min-height: var(--header-height);
  padding: 11px 34px;
}

.app-shell .topbar::before {
  inset: 8px 18px 0;
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(31, 31, 43, 0.055);
  border-radius: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), var(--shadow-shell);
}

.app-shell .topbar-title strong {
  font-size: 13px;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.app-shell .topbar-actions .status-badge {
  padding: 5px 9px;
  background: rgba(241, 242, 245, 0.78);
  border-color: rgba(31, 31, 43, 0.06);
}

.app-shell .page {
  max-width: 1480px;
  padding: 38px 32px 78px;
}

.app-shell .page-header {
  gap: 24px;
  margin-bottom: 24px;
}

.app-shell .page-header-copy h1 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 2.8vw, 2.65rem);
  font-weight: 610;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.app-shell .page-header-copy p {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.app-shell .eyebrow {
  margin-bottom: 9px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.app-shell .section-heading {
  margin-bottom: 17px;
}

.app-shell .section-heading h2,
.app-shell .panel h2 {
  font-weight: 620;
  letter-spacing: -0.03em;
}

.app-shell :where(.panel, .card, .action-count, .money-overview, .filter-panel, .lead-mobile-card, .queue-navigator, .empty-state, .error-state) {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(31, 31, 43, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), var(--shadow-card);
}

.app-shell .panel {
  padding: 23px;
  border-radius: var(--radius-panel);
}

.app-shell .panel--flush {
  padding: 0;
}

.app-shell .panel-section {
  padding: 21px;
}

.app-shell .stack {
  gap: 20px;
}

.app-shell .stack--tight {
  gap: 11px;
}

.app-shell .grid-2,
.app-shell .grid-equal,
.app-shell .lead-layout {
  gap: 20px;
}

.app-shell .tabs {
  gap: 3px;
  padding: 4px;
  margin-bottom: 18px;
  background: rgba(232, 233, 238, 0.72);
  border-color: rgba(31, 31, 43, 0.065);
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(20, 20, 30, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.app-shell .tab {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 660;
}

.app-shell .tab[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(31, 31, 43, 0.06), inset 0 1px 0 #fff, 0 7px 18px rgba(43, 42, 67, 0.075);
}

.app-shell .button {
  min-height: 41px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.app-shell .button--small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.app-shell .button--primary {
  background: linear-gradient(145deg, #1b1d24 0%, #08090d 76%);
  border-color: #08090d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 9px 24px rgba(8, 9, 13, 0.16);
}

.app-shell .button--primary:hover:not([disabled]) {
  background: linear-gradient(145deg, #292c35 0%, #111218 76%);
  border-color: #111218;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 28px rgba(8, 9, 13, 0.2);
}

.app-shell .button--secondary {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(31, 31, 43, 0.14);
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(43, 42, 67, 0.05);
}

.app-shell .button--secondary:hover:not([disabled]),
.app-shell .button--ghost:hover:not([disabled]) {
  background: var(--surface-muted);
}

.app-shell .icon-button {
  border-color: rgba(31, 31, 43, 0.1);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(43, 42, 67, 0.05);
}

.app-shell :where(.input, .select, .textarea) {
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--control-border);
  box-shadow: inset 0 1px 2px rgba(20, 20, 30, 0.025), inset 0 1px 0 #fff;
}

body:has(.app-shell) > .dialog {
  width: min(92vw, 560px);
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(31, 31, 43, 0.09);
  border-radius: 24px;
  box-shadow: var(--shadow-float);
}

body:has(.app-shell) > .dialog::backdrop {
  background: rgba(13, 14, 18, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

body:has(.app-shell) > .dialog .dialog-head {
  padding: 22px 22px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(31, 31, 43, 0.075);
}

body:has(.app-shell) > .dialog .dialog-head h2 {
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

body:has(.app-shell) > .dialog .dialog-body {
  padding: 18px 22px 22px;
}

body:has(.app-shell) > .dialog .dialog-actions {
  gap: 8px;
  padding: 14px 22px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-top-color: rgba(31, 31, 43, 0.075);
  box-shadow: 0 -14px 30px rgba(43, 42, 67, 0.04);
}

body:has(.app-shell) > .dialog .button {
  min-height: 41px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

body:has(.app-shell) > .dialog .button--primary {
  background: linear-gradient(145deg, #1b1d24 0%, #08090d 76%);
  border-color: #08090d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 9px 24px rgba(8, 9, 13, 0.16);
}

body:has(.app-shell) > .dialog .button--secondary {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(31, 31, 43, 0.14);
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(43, 42, 67, 0.05);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .app-shell .sidebar::before,
  .app-shell .topbar::before,
  .app-shell :where(.panel, .card, .action-count, .money-overview, .filter-panel, .lead-mobile-card, .queue-navigator, .empty-state, .error-state) {
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    backdrop-filter: blur(16px) saturate(125%);
  }
}

@media (max-width: 1279px) {
  .app-shell,
  body:has(.app-shell) {
    --sidebar-width: 220px;
  }

  .app-shell .page {
    padding: 30px 26px 68px;
  }
}

@media (max-width: 1099px) {
  .app-shell,
  body:has(.app-shell) {
    --sidebar-width: 0px;
    --header-height: calc(60px + env(safe-area-inset-top));
  }

  .app-shell .topbar {
    padding: calc(8px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) 8px calc(18px + env(safe-area-inset-left));
  }

  .app-shell .topbar::before {
    inset: calc(5px + env(safe-area-inset-top)) 9px 0;
    border-radius: 17px;
  }

  .app-shell .page {
    padding: 25px calc(20px + env(safe-area-inset-right)) calc(100px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  }

  .app-shell .mobile-nav {
    right: max(9px, env(safe-area-inset-right));
    bottom: max(9px, env(safe-area-inset-bottom));
    left: max(9px, env(safe-area-inset-left));
    min-height: 62px;
    padding: 5px 6px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(31, 31, 43, 0.075);
    border-radius: 19px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), var(--shadow-dock);
  }

  .app-shell .mobile-nav-link {
    min-height: 50px;
    border-radius: 13px;
  }

  .app-shell .mobile-nav-link[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(105, 99, 236, 0.08);
  }

  .app-shell .mobile-nav-link[aria-current="page"] .nav-icon {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(105, 99, 236, 0.08);
  }
}

@media (max-width: 767px) {
  .app-shell .page {
    padding: 21px calc(14px + env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  }

  .app-shell .page-header {
    gap: 14px;
    margin-bottom: 19px;
  }

  .app-shell .page-header-copy h1,
  .seller-lead-workspace .page-header-copy h1 {
    font-size: clamp(1.75rem, 8.5vw, 2.2rem);
    line-height: 1.06;
  }

  .app-shell .page-actions {
    gap: 7px;
  }

  .app-shell .panel,
  .app-shell .panel-section {
    padding: 17px;
  }

  .app-shell .panel--flush {
    padding: 0;
  }

  .app-shell .tabs {
    padding: 4px;
    margin-right: 0;
    margin-left: 0;
    background: rgba(232, 233, 238, 0.76);
    border: 1px solid rgba(31, 31, 43, 0.065);
    border-radius: 13px;
  }

  .app-shell .tab {
    min-height: 40px;
    background: transparent;
  }

  .app-shell .tab[aria-current="page"] {
    background: rgba(255, 255, 255, 0.96);
  }

  body:has(.app-shell) > .dialog {
    width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 20px;
  }

  body:has(.app-shell) > .dialog .dialog-head {
    padding: 19px 18px 14px;
  }

  body:has(.app-shell) > .dialog .dialog-body {
    padding: 16px 18px 19px;
  }

  body:has(.app-shell) > .dialog .dialog-actions {
    padding: 12px 18px 17px;
  }
}

@media (max-width: 480px) {
  .app-shell .topbar {
    padding-right: calc(13px + env(safe-area-inset-right));
    padding-left: calc(13px + env(safe-area-inset-left));
  }

  .app-shell .page {
    padding: 18px calc(10px + env(safe-area-inset-right)) calc(94px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
  }

  .app-shell .page-header-copy h1,
  .seller-lead-workspace .page-header-copy h1 {
    font-size: clamp(1.65rem, 9vw, 2rem);
    overflow-wrap: anywhere;
  }

  .app-shell .page-header-copy p {
    font-size: 12px;
  }

  .app-shell .panel,
  .app-shell .panel-section {
    padding: 15px;
    border-radius: 18px;
  }

  .app-shell .panel--flush {
    padding: 0;
  }

  .app-shell .button {
    min-height: 42px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .app-shell .tabs {
    gap: 2px;
  }

  .app-shell .tab {
    min-height: 42px;
    padding: 8px 11px;
  }

  .app-shell .mobile-nav {
    right: max(7px, env(safe-area-inset-right));
    bottom: max(7px, env(safe-area-inset-bottom));
    left: max(7px, env(safe-area-inset-left));
    padding: 4px;
    border-radius: 17px;
  }

  .app-shell .mobile-nav-link,
  .app-shell[data-shell-key^="admin:"] .mobile-nav-link {
    min-width: 58px;
    min-height: 51px;
    padding: 3px;
    font-size: 10px;
  }

  .app-shell .mobile-nav-link small {
    font-size: 10px;
  }

  body:has(.app-shell) > .dialog .dialog-actions {
    align-items: stretch;
  }

  body:has(.app-shell) > .dialog .dialog-actions .button,
  body:has(.app-shell) > .dialog .dialog-actions > a {
    flex: 1 1 132px;
  }
}

@media (max-width: 380px) {
  .app-shell[data-shell-key^="sales:"]:not([data-shell-key="sales:onboarding"]) .mobile-nav {
    justify-content: start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .app-shell[data-shell-key^="sales:"]:not([data-shell-key="sales:onboarding"]) .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .app-shell[data-shell-key^="sales:"]:not([data-shell-key="sales:onboarding"]) .mobile-nav-link {
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body:has(.app-shell) {
    background: var(--canvas);
  }

  .app-shell .sidebar::before,
  .app-shell .topbar::before,
  .app-shell .mobile-nav,
  .app-shell :where(.panel, .card, .action-count, .money-overview, .filter-panel, .lead-mobile-card, .queue-navigator, .empty-state, .error-state),
  body:has(.app-shell) > .dialog {
    background: var(--surface);
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (forced-colors: active) {
  .app-shell .nav-link[aria-current="page"] .nav-icon,
  .app-shell .mobile-nav-link[aria-current="page"] .nav-icon,
  .app-shell .button--primary {
    color: ButtonText;
    background: ButtonFace;
    border: 1px solid ButtonText;
    box-shadow: none;
  }
}

/* Balanced hybrid sign-in
 *
 * The authenticated workspace and public entry now share the same paper, ink,
 * and violet character. This is intentionally scoped away from the application,
 * customer-review, W-9, and legal-document surfaces.
 */
.login-page:not(.application-page) {
  --canvas: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #f1f2f5;
  --surface-strong: #e8e9ee;
  --surface-subtle: #fbfbfc;
  --ink: #08090d;
  --ink-soft: #2a2b32;
  --ink-muted: #60636a;
  --ink-faint: #666971;
  --border: rgba(31, 31, 43, 0.1);
  --border-strong: rgba(31, 31, 43, 0.17);
  --control-border: #858f9b;
  --brand: #111218;
  --brand-hover: #22242c;
  --accent: #552fca;
  --accent-soft: #efedff;
  min-width: 320px;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.78fr);
  gap: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 13% -6%, rgba(142, 124, 246, 0.17), transparent 33rem),
    radial-gradient(circle at 96% 8%, rgba(113, 163, 224, 0.1), transparent 36rem),
    radial-gradient(rgba(65, 61, 110, 0.055) 0.65px, transparent 0.75px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fbfcfd 0%, var(--canvas) 58%, #f3f4f7 100%);
  font-family: Geist, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page:not(.application-page) .login-brand-panel {
  min-width: 0;
  min-height: calc(100dvh - 28px);
  padding: clamp(32px, 5vw, 68px);
  background:
    radial-gradient(circle at 74% 19%, rgba(116, 100, 231, 0.3), transparent 28rem),
    radial-gradient(circle at 12% 94%, rgba(75, 99, 180, 0.18), transparent 25rem),
    linear-gradient(145deg, #252630 0%, #111218 57%, #08090d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 80px rgba(16, 17, 25, 0.18);
}

.login-page:not(.application-page) .login-brand-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 0.65px, transparent 0.75px);
  background-size: 28px 28px;
  border-radius: inherit;
  opacity: 0.14;
  mask-image: radial-gradient(ellipse 82% 66% at 62% 20%, #000 15%, transparent 78%);
  pointer-events: none;
}

.login-page:not(.application-page) .login-brand-panel::after {
  right: -150px;
  bottom: -135px;
  width: min(62vw, 630px);
  height: min(48vw, 470px);
  background-size: contain;
  border-radius: 0;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.28));
  opacity: 0.07;
  transform: rotate(-5deg);
}

.login-page:not(.application-page) .brand-lockup {
  position: relative;
  z-index: 2;
  gap: 12px;
}

.login-page:not(.application-page) .brand-mark {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(0, 0, 0, 0.26);
}

.login-page:not(.application-page) .brand-copy strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.login-page:not(.application-page) .brand-copy small {
  margin-top: 4px;
  color: #aaaab4;
  font-size: 11px;
}

.login-page:not(.application-page) .login-brand-message {
  max-width: 680px;
  margin: clamp(56px, 10vh, 112px) 0;
}

.login-page:not(.application-page) .login-eyebrow {
  margin-bottom: 19px;
  color: #bbb6ff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.login-page:not(.application-page) .login-brand-message h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 5.25vw, 5.8rem);
  font-weight: 560;
  letter-spacing: -0.067em;
  line-height: 0.9;
  text-wrap: balance;
}

.login-page:not(.application-page) .login-brand-message p {
  max-width: 570px;
  color: #b7b8c1;
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  line-height: 1.68;
}

.login-page:not(.application-page) .login-proof {
  gap: 8px;
}

.login-page:not(.application-page) .login-proof span {
  padding: 7px 11px;
  color: #d1d1d8;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.11);
  font-size: 11px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.login-page:not(.application-page) .login-form-panel {
  min-width: 0;
  padding: clamp(28px, 5vw, 72px);
  background: transparent;
}

.login-page:not(.application-page) .login-card {
  width: min(100%, 500px);
  padding: clamp(30px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 31, 43, 0.075);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 30px 82px rgba(43, 42, 67, 0.13), 0 7px 20px rgba(43, 42, 67, 0.05);
}

.login-page:not(.application-page) .login-card > .eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.login-page:not(.application-page) .login-card h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 610;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.login-page:not(.application-page) .login-card > p {
  margin-bottom: 25px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.58;
}

.login-page:not(.application-page) .login-workspace-switch {
  gap: 8px;
  margin-bottom: 13px;
  padding: 4px;
  background: rgba(232, 233, 238, 0.72);
  border: 1px solid rgba(31, 31, 43, 0.065);
  border-radius: 16px;
  box-shadow: inset 0 1px 2px rgba(20, 20, 30, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.login-page:not(.application-page) .login-workspace-option {
  min-height: 84px;
  gap: 11px;
  padding: 13px;
  color: var(--ink-muted);
  background: transparent;
  border-color: transparent;
  border-radius: 12px;
  box-shadow: none;
}

.login-page:not(.application-page) .login-workspace-option:hover,
.login-page:not(.application-page) .login-workspace-option:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(31, 31, 43, 0.05);
  box-shadow: none;
}

.login-page:not(.application-page) .login-workspace-option.is-active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(31, 31, 43, 0.065);
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(43, 42, 67, 0.08);
}

.login-page:not(.application-page) .login-workspace-icon {
  width: 34px;
  height: 34px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(31, 31, 43, 0.09);
  border-radius: 10px;
}

.login-page:not(.application-page) .login-workspace-option.is-active .login-workspace-icon {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(85, 47, 202, 0.12);
}

.login-page:not(.application-page) .login-workspace-option strong {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.login-page:not(.application-page) .login-workspace-option small {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
}

.login-page:not(.application-page) .login-role-note {
  margin-bottom: 20px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.5;
}

.login-page:not(.application-page) :where(.input, .select, .textarea) {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--control-border);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px rgba(20, 20, 30, 0.025), inset 0 1px 0 #fff;
}

.login-page:not(.application-page) .field label,
.login-page:not(.application-page) .field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.login-page:not(.application-page) .auth-stack,
.login-page:not(.application-page) .auth-form {
  gap: 13px;
}

.login-page:not(.application-page) .button {
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.login-page:not(.application-page) .auth-provider-button {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(31, 31, 43, 0.14);
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(43, 42, 67, 0.05);
}

.login-page:not(.application-page) .button--primary {
  min-height: 48px;
  background: linear-gradient(145deg, #1b1d24 0%, #08090d 76%);
  border-color: #08090d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 9px 24px rgba(8, 9, 13, 0.16);
}

.login-page:not(.application-page) .button--primary:hover:not([disabled]) {
  background: linear-gradient(145deg, #292c35 0%, #111218 76%);
  border-color: #111218;
}

.login-page:not(.application-page) .google-mark {
  width: 24px;
  height: 24px;
  color: #365ec9;
  border-color: rgba(31, 31, 43, 0.1);
  box-shadow: 0 2px 5px rgba(43, 42, 67, 0.05);
}

.login-page:not(.application-page) .auth-divider {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.login-page:not(.application-page) .auth-divider::before,
.login-page:not(.application-page) .auth-divider::after,
.login-page:not(.application-page) .login-secondary {
  border-color: rgba(31, 31, 43, 0.09);
}

.login-page:not(.application-page) .login-secondary {
  padding-top: 19px;
  margin-top: 21px;
  font-size: 11px;
}

.login-page:not(.application-page) .login-secondary a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.login-page:not(.application-page) .login-footnote {
  margin-top: 18px;
  color: var(--ink-faint);
  font-size: 10px;
}

.login-page:not(.application-page) :focus-visible {
  outline-color: #552fca;
}

.boot-screen:has(.auth-callback-card) {
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(142, 124, 246, 0.16), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(113, 163, 224, 0.1), transparent 34rem),
    radial-gradient(rgba(65, 61, 110, 0.055) 0.65px, transparent 0.75px) 0 0 / 28px 28px,
    #f7f8fb;
}

.boot-screen:has(.auth-callback-card) .auth-callback-card {
  padding: 42px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(31, 31, 43, 0.08);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 #fff, 0 30px 82px rgba(43, 42, 67, 0.13);
}

.boot-screen:has(.auth-callback-card) .auth-callback-card h1 {
  font-weight: 610;
  letter-spacing: -0.045em;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .login-page:not(.application-page) .login-card,
  .boot-screen:has(.auth-callback-card) .auth-callback-card {
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    backdrop-filter: blur(22px) saturate(130%);
  }
}

@media (max-width: 1100px) {
  .login-page:not(.application-page) {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.88fr);
  }

  .login-page:not(.application-page) .login-brand-panel {
    padding: 40px;
  }

  .login-page:not(.application-page) .login-brand-message h1 {
    font-size: clamp(2.8rem, 5.8vw, 4.7rem);
  }

  .login-page:not(.application-page) .login-form-panel {
    padding: 32px;
  }
}

@media (max-width: 899px) {
  .login-page:not(.application-page) {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .login-page:not(.application-page) .login-brand-panel {
    min-height: 320px;
    padding: calc(28px + env(safe-area-inset-top)) calc(28px + env(safe-area-inset-right)) 28px calc(28px + env(safe-area-inset-left));
    border-radius: 23px;
  }

  .login-page:not(.application-page) .login-brand-message {
    max-width: 650px;
    margin: 48px 0 30px;
  }

  .login-page:not(.application-page) .login-brand-message h1 {
    max-width: 650px;
    margin-bottom: 16px;
    font-size: clamp(2.6rem, 9vw, 4.4rem);
    line-height: 0.94;
  }

  .login-page:not(.application-page) .login-brand-message p {
    max-width: 580px;
    font-size: 14px;
  }

  .login-page:not(.application-page) .login-form-panel {
    align-items: flex-start;
    padding: 34px calc(16px + env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  }

  .login-page:not(.application-page) .login-card {
    width: min(100%, 580px);
    padding: clamp(28px, 6vw, 38px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(31, 31, 43, 0.075);
    border-radius: 24px;
    box-shadow: inset 0 1px 0 #fff, 0 24px 64px rgba(43, 42, 67, 0.11);
  }
}

@media (max-width: 767px) {
  .login-page:not(.application-page) .login-workspace-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-page:not(.application-page) .login-workspace-option {
    min-height: 80px;
  }
}

@media (max-width: 520px) {
  .login-page:not(.application-page) {
    gap: 8px;
    padding: 8px;
  }

  .login-page:not(.application-page) .login-brand-panel {
    min-height: 280px;
    padding: calc(22px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 22px calc(20px + env(safe-area-inset-left));
    border-radius: 20px;
  }

  .login-page:not(.application-page) .brand-mark {
    width: 40px;
    height: 40px;
  }

  .login-page:not(.application-page) .brand-copy strong {
    font-size: 13px;
  }

  .login-page:not(.application-page) .login-brand-message {
    margin: 38px 0 12px;
  }

  .login-page:not(.application-page) .login-brand-message h1 {
    margin-bottom: 13px;
    font-size: clamp(2.15rem, 11vw, 3rem);
    line-height: 0.98;
  }

  .login-page:not(.application-page) .login-brand-message p {
    display: block;
    font-size: 12px;
    line-height: 1.55;
  }

  .login-page:not(.application-page) .login-proof {
    display: none;
  }

  .login-page:not(.application-page) .login-form-panel {
    padding: 24px calc(8px + env(safe-area-inset-right)) calc(38px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  }

  .login-page:not(.application-page) .login-card {
    padding: 24px 20px;
    border-radius: 21px;
  }

  .login-page:not(.application-page) .login-card h2 {
    font-size: 1.8rem;
  }

  .login-page:not(.application-page) .login-card > p {
    margin-bottom: 21px;
  }

  .login-page:not(.application-page) .login-workspace-switch {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .login-page:not(.application-page) .login-workspace-option {
    min-height: 68px;
    padding: 10px;
  }

  .login-page:not(.application-page) .login-role-note {
    margin-bottom: 18px;
  }

  .login-page:not(.application-page) .login-secondary {
    align-items: center;
    flex-direction: column;
    gap: 3px;
  }

  .boot-screen:has(.auth-callback-card) {
    padding: 12px;
  }

  .boot-screen:has(.auth-callback-card) .auth-callback-card {
    padding: 30px 22px;
    border-radius: 21px;
  }
}

@media (max-width: 350px) {
  .login-page:not(.application-page) .login-brand-panel {
    padding-right: calc(16px + env(safe-area-inset-right));
    padding-left: calc(16px + env(safe-area-inset-left));
  }

  .login-page:not(.application-page) .login-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .login-page:not(.application-page) .login-workspace-option small {
    font-size: 9px;
  }
}

@media (max-height: 640px) and (min-width: 900px) {
  .login-page:not(.application-page) .login-brand-panel {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .login-page:not(.application-page) .login-brand-message {
    margin: 30px 0;
  }

  .login-page:not(.application-page) .login-brand-message h1 {
    font-size: clamp(2.6rem, 5vw, 4rem);
  }

  .login-page:not(.application-page) .login-proof {
    display: none;
  }

  .login-page:not(.application-page) .login-form-panel {
    align-items: flex-start;
    padding-top: 22px;
    padding-bottom: 22px;
    overflow-y: auto;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .login-page:not(.application-page) {
    background: #f7f8fb;
  }

  .login-page:not(.application-page) .login-card,
  .boot-screen:has(.auth-callback-card) .auth-callback-card {
    background: #ffffff;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .login-page:not(.application-page) .login-proof span {
    background: #292a33;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (forced-colors: active) {
  .login-page:not(.application-page),
  .login-page:not(.application-page) .login-brand-panel,
  .login-page:not(.application-page) .login-card,
  .login-page:not(.application-page) .login-workspace-switch,
  .login-page:not(.application-page) .login-workspace-option,
  .boot-screen:has(.auth-callback-card),
  .boot-screen:has(.auth-callback-card) .auth-callback-card {
    color: CanvasText;
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
  }

  .login-page:not(.application-page) .login-workspace-option.is-active {
    border: 2px solid Highlight;
  }

  .login-page:not(.application-page) .login-brand-panel::before,
  .login-page:not(.application-page) .login-brand-panel::after {
    display: none;
  }
}

/* Balanced hybrid sales application
 *
 * Scoped to /apply so customer review, W-9, legal, sign-in, and authenticated
 * workspace layouts keep their own composition and compliance boundaries.
 */
.application-page {
  --canvas: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #f1f2f5;
  --surface-strong: #e8e9ee;
  --surface-subtle: #fbfbfc;
  --ink: #08090d;
  --ink-soft: #2a2b32;
  --ink-muted: #60636a;
  --ink-faint: #666971;
  --border: rgba(31, 31, 43, 0.1);
  --border-strong: rgba(31, 31, 43, 0.17);
  --control-border: #858f9b;
  --brand: #111218;
  --brand-hover: #22242c;
  --accent: #552fca;
  --accent-soft: #efedff;
  min-width: 320px;
  grid-template-columns: minmax(380px, 0.82fr) minmax(560px, 1.18fr);
  align-items: start;
  gap: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 12% -5%, rgba(142, 124, 246, 0.17), transparent 34rem),
    radial-gradient(circle at 95% 9%, rgba(113, 163, 224, 0.1), transparent 38rem),
    radial-gradient(rgba(65, 61, 110, 0.055) 0.65px, transparent 0.75px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fbfcfd 0%, var(--canvas) 58%, #f3f4f7 100%);
  font-family: Geist, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.application-page .login-brand-panel {
  position: sticky;
  top: 14px;
  min-width: 0;
  min-height: calc(100dvh - 28px);
  height: calc(100dvh - 28px);
  padding: clamp(32px, 4.2vw, 64px);
  background:
    radial-gradient(circle at 76% 19%, rgba(116, 100, 231, 0.3), transparent 27rem),
    radial-gradient(circle at 10% 94%, rgba(75, 99, 180, 0.18), transparent 24rem),
    linear-gradient(145deg, #252630 0%, #111218 57%, #08090d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 80px rgba(16, 17, 25, 0.18);
}

.application-page .login-brand-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 0.65px, transparent 0.75px);
  background-size: 28px 28px;
  border-radius: inherit;
  opacity: 0.14;
  -webkit-mask-image: radial-gradient(ellipse 82% 66% at 62% 20%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 82% 66% at 62% 20%, #000 15%, transparent 78%);
  pointer-events: none;
}

.application-page .login-brand-panel::after {
  right: -135px;
  bottom: -125px;
  width: min(54vw, 560px);
  height: min(43vw, 420px);
  background-size: contain;
  border-radius: 0;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.28));
  opacity: 0.07;
  transform: rotate(-5deg);
}

.application-page .brand-lockup {
  position: relative;
  z-index: 2;
  gap: 12px;
}

.application-page .brand-mark {
  width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(0, 0, 0, 0.26);
}

.application-page .brand-copy strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.application-page .brand-copy small {
  margin-top: 4px;
  color: #aaaab4;
  font-size: 11px;
}

.application-page .login-brand-message {
  max-width: 620px;
  margin: clamp(44px, 8vh, 92px) 0;
}

.application-page .login-eyebrow {
  margin-bottom: 18px;
  color: #bbb6ff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.application-page .login-brand-message h1 {
  max-width: 620px;
  margin-bottom: 20px;
  font-size: clamp(2.75rem, 4.7vw, 5.2rem);
  font-weight: 560;
  letter-spacing: -0.065em;
  line-height: 0.91;
  text-wrap: balance;
}

.application-page .login-brand-message p {
  max-width: 560px;
  color: #b7b8c1;
  font-size: clamp(0.92rem, 1.15vw, 1.04rem);
  line-height: 1.65;
}

.application-page .login-proof {
  gap: 8px;
}

.application-page .login-proof span {
  padding: 7px 11px;
  color: #d1d1d8;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.11);
  font-size: 11px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.application-page .login-form-panel {
  min-width: 0;
  align-items: flex-start;
  padding: clamp(28px, 4.2vw, 64px);
  background: transparent;
}

.application-page .application-card {
  width: min(100%, 720px);
  padding: clamp(30px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.91);
  border: 1px solid rgba(31, 31, 43, 0.075);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 30px 82px rgba(43, 42, 67, 0.13), 0 7px 20px rgba(43, 42, 67, 0.05);
}

.application-page .back-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 11px;
  margin: -7px 0 25px -9px;
  color: var(--ink-muted);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 680;
}

.application-page .back-link:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.application-page .application-card > .eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.application-page .application-card h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.4vw, 2.65rem);
  font-weight: 610;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.application-page .application-card > p {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
}

.application-page .application-card form.stack {
  gap: 20px;
}

.application-page .application-identity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.application-page .application-identity-grid > .field {
  align-content: start;
  min-width: 0;
}

.application-page .field {
  gap: 7px;
}

.application-page .field label,
.application-page .field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.application-page :where(.input, .select, .textarea) {
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--control-border);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px rgba(20, 20, 30, 0.025), inset 0 1px 0 #fff;
}

.application-page :where(.input, .select) {
  min-height: 48px;
  padding: 10px 12px;
}

.application-page .textarea {
  min-height: 126px;
  padding: 12px;
  line-height: 1.55;
}

.application-page :where(.input, .select, .textarea):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(85, 47, 202, 0.12), inset 0 1px 2px rgba(20, 20, 30, 0.02);
}

.application-page .field-help {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.application-page .application-verification {
  gap: 13px;
  padding: 17px;
  background: linear-gradient(135deg, rgba(239, 237, 255, 0.72), rgba(249, 249, 252, 0.82));
  border-color: rgba(85, 47, 202, 0.14);
  border-radius: 15px;
}

.application-page .application-verification .code-input {
  max-width: 220px;
  font-size: 18px;
  text-align: center;
}

.application-page .button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.application-page .button--small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 11px;
}

.application-page .button--primary {
  min-height: 48px;
  background: linear-gradient(145deg, #1b1d24 0%, #08090d 76%);
  border-color: #08090d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 9px 24px rgba(8, 9, 13, 0.16);
}

.application-page .button--primary:hover:not([disabled]) {
  background: linear-gradient(145deg, #292c35 0%, #111218 76%);
  border-color: #111218;
}

.application-page .application-privacy {
  padding: 14px 15px;
  margin: 22px 0 0;
  color: var(--ink-muted);
  background: rgba(241, 242, 245, 0.76);
  border: 1px solid rgba(31, 31, 43, 0.075);
  border-radius: 13px;
  font-size: 10px;
  line-height: 1.55;
  text-align: left;
}

.application-page :focus-visible {
  outline-color: #552fca;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .application-page .application-card {
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    backdrop-filter: blur(22px) saturate(130%);
  }
}

@media (max-width: 1120px) {
  .application-page {
    grid-template-columns: minmax(340px, 0.74fr) minmax(540px, 1.26fr);
  }

  .application-page .login-brand-panel {
    padding: 38px;
  }

  .application-page .login-brand-message h1 {
    font-size: clamp(2.7rem, 5.2vw, 4.5rem);
  }

  .application-page .login-form-panel {
    padding: 34px 28px;
  }

  .application-page .application-card {
    padding: 34px;
  }
}

@media (max-width: 959px) {
  .application-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .application-page .login-brand-panel {
    position: relative;
    top: auto;
    min-height: 340px;
    height: auto;
    padding: calc(28px + env(safe-area-inset-top)) calc(28px + env(safe-area-inset-right)) 28px calc(28px + env(safe-area-inset-left));
    border-radius: 23px;
  }

  .application-page .login-brand-message {
    max-width: 690px;
    margin: 48px 0 32px;
  }

  .application-page .login-brand-message h1 {
    max-width: 650px;
    margin-bottom: 16px;
    font-size: clamp(2.6rem, 9vw, 4.4rem);
    line-height: 0.94;
  }

  .application-page .login-brand-message p {
    max-width: 650px;
    font-size: 14px;
  }

  .application-page .login-form-panel {
    padding: 34px calc(16px + env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  }

  .application-page .application-card {
    width: min(100%, 720px);
    padding: clamp(28px, 6vw, 40px);
    background: rgba(255, 255, 255, 0.91);
    border: 1px solid rgba(31, 31, 43, 0.075);
    border-radius: 24px;
    box-shadow: inset 0 1px 0 #fff, 0 24px 64px rgba(43, 42, 67, 0.11);
  }
}

@media (max-width: 767px) {
  .application-page .application-identity-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .application-page .application-card form.stack {
    gap: 18px;
  }
}

@media (max-width: 520px) {
  .application-page {
    gap: 8px;
    padding: 8px;
  }

  .application-page .login-brand-panel {
    min-height: 300px;
    padding: calc(22px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) 22px calc(20px + env(safe-area-inset-left));
    border-radius: 20px;
  }

  .application-page .brand-mark {
    width: 40px;
    height: 40px;
  }

  .application-page .brand-copy strong {
    font-size: 13px;
  }

  .application-page .login-brand-message {
    margin: 38px 0 20px;
  }

  .application-page .login-brand-message h1 {
    margin-bottom: 13px;
    font-size: clamp(2.15rem, 11vw, 3rem);
    line-height: 0.98;
  }

  .application-page .login-brand-message p {
    font-size: 12px;
    line-height: 1.55;
  }

  .application-page .login-proof {
    display: none;
  }

  .application-page .login-form-panel {
    padding: 24px calc(8px + env(safe-area-inset-right)) calc(38px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  }

  .application-page .application-card {
    padding: 24px 20px;
    border-radius: 21px;
  }

  .application-page .back-link {
    margin-bottom: 21px;
  }

  .application-page .application-card h2 {
    font-size: 2rem;
  }

  .application-page .application-card > p {
    margin-bottom: 24px;
  }

  .application-page .application-verification {
    padding: 14px;
  }

  .application-page .application-verification .button,
  .application-page .application-verification .code-input {
    width: 100%;
    max-width: none;
  }

  .application-page .application-privacy {
    padding: 12px;
  }
}

@media (max-width: 350px) {
  .application-page .login-brand-panel {
    padding-right: calc(16px + env(safe-area-inset-right));
    padding-left: calc(16px + env(safe-area-inset-left));
  }

  .application-page .application-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .application-page .application-card h2 {
    font-size: 1.8rem;
  }
}

@media (max-height: 700px) and (min-width: 960px) {
  .application-page .login-brand-panel {
    position: relative;
    top: auto;
    height: auto;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .application-page .login-brand-message {
    margin: 28px 0;
  }

  .application-page .login-brand-message h1 {
    font-size: clamp(2.45rem, 4.5vw, 3.75rem);
  }

  .application-page .login-proof {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .application-page {
    background: #f7f8fb;
  }

  .application-page .application-card {
    background: #ffffff;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .application-page .login-proof span {
    background: #292a33;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (forced-colors: active) {
  .application-page,
  .application-page .login-brand-panel,
  .application-page .application-card,
  .application-page .application-verification,
  .application-page .application-privacy,
  .application-page .login-proof span {
    color: CanvasText;
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
  }

  .application-page .login-brand-panel::before,
  .application-page .login-brand-panel::after {
    display: none;
  }
}

@media (pointer: coarse) {
  .app-shell .button,
  .app-shell .tab,
  body:has(.app-shell) > .dialog .button,
  .application-page .button,
  .application-page .back-link {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Verified application receipt shares the entrance palette without changing the
 * immutable confirmation copy or its single return action. */
.application-success {
  --canvas: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #f1f2f5;
  --ink: #08090d;
  --ink-soft: #2a2b32;
  --ink-muted: #60636a;
  --border: rgba(31, 31, 43, 0.1);
  --accent: #552fca;
  --accent-soft: #efedff;
  min-width: 320px;
  padding: clamp(18px, 5vw, 60px);
  background:
    radial-gradient(circle at 16% -5%, rgba(142, 124, 246, 0.18), transparent 34rem),
    radial-gradient(circle at 94% 8%, rgba(113, 163, 224, 0.1), transparent 38rem),
    radial-gradient(rgba(65, 61, 110, 0.055) 0.65px, transparent 0.75px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fbfcfd 0%, var(--canvas) 62%, #f3f4f7 100%);
  font-family: Geist, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.application-success .application-success-card {
  width: min(100%, 620px);
  padding: clamp(34px, 6vw, 54px);
  background: rgba(255, 255, 255, 0.91);
  border: 1px solid rgba(31, 31, 43, 0.075);
  border-radius: 27px;
  box-shadow: inset 0 1px 0 #fff, 0 30px 82px rgba(43, 42, 67, 0.13), 0 7px 20px rgba(43, 42, 67, 0.05);
}

.application-success .success-mark {
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  color: #176e53;
  background: #e7f6ef;
  border: 1px solid rgba(23, 110, 83, 0.12);
  box-shadow: inset 0 1px 0 #fff, 0 9px 24px rgba(23, 110, 83, 0.1);
  font-size: 22px;
}

.application-success .eyebrow {
  margin-bottom: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.application-success h1 {
  margin-bottom: 15px;
  font-size: clamp(2.2rem, 6vw, 3.7rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.application-success .application-success-card p {
  max-width: 520px;
  margin-bottom: 28px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.68;
}

.application-success .button {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.application-success .button--primary {
  background: linear-gradient(145deg, #1b1d24 0%, #08090d 76%);
  border-color: #08090d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 9px 24px rgba(8, 9, 13, 0.16);
}

.application-success :focus-visible {
  outline-color: #552fca;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .application-success .application-success-card {
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    backdrop-filter: blur(22px) saturate(130%);
  }
}

@media (max-width: 520px) {
  .application-success {
    padding: 10px;
  }

  .application-success .application-success-card {
    padding: 32px 22px;
    border-radius: 22px;
  }

  .application-success h1 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }

  .application-success .button {
    width: 100%;
  }
}

@media (max-width: 350px) {
  .application-success .application-success-card {
    padding-right: 17px;
    padding-left: 17px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .application-success {
    background: #f7f8fb;
  }

  .application-success .application-success-card {
    background: #ffffff;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (forced-colors: active) {
  .application-success,
  .application-success .application-success-card,
  .application-success .success-mark {
    color: CanvasText;
    background: Canvas;
    border-color: CanvasText;
    box-shadow: none;
  }
}

/* Seller money views and shared semantic icon treatment */
.app-shell .price-update-heading {
  align-items: center;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.price-update-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.price-update-panel > .empty-inline {
  padding: 25px 20px;
  margin: 0;
}

.price-update-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 0;
  gap: 13px;
  padding: 15px 18px;
  transition: background-color var(--motion-fast) var(--ease-ui);
}

.price-update-item:hover {
  background: rgba(247, 248, 252, 0.74);
}

.price-update-marker {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.price-update-marker .ui-icon {
  width: 17px;
  height: 17px;
}

.price-update-marker--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 18%, transparent);
}

.price-update-marker--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 18%, transparent);
}

.price-update-marker--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 18%, transparent);
}

.price-update-marker--info {
  color: var(--info);
  background: var(--info-soft);
  border-color: color-mix(in srgb, var(--info) 18%, transparent);
}

.price-update-main {
  display: grid;
  gap: 4px;
}

.price-update-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.price-update-title .item-title {
  min-width: 0;
  padding-top: 1px;
  color: var(--ink);
  font-size: 14px;
  white-space: normal;
}

.price-update-title a.item-title:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.price-update-amount {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  text-align: right;
}

.price-update-amount small {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.price-update-amount strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.price-update-detail {
  max-width: 68ch;
  margin-top: 4px;
  line-height: 1.5;
}

.price-update-actions {
  align-content: center;
  align-items: flex-end;
  flex-direction: column;
  white-space: normal;
}

.price-update-item--compact {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  padding: 13px 14px;
}

.price-update-item--compact .price-update-marker {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.price-update-item--compact .price-update-marker .ui-icon {
  width: 15px;
  height: 15px;
}

.price-update-item--compact .price-update-actions {
  grid-column: 2;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.timeline-dot .ui-icon {
  width: 13px;
  height: 13px;
}

.seller-access-icon .ui-icon,
.seller-contact-lock-icon .ui-icon,
.admin-audit-refresh-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.seller-paused-mark .ui-icon {
  width: 23px;
  height: 23px;
}

.seller-unlock-steps li > span .ui-icon {
  width: 16px;
  height: 16px;
}

.empty-icon .ui-icon,
.error-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.toast-icon .ui-icon {
  width: 13px;
  height: 13px;
}

.lock-banner > span .ui-icon {
  width: 16px;
  height: 16px;
}

.chat-link-arrow .ui-icon,
.chat-pins-heading .ui-icon,
.chat-message-empty .ui-icon {
  width: 16px;
  height: 16px;
}

@media (max-width: 720px) {
  .app-shell .price-update-heading {
    align-items: flex-start;
  }

  .price-update-heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .price-update-item {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    padding: 14px 15px;
  }

  .price-update-actions {
    grid-column: 2;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .app-shell .price-update-heading {
    display: grid;
  }

  .price-update-heading-actions {
    justify-content: flex-start;
  }

  .price-update-title {
    display: grid;
    gap: 6px;
  }

  .price-update-amount {
    justify-self: start;
    text-align: left;
  }
}

@media (forced-colors: active) {
  .price-update-marker {
    color: CanvasText;
    background: Canvas;
    border-color: CanvasText;
  }
}
