:root {
  color-scheme: light dark;
  --bg: #e8f4f1;
  --surface: #fbfffd;
  --surface-soft: #eaf7f3;
  --surface-raised: #ffffff;
  --ink: #102326;
  --text: var(--ink);
  --muted: #5d7374;
  --line: #bdded8;
  --line-strong: #8fc3ba;
  --accent: #0d9187;
  --accent-strong: #087165;
  --accent-soft: #dff7f2;
  --accent-warm: #d46f4d;
  --accent-warm-soft: #fff0e9;
  --accent-cool: #5368d6;
  --accent-cool-soft: #ecefff;
  --scrollbar-track: color-mix(in srgb, var(--accent-soft) 58%, #ffffff);
  --scrollbar-thumb: color-mix(in srgb, var(--accent) 42%, var(--accent-warm) 16%);
  --scrollbar-thumb-hover: color-mix(in srgb, var(--accent) 62%, var(--accent-warm) 20%);
  --scrollbar-thumb-warm: color-mix(in srgb, var(--accent-warm) 34%, var(--accent) 30%);
  --warning: #976612;
  --warning-soft: #fff3d8;
  --success: #167449;
  --success-soft: #e5f5ea;
  --good: var(--success);
  --danger: #ad3f4b;
  --danger-soft: #fdebed;
  --workflow-row-bg: var(--surface-soft);
  --workflow-row-hover-bg: var(--accent-soft);
  --workflow-row-warning-bg: var(--warning-soft);
  --sidebar-bg: #12383c;
  --sidebar-bg-hover: #245057;
  --sidebar-active: #f2c47b;
  --sidebar-text: #edf7f6;
  --sidebar-muted: #b7cbc8;
  --select-chevron: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.1 7.2 10 12.1l4.9-4.9' fill='none' stroke='%23102326' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --focus-ring: rgba(12, 136, 126, 0.24);
  --analytics-chart-surface: linear-gradient(180deg, #fbfcfc 0%, #ffffff 100%);
  --analytics-chart-grid: #e7edf0;
  --analytics-chart-axis: #cdd8dc;
  --analytics-chart-track: #e9f0f2;
  --analytics-chart-dot-fill: #ffffff;
  --analytics-heatmap-label: #103c3d;
  --analytics-bucket-text: #5b1e2b;
  --analytics-bucket-muted: #6b3d47;
  --shadow: 0 20px 54px rgba(20, 35, 38, 0.13);
  --shadow-soft: 0 12px 32px rgba(20, 35, 38, 0.095);
  --radius: 8px;
  --motion-fast: 140ms ease;
  --motion-medium: 190ms ease;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071315;
    --surface: #132326;
    --surface-soft: #192d30;
    --surface-raised: #1f3538;
    --ink: #eef6f4;
    --text: var(--ink);
    --muted: #a5b6b6;
    --line: #2b5155;
    --line-strong: #4b787b;
    --accent: #4ac2b1;
    --accent-strong: #7de2d2;
    --accent-soft: rgba(74, 194, 177, 0.16);
    --accent-warm: #f09a78;
    --accent-warm-soft: rgba(240, 154, 120, 0.16);
    --accent-cool: #9aa8ff;
    --accent-cool-soft: rgba(154, 168, 255, 0.16);
    --scrollbar-track: color-mix(in srgb, var(--surface-soft) 68%, #071315);
    --scrollbar-thumb: color-mix(in srgb, var(--accent) 42%, var(--accent-warm) 18%);
    --scrollbar-thumb-hover: color-mix(in srgb, var(--accent) 62%, var(--accent-warm) 22%);
    --scrollbar-thumb-warm: color-mix(in srgb, var(--accent-warm) 36%, var(--accent) 28%);
    --warning: #f0c36b;
    --warning-soft: rgba(240, 195, 107, 0.16);
    --success: #72d59c;
    --success-soft: rgba(114, 213, 156, 0.16);
    --danger: #f28b99;
    --danger-soft: rgba(242, 139, 153, 0.16);
    --workflow-row-bg: #17282b;
    --workflow-row-hover-bg: rgba(74, 194, 177, 0.13);
    --workflow-row-warning-bg: rgba(240, 195, 107, 0.16);
    --sidebar-bg: #081315;
    --sidebar-bg-hover: #1b3336;
    --sidebar-active: #f0c36b;
    --sidebar-text: #f2fbfa;
    --sidebar-muted: #8ea3a2;
    --select-chevron: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.1 7.2 10 12.1l4.9-4.9' fill='none' stroke='%23f2fbfa' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --focus-ring: rgba(74, 194, 177, 0.28);
    --analytics-chart-surface:
      linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 82%, #061113) 0%, color-mix(in srgb, var(--surface-raised) 82%, #071315) 100%);
    --analytics-chart-grid: rgba(125, 226, 210, 0.11);
    --analytics-chart-axis: rgba(198, 226, 222, 0.32);
    --analytics-chart-track: rgba(198, 226, 222, 0.11);
    --analytics-chart-dot-fill: #102326;
    --analytics-heatmap-label: #e9fbf8;
    --analytics-bucket-text: #ffe9ed;
    --analytics-bucket-muted: #f4bcc5;
    --shadow: 0 20px 46px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.3);
  }
}

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

* {
  box-sizing: border-box;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 76% 18%, color-mix(in srgb, var(--accent) 16%, transparent) 0 16rem, transparent 31rem),
    radial-gradient(circle at 12% 86%, color-mix(in srgb, var(--accent-warm) 15%, transparent) 0 15rem, transparent 30rem),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent) 0 20%, transparent 50%),
    linear-gradient(215deg, color-mix(in srgb, var(--accent-warm) 18%, transparent) 0 16%, transparent 44%),
    var(--bg);
  background-attachment: fixed;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  border: 3px solid var(--scrollbar-track);
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--scrollbar-thumb) 0%, var(--scrollbar-thumb-warm) 100%);
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, var(--scrollbar-thumb-hover) 0%, var(--scrollbar-thumb-warm) 100%);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 76% 18%, color-mix(in srgb, var(--accent) 16%, transparent) 0 16rem, transparent 31rem),
    radial-gradient(circle at 12% 86%, color-mix(in srgb, var(--accent-warm) 15%, transparent) 0 15rem, transparent 30rem),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent) 0 20%, transparent 50%),
    linear-gradient(215deg, color-mix(in srgb, var(--accent-warm) 18%, transparent) 0 16%, transparent 44%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
}

body:has(.app-shell.public-home-active) {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
  min-width: 0;
}

select:not([multiple]) {
  appearance: none;
  min-height: 38px;
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 42px 0 12px;
  background-image:
    var(--select-chevron),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 92%, #ffffff), color-mix(in srgb, var(--surface-raised) 88%, var(--accent-soft)));
  background-position:
    right 13px center,
    0 0;
  background-repeat: no-repeat;
  background-size:
    18px 18px,
    100% 100%;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    background-color var(--motion-fast);
}

@media (prefers-color-scheme: dark) {
  select:not([multiple]) {
    background-image:
      var(--select-chevron),
      linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 90%, #ffffff), color-mix(in srgb, var(--surface-raised) 86%, var(--accent-soft)));
  }
}

select:not([multiple]) option {
  color: #142326;
  background: #ffffff;
  font: 500 14px/1.35 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  overflow-x: clip;
  overflow-y: visible;
  transition: grid-template-columns 160ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 84px minmax(0, 1fr);
}

.app-shell.public-home-active,
.app-shell.public-auth-active {
  display: block;
  background: var(--bg);
  color-scheme: light dark;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --surface-raised: #ffffff;
  --ink: #142326;
  --text: var(--ink);
  --muted: #627478;
  --line: #d9e3e2;
  --line-strong: #becdcb;
  --accent: #0c887e;
  --accent-strong: #07695f;
  --accent-soft: #e3f5f1;
  --accent-warm: #d46f4d;
  --accent-warm-soft: #fff0e9;
  --accent-cool: #5368d6;
  --accent-cool-soft: #ecefff;
  --warning: #976612;
  --warning-soft: #fff3d8;
  --success: #167449;
  --success-soft: #e5f5ea;
  --good: var(--success);
  --danger: #ad3f4b;
  --danger-soft: #fdebed;
  --focus-ring: rgba(12, 136, 126, 0.24);
  --shadow: 0 14px 34px rgba(20, 35, 38, 0.09);
  --shadow-soft: 0 8px 24px rgba(20, 35, 38, 0.07);
}

.app-shell.public-home-active {
  overflow-x: clip;
}

@media (prefers-color-scheme: dark) {
  .app-shell.public-home-active,
  .app-shell.public-auth-active {
    --bg: #101719;
    --surface: #172124;
    --surface-soft: #1e2a2d;
    --surface-raised: #202c30;
    --ink: #eef6f4;
    --text: var(--ink);
    --muted: #a5b6b6;
    --line: #2d3d40;
    --line-strong: #415459;
    --accent: #4ac2b1;
    --accent-strong: #7de2d2;
    --accent-soft: rgba(74, 194, 177, 0.16);
    --accent-warm: #f09a78;
    --accent-warm-soft: rgba(240, 154, 120, 0.16);
    --accent-cool: #9aa8ff;
    --accent-cool-soft: rgba(154, 168, 255, 0.16);
    --warning: #f0c36b;
    --warning-soft: rgba(240, 195, 107, 0.16);
    --success: #72d59c;
    --success-soft: rgba(114, 213, 156, 0.16);
    --good: var(--success);
    --danger: #f28b99;
    --danger-soft: rgba(242, 139, 153, 0.16);
    --focus-ring: rgba(74, 194, 177, 0.28);
    --shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.26);
  }
}

.app-shell.public-home-active .sidebar,
.app-shell.public-home-active .toolbar,
.app-shell.public-home-active .app-notice,
.app-shell.public-auth-active .sidebar,
.app-shell.public-auth-active .toolbar,
.app-shell.public-auth-active .app-notice {
  display: none;
}

.sidebar {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 15%, transparent) 0 18%, transparent 38%),
    linear-gradient(28deg, transparent 0 36%, color-mix(in srgb, var(--accent-warm) 12%, transparent) 36% 50%, transparent 50% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar-bg) 86%, #294247) 0%, var(--sidebar-bg) 52%),
    var(--sidebar-bg);
  background-repeat: no-repeat;
  background-size: 100% 100vh;
  color: var(--sidebar-text);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--accent) 18%, transparent);
  scrollbar-color:
    color-mix(in srgb, var(--accent) 54%, var(--accent-warm) 18%)
    color-mix(in srgb, var(--sidebar-bg-hover) 52%, var(--sidebar-bg));
}

.sidebar::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--sidebar-bg-hover) 52%, var(--sidebar-bg));
}

.sidebar::-webkit-scrollbar-thumb {
  border-color: color-mix(in srgb, var(--sidebar-bg-hover) 52%, var(--sidebar-bg));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 58%, var(--sidebar-text) 8%) 0%,
      color-mix(in srgb, var(--accent-warm) 34%, var(--accent) 36%) 100%
    );
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 72%, var(--sidebar-text) 10%) 0%,
      color-mix(in srgb, var(--accent-warm) 42%, var(--accent) 38%) 100%
    );
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 38px 10px 6px;
}

.brand-mark {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(145deg, #0f8d86 0%, #0b756f 58%, #d87956 100%);
  box-shadow:
    0 14px 28px color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.2)),
    0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
  cursor: pointer;
  overflow: visible;
  transition:
    filter var(--motion-fast),
    transform var(--motion-fast),
    box-shadow var(--motion-fast);
}

.brand-mark-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rr-metronome-shadow,
.rr-metronome-post,
.rr-metronome-accent,
.rr-metronome-arm path {
  fill: none;
  stroke-linecap: round;
}

.rr-metronome-shadow {
  stroke: #073044;
  stroke-width: 6;
  opacity: 0.22;
}

.rr-metronome-body {
  fill: #f7fffd;
  stroke: #06243a;
  stroke-width: 4.6;
  stroke-linejoin: round;
}

.rr-metronome-base {
  fill: #f7fffd;
  stroke: #06243a;
  stroke-width: 4.6;
}

.rr-metronome-post {
  stroke: #06243a;
  stroke-width: 4.2;
}

.rr-metronome-arm {
  transform-origin: 32px 36px;
  transform-box: view-box;
  transform: rotate(-28deg);
  transition: transform 170ms ease-out;
  will-change: transform;
}

.rr-metronome-arm path {
  stroke: #18b89d;
  stroke-width: 4.6;
}

.rr-metronome-arm circle {
  fill: #0f9184;
  stroke: #dff4f1;
  stroke-width: 1.6;
}

.rr-metronome-accent {
  stroke: #d87956;
  stroke-width: 2.8;
  opacity: 0.88;
}

.brand-mark:hover,
.brand-mark:active {
  filter: saturate(1.12) brightness(1.05);
  box-shadow:
    0 14px 28px color-mix(in srgb, var(--accent) 24%, rgba(0, 0, 0, 0.18)),
    0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .brand-mark.metronome-always-on .rr-metronome-arm {
    animation: metronome-arm-tick 1480ms ease-in-out infinite;
  }

  .brand:hover .rr-metronome-arm,
  .brand:active .rr-metronome-arm,
  .public-brand:hover .rr-metronome-arm,
  .public-brand:active .rr-metronome-arm,
  .brand-mark:hover .rr-metronome-arm,
  .brand-mark:active .rr-metronome-arm {
    animation: metronome-arm-tick 1480ms ease-in-out infinite;
  }

  .brand.metronome-suppress-hover:hover .brand-mark:not(.metronome-kick) .rr-metronome-arm,
  .public-brand.metronome-suppress-hover:hover .brand-mark:not(.metronome-kick) .rr-metronome-arm,
  .brand-mark.metronome-suppress-hover:hover:not(.metronome-kick) .rr-metronome-arm {
    animation: none;
  }

  .brand-mark.metronome-kick .rr-metronome-arm {
    animation: metronome-arm-tick 1480ms ease-in-out 1;
  }
}

@keyframes metronome-arm-tick {
  0% {
    transform: rotate(-80deg);
  }

  50% {
    transform: rotate(80deg);
  }

  100% {
    transform: rotate(-80deg);
  }
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand div > span {
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 1.18;
  margin-top: 2px;
  max-width: 150px;
}

.sidebar-toggle {
  position: absolute;
  top: 20px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: #d7e1e4;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sidebar-toggle:hover {
  background: var(--sidebar-bg-hover);
  color: #ffffff;
}

.sidebar-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
  transform-origin: 50% 50%;
  transition: transform var(--motion-fast);
}

.sidebar-toggle [data-icon] {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  line-height: 0;
}

.sidebar-collapsed .brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 0 12px;
}

.sidebar-collapsed .brand div,
.sidebar-collapsed .nav-item span:last-child,
.sidebar-collapsed .nav-group-label,
.sidebar-collapsed .sidebar-foot {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  position: static;
  width: 42px;
  height: 42px;
  margin: 0 auto;
}

.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

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

.nav-item,
.icon-button {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  transition:
    background var(--motion-fast),
    color var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    transform var(--motion-fast);
}

.nav-item {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: var(--sidebar-muted);
  padding: 10px 12px;
  font-size: 14px;
  position: relative;
}

.nav-item span:last-child {
  min-width: 0;
  white-space: nowrap;
}

.nav-subitem {
  gap: 7px;
  padding-left: 18px;
  font-size: 13px;
}

.nav-group-label {
  color: color-mix(in srgb, var(--sidebar-muted) 72%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 14px 12px 5px;
  text-transform: uppercase;
}

.nav-item svg {
  width: 17px;
  height: 17px;
}

.nav-item.active,
.nav-item:hover {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 17%, var(--sidebar-bg-hover)) 0%, var(--sidebar-bg-hover) 100%);
  color: #ffffff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--sidebar-active);
}

.nav-item:not(:disabled):not(.disabled):hover {
  transform: translateX(2px);
}

.nav-item:disabled,
.nav-item.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nav-item:disabled:hover,
.nav-item.disabled:hover {
  background: transparent;
  color: var(--sidebar-muted);
  transform: none;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 8px 0;
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--sidebar-muted);
}

.sidebar-foot strong {
  color: #ffffff;
  font-size: 13px;
}

.sidebar-foot span:not(.muted-label) {
  line-height: 1.35;
}

.dev-session-switcher {
  display: grid;
  gap: 5px;
  margin: 6px 0;
}

.dev-session-switcher.hidden {
  display: none;
}

.dev-session-switcher select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background-color: var(--sidebar-bg-hover);
  color: #ffffff;
  padding: 7px 34px 7px 8px;
  font-size: 12px;
}

.session-sign-out {
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: transparent;
  color: #d8e4e7;
  padding: 6px 8px;
  font: inherit;
  cursor: pointer;
}

.session-sign-out:hover,
.session-sign-out:focus-visible {
  border-color: rgba(143, 189, 187, 0.7);
  color: #ffffff;
}

.session-sign-out:disabled {
  cursor: wait;
  opacity: 0.55;
}

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

.workspace {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  position: relative;
  background:
    radial-gradient(circle at 72% 12%, color-mix(in srgb, var(--accent) 16%, transparent) 0 14rem, transparent 30rem),
    radial-gradient(circle at 92% 72%, color-mix(in srgb, var(--accent-warm) 14%, transparent) 0 12rem, transparent 28rem),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent) 0 22%, transparent 52%),
    linear-gradient(215deg, color-mix(in srgb, var(--accent-warm) 18%, transparent) 0 14%, transparent 43%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 26%, transparent), transparent 30rem),
    var(--bg);
}

.workspace::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--accent) 24%, transparent) 0 11rem, transparent 28rem),
    radial-gradient(circle at 22% 80%, color-mix(in srgb, var(--accent-warm) 18%, transparent) 0 12rem, transparent 28rem),
    linear-gradient(126deg, transparent 0 8%, color-mix(in srgb, var(--accent) 14%, transparent) 8% 20%, transparent 20% 58%, color-mix(in srgb, var(--accent-warm) 14%, transparent) 58% 72%, transparent 72% 100%),
    linear-gradient(24deg, transparent 0 18%, color-mix(in srgb, var(--accent-warm) 11%, transparent) 18% 31%, transparent 31% 67%, color-mix(in srgb, var(--accent) 12%, transparent) 67% 78%, transparent 78% 100%);
  opacity: 0.86;
  pointer-events: none;
}

.app-notice {
  margin: 12px 18px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.app-notice.success {
  border-color: #a4d8bd;
  background: var(--success-soft);
  color: var(--success);
}

.app-notice.error {
  border-color: #e6b0b0;
  background: var(--danger-soft);
  color: var(--danger);
}

.app-notice.hidden {
  display: none;
}

.feedback-capture-guide {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 19;
  width: min(640px, calc(100vw - 36px));
  border: 1px solid #8ecfc7;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(17, 27, 32, 0.2);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.feedback-capture-guide strong {
  display: block;
  font-size: 14px;
}

.feedback-capture-guide > div > span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 2px;
}

.feedback-capture-guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.feedback-capture-hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 27, 32, 0.55);
}

.modal-backdrop.hidden {
  display: none;
}

.operation-progress-backdrop {
  z-index: 30;
}

.operation-progress-backdrop .sample-progress-bar span {
  width: 38%;
  animation: operation-progress-slide 1.15s ease-in-out infinite;
}

@keyframes operation-progress-slide {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(290%);
  }
}

.modal-card {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 24px 70px rgba(17, 27, 32, 0.28);
  padding: 16px;
}

.modal-backdrop.report-drawer-open {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.modal-backdrop.report-drawer-open .modal-card {
  width: min(560px, 100vw);
  max-height: none;
  height: 100%;
  border-radius: 0;
  padding: 18px;
}

.modal-backdrop.modal-client-create-open .modal-card {
  width: min(860px, calc(100vw - 48px));
  padding: 28px 32px 30px;
}

.modal-backdrop.source-statement-open .modal-card {
  width: min(1180px, calc(100vw - 48px));
}

.modal-backdrop.modal-client-create-open .modal-header {
  margin-bottom: 20px;
}

.modal-backdrop.modal-client-create-open .modal-header h2 {
  font-size: 28px;
}

.modal-backdrop.modal-client-create-open .modal-header p {
  font-size: 16px;
  line-height: 1.4;
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-error {
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--line));
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.sample-progress-modal {
  display: grid;
  gap: 14px;
}

.sample-progress-current {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.sample-progress-current > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sample-progress-current strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.sample-progress-current small,
.sample-progress-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.sample-progress-bar {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.sample-progress-bar span {
  display: block;
  width: var(--sample-progress, 8%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success));
  transition: width var(--motion-medium);
}

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

.sample-progress-step {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.sample-progress-step svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.sample-progress-step span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sample-progress-step.done {
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
  background: var(--success-soft);
  color: var(--success);
}

.sample-progress-step.current {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sample-progress-note {
  margin: 0;
}

.modal-form {
  display: grid;
  gap: 18px;
}

.modal-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.modal-field > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.modal-field input,
.modal-field select,
.modal-field textarea {
  width: 100%;
  min-width: 0;
}

.modal-field textarea {
  resize: vertical;
}

.source-statement-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.source-statement-preview-meta span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 8px;
  background: var(--surface-soft);
}

.source-statement-table-scroll {
  max-height: min(62vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.source-statement-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.source-statement-table th,
.source-statement-table td {
  max-width: 260px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-statement-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.source-statement-table td {
  color: var(--ink);
}

.source-statement-text-preview {
  max-height: min(62vh, 620px);
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px;
  white-space: pre-wrap;
}

.client-create-form {
  gap: 18px;
  padding-top: 8px;
}

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

.client-directory-create-form .client-create-name-field,
.client-directory-create-form .client-directory-create-wide,
.client-directory-create-form .client-create-actions {
  grid-column: 1 / -1;
}

.client-create-name-field input {
  min-height: 48px;
  font-size: 20px;
}

.client-create-actions {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  gap: 14px;
}

.client-create-actions .icon-button {
  min-height: 48px;
  padding-inline: 20px;
}

.modal-destination-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.modal-destination-grid .icon-button {
  justify-content: center;
  min-height: 44px;
}

.workflow-completion-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--success-soft);
  color: var(--text);
  padding: 14px;
  margin-bottom: 14px;
}

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

.workflow-completion-next svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--success);
}

.workflow-completion-next div {
  min-width: 0;
}

.workflow-completion-next small {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workflow-completion-next strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
}

.workflow-completion-summary p {
  margin: 10px 0 0 30px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.toolbar {
  min-height: 86px;
  padding: 20px 24px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--accent-soft) 48%, var(--surface)) 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 16px 42px color-mix(in srgb, var(--accent) 8%, transparent);
}

.toolbar > div:first-child {
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 760;
}

.toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-account {
  min-height: 38px;
  max-width: min(100%, 520px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-raised) 88%, var(--accent-soft));
  box-shadow: var(--shadow-soft);
}

.toolbar-account-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 1px;
  padding: 3px 8px;
  border-radius: calc(var(--radius) - 3px);
  cursor: pointer;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.toolbar-account-meta:hover,
.toolbar-account-meta:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
  outline: none;
}

.toolbar-account-meta strong,
.toolbar-account-meta small {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.toolbar-account-meta strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.toolbar-account-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.toolbar-feedback,
.toolbar-sign-out {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(17, 27, 32, 0.04);
}

.icon-button.toolbar-feedback {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #ffffff 8%) 0%, var(--accent) 100%);
  color: #ffffff;
  border-color: color-mix(in srgb, var(--accent) 74%, var(--line-strong));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent);
}

.icon-button.toolbar-feedback:hover,
.icon-button.toolbar-feedback:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.toolbar-sign-out:hover,
.toolbar-sign-out:focus-visible {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.toolbar-sign-out svg {
  width: 16px;
  height: 16px;
}

.icon-button {
  min-height: 38px;
  padding: 0 13px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 94%, #ffffff) 0%, color-mix(in srgb, var(--surface-raised) 88%, var(--accent-soft)) 100%);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.icon-button.disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.icon-button.disabled {
  pointer-events: none;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button.primary {
  color: #ffffff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #ffffff) 0%, var(--accent) 100%);
  border-color: var(--accent);
  box-shadow: 0 9px 18px color-mix(in srgb, var(--accent) 20%, transparent);
}

.icon-button.primary:disabled,
.icon-button.primary.disabled {
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line-strong);
  opacity: 1;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.icon-button.primary:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-strong) 92%, #ffffff) 0%, var(--accent-strong) 100%);
  color: #ffffff;
}

.icon-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.icon-button.primary:disabled:hover,
.icon-button.primary.disabled:hover {
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line-strong);
  box-shadow: none;
  transform: none;
}

.icon-button.danger {
  background: color-mix(in srgb, var(--danger-soft) 76%, #ffffff);
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line-strong));
  color: var(--danger);
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
  background: color-mix(in srgb, var(--danger-soft) 72%, var(--danger) 14%);
  border-color: var(--danger);
  color: var(--danger);
}

.icon-button.compact {
  min-width: 34px;
  min-height: 34px;
  padding: 0 12px;
}

.icon-button.compact:has(> span:only-child[data-icon]) {
  width: 34px;
  padding: 0;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.public-home-view {
  min-height: 100dvh;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, color-mix(in srgb, #28c7b5 18%, transparent) 0 24%, transparent 54%),
    linear-gradient(215deg, color-mix(in srgb, #e59b51 20%, transparent) 0 18%, transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 42%, transparent) 0%, transparent 38rem),
    var(--bg);
}

.public-home-view::before,
.public-home-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.public-home-view::before {
  inset: -12rem 0;
  background: url("./assets/revenue-rhythm-landing-splash.svg") center top / 100% 100% no-repeat;
  filter: saturate(1.32) contrast(1.04);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.16) 2rem, rgba(0, 0, 0, 0.68) 12rem, #000000 22rem, #000000 calc(100% - 16rem), rgba(0, 0, 0, 0.58) calc(100% - 8rem), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.16) 2rem, rgba(0, 0, 0, 0.68) 12rem, #000000 22rem, #000000 calc(100% - 16rem), rgba(0, 0, 0, 0.58) calc(100% - 8rem), transparent 100%);
  opacity: 0.98;
  transform: scale(1.015);
  z-index: 0;
}

.public-home-view::after {
  inset: -10rem 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 26%, color-mix(in srgb, var(--bg) 22%, transparent) 58%, color-mix(in srgb, var(--bg) 8%, transparent) 78%, color-mix(in srgb, var(--bg) 42%, transparent) 100%),
    linear-gradient(126deg, transparent 0 9%, color-mix(in srgb, var(--accent) 18%, transparent) 9% 24%, transparent 24% 58%, color-mix(in srgb, var(--warning) 14%, transparent) 58% 72%, transparent 72% 100%),
    linear-gradient(24deg, transparent 0 18%, color-mix(in srgb, var(--warning) 10%, transparent) 18% 31%, transparent 31% 67%, color-mix(in srgb, var(--accent) 12%, transparent) 67% 78%, transparent 78% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 0%, transparent) 0%, transparent 30%, color-mix(in srgb, var(--bg) 12%, transparent) 68%, color-mix(in srgb, var(--bg) 42%, transparent) 100%);
  opacity: 0.94;
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  .public-home-view {
    background:
      linear-gradient(135deg, color-mix(in srgb, #28c7b5 22%, transparent) 0 24%, transparent 58%),
      linear-gradient(215deg, color-mix(in srgb, #e48157 18%, transparent) 0 16%, transparent 46%),
      linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 28%, transparent) 0%, transparent 38rem),
      var(--bg);
  }

  .public-home-view::before {
    filter: saturate(1.48) brightness(1.02);
    mix-blend-mode: screen;
    opacity: 0.74;
  }

  .public-home-view::after {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 62%, transparent) 36%, color-mix(in srgb, var(--bg) 32%, transparent) 70%, color-mix(in srgb, var(--bg) 62%, transparent) 100%),
      linear-gradient(126deg, transparent 0 9%, color-mix(in srgb, var(--accent) 24%, transparent) 9% 24%, transparent 24% 58%, color-mix(in srgb, var(--warning) 16%, transparent) 58% 72%, transparent 72% 100%),
      linear-gradient(24deg, transparent 0 18%, color-mix(in srgb, var(--warning) 12%, transparent) 18% 31%, transparent 31% 67%, color-mix(in srgb, var(--accent) 16%, transparent) 67% 78%, transparent 78% 100%),
      linear-gradient(180deg, color-mix(in srgb, var(--bg) 20%, transparent) 0%, transparent 42%, color-mix(in srgb, var(--bg) 14%, transparent) 74%, color-mix(in srgb, var(--bg) 58%, transparent) 100%);
  }
}

html.rr-preview-light .public-home-view {
  background:
    linear-gradient(135deg, color-mix(in srgb, #28c7b5 18%, transparent) 0 24%, transparent 54%),
    linear-gradient(215deg, color-mix(in srgb, #e59b51 20%, transparent) 0 18%, transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 42%, transparent) 0%, transparent 38rem),
    var(--bg);
}

html.rr-preview-light .public-home-view::before {
  filter: saturate(1.32) contrast(1.04);
  mix-blend-mode: normal;
  opacity: 0.98;
}

html.rr-preview-light .public-home-view::after {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 26%, color-mix(in srgb, var(--bg) 22%, transparent) 58%, color-mix(in srgb, var(--bg) 8%, transparent) 78%, color-mix(in srgb, var(--bg) 42%, transparent) 100%),
    linear-gradient(126deg, transparent 0 9%, color-mix(in srgb, var(--accent) 18%, transparent) 9% 24%, transparent 24% 58%, color-mix(in srgb, var(--warning) 14%, transparent) 58% 72%, transparent 72% 100%),
    linear-gradient(24deg, transparent 0 18%, color-mix(in srgb, var(--warning) 10%, transparent) 18% 31%, transparent 31% 67%, color-mix(in srgb, var(--accent) 12%, transparent) 67% 78%, transparent 78% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 0%, transparent) 0%, transparent 30%, color-mix(in srgb, var(--bg) 12%, transparent) 68%, color-mix(in srgb, var(--bg) 42%, transparent) 100%);
}

html.rr-preview-dark .public-home-view {
  background:
    linear-gradient(135deg, color-mix(in srgb, #28c7b5 22%, transparent) 0 24%, transparent 58%),
    linear-gradient(215deg, color-mix(in srgb, #e48157 18%, transparent) 0 16%, transparent 46%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 28%, transparent) 0%, transparent 38rem),
    var(--bg);
}

html.rr-preview-dark .public-home-view::before {
  filter: saturate(1.48) brightness(1.02);
  mix-blend-mode: screen;
  opacity: 0.74;
}

html.rr-preview-dark .public-home-view::after {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 62%, transparent) 36%, color-mix(in srgb, var(--bg) 32%, transparent) 70%, color-mix(in srgb, var(--bg) 62%, transparent) 100%),
    linear-gradient(126deg, transparent 0 9%, color-mix(in srgb, var(--accent) 24%, transparent) 9% 24%, transparent 24% 58%, color-mix(in srgb, var(--warning) 16%, transparent) 58% 72%, transparent 72% 100%),
    linear-gradient(24deg, transparent 0 18%, color-mix(in srgb, var(--warning) 12%, transparent) 18% 31%, transparent 31% 67%, color-mix(in srgb, var(--accent) 16%, transparent) 67% 78%, transparent 78% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 20%, transparent) 0%, transparent 42%, color-mix(in srgb, var(--bg) 14%, transparent) 74%, color-mix(in srgb, var(--bg) 58%, transparent) 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .public-home-view::before {
    animation: public-splash-drift 18s ease-in-out infinite alternate;
  }
}

@keyframes public-splash-drift {
  from {
    transform: translate3d(-1.2%, -0.5%, 0) scale(1.01);
  }

  to {
    transform: translate3d(1.2%, 0.8%, 0) scale(1.035);
  }
}

.public-home-header {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 64px;
  padding: 12px clamp(18px, 5vw, 84px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 42%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent) 0%, color-mix(in srgb, var(--surface) 78%, transparent) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 42px color-mix(in srgb, var(--ink) 7%, transparent);
  overflow: visible;
}

.public-home-view > .public-home-header {
  position: fixed;
  left: 0;
  right: 0;
}

.public-home-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -34px;
  height: 34px;
  pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 38%, transparent) 0%, transparent 100%);
}

.public-home-main {
  position: relative;
  z-index: 1;
}

.public-brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.public-home-view > .public-home-header .brand-mark {
  width: 69px;
  height: 69px;
  border-radius: 17px;
}

.public-brand strong,
.public-brand small {
  display: block;
}

.public-brand strong {
  font-size: 16px;
  line-height: 1.15;
}

.public-brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
  max-width: 180px;
  overflow-wrap: anywhere;
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
  font-weight: 750;
}

.public-nav a,
.public-nav button {
  border-radius: calc(var(--radius) - 2px);
  color: var(--ink);
  padding: 8px 2px;
  text-decoration: none;
  transition:
    color var(--motion-fast),
    background var(--motion-fast);
}

.public-nav button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-weight: 750;
}

.public-nav a:hover,
.public-nav button:hover {
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
  color: var(--accent-strong);
}

.public-nav .public-nav-cta {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
}

.public-nav .public-nav-cta:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.public-nav .public-nav-feedback {
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  padding: 8px 10px;
  background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
}

.public-home-main {
  display: grid;
  gap: clamp(42px, 6vw, 70px);
  padding: 44px clamp(18px, 5vw, 84px) 48px;
}

.public-home-view > .public-home-main {
  padding-top: 108px;
}

.public-home-main > section {
  scroll-margin-top: 92px;
}

#home-workflow {
  scroll-margin-top: 108px;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(430px, 0.78fr) minmax(600px, 1.22fr);
  gap: clamp(34px, 5vw, 82px);
  align-items: center;
  min-height: clamp(540px, calc(100vh - 154px), 720px);
  isolation: isolate;
  position: relative;
}

.public-hero::before,
.public-hero::after {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #0d4f5c 0%, #0c887e 62%, #d46f4d 100%);
  border: 1px solid color-mix(in srgb, #ffffff 28%, transparent);
  border-radius: 18px;
  box-shadow:
    0 22px 58px color-mix(in srgb, var(--accent) 17%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 34%, transparent);
  color: #ffffff;
  content: "RR";
  display: grid;
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 850;
  justify-items: center;
  line-height: 1;
  opacity: 0.18;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.public-hero::before {
  right: clamp(26px, 6vw, 104px);
  top: clamp(60px, 11vw, 128px);
  transform: rotate(8deg);
  width: clamp(56px, 6vw, 88px);
}

.public-hero::after {
  bottom: clamp(76px, 13vw, 172px);
  left: clamp(42%, 50vw, 58%);
  transform: rotate(-10deg);
  width: clamp(42px, 4.6vw, 68px);
}

.public-hero-copy,
.public-product-preview {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.public-hero-copy {
  isolation: isolate;
}

.public-hero-copy > :not(.public-hero-backdrop-mark) {
  position: relative;
  z-index: 1;
}

.public-hero-backdrop-mark {
  position: absolute;
  left: clamp(-48px, -3vw, -18px);
  top: clamp(-22px, -2vw, 4px);
  z-index: 0;
  width: clamp(176px, 13vw, 240px);
  height: clamp(176px, 13vw, 240px);
  border-radius: 32px;
  cursor: default;
  filter: saturate(1.16);
  opacity: 0.18;
  pointer-events: none;
  transform: rotate(-4deg);
}

.public-hero h1 {
  color: var(--ink);
  max-width: 600px;
  font-size: clamp(32px, 2.65vw, 44px);
  font-weight: 540;
  line-height: 1.16;
  margin: 0 0 20px;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 15px;
}

.public-hero .public-hero-lede {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 800;
  margin-bottom: 18px;
  min-height: 0;
  padding: 12px 0 8px;
  position: relative;
  isolation: isolate;
}

.public-hero .public-hero-lede span {
  display: block;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.public-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin: 28px 0 24px;
}

.public-button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.public-button svg {
  width: 17px;
  height: 17px;
}

.public-button:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.public-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.public-button.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

.public-proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.public-proof-row > article {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--muted);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: start;
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 82%, transparent) 100%);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 12px;
  text-align: left;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    color var(--motion-fast),
    transform var(--motion-fast);
}

.public-proof-row > article:nth-child(2) {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-warm) 13%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 84%, transparent) 100%);
  border-color: color-mix(in srgb, var(--accent-warm) 22%, transparent);
}

.public-proof-row > article:nth-child(3) {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-cool) 12%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 84%, transparent) 100%);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.public-proof-row strong,
.public-proof-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-proof-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.public-proof-row small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.public-proof-row svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.public-proof-row > article:hover,
.public-proof-row > article:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 64%, var(--line));
  box-shadow:
    0 18px 42px color-mix(in srgb, var(--accent) 16%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 58%, transparent);
  color: var(--ink);
  outline: none;
  transform: translateY(-3px);
}

.public-product-preview {
  min-width: 0;
}

.preview-frame {
  border: 6px solid color-mix(in srgb, var(--ink) 78%, var(--surface));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 92%, var(--accent-soft));
  box-shadow:
    0 22px 48px color-mix(in srgb, var(--ink) 14%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
  aspect-ratio: 294 / 155;
  overflow: hidden;
}

.preview-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.public-workflow-section {
  display: grid;
  gap: 20px;
  isolation: isolate;
  padding: clamp(12px, 2vw, 22px) 0 6px;
  position: relative;
}

.public-workflow-section::before {
  content: "";
  position: absolute;
  inset: 58px 8% auto;
  height: 132px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--warning) 18%, transparent), color-mix(in srgb, var(--accent) 18%, transparent));
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}

.public-workflow-section h2,
.public-roles-section h2,
.public-contact-section h2,
.public-login-band h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.public-workflow-section h2 {
  text-align: center;
}

.public-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  position: relative;
}

.public-workflow::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 34px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--warning) 82%, var(--accent)), var(--accent-strong));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 24%, transparent);
  opacity: 0.56;
}

.public-workflow article,
.public-role-grid article,
.public-contact-section article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  position: relative;
  padding: 20px;
}

.public-workflow article {
  --workflow-card-accent: var(--accent);
  min-height: 156px;
  display: grid;
  align-content: start;
  gap: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--workflow-card-accent) 14%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 88%, transparent) 48%, color-mix(in srgb, var(--warning) 10%, var(--surface-raised)) 100%);
  border-color: color-mix(in srgb, var(--workflow-card-accent) 28%, var(--line));
  box-shadow:
    0 18px 44px color-mix(in srgb, var(--workflow-card-accent) 12%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 50%, transparent);
  overflow: hidden;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  z-index: 1;
}

.public-workflow article:nth-child(2) {
  --workflow-card-accent: #d38345;
}

.public-workflow article:nth-child(3) {
  --workflow-card-accent: #2bbfb0;
}

.public-workflow article::after {
  content: "";
  position: absolute;
  inset: auto 18px 14px;
  height: 22px;
  background:
    linear-gradient(90deg, currentColor 0 26%, transparent 26% 31%, currentColor 31% 38%, transparent 38% 43%, currentColor 43% 100%);
  clip-path: polygon(0 58%, 36% 58%, 42% 28%, 48% 74%, 55% 38%, 61% 58%, 100% 58%, 100% 66%, 61% 66%, 55% 46%, 48% 82%, 42% 36%, 36% 66%, 0 66%);
  color: color-mix(in srgb, var(--workflow-card-accent) 36%, transparent);
  opacity: 0.72;
  pointer-events: none;
}

.public-workflow article:hover {
  border-color: color-mix(in srgb, var(--workflow-card-accent) 68%, var(--line));
  box-shadow:
    0 24px 64px color-mix(in srgb, var(--workflow-card-accent) 20%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 64%, transparent);
  transform: translateY(-4px);
}

.public-workflow article:focus-visible,
.public-role-grid article:focus-visible {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px var(--focus-ring),
    0 22px 56px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: none;
  transform: translateY(-3px);
}

.public-workflow article > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--workflow-card-accent), color-mix(in srgb, var(--workflow-card-accent) 64%, #ffffff));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--workflow-card-accent) 26%, transparent);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 850;
}

.public-workflow h3,
.public-role-grid h3 {
  margin: 0;
  font-size: 16px;
}

.public-workflow p,
.public-role-grid p,
.public-roles-section > div:first-child p,
.public-contact-section p,
.public-login-band p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.public-video-section {
  margin-top: -58px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface-raised)) 0%, var(--surface-raised) 48%, color-mix(in srgb, var(--warning) 13%, var(--surface-raised)) 100%);
  box-shadow:
    0 22px 64px color-mix(in srgb, var(--accent) 14%, transparent),
    0 0 0 1px color-mix(in srgb, #ffffff 26%, transparent);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
  padding: clamp(16px, 1.8vw, 20px) clamp(18px, 3vw, 28px);
  position: relative;
  overflow: hidden;
}

.public-video-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(116deg, transparent 0 18%, color-mix(in srgb, var(--accent) 10%, transparent) 18% 28%, transparent 28% 62%, color-mix(in srgb, var(--warning) 12%, transparent) 62% 70%, transparent 70% 100%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .public-home-header {
    border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
    box-shadow: 0 18px 56px color-mix(in srgb, var(--accent) 10%, transparent);
  }

  .preview-frame {
    box-shadow:
      0 24px 72px color-mix(in srgb, var(--accent) 20%, transparent),
      0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  }

  .public-workflow article,
  .public-role-grid article,
  .public-contact-section article,
  .public-video-section {
    border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
    box-shadow:
      0 18px 52px color-mix(in srgb, var(--accent) 13%, transparent),
      0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
  }

  .public-contact-section article {
    box-shadow:
      0 18px 56px color-mix(in srgb, var(--accent) 18%, transparent),
      0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
  }
}

html.rr-preview-dark .public-home-header {
  border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
  box-shadow: 0 18px 56px color-mix(in srgb, var(--accent) 10%, transparent);
}

html.rr-preview-dark .preview-frame {
  box-shadow:
    0 24px 72px color-mix(in srgb, var(--accent) 20%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

html.rr-preview-dark .public-workflow article,
html.rr-preview-dark .public-role-grid article,
html.rr-preview-dark .public-contact-section article,
html.rr-preview-dark .public-video-section {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  box-shadow:
    0 18px 52px color-mix(in srgb, var(--accent) 13%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
}

html.rr-preview-dark .public-contact-section article {
  box-shadow:
    0 18px 56px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

.public-video-media,
.public-video-copy {
  min-width: 0;
}

.public-video-frame {
  border: 5px solid color-mix(in srgb, var(--ink) 74%, var(--surface));
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  aspect-ratio: 294 / 155;
  display: grid;
  margin: 0;
  overflow: hidden;
  position: relative;
}

.public-video-frame img,
.public-video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  grid-area: 1 / 1;
}

.public-video-player {
  background: #000000;
}

.public-video-player:fullscreen,
.public-video-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  object-position: center center;
  background: #000000;
}

.public-video-frame::after {
  content: "";
  grid-area: 1 / 1;
  background: linear-gradient(180deg, transparent 46%, rgba(8, 24, 27, 0.82) 100%);
  pointer-events: none;
}

.public-video-frame-ready::after {
  display: none;
}

.public-video-play {
  width: 62px;
  height: 62px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 78%, rgba(0, 0, 0, 0.16));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  grid-area: 1 / 1;
  justify-self: center;
  align-self: center;
  z-index: 1;
}

.public-video-play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid #ffffff;
  transform: translateX(2px);
}

.public-video-frame figcaption {
  grid-area: 1 / 1;
  align-self: end;
  z-index: 1;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  padding: 0 16px 14px;
}

.public-video-caption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  margin: 10px 0 0;
}

.public-section-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.public-video-copy h2 {
  color: var(--ink);
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.16;
  margin: 0 0 12px;
}

.public-video-copy > p:not(.public-section-kicker) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.public-video-points {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
}

.public-video-points li {
  color: var(--ink);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
}

.public-video-points li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
}

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

.public-roles-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.56fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.public-roles-section > div:first-child {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

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

.public-role-grid article {
  --role-card-accent: var(--accent);
  border-color: color-mix(in srgb, var(--role-card-accent) 26%, var(--line));
  border-radius: 12px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--role-card-accent) 13%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 92%, transparent) 52%, color-mix(in srgb, var(--accent-warm) 9%, var(--surface-raised)) 100%);
  box-shadow:
    0 16px 42px color-mix(in srgb, var(--role-card-accent) 10%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 48%, transparent);
  display: grid;
  gap: 10px;
  overflow: hidden;
  cursor: default;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    transform var(--motion-fast);
}

.public-role-grid article:nth-child(2) {
  --role-card-accent: #d38345;
}

.public-role-grid article:nth-child(3) {
  --role-card-accent: #5368d6;
}

.public-role-grid article::after {
  content: "";
  position: absolute;
  inset: auto 18px 14px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(0 58%, 24% 58%, 29% 38%, 34% 72%, 40% 45%, 46% 58%, 100% 58%, 100% 66%, 46% 66%, 40% 53%, 34% 80%, 29% 46%, 24% 66%, 0 66%);
  color: color-mix(in srgb, var(--role-card-accent) 30%, transparent);
  opacity: 0.62;
  pointer-events: none;
}

.public-role-grid article:hover {
  border-color: color-mix(in srgb, var(--role-card-accent) 62%, var(--line));
  box-shadow:
    0 22px 58px color-mix(in srgb, var(--role-card-accent) 17%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 62%, transparent);
  transform: translateY(-4px);
}

.public-role-grid svg {
  width: 32px;
  height: 32px;
  color: var(--role-card-accent);
}

.public-contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.public-contact-section article {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  display: grid;
  gap: 12px;
  align-content: start;
}

.public-contact-section article:nth-child(2) {
  background: var(--surface-raised);
}

.public-contact-section article > a:not(.public-button) {
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 850;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.public-contact-section .public-button {
  width: 100%;
}

.alpha-access-card {
  min-width: 0;
}

.alpha-access-form {
  display: grid;
  gap: 10px;
}

.alpha-access-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.alpha-access-form input,
.alpha-access-form textarea {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-transform: none;
}

.alpha-access-form input {
  min-height: 40px;
  padding: 0 10px;
}

.alpha-access-form textarea {
  min-height: 96px;
  resize: vertical;
  padding: 10px;
  line-height: 1.35;
}

.alpha-access-form input:focus,
.alpha-access-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
  outline: none;
}

.alpha-access-summary {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 10px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.alpha-access-summary.error {
  border-color: rgba(176, 59, 46, 0.36);
  background: var(--danger-soft);
  color: var(--danger);
}

.alpha-access-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.alpha-access-privacy a {
  color: var(--accent-strong);
  font-weight: 800;
  text-underline-offset: 3px;
}

.public-login-band {
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.public-login-band h2,
.public-login-band p {
  color: #ffffff;
}

.public-login-button {
  background: var(--surface-raised);
  min-width: 230px;
}

.public-footer {
  margin-top: 10px;
  padding: clamp(22px, 4vw, 34px);
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(180px, 1fr));
  gap: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 90%, transparent) 58%, color-mix(in srgb, var(--accent-warm) 9%, var(--surface-raised)) 100%);
  box-shadow: var(--shadow-soft);
}

.public-footer h2,
.public-footer strong,
.public-info-card h3 {
  margin: 0;
  color: var(--ink);
}

.public-footer h2 {
  font-size: 13px;
  text-transform: uppercase;
}

.public-footer-brand,
.public-footer-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.public-footer-brand strong {
  font-size: 18px;
}

.public-footer-brand span,
.public-footer-brand small,
.public-footer-column p,
.public-footer-column small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.public-footer a,
.public-footer button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-weight: 720;
  line-height: 1.35;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

.public-footer a[href^="mailto:"] {
  font-size: 14px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.public-footer a:hover,
.public-footer button:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-info-view {
  min-height: 100vh;
}

.public-info-main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 8vh, 92px) 0 76px;
  display: grid;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.public-shared-footer {
  display: none;
  width: min(1120px, calc(100% - 36px));
  margin: -24px auto 58px;
  position: relative;
  z-index: 1;
}

.app-shell.public-auth-active .public-shared-footer {
  display: grid;
}

.public-info-main-split {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.74fr);
  align-items: start;
  gap: clamp(34px, 6vw, 76px);
}

.public-info-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
}

.public-info-copy {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.public-info-copy h2,
.public-legal-card h2 {
  max-width: 820px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1;
  font-weight: 820;
}

.public-info-copy p,
.public-legal-card p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.public-info-logo-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 48%, color-mix(in srgb, var(--accent-warm) 15%, transparent) 100%);
  box-shadow:
    0 28px 90px color-mix(in srgb, var(--accent) 13%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #ffffff 24%, transparent);
}

.public-info-big-mark {
  width: clamp(190px, 20vw, 270px);
  height: clamp(190px, 20vw, 270px);
  border-radius: 42px;
  box-shadow:
    0 30px 86px color-mix(in srgb, var(--accent) 26%, transparent),
    0 0 0 1px color-mix(in srgb, #ffffff 34%, transparent);
}

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

.public-info-grid article,
.public-info-card {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 8%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 92%, transparent) 54%, color-mix(in srgb, var(--accent-warm) 8%, var(--surface-raised)) 100%);
  box-shadow: var(--shadow-soft);
}

.public-info-grid article span[data-icon] {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.public-info-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.public-info-grid p,
.public-contact-list,
.public-contact-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.public-info-story {
  gap: 16px;
}

.public-info-story h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.06;
}

.public-info-story p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.public-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.public-info-actions .public-button {
  min-width: 210px;
}

.public-legal-sections {
  display: grid;
  gap: 14px;
}

.public-legal-sections article {
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface-raised));
}

.public-legal-sections h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.public-legal-sections a {
  color: var(--accent-strong);
  font-weight: 760;
}

.public-contact-list {
  display: grid;
  gap: 12px;
}

.public-contact-list div {
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.public-contact-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.public-contact-list dt {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-contact-list a {
  color: var(--accent-strong);
  font-weight: 760;
  text-decoration: none;
}

.public-contact-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-legal-card {
  max-width: 880px;
}

.content-grid {
  flex: 1;
  min-height: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 420px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.view-panel {
  display: none;
}

.view-panel.active.public-home-view {
  display: block;
}

.view-panel.active.content-grid {
  display: grid;
}

.view-panel.active.brokers-view {
  display: grid;
}

.view-panel.active.carriers-view {
  display: grid;
}

.view-panel.active.clients-view {
  display: grid;
}

.view-panel.active.statement-types-view {
  display: grid;
}

.view-panel.active.statement-parsing-view,
.view-panel.active.statement-configuration-view,
.view-panel.active.commission-assignment-view {
  display: grid;
}

.view-panel.active.commission-rules-view {
  display: grid;
}

.view-panel.active.approval-view {
  display: grid;
}

.view-panel.active.dashboard-view,
.view-panel.active.platform-admin-view,
.view-panel.active.auth-required-view,
.view-panel.active.password-reset-view,
.view-panel.active.invite-activation-view,
.view-panel.active.ai-review-view,
.view-panel.active.commission-checks-view,
.view-panel.active.missing-view,
.view-panel.active.processed-statement-history-view,
.view-panel.active.reporting-view,
.view-panel.active.feedback-view,
.view-panel.active.documentation-view,
.view-panel.active.tenant-settings-view,
.view-panel.active.dev-view,
.view-panel.active.export-view {
  display: grid;
}

.import-panel,
.table-panel,
.review-drawer,
.setup-panel,
.approval-panel,
.approval-card,
.dashboard-panel,
.settings-panel {
  min-height: 0;
  min-width: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-raised)) 0%, var(--surface-raised) 56%, color-mix(in srgb, var(--accent-warm) 5%, var(--surface-raised)) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-view,
.platform-admin-view,
.auth-required-view,
.password-reset-view,
.invite-activation-view,
.commission-checks-view,
.missing-view,
.ai-review-view,
.reporting-view,
.feedback-view,
.documentation-view,
.tenant-settings-view,
.dev-view,
.export-view {
  flex: 1;
  min-height: 0;
  padding: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 14px;
  align-content: start;
}

.auth-required-view {
  grid-template-columns: minmax(0, 680px);
}

.platform-admin-view {
  grid-template-columns: minmax(0, 1fr);
}

.platform-admin-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.platform-admin-accounts-panel {
  padding: 16px;
}

.platform-alpha-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.platform-admin-account-form {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.platform-admin-account-form .settings-section-title,
.platform-admin-account-form .auth-form-error,
.platform-admin-account-form .icon-button {
  grid-column: 1 / -1;
}

.platform-admin-accounts-list {
  display: grid;
  gap: 10px;
}

.platform-admin-account-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
}

.platform-alpha-requests-list {
  display: grid;
  gap: 10px;
}

.platform-alpha-request-card {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.platform-alpha-request-main {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.platform-alpha-request-main strong,
.platform-alpha-request-main span {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
}

.platform-alpha-request-main strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.platform-alpha-request-main span:not(.badge) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 3px;
}

.platform-alpha-request-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.platform-alpha-request-details div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 9px;
}

.platform-alpha-request-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.platform-alpha-request-details dd {
  min-width: 0;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.platform-alpha-request-details dd small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.platform-alpha-admin-email {
  color: var(--accent) !important;
}

.platform-alpha-email-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
}

.platform-alpha-email-status.success {
  border-color: rgba(30, 126, 82, 0.28);
  background: rgba(30, 126, 82, 0.12);
  color: var(--success);
}

.platform-alpha-email-status.warning {
  border-color: rgba(178, 119, 6, 0.3);
  background: rgba(178, 119, 6, 0.12);
  color: var(--warning);
}

.platform-alpha-email-status.danger {
  border-color: rgba(190, 18, 60, 0.28);
  background: rgba(190, 18, 60, 0.12);
  color: var(--danger);
}

.platform-alpha-request-notes {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.platform-alpha-request-notes strong {
  color: var(--ink);
}

.platform-alpha-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-agency-actions {
  padding-top: 2px;
}

.platform-agency-edit-form {
  display: grid;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-raised));
  padding: 12px;
}

.platform-agency-edit-heading strong,
.platform-agency-edit-heading span {
  display: block;
}

.platform-agency-edit-heading strong {
  color: var(--ink);
  font-size: 15px;
}

.platform-agency-edit-heading span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.platform-agency-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.platform-agency-edit-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.platform-agency-edit-grid input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-transform: none;
}

.platform-agency-edit-grid input:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  outline-offset: 1px;
}

.platform-agency-edit-grid input[readonly] {
  background: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
}

.platform-agency-edit-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.platform-agency-edit-note.warning {
  color: var(--warning);
}

.platform-tenant-name-note {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.platform-alpha-invitation-link {
  display: grid;
  gap: 6px;
}

.platform-alpha-invitation-link label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.platform-alpha-invitation-link div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.platform-alpha-invitation-link input {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.auth-required-panel {
  grid-column: 1;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.password-reset-view,
.invite-activation-view {
  grid-template-columns: minmax(0, 520px);
}

.invitation-panel {
  grid-column: 1;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.invitation-panel-with-brand {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.55fr);
  align-items: stretch;
}

.invitation-panel-with-brand .auth-portal-card-header,
.invitation-panel-with-brand .invitation-summary,
.invitation-panel-with-brand .auth-form {
  grid-column: 1;
}

.invitation-brand-aside {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 0;
  padding: 20px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 13%, var(--surface-soft)) 0%, color-mix(in srgb, var(--surface-soft) 90%, transparent) 58%, color-mix(in srgb, var(--accent-warm) 12%, var(--surface-soft)) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 22%, transparent);
}

.invitation-brand-aside .brand-mark {
  width: 112px;
  height: 112px;
  border-radius: 24px;
}

.invitation-brand-aside div {
  display: grid;
  gap: 7px;
}

.invitation-brand-aside strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
}

.invitation-brand-aside span,
.invitation-brand-aside small {
  color: var(--muted);
  line-height: 1.4;
}

.invitation-summary {
  display: grid;
  gap: 10px;
}

.invitation-summary-card,
.invitation-message {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.invitation-summary-card small,
.invitation-summary-card span,
.invitation-message span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.auth-support-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.auth-support-actions .public-button {
  min-height: 40px;
  width: 100%;
}

.auth-support-actions .public-button span {
  color: inherit;
}

.view-panel.active.auth-portal-view {
  display: block;
}

.view-panel.active.public-info-view {
  display: block;
}

.auth-portal-view {
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
  background:
    radial-gradient(circle at 14% 18%, color-mix(in srgb, var(--accent) 20%, transparent) 0 12rem, transparent 27rem),
    radial-gradient(circle at 82% 34%, color-mix(in srgb, var(--accent-warm) 17%, transparent) 0 14rem, transparent 30rem),
    radial-gradient(circle at 52% 88%, color-mix(in srgb, var(--accent) 17%, transparent) 0 15rem, transparent 32rem),
    linear-gradient(132deg, color-mix(in srgb, var(--accent) 12%, transparent) 0 22%, transparent 22% 48%, color-mix(in srgb, var(--accent-warm) 10%, transparent) 48% 62%, transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 86%, transparent) 0%, var(--bg) 58%),
    var(--bg);
}

.auth-portal-view::before,
.auth-portal-view::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-portal-view::before {
  inset: 92px -8% 0;
  background:
    linear-gradient(122deg, transparent 0 12%, color-mix(in srgb, var(--accent) 9%, transparent) 12% 28%, transparent 28% 54%, color-mix(in srgb, var(--accent-warm) 10%, transparent) 54% 67%, transparent 67%),
    linear-gradient(32deg, transparent 0 46%, color-mix(in srgb, var(--accent) 7%, transparent) 46% 58%, transparent 58%);
  opacity: 0.9;
}

.auth-portal-view::after {
  inset: auto 9% 8% 46%;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-warm) 18%, transparent));
  opacity: 0.24;
}

.auth-portal-view.auth-required-view,
.auth-portal-view.password-reset-view,
.auth-portal-view.invite-activation-view,
.auth-portal-view.public-info-view {
  padding: 0;
}

.auth-portal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 46px color-mix(in srgb, var(--accent) 8%, transparent);
}

.auth-portal-main {
  width: min(1120px, calc(100% - 36px));
  min-height: auto;
  margin: 0 auto;
  padding: clamp(42px, 7vh, 76px) 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.7fr);
  align-items: start;
  gap: clamp(32px, 6vw, 76px);
  position: relative;
  z-index: 1;
}

.auth-portal-main.auth-portal-narrow {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr);
}

.auth-portal-copy {
  min-width: 0;
  display: grid;
  gap: 22px;
  align-content: start;
}

.auth-portal-copy .brand-mark {
  width: clamp(152px, 13vw, 192px);
  height: clamp(152px, 13vw, 192px);
  border-radius: 32px;
  font-size: 20px;
  box-shadow:
    0 28px 74px color-mix(in srgb, var(--accent) 26%, transparent),
    0 0 0 1px color-mix(in srgb, #ffffff 34%, transparent);
}

.auth-portal-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 6vw, 74px);
  line-height: 0.98;
  font-weight: 820;
  max-width: 760px;
}

.auth-portal-copy p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.auth-portal-proof {
  display: grid;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.auth-portal-proof span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.auth-portal-proof svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex: 0 0 auto;
}

.auth-portal-card {
  min-width: 0;
  padding: 28px;
  display: grid;
  gap: 20px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 8%, var(--surface-raised)) 0%, color-mix(in srgb, var(--surface-raised) 94%, transparent) 54%, color-mix(in srgb, var(--accent-warm) 8%, var(--surface-raised)) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 8px;
  box-shadow:
    0 22px 64px color-mix(in srgb, var(--accent) 13%, transparent),
    0 0 0 1px color-mix(in srgb, #ffffff 30%, transparent);
}

.auth-portal-card.hidden {
  display: none;
}

.auth-portal-card-header {
  display: grid;
  gap: 6px;
}

.auth-portal-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
}

.auth-portal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-portal-card .auth-form {
  display: grid;
  gap: 14px;
}

.auth-portal-card .auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-portal-card .auth-form input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--surface) 90%, #ffffff);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  text-transform: none;
}

@media (prefers-color-scheme: dark) {
  .auth-portal-view {
    background:
      radial-gradient(circle at 14% 18%, color-mix(in srgb, var(--accent) 18%, transparent) 0 13rem, transparent 28rem),
      radial-gradient(circle at 82% 34%, color-mix(in srgb, var(--accent-warm) 15%, transparent) 0 14rem, transparent 30rem),
      radial-gradient(circle at 52% 88%, color-mix(in srgb, var(--accent) 16%, transparent) 0 16rem, transparent 33rem),
      linear-gradient(132deg, color-mix(in srgb, var(--accent) 9%, transparent) 0 22%, transparent 22% 48%, color-mix(in srgb, var(--accent-warm) 8%, transparent) 48% 62%, transparent 62%),
      var(--bg);
  }

  .auth-portal-card {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
    box-shadow:
      0 24px 72px color-mix(in srgb, var(--accent) 18%, transparent),
      0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
  }

  .auth-portal-card .auth-form input {
    background: color-mix(in srgb, var(--surface) 78%, #ffffff);
  }
}

.auth-portal-card .password-field input {
  padding-right: 46px;
}

.auth-portal-card .password-toggle {
  right: 8px;
}

.auth-portal-card .icon-button,
.auth-portal-actions .public-button {
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.account-portal-summary {
  display: grid;
  gap: 10px;
}

.account-portal-summary article {
  min-width: 0;
  padding: 13px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.account-portal-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-portal-summary strong {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-portal-summary span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-portal-auth-note strong {
  color: var(--accent-strong);
}

.auth-portal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.invitation-summary-card strong,
.invitation-message strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.invitation-message.error {
  border-color: rgba(176, 59, 46, 0.36);
  background: var(--danger-soft);
}

.password-reset-open-link {
  margin-top: 6px;
  text-decoration: none;
}

.password-reset-local-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.password-reset-open-link span {
  color: inherit;
}

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

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

.auth-form input {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
}

.password-field {
  min-width: 0;
  display: block;
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent-soft) 68%, transparent);
  box-shadow: 0 0 0 2px var(--focus-ring);
  outline: none;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.auth-form-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.commission-checks-view,
.missing-view {
  grid-template-columns: minmax(0, 1fr);
}

.ai-review-view {
  grid-template-columns: minmax(0, 1fr);
}

.commission-checks-view .approval-panel,
.missing-view .approval-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.ai-review-view .approval-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.dashboard-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.dashboard-widgets {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 14px;
}

.dashboard-widget {
  position: relative;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    grid-column 140ms ease,
    opacity 140ms ease;
}

.dashboard-widget.dragging {
  opacity: 0.62;
}

.dashboard-widget.resizing {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dashboard-widget.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dashboard-widget-half {
  grid-column: span 2;
}

.dashboard-widget-full {
  grid-column: 1 / -1;
}

.dashboard-panel .setup-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.dashboard-panel .compact-select {
  flex: 0 1 190px;
}

.dashboard-widget-toolbar {
  position: relative;
  z-index: 6;
  min-width: min(100%, 220px);
  max-width: min(100%, 430px);
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible;
}

.dashboard-widget-toolbar svg {
  display: block;
  opacity: 1;
  visibility: visible;
}

.dashboard-widget-toolbar .help-link-icon {
  display: grid;
  place-items: center;
  color: currentColor;
  pointer-events: none;
}

.dashboard-detail-button {
  min-width: 104px;
}

.help-link-button.icon-button.compact {
  min-width: 96px;
}

.dashboard-layout-controls {
  position: relative;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow: visible;
}

.dashboard-widget-drag-handle {
  position: relative;
  width: 34px;
  padding: 0;
  border-color: var(--line-strong);
  background: var(--surface-soft);
  cursor: grab;
  overflow: visible;
  z-index: 4;
}

.dashboard-widget-drag-handle:hover,
.dashboard-widget-drag-handle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.dashboard-widget-drag-handle:active {
  cursor: grabbing;
}

.dashboard-widget-drag-icon {
  display: grid;
  place-items: center;
  color: currentColor;
  pointer-events: none;
}

.dashboard-widget-drag-handle svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  opacity: 1;
  visibility: visible;
}

.dashboard-widget-drag-handle::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: max-content;
  max-width: 180px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #14252d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.dashboard-widget-drag-handle::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  right: 12px;
  z-index: 21;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #14252d;
  border-left: 5px solid transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.dashboard-widget-drag-handle:hover::after,
.dashboard-widget-drag-handle:hover::before,
.dashboard-widget-drag-handle:focus-visible::after,
.dashboard-widget-drag-handle:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.dashboard-widget-resize-edge {
  position: absolute;
  top: 72px;
  right: 0;
  bottom: 16px;
  width: 30px;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(90deg, transparent 0%, rgb(15 118 110 / 0.04) 100%);
  cursor: ew-resize;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    background 140ms ease;
}

.dashboard-widget-resize-edge::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #c5d1d8;
  transition: background 140ms ease;
}

.dashboard-widget-resize-grip {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 36px;
  border: 1px solid #cbd7dd;
  border-radius: 8px 0 0 8px;
  background: var(--surface-raised);
  color: var(--muted);
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.08);
  display: grid;
  place-items: center;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
  transform: translateX(4px);
}

.dashboard-widget-resize-grip svg {
  width: 14px;
  height: 14px;
}

.dashboard-widget-resize-edge:hover::before,
.dashboard-widget-resize-edge:focus-visible::before,
.dashboard-widget.resizing .dashboard-widget-resize-edge::before {
  background: var(--accent);
}

.dashboard-widget-resize-edge:hover .dashboard-widget-resize-grip,
.dashboard-widget-resize-edge:focus-visible .dashboard-widget-resize-grip,
.dashboard-widget.resizing .dashboard-widget-resize-grip {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  transform: translateX(2px);
}

.dashboard-widget:hover .dashboard-widget-resize-edge,
.dashboard-widget:focus-within .dashboard-widget-resize-edge,
.dashboard-widget.resizing .dashboard-widget-resize-edge {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-widget:hover .dashboard-widget-resize-edge {
  background: linear-gradient(90deg, transparent 0%, rgb(15 118 110 / 0.06) 100%);
}

.dashboard-widget-resize-edge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.dashboard-resizing {
  cursor: ew-resize;
  user-select: none;
}

.dashboard-layout-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.dashboard-widget:hover .dashboard-layout-controls,
.dashboard-widget:focus-within .dashboard-layout-controls,
.dashboard-widget.dragging .dashboard-layout-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dashboard-actions-list,
.ranked-list,
.export-actions {
  display: grid;
  gap: 9px;
}

.dashboard-action,
.ranked-row {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface-soft)) 0%, color-mix(in srgb, var(--surface-soft) 88%, var(--accent-warm-soft)) 100%);
  color: var(--ink);
  padding: 11px;
  display: grid;
  gap: 5px;
  text-align: left;
}

.dashboard-action {
  cursor: pointer;
  grid-template-columns: minmax(0, 1fr) minmax(64px, auto) minmax(104px, auto);
  align-items: center;
}

.dashboard-action span,
.dashboard-action em,
.ranked-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.dashboard-action span {
  font-weight: 800;
}

.dashboard-action strong {
  color: color-mix(in srgb, var(--accent-strong) 86%, var(--accent-warm));
  font-size: 20px;
  text-align: right;
}

.dashboard-action:not(:disabled):not(.disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.dashboard-action em {
  text-align: right;
  white-space: nowrap;
}

.dashboard-action:disabled,
.dashboard-action.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.ranked-row {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
}

.ranked-row span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.ranked-row em {
  grid-column: 2;
}

.dashboard-detail-body {
  display: grid;
  gap: 14px;
}

.dashboard-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-detail-metrics div {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  padding: 11px;
  display: grid;
  gap: 4px;
}

.dashboard-detail-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-detail-metrics strong {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dashboard-detail-table-wrap {
  max-height: min(420px, 52vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.dashboard-detail-table {
  min-width: 560px;
  font-size: 12px;
}

.dashboard-detail-table th,
.dashboard-detail-table td {
  vertical-align: top;
}

.dashboard-widget-net_new_commissions,
.dashboard-widget-commission_trend {
  min-height: 230px;
}

.dashboard-widget-commission_trend {
  min-height: 290px;
}

.commission-summary-list {
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: var(--radius);
  display: grid;
  align-content: start;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-raised)) 0%, var(--surface-raised) 100%);
}

.commission-summary-list div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.commission-summary-list div:last-child {
  border-bottom: 0;
}

.commission-summary-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.commission-summary-list strong {
  font-size: 21px;
  line-height: 1.15;
}

.compact-select {
  min-height: 34px;
  max-width: 190px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background-color: color-mix(in srgb, var(--surface-raised) 90%, var(--accent-soft));
  background-image: var(--select-chevron);
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0 34px 0 11px;
}

.compact-toggle {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-raised) 90%, var(--accent-soft));
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.compact-toggle input {
  accent-color: var(--accent);
}

.commission-trend-chart {
  min-height: 218px;
  display: grid;
  grid-template-columns: minmax(64px, max-content) minmax(0, 1fr);
  gap: 16px;
}

.commission-trend-empty {
  grid-column: 1 / -1;
  min-height: 166px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 20px;
  text-align: center;
}

.commission-trend-axis {
  color: var(--muted);
  display: grid;
  align-content: space-between;
  justify-items: end;
  padding: 10px 0 28px;
  min-width: 0;
  text-align: right;
}

.commission-trend-axis span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-trend-plot {
  position: relative;
  display: grid;
  min-width: 0;
  border-radius: var(--radius);
  background:
    linear-gradient(to bottom, rgb(96 112 120 / 0.08) 1px, transparent 1px) 0 10px / 100% calc((100% - 38px) / 2) no-repeat,
    linear-gradient(to bottom, rgb(96 112 120 / 0.08) 1px, transparent 1px) 0 50% / 100% calc((100% - 38px) / 2) no-repeat;
}

.commission-trend-bars {
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  gap: clamp(8px, 1.8vw, 18px);
  padding: 10px 16px 28px;
  min-width: 0;
}

.commission-trend-bar {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding-bottom: 25px;
  display: flex;
  align-items: end;
  justify-content: center;
  position: relative;
}

.commission-trend-bar-pair {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.commission-trend-bar i {
  width: min(42px, 100%);
  min-height: 0;
  border-radius: 5px 5px 0 0;
  background: #0d7771;
}

.commission-trend-bar-pair .prior {
  background: #9aa6b2;
}

.commission-trend-bar-pair .current {
  background: #0d7771;
}

.commission-trend-bar b {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  max-width: min(58px, 100%);
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-trend-plot.line .commission-trend-bars {
  align-items: stretch;
}

.commission-trend-plot.line .commission-trend-bar-pair {
  visibility: hidden;
}

.commission-trend-line {
  position: absolute;
  inset: 10px 16px 28px 0;
  z-index: 2;
  width: calc(100% - 16px);
  height: calc(100% - 38px);
  overflow: visible;
}

.commission-trend-line polyline {
  fill: none;
  stroke: #0d7771;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.commission-trend-line polyline.prior {
  stroke: #9aa6b2;
  stroke-dasharray: 5 4;
}

.commission-trend-line ellipse {
  fill: #ffffff;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.commission-trend-line ellipse.current {
  stroke: #0d7771;
}

.commission-trend-line ellipse.prior {
  stroke: #7d8892;
}

.commission-trend-legend {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 8px;
}

.commission-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.commission-trend-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #0d7771;
}

.commission-trend-legend span:last-child::before {
  background: #9aa6b2;
}

.commission-checks-view .dashboard-actions,
.missing-view .dashboard-actions,
.dev-view .setup-panel,
.export-view .dashboard-panel {
  grid-column: 1 / -1;
}

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

.feedback-view {
  grid-template-columns: minmax(0, 760px);
}

.documentation-view {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  align-items: start;
}

.documentation-sidebar,
.documentation-content {
  padding: 16px;
}

.documentation-sidebar {
  display: grid;
  grid-template-rows: auto;
  gap: 14px;
  overflow: visible;
}

.documentation-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 4px;
}

.documentation-tab {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 8px;
}

.documentation-tab.active {
  background: var(--surface-raised);
  color: var(--accent-strong);
  box-shadow: 0 1px 5px rgba(10, 31, 36, 0.08);
}

.documentation-topic-list {
  display: grid;
  min-height: 0;
  overflow: visible;
  gap: 8px;
}

.documentation-topic {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 11px;
  text-align: left;
}

.documentation-topic.active {
  border-color: rgba(11, 127, 121, 0.42);
  background: var(--accent-soft);
}

.documentation-topic strong {
  font-size: 13px;
}

.documentation-topic span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.documentation-markdown {
  max-width: 880px;
  display: grid;
  gap: 12px;
  color: var(--text);
  line-height: 1.55;
}

.documentation-markdown h1,
.documentation-markdown h2,
.documentation-markdown h3,
.documentation-markdown p,
.documentation-markdown ul,
.documentation-markdown figure,
.documentation-markdown pre {
  margin: 0;
}

.documentation-markdown h1 {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
}

.documentation-markdown h2 {
  margin-top: 12px;
  color: var(--ink);
  font-size: 21px;
}

.documentation-markdown h3 {
  margin-top: 6px;
  color: var(--ink);
  font-size: 16px;
}

.documentation-markdown ul {
  padding-left: 20px;
}

.documentation-markdown li {
  margin: 5px 0;
}

.documentation-markdown a,
.inline-help-link {
  color: var(--accent-strong);
  font-weight: 800;
}

.documentation-markdown figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 8px;
}

.documentation-markdown img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.documentation-video {
  display: grid;
  gap: 8px;
}

.documentation-video-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.documentation-video-toolbar strong {
  color: var(--ink);
  font-size: 14px;
}

.documentation-video [data-documentation-video-close] {
  display: none;
}

.documentation-video video {
  display: block;
  width: 100%;
  max-height: min(68vh, 620px);
  border-radius: 8px;
  background: #081b20;
  box-shadow: 0 16px 34px rgba(9, 38, 45, 0.18);
}

.documentation-video.large {
  position: fixed;
  inset: 18px;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    var(--surface-raised);
  padding: 16px;
  box-shadow: 0 32px 90px rgba(3, 25, 31, 0.36);
}

.documentation-video.large::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(4, 18, 22, 0.58);
  backdrop-filter: blur(4px);
}

.documentation-video.large video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.documentation-video.large [data-documentation-video-large] {
  display: none;
}

.documentation-video.large [data-documentation-video-close] {
  display: inline-flex;
}

.documentation-video figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.documentation-video-chapter {
  appearance: none;
  display: grid;
  width: 100%;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface-raised)), var(--surface-raised));
  margin: 10px 0;
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    transform var(--motion-fast);
}

.documentation-video-chapter:hover,
.documentation-video-chapter:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
  transform: translateY(-2px);
}

.documentation-video-chapter strong {
  font-size: 13px;
}

.documentation-video-chapter span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.documentation-markdown code {
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 1px 5px;
  font-size: 0.92em;
}

.documentation-markdown pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0f1f24;
  padding: 12px;
  color: #f4fbfb;
}

.documentation-markdown pre code {
  background: transparent;
  padding: 0;
}

.inline-help-link {
  width: fit-content;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
}

.import-help-button {
  justify-self: start;
  min-height: 30px;
  margin-top: 5px;
  padding: 0 10px;
}

.feedback-panel {
  padding: 16px;
}

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

.feedback-form .field-wide,
.feedback-form .form-actions {
  grid-column: 1 / -1;
}

.feedback-recipient {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px 11px;
  display: grid;
  gap: 3px;
}

.feedback-recipient span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feedback-recipient strong {
  font-size: 13px;
}

.feedback-diagnostics {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}

.feedback-diagnostics input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: 0 0 auto;
}

.feedback-diagnostics strong {
  line-height: 1.25;
}

.feedback-diagnostics-note {
  border-left: 3px solid var(--warning);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 5px 0 0;
  padding-left: 8px;
}

.feedback-screenshot-control {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
}

.feedback-screenshot-control small,
.feedback-screenshot-preview-header > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.feedback-screenshot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.feedback-screenshot-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
}

.feedback-screenshot-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feedback-screenshot-preview img {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  max-height: 180px;
  max-width: 100%;
  object-fit: contain;
}

.feedback-modal-form {
  gap: 14px;
}

.feedback-modal-diagnostics {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px 11px;
}

.feedback-triage-panel {
  padding: 16px;
}

.feedback-triage-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.feedback-triage-summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px 11px;
  display: grid;
  gap: 5px;
}

.feedback-triage-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.feedback-triage-summary-card strong {
  font-size: 24px;
  line-height: 1;
}

.feedback-triage-list {
  display: grid;
  gap: 12px;
}

.feedback-triage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
  padding: 14px;
}

.feedback-triage-card-main,
.feedback-triage-controls {
  min-width: 0;
}

.feedback-triage-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feedback-triage-heading h3 {
  margin: 0;
  font-size: 18px;
}

.feedback-triage-heading p,
.feedback-triage-message,
.feedback-triage-meta,
.feedback-diagnostics-detail {
  color: var(--muted);
}

.feedback-triage-heading p,
.feedback-triage-message {
  margin: 4px 0 0;
}

.feedback-triage-message {
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
}

.feedback-triage-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.feedback-triage-meta,
.feedback-diagnostics-detail dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 12px 0 0;
}

.feedback-triage-meta dt,
.feedback-diagnostics-detail dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.feedback-triage-meta dd,
.feedback-diagnostics-detail dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback-diagnostics-detail {
  margin-top: 12px;
}

.feedback-diagnostics-detail summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 750;
}

.feedback-diagnostics-screenshot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
}

.feedback-diagnostics-screenshot img {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
}

.feedback-diagnostics-logs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
}

.feedback-diagnostics-logs > strong {
  color: var(--text);
  font-size: 13px;
}

.feedback-diagnostics-logs ol {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feedback-diagnostics-logs li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.feedback-diagnostics-logs li:first-child {
  border-top: 0;
  padding-top: 0;
}

.feedback-diagnostics-logs span,
.feedback-diagnostics-empty {
  color: var(--muted);
  font-size: 12px;
}

.feedback-diagnostics-logs code {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.feedback-diagnostics-empty {
  margin: 10px 0 0;
}

.feedback-triage-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.feedback-triage-controls .field-wide,
.feedback-triage-controls .icon-button {
  grid-column: 1 / -1;
}

.feedback-triage-controls textarea {
  resize: vertical;
}

.tenant-settings-view {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
}

.settings-primary {
  grid-row: span 3;
}

.settings-panel {
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.tenant-settings-form .field-wide,
.tenant-settings-form .settings-section-title,
.tenant-settings-form .icon-button {
  grid-column: 1 / -1;
}

.tenant-user-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tenant-user-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-section-title {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 4px;
}

.settings-section-title strong {
  font-size: 15px;
}

.settings-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.settings-toggle {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.settings-toggle-important {
  border-color: rgba(11, 127, 121, 0.42);
  background: var(--accent-soft);
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle strong {
  font-size: 13px;
  line-height: 1.35;
}

.settings-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.parser-mapping-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.parser-mapping-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.parser-mapping-summary strong {
  color: var(--text, var(--ink));
  font-size: 18px;
  line-height: 1.25;
}

.parser-mapping-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.settings-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 0;
}

.settings-details summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  list-style: none;
}

.settings-details summary::-webkit-details-marker {
  display: none;
}

.settings-details summary::marker {
  content: "";
}

.settings-details-summary-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-details .settings-details-summary-text > span {
  color: var(--text, var(--ink));
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.settings-details .settings-details-summary-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.expand-affordance {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  text-align: center;
}

.settings-details summary .expand-affordance::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.settings-details[open] summary .expand-affordance::before {
  content: "-";
}

.settings-details > p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-details .approval-warning-policy-grid {
  padding: 0 12px 12px;
}

.approval-warning-policy-field {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 11px;
}

.approval-warning-policy-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.settings-list {
  display: grid;
  gap: 9px;
}

.settings-list-item,
.settings-summary-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 11px;
}

.settings-list-item {
  display: grid;
  gap: 4px;
}

.settings-list-item strong,
.settings-summary-row strong {
  font-size: 13px;
}

.settings-list-item span,
.settings-summary-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-list-item.muted {
  background: var(--surface-soft);
  color: var(--muted);
}

.settings-list-item.active-role {
  border-color: rgba(11, 127, 121, 0.42);
  background: var(--accent-soft);
}

.tenant-user-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(74px, 0.55fr) max-content;
  gap: 10px;
  align-items: start;
}

.tenant-user-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tenant-user-card strong,
.tenant-user-card span,
.tenant-user-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tenant-user-card strong {
  font-size: 13px;
}

.tenant-user-card span,
.tenant-user-card small {
  color: var(--muted);
  font-size: 12px;
}

.tenant-user-reminder-status {
  color: var(--accent);
  font-weight: 800;
}

.tenant-user-card > div:first-child {
  grid-column: 1 / -1;
}

.tenant-user-producer {
  grid-column: 1 / 3;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.tenant-user-actions {
  grid-column: 3;
  grid-row: 2 / 4;
  display: grid;
  gap: 8px;
  align-self: center;
  justify-self: end;
}

.tenant-user-actions .icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
}

.tenant-user-actions .tenant-user-action-button {
  width: auto;
  min-width: 118px;
  padding: 0 10px;
  justify-content: flex-start;
}

.tenant-user-invitation {
  min-width: 0;
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: center;
}

.tenant-user-invitation small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.tenant-user-invitation input {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-raised);
}

.tenant-user-card.active-role {
  border-color: rgba(11, 127, 121, 0.42);
  background: var(--accent-soft);
}

.settings-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-summary-row strong {
  color: var(--accent-strong);
  text-align: right;
}

.reporting-panel {
  grid-column: 1 / -1;
  min-width: 0;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.reporting-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.reporting-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.reporting-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reporting-header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.revenue-report-mode-tabs {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface-soft);
}

.revenue-report-mode-tabs button {
  min-height: 36px;
  padding: 7px 16px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.revenue-report-mode-tabs button.active {
  background: var(--surface-raised);
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
}

.report-filter-bar {
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface-soft)) 0%, color-mix(in srgb, var(--surface-soft) 86%, var(--accent-warm-soft)) 100%);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: center;
  gap: 8px;
}

.report-filter-bar.analytics-report-filters {
  grid-template-columns: minmax(180px, 260px) auto;
  justify-content: start;
}

.report-filter-bar select {
  min-height: 38px;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line-strong));
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  background-image:
    var(--select-chevron),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 94%, #ffffff), color-mix(in srgb, var(--surface-raised) 88%, var(--accent-soft)));
  background-position:
    right 13px center,
    0 0;
  background-repeat: no-repeat;
  background-size:
    18px 18px,
    100% 100%;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent);
}

.report-filter-bar .icon-button {
  min-height: 38px;
  justify-self: end;
  min-width: 92px;
  white-space: nowrap;
}

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

.report-table-card {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  padding: 13px;
  display: grid;
  gap: 12px;
}

.report-table-footer {
  display: flex;
  justify-content: center;
}

.revenue-chart-card {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.revenue-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.revenue-chart-heading strong,
.revenue-chart-heading span {
  display: block;
}

.revenue-chart-heading span,
.revenue-chart-note {
  color: var(--muted);
  font-size: 12px;
}

.revenue-chart-legend {
  display: flex;
  gap: 12px;
}

.revenue-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.revenue-chart-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.revenue-chart-legend i.comparison {
  background: var(--accent-warm);
}

.revenue-trend-chart {
  width: 100%;
  min-height: 260px;
  overflow: visible;
}

.revenue-trend-chart .axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.revenue-trend-chart .axis-label,
.revenue-trend-chart .month-label {
  fill: var(--muted);
  font-size: 11px;
}

.revenue-trend-chart .current-line,
.revenue-trend-chart .comparison-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.revenue-trend-chart .comparison-line {
  stroke: var(--accent-warm);
  stroke-width: 3;
  stroke-dasharray: 7 6;
}

.revenue-trend-point {
  cursor: pointer;
}

.revenue-trend-point circle {
  fill: var(--surface-raised);
  stroke: var(--accent);
  stroke-width: 3;
}

.revenue-trend-point:focus circle,
.revenue-trend-point:hover circle {
  fill: var(--accent-soft);
  stroke-width: 5;
  outline: none;
}

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

.revenue-driver-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.4fr);
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.revenue-driver-row:hover,
.revenue-driver-row:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface-raised));
}

.revenue-driver-label {
  display: grid;
  gap: 2px;
}

.revenue-driver-label small {
  color: var(--muted);
}

.revenue-driver-track {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 76%, transparent);
  overflow: hidden;
}

.revenue-driver-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
}

.revenue-driver-row.decline .revenue-driver-track i {
  background: var(--danger);
}

.book-owner-bars {
  display: grid;
  gap: 8px;
}

.book-owner-bar {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.4fr) minmax(100px, auto);
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.book-owner-bar:hover,
.book-owner-bar:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface-raised));
}

.book-owner-bar-label {
  display: grid;
  gap: 2px;
}

.book-owner-bar-label small {
  color: var(--muted);
}

.book-owner-bar-track {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 76%, transparent);
  overflow: hidden;
}

.book-owner-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.book-owner-bar-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.book-status-at_risk {
  color: var(--warning-ink);
  background: color-mix(in srgb, var(--warning) 18%, var(--surface-raised));
}

.revenue-chart-note {
  margin: 0;
}

.report-table-scroll {
  max-width: 100%;
  height: min(62vh, 640px);
  min-height: 320px;
  max-height: 640px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 13%, var(--line));
  border-radius: var(--radius);
  background: var(--surface-raised);
  contain: layout paint;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 16%, transparent);
}

.report-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

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

.revenue-detail-table {
  min-width: 1500px;
}

.report-table th {
  white-space: nowrap;
}

.report-sort-button {
  width: 100%;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in srgb, var(--surface-raised) 84%, transparent);
  color: inherit;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.report-sort-button:hover,
.report-sort-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.report-sort-indicator {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent);
}

.report-sort-indicator svg {
  width: 13px;
  height: 13px;
}

.report-table tbody tr {
  cursor: default;
}

.report-table td {
  background: var(--surface-raised);
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-spacer-row td {
  padding: 0;
  border: 0;
  background: var(--surface-raised);
}

.report-group-row th {
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
}

.report-table.commission-register-table {
  min-width: 0;
  table-layout: fixed;
}

.report-table.book-report-table {
  min-width: 0;
  table-layout: fixed;
}

.current-book-report-table th {
  white-space: normal;
  line-height: 1.2;
}

.current-book-report-table th:nth-child(1),
.current-book-report-table td:nth-child(1) {
  width: 14%;
}

.current-book-report-table th:nth-child(2),
.current-book-report-table td:nth-child(2) {
  width: 13%;
}

.current-book-report-table th:nth-child(3),
.current-book-report-table td:nth-child(3) {
  width: 17%;
}

.current-book-report-table th:nth-child(4),
.current-book-report-table td:nth-child(4) {
  width: 12%;
}

.current-book-report-table th:nth-child(5),
.current-book-report-table td:nth-child(5) {
  width: 10%;
}

.current-book-report-table th:nth-child(6),
.current-book-report-table td:nth-child(6) {
  width: 14%;
  text-align: left;
}

.current-book-report-table th:nth-child(7),
.current-book-report-table td:nth-child(7) {
  width: 10%;
  text-align: right;
}

.current-book-report-table th:nth-child(8),
.current-book-report-table td:nth-child(8) {
  width: 10%;
}

.commission-register-table th,
.commission-register-table td {
  vertical-align: top;
}

.commission-register-table th:nth-child(1),
.commission-register-table td:nth-child(1) {
  width: 25%;
}

.commission-register-table th:nth-child(2),
.commission-register-table td:nth-child(2) {
  width: 11%;
}

.commission-register-table th:nth-child(3),
.commission-register-table td:nth-child(3) {
  width: 18%;
}

.commission-register-table th:nth-child(4),
.commission-register-table td:nth-child(4) {
  width: 13%;
  text-align: right;
}

.commission-register-table th:nth-child(5),
.commission-register-table td:nth-child(5) {
  width: 16%;
  text-align: right;
}

.commission-register-table th:nth-child(6),
.commission-register-table td:nth-child(6) {
  width: 17%;
  text-align: right;
}

.book-report-table th:nth-child(6),
.book-report-table td:nth-child(6) {
  text-align: right;
}

.report-date-cell,
.report-money-cell {
  display: block;
  white-space: nowrap;
}

.report-money-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.report-cell-stack {
  display: grid;
  min-width: 0;
  gap: 3px;
  line-height: 1.18;
}

.report-cell-stack strong,
.report-cell-stack span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.report-cell-stack strong {
  font-size: 13px;
}

.report-cell-stack span {
  color: var(--muted);
  font-size: 11px;
}

.report-cell-stack.nowrap strong,
.report-cell-stack.rule strong,
.report-cell-stack.status strong {
  white-space: nowrap;
}

.report-cell-stack.rule strong,
.report-cell-stack.status strong {
  font-weight: 700;
}

.report-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.report-row-detail-drawer {
  display: grid;
  gap: 14px;
}

.report-row-detail-list {
  margin: 0;
  display: grid;
  gap: 9px;
}

.report-row-detail-list div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.report-row-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.report-row-detail-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.report-analytics-shell {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.reporting-overview-shell {
  display: grid;
  gap: 16px;
}

.reporting-destinations {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface-raised)) 0%, var(--surface-raised) 70%);
  overflow: hidden;
}

.reporting-destinations-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.reporting-destinations-header span,
.reporting-destination-card > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reporting-destinations-header h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.reporting-destinations-header p,
.reporting-destination-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.reporting-destination-card {
  min-width: 0;
  padding: 18px 20px;
  display: grid;
  align-content: start;
  gap: 7px;
}

.reporting-destination-card + .reporting-destination-card {
  border-left: 1px solid var(--line);
}

.reporting-destination-card > strong {
  color: var(--ink);
  font-size: 19px;
}

.reporting-destination-card .icon-button {
  justify-self: start;
  margin-top: 8px;
}

.analytics-card {
  grid-column: span 2;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-raised)) 0%, var(--surface-raised) 100%);
  padding: 13px;
  display: grid;
  gap: 12px;
}

.analytics-card-wide {
  grid-column: span 6;
}

.analytics-card-half {
  grid-column: span 3;
}

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

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

.analytics-card-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analytics-ai-card {
  gap: 14px;
}

.analytics-ai-header {
  align-items: center;
}

.analytics-ai-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-ai-actions b {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 9px;
  white-space: nowrap;
}

.analytics-ai-actions b.ready {
  color: var(--success);
  background: var(--success-soft);
}

.analytics-ai-actions b.review {
  color: var(--warning);
  background: var(--warning-soft);
}

.analytics-ai-actions b.blocked {
  color: var(--danger);
  background: var(--danger-soft);
}

.analytics-ai-summary {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

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

.analytics-ai-columns section,
.analytics-ai-card > section {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.analytics-ai-columns section > strong,
.analytics-ai-card > section > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.analytics-ai-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analytics-ai-list li {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  padding-left: 9px;
}

.analytics-insights-card {
  gap: 14px;
}

.analytics-notice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.analytics-notice {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-raised);
  padding: 12px;
}

.analytics-notice span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-notice strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.08;
}

.analytics-notice p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.analytics-notice.good strong {
  color: var(--success);
}

.analytics-notice.watch strong {
  color: var(--warning);
}

.analytics-notice-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-drilldown-button {
  max-width: 100%;
}

.analytics-drilldown-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-what-to-notice {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 7%, var(--surface-raised)) 0%, var(--surface-raised) 48%);
}

.analytics-what-to-notice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.analytics-section-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-what-to-notice-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.analytics-what-to-notice-header p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.analytics-signal-count {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  white-space: nowrap;
}

.analytics-priority-list {
  display: grid;
}

.analytics-priority-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-raised) 96%, transparent);
}

.analytics-priority-card:last-child {
  border-bottom: 0;
}

.analytics-priority-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: color-mix(in srgb, var(--accent) 58%, var(--line));
}

.analytics-priority-card.good::before {
  background: var(--success);
}

.analytics-priority-card.watch::before {
  background: var(--warning);
}

.analytics-priority-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.analytics-priority-content {
  min-width: 0;
}

.analytics-priority-content > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.analytics-priority-content > strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}

.analytics-priority-card.good .analytics-priority-content > strong {
  color: var(--success);
}

.analytics-priority-card.watch .analytics-priority-content > strong {
  color: var(--warning);
}

.analytics-priority-content p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.analytics-priority-content small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.analytics-priority-content small b {
  color: var(--text);
}

.analytics-priority-action {
  align-self: center;
  justify-self: end;
}

.analytics-chart-stack {
  display: grid;
  gap: 8px;
}

.analytics-chart-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 22px;
}

.analytics-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.analytics-chart-legend i {
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.analytics-chart-legend i.average {
  height: 3px;
  background: #6b7f86;
}

.analytics-monthly-chart,
.analytics-trend-chart {
  width: 100%;
  min-height: 240px;
  display: block;
  background: var(--analytics-chart-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.analytics-grid-line {
  stroke: var(--analytics-chart-grid);
  stroke-width: 1;
}

.analytics-axis-line {
  stroke: var(--analytics-chart-axis);
  stroke-width: 1.2;
}

.analytics-axis-label,
.analytics-legend {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.analytics-legend {
  fill: var(--accent-strong);
}

.analytics-legend.payout {
  fill: #7b5f00;
}

.analytics-legend.average {
  fill: #6b7f86;
}

.analytics-month-bar rect {
  fill: var(--accent);
}

.analytics-bar-value,
.analytics-row-count {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 850;
}

.analytics-row-count {
  fill: var(--muted);
}

.analytics-line.average {
  stroke: #6b7f86;
  stroke-width: 2.4;
}

.analytics-average-dot {
  fill: var(--analytics-chart-dot-fill);
  stroke: #6b7f86;
  stroke-width: 2;
}

.analytics-area {
  fill: rgba(22, 132, 125, 0.1);
}

.analytics-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-line.gross {
  stroke: var(--accent);
}

.analytics-line.payout {
  stroke: #b48a00;
}

.analytics-dot.gross {
  fill: var(--analytics-chart-dot-fill);
  stroke: var(--accent);
  stroke-width: 2;
}

.analytics-ranked-list {
  display: grid;
  gap: 9px;
}

.analytics-ranked-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.analytics-rank {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.analytics-ranked-row div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

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

.analytics-ranked-row strong {
  font-size: 14px;
}

.analytics-ranked-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.analytics-ranked-row i {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--analytics-chart-track);
  overflow: hidden;
  position: relative;
}

.analytics-ranked-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #88b8a8);
}

.analytics-pie-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface-raised) 100%);
}

.analytics-pie-chart {
  width: min(68%, 210px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background: var(--pie-gradient);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 37, 41, 0.08);
}

.analytics-pie-chart::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: inherit;
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--line);
}

.analytics-pie-chart span {
  min-width: 0;
  width: 58%;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.analytics-pie-chart strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.analytics-pie-chart em {
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-pie-legend {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.analytics-pie-legend-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.analytics-pie-legend-row i {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--slice-color);
}

.analytics-pie-legend-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.analytics-pie-legend-row strong,
.analytics-pie-legend-row span {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.analytics-pie-legend-row strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.analytics-pie-legend-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

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

.analytics-bucket {
  min-height: 92px;
  border: 1px solid rgba(184, 75, 90, 0.24);
  border-radius: var(--radius);
  background: rgba(184, 75, 90, var(--bucket-opacity));
  color: var(--analytics-bucket-text);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px;
}

.analytics-bucket strong {
  font-size: 26px;
  line-height: 1;
}

.analytics-bucket span {
  color: var(--analytics-bucket-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.analytics-heatmap {
  min-width: 0;
  overflow-x: auto;
  display: grid;
  grid-template-columns: minmax(118px, 0.9fr) repeat(var(--heatmap-cols), minmax(76px, 1fr));
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--analytics-chart-surface);
}

.analytics-heatmap-corner,
.analytics-heatmap-month {
  min-height: 24px;
}

.analytics-heatmap-month {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.analytics-heatmap-label {
  min-width: 0;
  align-self: center;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-heatmap-cell {
  min-height: 44px;
  border: 1px solid rgba(29, 100, 104, 0.16);
  border-radius: 6px;
  background: rgba(22, 132, 125, var(--cell-opacity));
  display: grid;
  place-items: center;
}

.analytics-heatmap-cell em {
  color: var(--analytics-heatmap-label);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.analytics-producer-positioning {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface-raised) 100%);
}

.analytics-producer-positioning-head,
.analytics-producer-positioning-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 2.2fr) 96px 54px 68px;
  gap: 10px;
  align-items: center;
}

.analytics-producer-positioning-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.analytics-producer-positioning-row {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 8px 10px;
}

.analytics-producer-positioning-row.top {
  border-color: rgba(22, 132, 125, 0.28);
  background: rgba(22, 132, 125, 0.04);
}

.analytics-producer-positioning-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-producer-positioning-row b,
.analytics-producer-positioning-row em {
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.analytics-position-bar {
  min-width: 0;
  height: 26px;
  border-radius: 999px;
  background: var(--analytics-chart-track);
  overflow: hidden;
  position: relative;
}

.analytics-position-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--position-width);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #88b8a8);
}

.analytics-position-bar span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 5px 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.analytics-distribution {
  min-height: 220px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding: 10px 8px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--analytics-chart-surface);
}

.analytics-distribution-bar {
  min-width: 0;
  height: 100%;
  min-height: 190px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  gap: 6px;
}

.analytics-distribution-bar strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.analytics-distribution-bar > span {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.analytics-distribution-bar i {
  width: min(100%, 38px);
  height: var(--bar-height);
  min-height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--accent), #88b8a8);
}

.analytics-distribution-bar em,
.analytics-distribution-bar small {
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-waterfall {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--analytics-chart-surface);
}

.analytics-waterfall-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.analytics-waterfall-row span,
.analytics-waterfall-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.analytics-waterfall-row strong {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.analytics-waterfall-row i {
  height: 18px;
  border-radius: 999px;
  background: var(--analytics-chart-track);
  overflow: hidden;
  position: relative;
}

.analytics-waterfall-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--waterfall-width);
  border-radius: inherit;
  background: var(--waterfall-color, var(--accent));
}

.analytics-waterfall-row.gross {
  --waterfall-color: var(--accent);
}

.analytics-waterfall-row.payout {
  --waterfall-color: #b48a00;
}

.analytics-waterfall-row.retained {
  --waterfall-color: #2f7a4c;
}

.analytics-waterfall-row.muted {
  --waterfall-color: #a7b6bb;
}

.analytics-empty {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  font-weight: 750;
}

.missing-history {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.missing-history > strong {
  display: block;
  margin-bottom: 8px;
}

.missing-history ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.missing-history li span {
  display: block;
  font-weight: 800;
}

.missing-history li small {
  color: var(--muted);
}

.missing-history li p,
.missing-history > p {
  margin: 4px 0 0;
  color: var(--text);
}

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

.report-placeholder {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 5px;
}

.report-placeholder strong {
  color: var(--accent-strong);
}

.report-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.dev-actions {
  display: grid;
  gap: 10px;
}

.dev-action {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.dev-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dev-action strong {
  display: block;
  margin-bottom: 4px;
}

.dev-action p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.export-actions {
  grid-template-columns: repeat(2, max-content);
  justify-content: start;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.import-panel {
  grid-column: 1 / -1;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 420px);
  align-items: stretch;
  gap: 12px;
  overflow: visible;
}

.import-panel.upload-panel-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.import-panel.upload-panel-hidden .import-summary-card {
  grid-column: 1 / -1;
}

.drop-zone {
  min-width: 0;
  min-height: 112px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  place-items: start;
  align-content: center;
  align-items: center;
  column-gap: 13px;
  gap: 8px;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
}

.sample-data-panel {
  grid-column: 1 / -1;
  align-content: start;
  gap: 10px;
}

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

.sample-data-actions,
.sample-data-snapshot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.sample-data-snapshot-list {
  justify-content: flex-start;
}

.sample-data-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sample-data-status.success {
  color: var(--success);
}

.sample-data-status.error {
  color: var(--danger);
}

.sample-data-month-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.sample-month-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.sample-month-card strong,
.sample-month-card span {
  display: block;
  min-width: 0;
}

.sample-month-card strong {
  color: var(--ink);
  font-size: 13px;
}

.sample-month-card > div > span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  display: none;
}

.drop-zone [data-icon] {
  grid-row: 1;
}

.drop-zone svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.drop-zone strong {
  font-size: 15px;
}

.drop-zone-copy {
  grid-column: 2;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.drop-zone-copy > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.summary-block {
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-raised)) 0%, var(--surface-raised) 100%);
  box-shadow: var(--shadow-soft);
}

.import-summary-card {
  min-width: 0;
  min-height: 112px;
  align-content: start;
}

.import-summary-card .summary-heading {
  padding-bottom: 2px;
}

.summary-heading,
.table-header,
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-heading {
  justify-content: flex-start;
  font-size: 14px;
}

.summary-heading svg,
.drawer-header > svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.metric-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.metric-list div {
  min-width: 0;
  padding: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 82%, var(--accent-soft)) 0%, color-mix(in srgb, var(--surface-soft) 78%, var(--accent-warm-soft)) 100%);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 13%, var(--line));
}

.metric-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-list dd {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 780;
}

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

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--surface-raised) 0%, color-mix(in srgb, var(--surface-raised) 90%, var(--accent-soft)) 100%);
  font-size: 14px;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    background var(--motion-fast);
}

.field select {
  padding-right: 42px;
  background-image:
    var(--select-chevron),
    linear-gradient(180deg, var(--surface-raised) 0%, color-mix(in srgb, var(--surface-raised) 90%, var(--accent-soft)) 100%);
  background-position:
    right 13px center,
    0 0;
  background-repeat: no-repeat;
  background-size:
    18px 18px,
    100% 100%;
}

.field textarea {
  resize: vertical;
  line-height: 1.35;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.icon-button:focus-visible,
.nav-item:focus-visible,
.drop-zone:focus-within {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.field.inactive {
  opacity: 0.58;
}

.recent-statements-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 -2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.recent-statements-heading svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.recent-files {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 112px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--accent-soft));
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.recent-files:empty::before {
  content: "No files imported";
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.file-pill {
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.file-pill strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-pill span {
  color: var(--muted);
}

.import-statement-card {
  border: 1px solid color-mix(in srgb, var(--accent) 13%, var(--line));
  border-radius: var(--radius);
  padding: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    transform var(--motion-fast),
    background var(--motion-fast);
}

.import-statement-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.import-statement-card strong,
.import-statement-card span {
  min-width: 0;
}

.import-statement-card strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-statement-card div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.setup-reuse-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  border: 1px solid #cde8d5;
  border-radius: 999px;
  background: var(--success-soft);
  padding: 2px 7px;
  color: var(--good);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.import-statement-card > .badge {
  justify-self: start;
  grid-column: 1 / -1;
}

.import-routing-panel {
  grid-column: 1 / -1;
  padding: 15px;
  display: grid;
  gap: 13px;
}

.import-routing-list {
  display: grid;
  gap: 12px;
}

.import-routing-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.import-routing-card {
  min-height: 116px;
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-raised)) 0%, var(--surface-raised) 72%, color-mix(in srgb, var(--accent-warm) 5%, var(--surface-raised)) 100%);
  color: var(--ink);
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  text-align: left;
  cursor: pointer;
}

.import-routing-card svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.import-routing-card strong {
  font-size: 24px;
  line-height: 1;
}

.import-routing-card span {
  grid-column: 1 / -1;
  font-weight: 780;
  font-size: 13px;
}

.import-routing-card em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.35;
}

.import-routing-card:not(.disabled):hover {
  border-color: rgba(11, 127, 121, 0.42);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.import-routing-card.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.import-routing-summary {
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--accent-soft));
  padding: 11px 12px;
  display: grid;
  gap: 2px;
}

.import-routing-summary span {
  color: var(--muted);
  font-size: 13px;
}

.table-panel {
  display: flex;
  flex-direction: column;
}

.table-header {
  min-height: 56px;
  padding: 11px 13px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--surface-raised) 82%, var(--accent-soft)) 0%, color-mix(in srgb, var(--surface-raised) 90%, var(--accent-warm-soft)) 100%);
}

.table-header strong,
.drawer-header strong {
  display: block;
  font-size: 15px;
}

.table-header span,
.drawer-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.table-scroll {
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.col-carrier {
  width: 9%;
}

.col-client-id {
  width: 10%;
}

.col-client {
  width: 16%;
}

.col-broker {
  width: 7%;
}

.col-split {
  width: 12%;
}

.col-date {
  width: 10%;
}

.col-premium,
.col-commission {
  width: 9%;
}

.col-confidence {
  width: 8%;
}

.col-status {
  width: 10%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 78%, var(--accent-soft)) 0%, color-mix(in srgb, var(--surface-soft) 90%, var(--surface-raised)) 100%);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

tbody tr {
  cursor: pointer;
  transition:
    background var(--motion-fast),
    box-shadow var(--motion-fast);
}

tbody tr:hover,
tbody tr.selected {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

td.client-cell {
  font-weight: 700;
}

.row-edit {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: inherit;
  padding: 5px 6px;
  outline: none;
}

.row-edit:hover {
  border-color: var(--line);
  background: var(--surface-raised);
}

.row-edit:focus {
  border-color: var(--accent);
  background: var(--surface-raised);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.amount-edit {
  text-align: right;
}

.approval-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.approval-field .row-edit,
.approval-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background-color: var(--surface-raised);
}

.approval-field.has-warning .row-edit,
.approval-field.has-warning select {
  border-color: var(--warning);
  background-color: transparent;
  box-shadow: inset 4px 0 0 var(--warning);
  color: var(--warning);
}

.approval-field.has-error .row-edit,
.approval-field.has-error select {
  border-color: var(--warning);
  background-color: transparent;
  box-shadow: inset 4px 0 0 var(--warning);
  color: var(--warning);
}

.approval-field-notes {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.approval-field-notes .warning {
  color: var(--warning);
}

.approval-field-notes .error {
  color: var(--warning);
}

.status-edit {
  min-width: 96px;
  color: var(--warning);
  background: var(--warning-soft);
  border-color: transparent;
  font-weight: 750;
}

.status-edit:has(option[value="Confirmed"]:checked) {
  color: var(--success);
  background: var(--success-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 750;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-cell .badge {
  white-space: normal;
  min-width: 82px;
  text-align: center;
}

.confidence-cell .badge {
  min-width: 48px;
}

.badge.success {
  color: var(--success);
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 26%, transparent);
}

.badge.warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 26%, transparent);
}

.badge.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 26%, transparent);
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.empty-state.compact {
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 18px;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

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

.review-drawer {
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: auto;
}

.drawer-header {
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.drawer-action {
  width: 100%;
}

.review-form {
  display: grid;
  gap: 11px;
}

.split-field {
  gap: 8px;
}

.split-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px;
  gap: 8px;
}

.split-add-row .icon-button {
  grid-column: 1 / -1;
}

.icon-button.compact-action {
  min-height: 34px;
  padding: 0 10px;
}

.split-list {
  display: grid;
  gap: 6px;
  min-height: 30px;
}

.split-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 12px;
}

.split-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-chip strong {
  color: var(--accent-strong);
}

.split-remove {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.split-remove:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

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

.split-payouts {
  display: grid;
  gap: 6px;
}

.payout-summary {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.payout-summary div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.payout-summary span {
  color: var(--muted);
  font-weight: 700;
}

.payout-summary strong {
  color: var(--accent-strong);
}

.brokers-view,
.carriers-view,
.clients-view,
.statement-types-view,
.commission-rules-view {
  flex: 1;
  min-height: 0;
  padding: 18px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.statement-parsing-view,
.statement-configuration-view,
.commission-assignment-view,
.approval-view {
  flex: 1;
  min-height: 0;
  padding: 18px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.statement-configuration-view {
  grid-template-columns: minmax(0, 1fr);
}

.commission-assignment-view,
.approval-view {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.workflow-statement-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.setup-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.configuration-row-rules {
  display: grid;
  gap: 10px;
}

.compact-table {
  max-height: 340px;
}

.assignment-sections {
  display: grid;
  gap: 14px;
}

.assignment-records {
  display: grid;
  gap: 14px;
}

.assignment-statement-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.assignment-statement-form .field-wide {
  grid-column: 1 / -1;
}

.assignment-statement-actions {
  justify-content: stretch;
}

.assignment-statement-actions .icon-button {
  flex: 1 1 190px;
  justify-content: center;
}

.assignment-record-list {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.assignment-record-rows {
  display: grid;
  gap: 8px;
}

.assignment-record-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 13%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  padding: 10px;
}

.assignment-record-row-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 160px);
  gap: 10px;
  align-items: start;
}

.assignment-record-row-header strong,
.assignment-record-row-header span,
.assignment-record-control span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.assignment-record-row-header strong {
  color: var(--accent-strong);
}

.assignment-record-row-header span,
.assignment-record-control span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.assignment-record-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.assignment-record-row select {
  width: 100%;
}

.assignment-section {
  display: grid;
  gap: 8px;
  min-height: 0;
}

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

.assignment-section-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.assignment-section-header > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.assignment-filter-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  padding: 0 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.assignment-filter-toggle input {
  accent-color: var(--accent);
}

.assignment-filter-toggle:has(input:disabled) {
  cursor: not-allowed;
  color: var(--muted);
  background: var(--surface-soft);
}

.assignment-filter-note {
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
}

.producer-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  gap: 18px;
  padding: 12px;
}

.producer-section-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.producer-section-heading strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.producer-section-heading em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.producer-section-actions {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) 44px;
  align-items: end;
  gap: 16px;
  min-width: 0;
}

.producer-section-toggle {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  text-align: left;
}

.producer-section-toggle > span:not(.expand-affordance) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.producer-section-toggle strong {
  font-size: 14px;
}

.producer-section-toggle em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.producer-section-header .producer-section-toggle {
  align-self: end;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.producer-section-control,
.producer-section-rule {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.producer-section-control span,
.producer-section-rule span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .producer-section-header {
    grid-template-columns: 1fr;
  }

  .producer-section-actions {
    grid-template-columns: minmax(0, 1fr) 44px;
    width: 100%;
  }

  .producer-section-control {
    grid-column: 1 / -1;
  }
}

.assignment-section-rule-select,
.assignment-section-producer-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.assignment-table-scroll {
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
}

.assignment-table-scroll table {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  table-layout: fixed;
}

.assignment-table-scroll .producer-assignment-table {
  min-width: 0;
  width: 100%;
}

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

.configuration-row-rule-select,
.assignment-row-rule-select,
.assignment-client-select,
.assignment-client-type-select,
.assignment-row-producer-select,
.assignment-section-producer-select,
.commission-assignment-rule-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.assignment-table-scroll th,
.assignment-table-scroll td {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-left: 8px;
  padding-right: 8px;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.assignment-table-scroll .assignment-imported-client-cell,
.assignment-table-scroll .assignment-client-cell {
  padding-right: 14px;
}

.assignment-table-scroll .assignment-client-type-cell {
  padding-left: 10px;
}

.assignment-table-scroll .assignment-row-rule-select,
.assignment-table-scroll .assignment-client-select,
.assignment-table-scroll .assignment-client-type-select,
.assignment-table-scroll .assignment-row-producer-select,
.assignment-table-scroll .assignment-section-producer-select {
  appearance: none;
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line-strong));
  border-radius: calc(var(--radius) - 2px);
  padding: 5px 36px 5px 9px;
  color: var(--ink);
  background-image:
    var(--select-chevron),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 94%, #ffffff), color-mix(in srgb, var(--surface-raised) 88%, var(--accent-soft)));
  background-position:
    right 10px center,
    0 0;
  background-repeat: no-repeat;
  background-size:
    17px 17px,
    100% 100%;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 18%, transparent);
}

.assignment-table-scroll .assignment-row-rule-select:focus,
.assignment-table-scroll .assignment-client-select:focus,
.assignment-table-scroll .assignment-client-type-select:focus,
.assignment-table-scroll .assignment-row-producer-select:focus,
.assignment-table-scroll .assignment-section-producer-select:focus {
  border-color: rgba(11, 127, 121, 0.65);
  outline: 2px solid rgba(11, 127, 121, 0.16);
  outline-offset: 1px;
}

.inline-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.assignment-client-control {
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.assignment-table-scroll .assignment-client-control {
  min-width: 0;
}

.assignment-imported-client-name {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.assignment-imported-client-name.muted {
  color: var(--muted);
}

.assignment-client-select.client-match-exact {
  border-color: rgba(52, 168, 111, 0.75);
  background-color: rgba(52, 168, 111, 0.16);
}

.assignment-client-type-select.client-type-ready {
  border-color: rgba(52, 168, 111, 0.75);
  background-color: rgba(52, 168, 111, 0.16);
}

.assignment-row-rule-select.assignment-rule-ready {
  border-color: rgba(52, 168, 111, 0.75);
  background-color: rgba(52, 168, 111, 0.16);
}

.assignment-client-select.client-match-close,
.assignment-client-select.client-match-auto {
  border-color: rgba(204, 158, 36, 0.8);
  background-color: rgba(204, 158, 36, 0.18);
}

.assignment-client-select.client-match-inactive {
  border-color: #d39a12 !important;
  background-color: #fff2bf !important;
  box-shadow: inset 4px 0 0 #d39a12;
}

.workflow-field-needs-attention,
.assignment-client-select.client-needs-attention {
  border-color: #d39a12 !important;
  background-color: #fff2bf !important;
  box-shadow: inset 4px 0 0 #d39a12;
}

.assignment-rule-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.assignment-row-approve-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 30px;
  width: 100%;
  gap: 5px;
  border: 1px solid #ecd390;
  border-radius: 6px;
  background: rgba(204, 158, 36, 0.14);
  padding: 4px 8px;
  color: #715000;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.assignment-row-approve-button.approved {
  border-color: rgba(52, 168, 111, 0.72);
  background: rgba(52, 168, 111, 0.16);
  color: var(--success);
}

.assignment-row-approve-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 1200px) {
  .assignment-row-approve-button span:last-child {
    display: none;
  }
}

.client-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(360px, 50vh);
  overflow: auto;
  padding: 2px;
}

.client-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.client-picker-row:hover,
.client-picker-row.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.client-picker-row span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-picker-row strong,
.client-picker-row em {
  overflow-wrap: anywhere;
}

.client-picker-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

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

.setup-header > div {
  min-width: 0;
}

.setup-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.setup-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.setup-header .help-link-button {
  flex: 0 0 auto;
  min-width: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
}

.reference-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.reference-search {
  flex: 1 1 260px;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-raised);
  padding: 0 10px;
  color: var(--muted);
}

.reference-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.reference-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  min-width: 0;
}

.reference-status-filter {
  flex: 0 1 auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: hidden;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.reference-status-filter button {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.reference-status-filter button:hover,
.reference-status-filter button.active {
  background: var(--surface-raised);
  color: var(--accent-strong);
  box-shadow: 0 1px 2px rgba(17, 27, 32, 0.08);
}

.reference-status-filter svg {
  width: 14px;
  height: 14px;
}

:root {
  --data-directory-list-height: clamp(840px, 104vh, 1360px);
}

.carriers-view > .setup-panel:first-child .carrier-rules-list,
.clients-view > .setup-panel:first-child .carrier-rules-list,
.statement-types-view > .setup-panel:first-child .carrier-rules-list,
.commission-rules-view > .setup-panel:first-child .carrier-rules-list,
.brokers-view > .setup-panel:first-child .brokers-list {
  max-height: var(--data-directory-list-height);
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.processed-statement-history-view .approval-panel {
  grid-column: 1 / -1;
  min-height: 0;
}

#processed-history-list {
  height: var(--data-directory-list-height);
  min-height: 0;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.processed-history-range-field {
  flex: 0 0 210px;
  margin: 0;
}

.processed-history-range-field select {
  min-height: 36px;
}

.reference-list-footer {
  display: flex;
  justify-content: center;
  padding-top: 12px;
}

.clients-view > .setup-panel:last-child,
.statement-types-view > .setup-panel:last-child,
.commission-rules-view > .setup-panel:last-child,
.carriers-view > .setup-panel:last-child,
.brokers-view > .setup-panel:last-child {
  min-height: 0;
}

.commission-assignment-queue-panel {
  min-width: 0;
}

.statement-configuration-view .carrier-rules-list,
.commission-assignment-queue-panel .carrier-rules-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-height: none;
  overflow: auto;
  gap: 10px;
}

.commission-assignment-detail-panel {
  min-width: 0;
}

.commission-assignment-detail-panel .carrier-rule-form {
  max-width: none;
}

.client-filter-field {
  width: 220px;
}

.client-detail-form {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.producer-detail-form,
.carrier-detail-form,
.statement-definition-detail-form,
.commission-rule-detail-form {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.producer-detail-form {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
}

.client-detail-form .field-wide,
.producer-detail-form .field-wide,
.carrier-detail-form .field-wide,
.statement-definition-detail-form .field-wide,
.commission-rule-detail-form .field-wide {
  grid-column: 1 / -1;
}

.data-reference-row.data-workflow-row.broker-card .producer-detail-form,
.data-reference-row.data-workflow-row.broker-card .producer-detail-form .field,
.data-reference-row.data-workflow-row.broker-card .producer-detail-form .form-actions,
.data-reference-row.data-workflow-row.carrier-rule-card .carrier-detail-form,
.data-reference-row.data-workflow-row.carrier-rule-card .carrier-detail-form .field,
.data-reference-row.data-workflow-row.carrier-rule-card .carrier-detail-form .form-actions,
.data-reference-row.data-workflow-row.carrier-rule-card .statement-definition-detail-form,
.data-reference-row.data-workflow-row.carrier-rule-card .statement-definition-detail-form .field,
.data-reference-row.data-workflow-row.carrier-rule-card .commission-rule-detail-form,
.data-reference-row.data-workflow-row.carrier-rule-card .commission-rule-detail-form .field {
  display: grid;
}

.data-reference-row.data-workflow-row .producer-detail-form,
.data-reference-row.data-workflow-row .carrier-detail-form,
.data-reference-row.data-workflow-row .statement-definition-detail-form,
.data-reference-row.data-workflow-row .assignment-statement-form,
.data-reference-row.data-workflow-row .commission-rule-detail-form {
  cursor: default;
}

.client-linked-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

.client-linked-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.client-linked-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.client-linked-row-header strong,
.client-linked-row-header span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.client-linked-row-header span {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-linked-item dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.client-linked-item dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-linked-item dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.client-usage-summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.client-usage-summary div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.client-usage-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-usage-summary dd {
  margin: 4px 0 0;
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 850;
}

.commission-assignment-detail-panel .assignment-table-scroll {
  max-height: clamp(300px, 48vh, 560px);
}

.brokers-list,
.pending-brokers,
.carrier-rules-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.broker-card,
.pending-broker,
.carrier-rule-card,
.empty-setup {
  border: 1px solid color-mix(in srgb, var(--accent) 13%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  padding: 11px;
}

.broker-card,
.carrier-rule-card {
  display: grid;
  gap: 7px;
}

.broker-card.data-reference-row:not(.data-workflow-row) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.broker-card,
.carrier-rule-card {
  cursor: pointer;
}

.broker-card:hover,
.broker-card.selected,
.carrier-rule-card:hover,
.carrier-rule-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
}

.data-reference-row.data-workflow-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 52px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--accent) 13%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-soft)) 0%, var(--surface-soft) 100%);
  padding: 0;
  color: var(--ink);
  overflow: hidden;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    background var(--motion-fast),
    transform var(--motion-fast);
}

.data-reference-row.data-workflow-row:hover,
.data-reference-row.data-workflow-row.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.data-reference-row.data-workflow-row .data-reference-main {
  min-height: 50px;
  padding: 8px 12px;
}

.data-reference-row.data-workflow-row .data-reference-actions {
  padding: 8px 12px 8px 0;
}

.data-reference-row.data-workflow-row.expanded .data-reference-main,
.data-reference-row.data-workflow-row.expanded .data-reference-actions {
  border-bottom: 1px solid var(--line);
}

.data-reference-row.data-workflow-row .data-reference-main strong {
  color: var(--accent-strong);
}

.data-reference-row.data-workflow-row .data-reference-main span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.data-reference-row.data-workflow-row .data-row-affordance {
  align-self: center;
}

.data-reference-detail-slot {
  min-width: 0;
}

.data-reference-row.data-workflow-row .data-reference-inline-detail {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px 12px 10px;
}

.data-reference-row.data-workflow-row .data-reference-detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  min-width: 0;
}

.data-reference-row.data-workflow-row .data-reference-detail-grid > div {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.data-reference-row.data-workflow-row .data-reference-detail-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-reference-row.data-workflow-row .data-reference-detail-grid dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.carrier-rule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.carrier-rule-header strong,
.carrier-rule-header span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.carrier-rule-header strong {
  color: var(--accent-strong);
}

.carrier-rule-header span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.carrier-rule-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.carrier-rule-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.carrier-rule-card dd {
  margin: 3px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.carrier-rule-card .summary-wide {
  grid-column: 1 / -1;
}

.data-reference-row .carrier-rule-header > div,
.data-reference-row.broker-card > div {
  min-width: 0;
}

.data-row-affordance {
  align-self: flex-start;
}

.import-rule-review {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.import-rule-review.empty {
  color: var(--muted);
}

.import-rule-review-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.import-rule-review-header strong,
.import-rule-review > strong {
  color: var(--ink);
  font-size: 12px;
}

.import-rule-review-header span,
.import-rule-review.empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.import-rule-review dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.import-rule-review dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.import-rule-review dd {
  margin: 3px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.broker-card div,
.pending-broker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.broker-card div {
  grid-template-columns: minmax(0, 1fr);
  align-items: baseline;
}

.data-reference-row.data-workflow-row.broker-card div {
  display: block;
}

.data-reference-row.data-workflow-row.broker-card .data-reference-detail-grid,
.data-reference-row.data-workflow-row.broker-card .data-reference-detail-grid > div,
.data-reference-row.data-workflow-row.broker-card .statement-approval-actions {
  display: grid;
}

.data-reference-row.data-workflow-row.broker-card .statement-approval-actions {
  display: flex;
}

.broker-card strong {
  color: var(--accent-strong);
}

.broker-card span,
.pending-broker span,
.broker-card p,
.empty-setup {
  color: var(--muted);
  font-size: 12px;
}

.broker-card p {
  margin: 0;
  line-height: 1.35;
}

.pending-broker > div {
  display: grid;
  gap: 3px;
}

.pending-brokers-section {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 11px;
}

.compact-field {
  min-width: 104px;
}

.broker-form,
.carrier-rule-form,
.carrier-splits-field,
.guided-setup-form {
  display: grid;
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.form-actions .icon-button.primary {
  margin-left: auto;
}

.guided-setup {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--warning) 62%, var(--line));
  background: var(--warning-soft);
}

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

.guided-setup-form .field:nth-last-child(2),
.guided-setup-form .icon-button {
  grid-column: 1 / -1;
}

.carrier-splits-field > span,
.carrier-splits-header > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.carrier-splits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.commission-split-rows {
  display: grid;
  gap: 8px;
}

.carrier-split-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(64px, 76px) 34px;
  align-items: center;
  gap: 8px;
}

.carrier-split-row select,
.carrier-split-row input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--ink);
  background-color: var(--surface-raised);
  font-size: 14px;
}

.carrier-split-row select {
  padding-right: 38px;
}

.carrier-split-row .icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.approval-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.approval-header,
.approval-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.approval-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.approval-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.commission-check-actions,
.missing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.check-run-memo-panel {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface-soft)), color-mix(in srgb, var(--accent-warm) 6%, var(--surface-soft)));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent);
  padding: 13px 14px;
}

.check-run-memo-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.check-run-memo-panel input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line-strong));
  border-left: 4px solid color-mix(in srgb, var(--accent) 70%, var(--accent-warm));
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 92%, var(--accent-soft)), color-mix(in srgb, var(--surface-raised) 86%, var(--surface-soft)));
  color: var(--ink);
  box-shadow:
    0 1px 0 color-mix(in srgb, #ffffff 28%, transparent),
    inset 0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent);
  opacity: 1;
  padding: 0 14px;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    background var(--motion-fast);
}

.check-run-memo-panel input::placeholder {
  color: color-mix(in srgb, var(--muted) 84%, var(--ink));
}

.check-run-memo-panel:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--focus-ring) 16%, transparent),
    inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent);
}

.check-run-memo-panel input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line-strong));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--focus-ring) 18%, transparent),
    inset 0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent);
}

.check-run-memo-panel input:disabled {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  border-left-color: color-mix(in srgb, var(--muted) 34%, var(--accent));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 78%, var(--surface-soft)), color-mix(in srgb, var(--surface-soft) 92%, var(--accent-soft)));
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 7%, transparent);
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: color-mix(in srgb, var(--muted) 88%, var(--ink));
}

.approval-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.commission-checks-view .approval-summary,
.missing-view .approval-summary,
.ai-review-view .approval-summary {
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(130px, 1fr));
}

.ai-review-view .approval-header {
  align-items: center;
}

.ai-review-view .approval-header-actions {
  align-items: center;
}

.ai-review-view .approval-checks {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.approval-metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  min-width: 0;
  gap: 5px;
}

.approval-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.approval-metric strong {
  font-size: 22px;
  line-height: 1.1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.approval-metric.good strong {
  color: var(--success);
}

.approval-metric.bad strong {
  color: var(--danger);
}

.approval-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.math-check {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-soft);
  display: grid;
  gap: 4px;
}

.math-check span {
  width: max-content;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
}

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

.math-check.fail span {
  color: var(--warning);
  background: var(--warning-soft);
}

.ai-review-check.blocked span {
  color: var(--danger);
  background: var(--danger-soft);
}

.ai-review-check.review span {
  color: var(--warning);
  background: var(--warning-soft);
}

.math-check strong {
  font-size: 13px;
}

.math-check em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.approval-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.ai-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 14px;
  min-height: 0;
}

.ai-review-ai-card {
  gap: 14px;
}

.ai-review-payment-card {
  gap: 14px;
}

.ai-review-fixes-card {
  gap: 14px;
}

.ai-review-payment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-review-payment-header strong {
  display: block;
  font-size: 15px;
}

.ai-review-payment-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

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

.ai-review-payment-grid section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  align-content: start;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.ai-review-payment-grid section > strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.ai-review-payment-grid ul {
  align-content: start;
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-review-payment-grid li {
  border-left: 3px solid var(--line);
  align-content: start;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 9px;
}

.ai-review-payment-grid li.ready {
  border-left-color: var(--success);
}

.ai-review-payment-grid li.review {
  border-left-color: var(--warning);
}

.ai-review-payment-grid li.blocked {
  border-left-color: var(--danger);
}

.ai-review-payment-grid li strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ai-review-payment-grid li span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ai-review-fix-list {
  display: grid;
  gap: 10px;
}

.ai-review-fix-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.ai-review-fix-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ai-review-fix-main strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.ai-review-fix-main span,
.ai-review-fix-main p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.ai-review-fix-values {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-review-fix-values div,
.ai-review-fix-custom {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}

.ai-review-fix-values span,
.ai-review-fix-custom span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-review-fix-values b {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.ai-review-fix-custom input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
}

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

.ai-review-fix-actions .icon-button {
  min-width: 128px;
}

.ai-review-fix-modal-body {
  display: grid;
  gap: 12px;
}

.ai-review-fix-modal-body p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

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

.ai-review-fix-modal-context {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  gap: 0;
  overflow: hidden;
}

.ai-review-fix-modal-context div {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
}

.ai-review-fix-modal-context div + div {
  border-top: 1px solid var(--line);
}

.ai-review-fix-modal-context span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-review-fix-modal-context strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ai-review-fix-modal-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
}

.ai-review-fix-modal-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-review-fix-modal-grid strong {
  color: var(--text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.ai-review-fix-modal-actions {
  gap: 8px;
}

.ai-review-ai-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-review-ai-header strong {
  display: block;
  font-size: 15px;
}

.ai-review-ai-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.ai-review-ai-header b {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 9px;
  white-space: nowrap;
}

.ai-review-ai-header b.blocked {
  color: var(--danger);
  background: var(--danger-soft);
}

.ai-review-ai-header b.review {
  color: var(--warning);
  background: var(--warning-soft);
}

.ai-review-ai-header b.ready {
  color: var(--success);
  background: var(--success-soft);
}

.ai-review-ai-summary {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.ai-review-ai-error {
  border: 1px solid rgba(180, 57, 70, 0.35);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.ai-review-ai-error strong {
  color: var(--danger);
  font-size: 14px;
}

.ai-review-ai-error span {
  color: #7f2c35;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

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

.ai-review-ai-card section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ai-review-ai-card section > strong {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-review-ai-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-review-ai-list li {
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  padding-left: 9px;
}

.ai-review-ai-list li strong {
  color: var(--text);
  display: block;
  font-size: 13px;
}

.ai-review-ai-list li span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.ai-review-ai-statement-notes {
  display: grid;
  gap: 8px;
}

.ai-review-ai-statement-notes article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: grid;
  gap: 4px;
  padding: 10px;
}

.ai-review-ai-statement-notes article.blocked {
  border-color: rgba(180, 57, 70, 0.45);
}

.ai-review-ai-statement-notes article.review {
  border-color: rgba(153, 105, 20, 0.45);
}

.ai-review-ai-statement-notes article.ready {
  border-color: rgba(13, 119, 113, 0.35);
}

.ai-review-ai-statement-notes b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.ai-review-ai-statement-notes strong {
  font-size: 14px;
}

.ai-review-ai-statement-notes span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ai-review-statement-list,
.ai-review-finding-list {
  display: grid;
  gap: 10px;
}

.ai-review-statement {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.ai-review-statement.blocked {
  border-color: rgba(180, 57, 70, 0.45);
}

.ai-review-statement.review {
  border-color: rgba(153, 105, 20, 0.45);
}

.ai-review-statement.ready {
  border-color: rgba(13, 119, 113, 0.35);
}

.ai-review-statement-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.ai-review-statement-summary strong {
  display: block;
  font-size: 14px;
}

.ai-review-statement-summary span,
.ai-review-finding-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ai-review-statement-summary b {
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  white-space: nowrap;
}

.ai-review-statement.blocked .ai-review-statement-summary b {
  color: var(--danger);
  background: var(--danger-soft);
}

.ai-review-statement.review .ai-review-statement-summary b {
  color: var(--warning);
  background: var(--warning-soft);
}

.ai-review-statement.ready .ai-review-statement-summary b {
  color: var(--success);
  background: var(--success-soft);
}

.ai-review-finding-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-review-finding-list li {
  border-left: 3px solid var(--line);
  padding-left: 9px;
  display: grid;
  gap: 3px;
}

.ai-review-finding-list li.blocked {
  border-left-color: var(--danger);
}

.ai-review-finding-list li.review {
  border-left-color: var(--warning);
}

.ai-review-finding-list li.ready {
  border-left-color: var(--success);
}

.ai-review-producer .commission-check-payee-summary {
  padding: 12px;
}

.commission-checks-grid {
  grid-template-columns: 360px minmax(560px, 1fr);
}

.approval-card {
  padding: 13px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.approval-card-header strong {
  display: block;
  font-size: 15px;
}

.approval-card-header > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.icon-button.compact-filter {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.icon-button.pressed,
.icon-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}

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

.broker-check-row,
.statement-approval-row,
.check-producer-row,
.payment-run-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition:
    border-color var(--motion-fast),
    box-shadow var(--motion-fast),
    background var(--motion-fast),
    transform var(--motion-fast);
}

.statement-approval-row,
.check-producer-row,
.payment-run-row {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workflow-statement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0;
  overflow: hidden;
  background: var(--workflow-row-bg);
  transition:
    background var(--motion-fast),
    box-shadow var(--motion-fast);
}

.workflow-statement-row .statement-approval-main {
  min-height: 62px;
  padding: 10px 12px;
}

.workflow-statement-row .statement-approval-actions {
  padding: 10px 12px 10px 0;
}

.processed-history-statement-row {
  cursor: pointer;
}

.processed-history-statement-row .processed-history-statement-main {
  cursor: pointer;
}

.processed-commission-row-list {
  display: grid;
  gap: 0;
  min-width: 0;
}

.processed-commission-row-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(80px, 0.7fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr);
  gap: 6px 16px;
  align-items: start;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.processed-commission-row-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.processed-commission-client,
.processed-commission-cell {
  min-width: 0;
}

.processed-commission-secondary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) minmax(240px, 1.25fr) minmax(260px, 1.35fr);
  gap: 6px 16px;
  min-width: 0;
}

.processed-commission-client strong,
.processed-commission-cell strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.processed-commission-client span,
.processed-commission-cell span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.processed-commission-client span {
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.processed-commission-cell.wide {
  grid-column: span 2;
}

@media (max-width: 860px) {
  .processed-commission-row-card {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .processed-commission-secondary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .processed-commission-cell.wide {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .processed-commission-row-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .processed-commission-secondary {
    grid-template-columns: minmax(0, 1fr);
  }

  .processed-commission-client,
  .processed-commission-cell.wide {
    grid-column: auto;
  }
}

.workflow-statement-row.expanded {
  align-items: stretch;
}

.workflow-statement-row.expanded .statement-approval-main,
.workflow-statement-row.expanded .statement-approval-actions {
  border-bottom: 1px solid var(--line);
}

.workflow-statement-detail-slot {
  grid-column: 1 / -1;
  min-width: 0;
}

.workflow-inline-detail-panel {
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 5%, var(--surface-soft)) 0%, color-mix(in srgb, var(--surface-soft) 92%, var(--accent-warm-soft)) 100%);
  margin: 0 10px 10px;
  padding: 14px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 16%, transparent);
}

.workflow-inline-detail-panel > .setup-header {
  display: none;
}

.workflow-inline-detail-panel .carrier-rule-form {
  max-width: none;
}

.workflow-list-toggle,
.workflow-statement-expand {
  width: 36px;
  min-width: 36px;
  padding: 0;
  justify-content: center;
}

.workflow-list-header-toggle {
  cursor: pointer;
}

.workflow-list-header-toggle button,
.workflow-list-header-toggle a,
.workflow-list-header-toggle input,
.workflow-list-header-toggle select,
.workflow-list-header-toggle textarea {
  cursor: revert;
}

.statement-approval-main {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  flex: 1;
  padding: 0;
  text-align: left;
  font: inherit;
}

.statement-approval-main > div {
  min-width: 0;
}

.statement-approval-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.statement-approval-actions .icon-button:not(.primary) {
  background: var(--surface);
}

.statement-approval-actions .icon-button span {
  color: inherit;
  display: inline-flex;
  font-size: inherit;
  margin-top: 0;
}

.statement-approval-row:hover,
.statement-approval-row.selected,
.check-producer-row:hover,
.check-producer-row.selected,
.payment-run-row:hover,
.payment-run-row.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.workflow-statement-row:hover,
.workflow-statement-row.selected,
.workflow-statement-row.warning {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 24%, var(--workflow-row-hover-bg)) 0, var(--workflow-row-hover-bg) 18px, var(--workflow-row-hover-bg) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}

.workflow-statement-row .statement-approval-main:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.statement-approval-row.warning {
  border-color: color-mix(in srgb, var(--warning) 60%, var(--line));
  background: var(--warning-soft);
}

.statement-approval-row.workflow-statement-row.warning {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--warning) 32%, var(--workflow-row-warning-bg)) 0, var(--workflow-row-warning-bg) 18px, var(--workflow-row-warning-bg) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warning) 28%, transparent);
}

.workflow-statement-row.warning .statement-approval-main strong,
.workflow-statement-row.warning .statement-approval-main span {
  color: var(--warning);
}

.workflow-statement-row:hover .statement-approval-main strong,
.workflow-statement-row.selected .statement-approval-main strong {
  color: var(--accent-strong);
}

.workflow-statement-row:hover .statement-approval-main span,
.workflow-statement-row.selected .statement-approval-main span {
  color: var(--accent);
}

.statement-approval-row.error {
  border-color: #dfa5a5;
  background: #fde9e9;
}

.broker-check-row strong,
.broker-check-row span,
.statement-approval-row strong,
.statement-approval-row span,
.check-producer-row strong,
.check-producer-row span,
.payment-run-row strong,
.payment-run-row span {
  display: block;
}

.broker-check-row span,
.statement-approval-row span,
.check-producer-row span,
.payment-run-row span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.statement-approval-row .statement-header-scope,
.statement-approval-row .statement-header-rule {
  display: inline;
  color: inherit;
  font-style: normal;
  font-weight: 800;
}

.broker-check-row b,
.statement-approval-row b,
.check-producer-row b,
.payment-run-row b {
  color: var(--accent-strong);
  white-space: nowrap;
}

.payment-run-history-card {
  border-top: 1px solid var(--line);
}

.payment-run-history {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.finalized-check-run-card {
  border-color: color-mix(in srgb, var(--success) 38%, var(--line));
  background: color-mix(in srgb, var(--success-soft) 70%, var(--surface-raised));
}

.finalized-check-run-card .approval-summary {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) repeat(4, minmax(100px, 0.8fr));
}

.commission-check-payee-card.finalized {
  background: var(--surface-raised);
}

.commission-checks-card-grid,
.commission-check-payee-list,
.missing-card-grid,
.missing-list,
.commission-check-statements-list {
  display: grid;
  gap: 10px;
}

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

.missing-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.missing-row:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.missing-row-main,
.missing-row-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.missing-row-main strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.missing-row-main span,
.missing-row-main em,
.missing-row-meta span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.missing-row-meta {
  justify-items: end;
  text-align: right;
}

.missing-row-meta > strong {
  color: var(--accent-strong);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.missing-commission-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

.missing-commission-row .report-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.missing-table-wrap {
  width: 100%;
  min-width: 0;
}

.missing-commission-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: visible;
  background: var(--surface-raised);
}

.missing-commission-table th,
.missing-commission-table td {
  border: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.missing-commission-table th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.missing-commission-table td {
  color: var(--ink);
}

.missing-commission-table td strong,
.missing-commission-table td small {
  display: block;
}

.missing-commission-table td small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.missing-commission-table .numeric {
  color: var(--accent-strong);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.missing-commission-table .missing-status {
  justify-self: start;
}

.missing-commission-table .report-actions {
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
  white-space: normal;
}

.missing-actions-menu {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.missing-actions-menu-toggle {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  cursor: pointer;
}

.missing-actions-menu-toggle::-webkit-details-marker {
  display: none;
}

.missing-actions-menu-toggle svg {
  width: 14px;
  height: 14px;
}

.missing-actions-menu[open] .missing-actions-menu-toggle {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.missing-actions-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 160px;
  max-width: min(220px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  padding: 4px;
  display: grid;
  gap: 2px;
}

.missing-actions-menu:not([open]) .missing-actions-menu-list {
  display: none;
}

.missing-actions-menu-item {
  width: 100%;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 8px 10px;
  text-align: left;
}

.missing-actions-menu-item:hover,
.missing-actions-menu-item:focus-visible {
  outline: 0;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.missing-actions-menu-item.danger {
  color: #b4232d;
}

.missing-actions-menu-item.danger:hover,
.missing-actions-menu-item.danger:focus-visible {
  background: var(--danger-soft);
  color: var(--danger);
}

.missing-commission-table .icon-button.compact-filter {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.1;
}

.missing-commission-table th:nth-child(1) {
  width: 13%;
}

.missing-commission-table th:nth-child(2) {
  width: 10%;
}

.missing-commission-table th:nth-child(3) {
  width: 15%;
}

.missing-commission-table th:nth-child(4) {
  width: 9%;
}

.missing-commission-table td:nth-child(4) {
  white-space: nowrap;
}

.missing-commission-table th:nth-child(5) {
  width: 10%;
}

.missing-commission-table th:nth-child(6) {
  width: 8%;
}

.missing-commission-table th:nth-child(7) {
  width: 8%;
}

.missing-commission-table th:nth-child(8) {
  width: 16%;
}

.missing-commission-table th:nth-child(9) {
  width: 11%;
}

.missing-status {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.missing-status.warning {
  border-color: #e2bd70;
  background: var(--warning-soft);
  color: var(--warning);
}

.missing-status.muted {
  background: var(--surface);
  color: var(--muted);
}

.commission-check-payee-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  min-width: 0;
  overflow: hidden;
}

.commission-check-payee-card.expanded {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.commission-check-payee-toggle {
  border: 0;
  width: 100%;
  min-width: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(96px, auto) 32px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
  font: inherit;
}

.commission-check-payee-toggle:hover {
  color: var(--accent-strong);
}

.commission-check-payee-toggle strong,
.commission-check-payee-toggle span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.commission-check-payee-toggle span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.commission-check-payee-toggle b {
  color: var(--accent-strong);
  text-align: right;
  white-space: nowrap;
}

.commission-check-payee-toggle .expand-affordance {
  color: var(--accent);
  display: inline-grid;
  font-size: 20px;
  margin-top: 0;
  overflow-wrap: normal;
}

.commission-check-payee-expand {
  justify-self: end;
}

.commission-check-payee-statements {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px;
}

.commission-check-statement {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.commission-check-statement-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(88px, auto) minmax(280px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.commission-check-statement-summary strong,
.commission-check-statement-summary span {
  display: block;
}

.commission-check-statement-summary span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.commission-check-statement-summary b {
  color: var(--accent-strong);
  text-align: right;
  white-space: nowrap;
}

.commission-check-statement-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.commission-check-statement-actions .icon-button {
  padding: 0 10px;
}

.commission-check-statement-actions [data-check-configure-statement-id] {
  gap: 6px;
}

.commission-check-detail-scroll {
  border-top: 1px solid var(--line);
  overflow: auto;
}

.commission-check-detail-table {
  min-width: 720px;
  font-size: 12px;
}

.commission-check-detail-table th:nth-child(1),
.commission-check-detail-table td:nth-child(1) {
  width: 38%;
}

.commission-check-detail-table th:nth-child(2),
.commission-check-detail-table td:nth-child(2) {
  width: 20%;
}

.commission-check-detail-table th:nth-child(3),
.commission-check-detail-table td:nth-child(3) {
  width: 20%;
}

.commission-check-detail-table th:nth-child(4),
.commission-check-detail-table td:nth-child(4) {
  width: 22%;
}

.approval-statement-summary {
  display: grid;
  gap: 8px;
}

.approval-total-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) minmax(120px, auto) minmax(104px, auto);
  gap: 12px;
  align-items: end;
}

.approval-total-row .assignment-row-approve-button {
  width: auto;
  min-width: 104px;
  align-self: end;
}

.approval-total-row.warning {
  border-color: #e0b24d;
  background: transparent;
}

.approval-total-row.warning label > span,
.approval-total-row.warning > div span {
  color: var(--warning);
}

.approval-total-row.error {
  border-color: #dfa5a5;
  background: #fde9e9;
}

.approval-total-row input.invalid {
  border-color: var(--danger);
  background: #fff7f7;
}

.approval-total-row > div span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

.approval-total-row > div strong {
  display: block;
  min-height: 34px;
  padding: 6px 0;
  color: var(--text);
}

.approval-warning-actions {
  border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--warning-soft) 72%, transparent), transparent 68%),
    var(--surface-soft);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.approval-warning-actions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.approval-warning-actions-header strong {
  color: var(--text);
  font-size: 13px;
}

.approval-warning-actions-header span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.approval-warning-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.approval-warning-action-card {
  border: 1px solid color-mix(in srgb, var(--warning) 30%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, var(--warning-soft));
  min-width: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, auto);
  gap: 10px;
  align-items: center;
}

.approval-warning-action-card.identity {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: color-mix(in srgb, var(--surface) 84%, var(--accent-soft));
}

.approval-warning-action-card strong,
.approval-warning-action-card span {
  display: block;
}

.approval-warning-action-card strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.approval-warning-action-card > div > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin-top: 3px;
}

.approval-warning-action-card .assignment-row-approve-button {
  width: auto;
  min-width: 104px;
  justify-self: end;
}

.approval-table-scroll {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

.approval-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.approval-table th:nth-child(1),
.approval-table td:nth-child(1) {
  width: 34%;
}

.approval-table th:nth-child(2),
.approval-table td:nth-child(2) {
  width: 14%;
}

.approval-table th:nth-child(3),
.approval-table td:nth-child(3) {
  width: 15%;
}

.approval-table th:nth-child(4),
.approval-table td:nth-child(4) {
  width: 37%;
}

.approval-table.has-review-column th:nth-child(1),
.approval-table.has-review-column td:nth-child(1) {
  width: 30%;
}

.approval-table.has-review-column th:nth-child(2),
.approval-table.has-review-column td:nth-child(2) {
  width: 12%;
}

.approval-table.has-review-column th:nth-child(3),
.approval-table.has-review-column td:nth-child(3) {
  width: 14%;
}

.approval-table.has-review-column th:nth-child(4),
.approval-table.has-review-column td:nth-child(4) {
  width: 34%;
}

.approval-table.has-review-column th:nth-child(5),
.approval-table.has-review-column td:nth-child(5) {
  width: 10%;
}

.approval-table.statement-scope-approval-table th:nth-child(1),
.approval-table.statement-scope-approval-table td:nth-child(1) {
  width: 48%;
}

.approval-table.statement-scope-approval-table th:nth-child(2),
.approval-table.statement-scope-approval-table td:nth-child(2) {
  width: 18%;
}

.approval-table.statement-scope-approval-table th:nth-child(3),
.approval-table.statement-scope-approval-table td:nth-child(3) {
  width: 34%;
}

.approval-table.statement-scope-approval-table.has-review-column th:nth-child(1),
.approval-table.statement-scope-approval-table.has-review-column td:nth-child(1) {
  width: 42%;
}

.approval-table.statement-scope-approval-table.has-review-column th:nth-child(2),
.approval-table.statement-scope-approval-table.has-review-column td:nth-child(2) {
  width: 16%;
}

.approval-table.statement-scope-approval-table.has-review-column th:nth-child(3),
.approval-table.statement-scope-approval-table.has-review-column td:nth-child(3) {
  width: 32%;
}

.approval-table.statement-scope-approval-table.has-review-column th:nth-child(4),
.approval-table.statement-scope-approval-table.has-review-column td:nth-child(4) {
  width: 10%;
}

.approval-table th,
.approval-table td {
  padding: 10px clamp(6px, 0.7vw, 12px);
  vertical-align: top;
}

.approval-date-edit {
  max-width: 100%;
}

.approval-commission-edit {
  max-width: 100%;
  border-color: var(--line-strong);
  background: #ffffff;
  font-variant-numeric: tabular-nums;
}

.approval-commission-edit:focus {
  background: #ffffff;
}

.approval-rule-select {
  min-height: 34px;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 5px 36px 5px 8px;
  outline: none;
}

.approval-rule-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 139, 132, 0.14);
}

.approval-commission-edit.invalid {
  border-color: var(--danger);
  background: #fff7f7;
}

.approval-source-review {
  display: grid;
  gap: 4px;
  font-size: 11px;
  line-height: 1.25;
}

.approval-source-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.approval-source-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.approval-source-review > span,
.approval-source-review em {
  color: var(--muted);
  font-style: normal;
}

.source-field-review {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}

.source-field {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.source-field.success {
  border-color: #cde8d5;
  background: #effaf2;
  color: var(--good);
}

.source-field.warning {
  border-color: #f0d9a2;
  background: #fff8e8;
  color: #8a5a00;
}

.source-field.danger {
  border-color: #f0b8b8;
  background: #fff1f1;
  color: var(--danger);
}

.source-field-review.reviewed .source-field.warning,
.source-field-review.reviewed .source-field.danger {
  border-color: #cde8d5;
  background: #effaf2;
  color: var(--good);
}

.parser-review-status {
  border: 1px solid #cde8d5;
  border-radius: 999px;
  background: #effaf2;
  padding: 2px 6px;
  color: var(--good);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.parser-review-guidance {
  display: grid;
  gap: 3px;
  border: 1px solid #ecd390;
  border-radius: 6px;
  background: #fff8e2;
  padding: 7px;
  color: #715000;
}

.parser-review-guidance strong {
  color: #5c4200;
  font-size: 11px;
}

.parser-review-guidance span {
  color: #715000;
}

.parser-review-guidance.reviewed {
  border-color: #cde8d5;
  background: #f4fbf6;
  color: #2b6c45;
}

.parser-review-guidance.reviewed strong,
.parser-review-guidance.reviewed span {
  color: #2b6c45;
}

.parser-review-button {
  justify-self: start;
}

.approval-review-cell {
  min-width: 0;
}

.approval-row-issues {
  display: grid;
  gap: 5px;
  border: 1px solid #ecd390;
  border-radius: 6px;
  background: #fff8e2;
  padding: 7px;
  color: #715000;
}

.approval-row-issues.error {
  border-color: #efb2b2;
  background: #fff1f1;
  color: var(--danger);
}

.approval-row-issue {
  display: grid;
  gap: 2px;
}

.approval-row-issue strong {
  color: #5c4200;
  font-size: 11px;
}

.approval-row-issue.error strong,
.approval-row-issues.error .approval-row-issue strong {
  color: var(--danger);
}

.approval-row-issue span {
  color: currentColor;
  font-size: 12px;
  line-height: 1.35;
}

.parser-review-statement-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  border: 1px solid #ecd390;
  border-radius: var(--radius);
  background: #fff8e2;
  padding: 10px 12px;
  color: #715000;
}

.parser-review-statement-note > div {
  display: grid;
  gap: 3px;
}

.parser-review-statement-note strong {
  color: #5c4200;
}

.parser-review-statement-note span {
  color: #715000;
  font-size: 12px;
  line-height: 1.35;
}

.approval-source-review details {
  min-width: 0;
}

.approval-source-review details summary::-webkit-details-marker {
  display: none;
}

.approval-source-review details summary::marker {
  content: "";
}

.approval-producer-section-row {
  cursor: default;
}

.approval-producer-section-row td {
  background: var(--surface-soft);
  padding: 8px 10px;
}

.approval-section-toggle {
  width: 100%;
  justify-content: flex-end;
  gap: 16px;
}

.approval-section-toggle > span:not(.expand-affordance) {
  text-align: right;
}

.approval-source-review summary {
  color: var(--accent);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.approval-source-review summary .expand-affordance {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 15px;
}

.approval-source-review summary .expand-affordance::before {
  content: "+";
}

.approval-source-review details[open] summary .expand-affordance::before {
  content: "-";
}

.approval-source-review p {
  margin: 6px 0 0;
  max-height: 74px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 7px;
  color: var(--text);
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .approval-table {
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .sample-progress-steps {
    grid-template-columns: 1fr;
  }

  .approval-table,
  .approval-table tbody,
  .approval-table tr,
  .approval-table td {
    display: block;
    width: 100%;
  }

  .approval-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .approval-table thead {
    display: none;
  }

  .approval-table tbody tr:not(.approval-producer-section-row) {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .approval-table tbody tr:not(.approval-producer-section-row) td {
    display: grid;
    width: 100% !important;
    grid-template-columns: minmax(86px, 28%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border-bottom: 0;
    padding: 0;
  }

  .approval-table tbody tr:not(.approval-producer-section-row) td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 34px;
    text-transform: uppercase;
  }

  .approval-producer-section-row td {
    display: block;
    padding: 10px 12px;
  }

  .approval-section-toggle {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .approval-warning-actions-header,
  .approval-warning-action-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .approval-warning-actions-header {
    display: grid;
  }

  .approval-warning-actions-header span {
    text-align: left;
  }

  .approval-warning-action-card .assignment-row-approve-button {
    justify-self: stretch;
  }

  .approval-table tbody tr:not(.approval-producer-section-row) td {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .approval-table tbody tr:not(.approval-producer-section-row) td::before {
    line-height: 1.2;
  }
}

@media (max-width: 1360px) {
  .approval-view .approval-grid {
    grid-template-columns: 1fr;
  }

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

  .public-product-preview {
    max-width: 920px;
  }
}

.approval-table tbody tr.ready {
  background: transparent;
}

.approval-table tbody tr.warning {
  background: transparent;
}

.approval-table tbody tr.error {
  background: transparent;
}

.approval-table tbody tr.ready:hover,
.approval-table tbody tr.ready.selected {
  background: transparent;
}

.approval-table tbody tr.warning:hover,
.approval-table tbody tr.warning.selected {
  background: transparent;
}

.approval-table tbody tr.error:hover,
.approval-table tbody tr.error.selected {
  background: transparent;
}

.empty-table-cell {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 18px;
  text-align: center;
}

@media (max-width: 1180px) {
  .platform-alpha-summary,
  .platform-admin-account-grid,
  .platform-alpha-request-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-roles-section,
  .public-video-section,
  .public-contact-section {
    grid-template-columns: 1fr;
  }

  .public-roles-section > div:first-child {
    max-width: 680px;
  }

  .public-role-grid {
    grid-template-columns: 1fr;
  }

  .public-role-grid article,
  .public-role-grid article:first-child,
  .public-role-grid article:last-child {
    border-right-width: 1px;
    border-radius: var(--radius);
  }

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

  .import-panel {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  }

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

  .table-panel,
  .review-drawer {
    grid-column: 1;
  }

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

  .review-form .field:last-of-type,
  .review-form .split-field,
  .review-form .icon-button {
    grid-column: 1 / -1;
  }

  .reference-search,
  .reference-status-filter {
    width: 100%;
    flex-basis: 100%;
  }

  .reference-status-filter button {
    flex: 1 1 72px;
    justify-content: center;
  }

  .data-reference-row.data-workflow-row .data-reference-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brokers-view,
  .carriers-view,
  .clients-view,
  .statement-types-view,
  .statement-configuration-view,
  .commission-rules-view,
  .commission-assignment-view,
  .missing-view,
  .dashboard-view,
  .platform-admin-view,
  .commission-checks-view,
  .ai-review-view,
  .reporting-view,
  .feedback-view,
  .documentation-view,
  .tenant-settings-view,
  .dev-view,
  .export-view {
    grid-template-columns: 1fr;
  }

  .dashboard-widgets,
  .platform-admin-account-grid,
  .commission-checks-view .dashboard-panel {
    grid-column: 1;
  }

  .platform-admin-account-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-widget-half,
  .dashboard-widget-full {
    grid-column: 1 / -1;
  }

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

  .assignment-statement-form {
    grid-template-columns: 1fr;
  }

  .client-detail-form,
  .producer-detail-form,
  .carrier-detail-form,
  .statement-definition-detail-form,
  .commission-rule-detail-form,
  .client-usage-summary dl {
    grid-template-columns: 1fr;
  }

  .broker-form-panel {
    grid-row: auto;
  }

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

  .commission-checks-view .approval-summary,
  .missing-view .approval-summary,
  .ai-review-view .approval-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .finalized-check-run-card .approval-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .data-reference-row.data-workflow-row .data-reference-detail-grid {
    grid-template-columns: 1fr;
  }

  .platform-alpha-summary,
  .platform-alpha-request-details,
  .platform-alpha-request-main {
    grid-template-columns: 1fr;
  }

  .public-home-header {
    position: relative;
    top: auto;
    z-index: 2;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
    background: color-mix(in srgb, var(--surface) 98%, transparent);
  }

  .public-home-view > .public-home-header {
    position: relative;
    left: auto;
    right: auto;
  }

  .public-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .public-nav a,
  .public-nav button,
  .public-nav .public-nav-cta {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    justify-content: center;
    text-align: center;
    padding: 0 8px;
  }

  .public-nav .public-nav-cta {
    grid-column: 1 / -1;
  }

  .public-home-main {
    gap: 36px;
    padding: 28px 14px 32px;
  }

  .public-home-view::before {
    inset: 142px -240px 0 -300px;
    background-position: center top;
    background-size: auto 100%;
    opacity: 0.34;
  }

  .public-home-view::after {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bg) 42%, transparent) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 32%, color-mix(in srgb, var(--bg) 54%, transparent) 72%, color-mix(in srgb, var(--bg) 78%, transparent) 100%),
      linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 84%, transparent) 58%, transparent 100%);
  }

  html.rr-preview-light .public-home-view::before {
    opacity: 0.34;
  }

  html.rr-preview-light .public-home-view::after {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bg) 42%, transparent) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 32%, color-mix(in srgb, var(--bg) 54%, transparent) 72%, color-mix(in srgb, var(--bg) 78%, transparent) 100%),
      linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 84%, transparent) 58%, transparent 100%);
  }

  html.rr-preview-dark .public-home-view::before {
    opacity: 0.32;
  }

  .public-home-main > section {
    scroll-margin-top: 18px;
  }

  #home-workflow {
    scroll-margin-top: 18px;
  }

  .public-hero {
    gap: 24px;
    min-height: auto;
  }

  .public-hero::before,
  .public-hero::after {
    display: none;
  }

  .public-hero-backdrop-mark {
    left: -24px;
    top: -8px;
    width: 150px;
    height: 150px;
    border-radius: 24px;
    opacity: 0.13;
  }

  .public-hero h1 {
    font-size: 31px;
  }

  .public-hero .public-hero-lede {
    font-size: 25px;
    min-height: 0;
    padding-top: 12px;
  }

  .public-hero-actions,
  .public-hero-actions .public-button {
    width: 100%;
  }

  .public-video-section {
    margin-top: -16px;
    padding: 14px;
  }

  .public-video-frame {
    border-width: 4px;
  }

  .public-video-play {
    width: 52px;
    height: 52px;
  }

  .public-video-actions,
  .public-video-actions .public-button {
    width: 100%;
  }

  .public-proof-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .preview-frame {
    min-height: 0;
    border-width: 4px;
  }

  .public-login-band {
    align-items: stretch;
    flex-direction: column;
  }

  .public-footer,
  .public-info-hero,
  .public-info-main-split,
  .public-info-grid {
    grid-template-columns: 1fr;
  }

  .public-footer {
    padding: 18px;
  }

  .public-shared-footer {
    width: calc(100% - 28px);
    margin: -16px auto 42px;
  }

  .public-info-main {
    width: calc(100% - 28px);
    padding: 34px 0 48px;
  }

  .public-info-logo-panel {
    min-height: 220px;
  }

  .public-info-big-mark {
    width: 164px;
    height: 164px;
    border-radius: 30px;
  }

  .public-info-copy h2,
  .public-legal-card h2 {
    font-size: 38px;
  }

  .public-info-copy p,
  .public-legal-card p {
    font-size: 16px;
  }

  .public-workflow {
    grid-template-columns: 1fr;
  }

  .public-login-button {
    width: 100%;
    min-width: 0;
  }

  .auth-portal-main,
  .auth-portal-main.auth-portal-narrow {
    width: calc(100% - 28px);
    min-height: auto;
    padding: 34px 0 48px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 26px;
  }

  .auth-portal-copy {
    gap: 14px;
  }

  .auth-portal-copy .brand-mark {
    width: 128px;
    height: 128px;
    border-radius: 24px;
  }

  .auth-portal-copy h2 {
    font-size: 38px;
  }

  .auth-portal-copy p {
    font-size: 16px;
  }

  .auth-portal-card {
    padding: 18px;
  }

  .auth-portal-card h3 {
    font-size: 22px;
  }

  .invitation-panel-with-brand {
    grid-template-columns: 1fr;
  }

  .invitation-panel-with-brand .auth-portal-card-header,
  .invitation-panel-with-brand .invitation-summary,
  .invitation-panel-with-brand .auth-form,
  .invitation-brand-aside {
    grid-column: 1;
  }

  .invitation-brand-aside {
    grid-row: auto;
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .invitation-brand-aside .brand-mark {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    max-height: none;
    overflow-y: visible;
    position: relative;
    top: auto;
    padding: 12px;
    gap: 12px;
  }

  .sidebar-toggle {
    display: none;
  }

  .brand {
    padding: 0 6px 10px;
  }

  .sidebar-collapsed .brand {
    justify-content: flex-start;
    padding: 0 6px 10px;
  }

  .sidebar-collapsed .brand div {
    display: block;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-item {
    justify-content: center;
    min-height: 50px;
    flex-direction: column;
    gap: 4px;
    padding: 6px 4px;
    font-size: 10px;
    line-height: 1.1;
  }

  .nav-subitem {
    padding-left: 4px;
  }

  .nav-item span:last-child {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .nav-group-label,
  .sidebar-foot {
    display: none;
  }

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

  .toolbar-actions,
  .toolbar-actions .icon-button {
    width: 100%;
  }

  .toolbar-account {
    width: 100%;
    align-items: stretch;
  }

  .toolbar-actions .toolbar-account .toolbar-sign-out {
    width: auto;
    min-height: 34px;
  }

  .toolbar-account-meta strong,
  .toolbar-account-meta small {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .content-grid {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .dashboard-action {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-action em {
    grid-column: 1 / -1;
    text-align: left;
  }

  .dashboard-panel .setup-header {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .compact-select,
  .compact-toggle {
    width: 100%;
    max-width: none;
  }

  .dashboard-widget-toolbar,
  .dashboard-layout-controls {
    width: 100%;
  }

  .dashboard-layout-controls {
    justify-content: flex-end;
  }

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

  .dashboard-detail-table {
    min-width: 520px;
  }

  .ai-review-fix-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ai-review-fix-values {
    grid-template-columns: 1fr;
  }

  .ai-review-fix-modal-grid {
    grid-template-columns: 1fr;
  }

  .ai-review-fix-modal-context div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .ai-review-fix-actions {
    justify-content: flex-start;
  }

  .report-analytics-shell {
    grid-template-columns: 1fr;
  }

  .reporting-destination-grid {
    grid-template-columns: 1fr;
  }

  .reporting-destination-card + .reporting-destination-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .analytics-card,
  .analytics-card-half,
  .analytics-card-wide {
    grid-column: span 1;
  }

  .analytics-ai-header {
    align-items: flex-start;
  }

  .analytics-ai-actions {
    justify-content: flex-start;
  }

  .analytics-ai-columns {
    grid-template-columns: 1fr;
  }

  .analytics-notice-grid {
    grid-template-columns: 1fr;
  }

  .analytics-notice {
    min-height: auto;
  }

  .analytics-what-to-notice-header {
    display: grid;
    padding: 16px;
  }

  .analytics-signal-count {
    justify-self: start;
  }

  .analytics-priority-card {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 15px 16px;
  }

  .analytics-priority-rank {
    width: 30px;
    height: 30px;
  }

  .analytics-priority-action {
    grid-column: 2;
    justify-self: start;
  }

  .analytics-pie-layout {
    grid-template-columns: 1fr;
  }

  .analytics-pie-chart {
    width: min(72vw, 190px);
  }

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

  .analytics-heatmap {
    grid-template-columns: minmax(96px, 0.9fr) repeat(var(--heatmap-cols), minmax(70px, 1fr));
  }

  .analytics-distribution {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .analytics-distribution-bar {
    min-height: 150px;
  }

  .analytics-producer-positioning-head {
    display: none;
  }

  .analytics-producer-positioning-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .analytics-producer-positioning-row strong,
  .analytics-producer-positioning-row b,
  .analytics-producer-positioning-row em {
    text-align: left;
    white-space: normal;
  }

  .analytics-producer-positioning-row b::before {
    content: "Metric: ";
    color: var(--muted);
    font-weight: 850;
  }

  .analytics-producer-positioning-row em:first-of-type::before {
    content: "Rows: ";
    color: var(--muted);
    font-weight: 850;
  }

  .analytics-producer-positioning-row em:last-of-type::before {
    content: "Carriers: ";
    color: var(--muted);
    font-weight: 850;
  }

  .analytics-waterfall-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .analytics-waterfall-row strong {
    grid-column: 2;
    justify-self: start;
  }

  .modal-backdrop.report-drawer-open .modal-card {
    width: 100vw;
    padding: 14px;
  }

  .dashboard-widget-resize-edge {
    display: none;
  }

  .brokers-view,
  .carriers-view,
  .clients-view,
  .statement-types-view,
  .statement-configuration-view,
  .commission-rules-view,
  .commission-assignment-view,
  .dashboard-view,
  .platform-admin-view,
  .commission-checks-view,
  .missing-view,
  .ai-review-view,
  .reporting-view,
  .feedback-view,
  .documentation-view,
  .tenant-settings-view,
  .dev-view,
  .export-view {
    padding: 12px;
  }

  .ai-review-payment-grid,
  .ai-review-ai-columns {
    grid-template-columns: 1fr;
  }

  .tenant-settings-form {
    grid-template-columns: 1fr;
  }

  .platform-admin-account-form {
    grid-template-columns: 1fr;
  }

  .feedback-form {
    grid-template-columns: 1fr;
  }

  .feedback-capture-guide {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .feedback-capture-guide-actions,
  .feedback-screenshot-preview-header {
    justify-content: flex-start;
  }

  .feedback-screenshot-preview-header {
    display: grid;
  }

  .feedback-triage-summary,
  .feedback-triage-card,
  .feedback-triage-controls {
    grid-template-columns: 1fr;
  }

  .feedback-screenshot-control {
    display: grid;
  }

  .feedback-triage-heading {
    display: grid;
  }

  .feedback-triage-badges {
    justify-content: flex-start;
  }

  .documentation-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .documentation-topic-list {
    max-height: min(420px, 55vh);
  }

  .tenant-user-form,
  .tenant-user-card {
    grid-template-columns: 1fr;
  }

  .tenant-user-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    grid-template-columns: repeat(auto-fit, minmax(118px, max-content));
  }

  .approval-view {
    padding: 12px;
  }

  .export-actions {
    grid-template-columns: 1fr;
  }

  .dev-action {
    grid-template-columns: 1fr;
  }

  .dev-action-buttons {
    justify-content: stretch;
  }

  .dev-action-buttons .icon-button {
    flex: 1 1 160px;
  }

  .sample-data-header {
    align-items: stretch;
    flex-direction: column;
  }

  .sample-data-actions,
  .sample-data-snapshot-list {
    justify-content: stretch;
  }

  .sample-data-actions .icon-button,
  .sample-data-snapshot-list .icon-button {
    flex: 1 1 180px;
  }

  .approval-header {
    display: grid;
  }

  .approval-panel,
  .approval-panel > *,
  .approval-card-header > div {
    min-width: 0;
  }

  .approval-summary,
  .approval-checks {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .missing-card-grid,
  .missing-row,
  .missing-commission-row {
    grid-template-columns: 1fr;
  }

  .missing-row-meta {
    justify-items: start;
    text-align: left;
  }

  .missing-status {
    justify-self: start;
  }

  .missing-commission-table,
  .missing-commission-table thead,
  .missing-commission-table tbody,
  .missing-commission-table tr,
  .missing-commission-table th,
  .missing-commission-table td {
    display: block;
    width: 100%;
  }

  .missing-commission-table thead {
    display: none;
  }

  .missing-commission-table tr {
    border-bottom: 1px solid var(--line);
  }

  .missing-commission-table tr:last-child {
    border-bottom: 0;
  }

  .missing-commission-table td {
    border-width: 0 0 1px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
  }

  .missing-commission-table td::before {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .missing-commission-table td:nth-child(1)::before {
    content: "Client";
  }

  .missing-commission-table td:nth-child(2)::before {
    content: "Carrier";
  }

  .missing-commission-table td:nth-child(3)::before {
    content: "Statement";
  }

  .missing-commission-table td:nth-child(4)::before {
    content: "Expected";
  }

  .missing-commission-table td:nth-child(5)::before {
    content: "Producer";
  }

  .missing-commission-table td:nth-child(6)::before {
    content: "Status";
  }

  .missing-commission-table td:nth-child(7)::before {
    content: "Last";
  }

  .missing-commission-table td:nth-child(8)::before {
    content: "Reason";
  }

  .missing-commission-table td:nth-child(9)::before {
    content: "Actions";
  }

  .missing-actions-menu {
    width: 100%;
  }

  .missing-actions-menu-list {
    position: static;
    min-width: 0;
    max-width: none;
    margin-top: 6px;
    box-shadow: none;
  }

  .approval-header-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    justify-self: end;
    width: auto;
  }

  .approval-header-actions .icon-button {
    flex: 0 0 auto;
    width: auto;
  }

  .workflow-statement-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .workflow-statement-row .statement-approval-main {
    min-height: 0;
    padding: 12px;
  }

  .workflow-statement-row .statement-approval-actions {
    padding: 0 12px 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .workflow-statement-row.expanded .statement-approval-main {
    border-bottom: 0;
  }

  .workflow-statement-row.expanded .statement-approval-actions {
    border-bottom: 1px solid var(--line);
  }

  .assignment-table-scroll {
    max-height: none;
    overflow: visible;
  }

  .assignment-table-scroll table,
  .assignment-table-scroll tbody,
  .assignment-table-scroll tr,
  .assignment-table-scroll td {
    display: block;
    width: 100%;
  }

  .assignment-table-scroll colgroup,
  .assignment-table-scroll thead {
    display: none;
  }

  .assignment-table-scroll tbody {
    display: grid;
    gap: 10px;
  }

  .assignment-table-scroll tbody tr {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    padding: 10px;
  }

  .assignment-table-scroll td {
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 0;
    overflow: visible;
    padding: 0;
    text-overflow: clip;
  }

  .assignment-table-scroll td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .assignment-table-scroll .empty-table-cell {
    display: block;
    padding: 12px;
    text-align: left;
  }

  .assignment-table-scroll .empty-table-cell::before {
    display: none;
  }

  .report-filter-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .revenue-report-mode-tabs {
    width: 100%;
  }

  .revenue-report-mode-tabs button {
    flex: 1;
  }

  .revenue-chart-heading,
  .revenue-driver-row {
    grid-template-columns: 1fr;
  }

  .revenue-chart-heading {
    display: grid;
  }

  .revenue-trend-chart {
    min-height: 220px;
  }

  .revenue-driver-row {
    gap: 8px;
  }

  .commission-checks-view .approval-summary,
  .missing-view .approval-summary,
  .ai-review-view .approval-summary {
    grid-template-columns: 1fr;
  }

  .finalized-check-run-card .approval-summary {
    grid-template-columns: 1fr;
  }

  .commission-checks-view .approval-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .commission-checks-view .approval-card-header .icon-button {
    justify-self: stretch;
    width: 100%;
  }

  .commission-checks-view .approval-summary,
  .missing-view .approval-summary,
  .ai-review-view .approval-summary,
  .finalized-check-run-card .approval-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .approval-grid,
  .ai-review-grid,
  .commission-checks-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .ai-review-ai-header {
    display: grid;
  }

  .approval-card,
  .commission-checks-card-grid,
  .commission-check-payee-list,
  .commission-check-statements-list {
    min-width: 0;
    width: 100%;
  }

  .commission-check-payee-toggle,
  .commission-check-statement-summary {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .commission-check-payee-toggle b,
  .commission-check-statement-summary b {
    text-align: left;
  }

  .commission-check-statement-actions {
    width: 100%;
    justify-self: start;
    justify-content: flex-start;
  }

  .commission-check-payee-expand {
    justify-self: start;
  }

  .commission-check-actions {
    justify-content: stretch;
  }

  .check-run-memo-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .commission-check-actions .icon-button,
  .commission-check-statement-actions .icon-button {
    flex: 1 1 150px;
    min-width: 0;
  }

  .commission-check-statement-actions [data-check-configure-statement-id] {
    flex-basis: 110px;
  }

  .approval-total-row {
    grid-template-columns: 1fr;
  }

  .import-panel {
    grid-template-columns: 1fr;
  }

  .import-routing-cards {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
  }

  .drop-zone svg {
    grid-row: auto;
  }

  .review-form {
    grid-template-columns: 1fr;
  }

  .guided-setup-form {
    grid-template-columns: 1fr;
  }

  .approval-warning-policy-grid {
    grid-template-columns: 1fr;
  }

  .modal-backdrop.modal-client-create-open .modal-card {
    width: min(100%, calc(100vw - 28px));
    padding: 20px;
  }

  .client-directory-create-form {
    grid-template-columns: 1fr;
  }

  .client-directory-create-form .client-create-name-field,
  .client-directory-create-form .client-directory-create-wide,
  .client-directory-create-form .client-create-actions {
    grid-column: auto;
  }

  .client-create-actions {
    justify-content: stretch;
  }

  .client-create-actions .icon-button {
    flex: 1 1 160px;
    justify-content: center;
  }

  .pending-broker,
  .broker-card div,
  .carrier-rule-card dl,
  .carrier-rule-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

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

  .nav-item:not(:disabled):not(.disabled):hover,
  .icon-button:hover,
  .import-statement-card:hover,
  .import-routing-card:not(.disabled):hover,
  .data-reference-row.data-workflow-row:hover,
  .statement-approval-row:hover,
  .check-producer-row:hover,
  .payment-run-row:hover {
    transform: none;
  }
}
