:root {
  color-scheme: light;
  --paper: #f5f6f2;
  --paper-strong: #ffffff;
  --paper-muted: #e8ebe5;
  --ink: #171717;
  --ink-soft: #4e5450;
  --muted: #737b76;
  --line: #d7ddd5;
  --line-strong: #bcc7bf;
  --teal: #087b73;
  --teal-strong: #075f59;
  --teal-soft: #e8f5f2;
  --blue: #255f9f;
  --amber: #ad6b16;
  --red: #a33a2d;
  --green: #1f7a3a;
  --charcoal: #151615;
  --charcoal-2: #20221f;
  --white: #ffffff;
  --shadow: 0 16px 38px rgba(19, 25, 22, 0.07);
  --shadow-soft: 0 1px 2px rgba(19, 25, 22, 0.05);
  --font-sans: "Inter", "Segoe UI", "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  --font-display: "Canela", "Editorial New", "Tiempos Headline", "Noe Display", "Ivar Display",
    "Iowan Old Style", "New York", "Georgia", "Cambria", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings:
    "kern" 1,
    "liga" 1,
    "calt" 1,
    "tnum" 1;
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.45;
}

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

button,
a,
input,
select,
textarea {
  letter-spacing: 0;
}

a {
  color: inherit;
}

.public-shell[hidden],
.app-shell[hidden],
.public-page[hidden],
.page-view[hidden],
.hidden,
[hidden] {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0;
}

p {
  color: var(--ink-soft);
}

strong,
b {
  font-weight: 760;
}

.button,
.icon-button,
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 760;
  text-decoration: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.button {
  gap: 8px;
  padding: 0 17px;
}

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

.button.primary:hover {
  background: var(--teal);
}

.button.danger-action,
.icon-button.danger-action {
  border-color: #d8c3bc;
  background: #fff8f5;
  color: #78342f;
}

.button.danger-action:hover,
.icon-button.danger-action:hover {
  border-color: #bd9b91;
  background: #f5e6e1;
  color: #5f2824;
}

.button.secondary:hover,
.icon-button:hover,
.menu-button:hover {
  border-color: #9aa7a0;
  background: #f9faf8;
}

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

.icon-button,
.menu-button {
  width: 42px;
  padding: 0;
}

.dialog-close {
  appearance: none;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fbfcfa;
  box-shadow: 0 1px 0 rgba(16, 24, 20, 0.04);
  color: transparent;
  font-size: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.dialog-close:hover {
  border-color: rgba(0, 105, 96, 0.36);
  background: #f4faf7;
  box-shadow: 0 6px 16px rgba(0, 105, 96, 0.1);
}

.dialog-close:hover::before {
  color: var(--ink);
}

.dialog-close::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #4d5853;
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #4d5853;
  transform: translate(-50%, -50%) rotate(-45deg);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 123, 115, 0.18);
  outline-offset: 2px;
}

.field,
label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span,
label > span {
  color: #39413d;
  font-size: 13px;
  font-weight: 760;
  max-width: 100%;
  overflow-wrap: anywhere;
}

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

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

/* Public shell */
.public-shell {
  min-height: 100vh;
  background: var(--paper);
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 76px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 246, 242, 0.96);
  backdrop-filter: blur(14px);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.public-brand-mark,
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 800;
}

.public-brand-mark {
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: #ffffff;
}

.public-brand strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1;
}

.public-brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.public-nav {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
}

.public-nav::before {
  display: none !important;
  content: none !important;
}

.public-nav a {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #38413d;
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 680;
  text-decoration: none;
}

.public-nav a:hover,
.public-nav a.active {
  background: #e9ede8;
}

.public-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.public-main {
  background: var(--paper);
}

/* Workbench homepage */
.workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(540px, 0.76fr);
  min-height: min(760px, calc(100vh - 76px));
  border-bottom: 1px solid var(--line);
}

.workbench-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 20px;
  padding: clamp(34px, 4.4vw, 66px);
  border-right: 1px solid var(--line);
}

.workbench-intro h1 {
  margin: 0;
  color: var(--ink);
  max-width: 570px;
  font-size: 72px;
  font-weight: 500;
  line-height: 1.02;
  text-wrap: balance;
}

.workbench-intro > p:not(.eyebrow) {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.58;
}

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

.intro-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 520px;
  border: 1px solid var(--line);
  background: var(--line);
}

.intro-notes span {
  min-height: 58px;
  padding: 14px;
  background: #fbfcfa;
  color: #404843;
  font-size: 12px;
  font-weight: 760;
}

.recon-workbench {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(24px, 3.2vw, 48px);
  background: #ecefeb;
}

.workbench-toolbar,
.ledger-panels,
.match-ticket {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.workbench-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.workbench-toolbar span,
.ledger-pane header span,
.match-ticket span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.workbench-toolbar strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 16px;
}

.workbench-toolbar small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #cbd4cd;
  border-radius: 999px;
  color: #3f4944;
  font-size: 12px;
  font-weight: 760;
}

.ledger-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.ledger-pane {
  min-width: 0;
  padding: 16px;
  background: var(--paper-strong);
}

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

.ledger-pane header strong {
  color: var(--ink);
  font-size: 15px;
}

.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.ledger-row:first-of-type {
  border-top: 0;
}

.ledger-row.selected {
  border: 1px solid rgba(8, 123, 115, 0.28);
  border-radius: 8px;
  background: #eef8f5;
}

.ledger-row.warning {
  background: #fff8eb;
}

.ledger-row.danger {
  background: #fff1ef;
}

.ledger-row b {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.ledger-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ledger-row > strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.match-ticket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.64fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.match-ticket strong {
  display: block;
  margin-top: 2px;
  color: var(--teal);
  font-size: 24px;
}

.match-ticket ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #444e49;
  font-size: 13px;
}

.match-ticket a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.workbench-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
}

.workbench-strip span {
  display: grid;
  place-items: center;
  min-height: 78px;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f5f1;
  font-size: 12px;
  font-weight: 820;
  text-align: center;
  text-transform: uppercase;
}

.workbench-strip span:last-child {
  border-right: 0;
}

.workbench-section,
.workbench-final {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(52px, 7vw, 96px) clamp(22px, 6vw, 82px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.section-heading h2,
.workbench-final h2,
.auth-aside h1,
.public-simple-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
}

.section-heading p:not(.eyebrow),
.workbench-final p:not(.eyebrow) {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.62;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.method-grid article {
  min-height: 204px;
  padding: 22px;
  background: var(--paper-strong);
}

.method-grid article span {
  color: var(--teal-strong);
  font-size: 12px;
  font-weight: 900;
}

.method-grid article strong {
  display: block;
  margin-top: 42px;
  color: var(--ink);
  font-size: 22px;
}

.method-grid article p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.plain-list,
.source-grid,
.control-table {
  display: grid;
  gap: 10px;
}

.plain-list span,
.source-grid span,
.control-table div {
  min-height: 58px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  font-weight: 760;
}

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

.source-grid span {
  display: grid;
  place-items: center;
  text-align: center;
}

.control-table div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
}

.control-table b {
  color: var(--teal-strong);
}

.control-table span {
  color: var(--ink-soft);
}

.workbench-final {
  align-items: center;
  background: var(--charcoal);
}

.workbench-final h2 {
  color: #ffffff;
}

.workbench-final .eyebrow {
  color: #7fe2d7;
}

.workbench-final .button {
  justify-self: end;
  min-width: 160px;
}

/* Auth, security, pricing */
.auth-page {
  min-height: calc(100vh - 76px);
  padding: clamp(34px, 5vw, 76px);
  background: var(--paper);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(380px, 0.72fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.compact-auth-layout {
  max-width: 960px;
}

.auth-aside,
.auth-card,
.public-simple-hero,
.public-feature-grid article,
.pricing-plan {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-aside,
.auth-card {
  padding: clamp(26px, 3.6vw, 42px);
}

.auth-aside p:not(.eyebrow),
.auth-card p,
.public-simple-hero p {
  color: var(--ink-soft);
}

.auth-assurance,
.signup-next-steps {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.auth-assurance span,
.signup-next-steps {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: #3f4743;
  font-size: 13px;
  font-weight: 720;
}

.signup-next-steps span {
  color: var(--teal-strong);
  font-weight: 840;
}

.signup-next-steps ol {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

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

.auth-card-header {
  display: grid;
  gap: 4px;
  padding-bottom: 4px;
}

.auth-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

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

.auth-help-row {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: -4px;
}

.text-link,
.auth-switch-link {
  color: var(--teal-strong);
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.text-link:hover,
.auth-switch-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.credential-segmented,
.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0f3ef;
}

.segment-choice {
  position: relative;
  display: grid;
}

.segment-choice input {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.segment-choice input:focus-visible + span {
  outline: 2px solid rgba(0, 115, 105, 0.28);
  outline-offset: 2px;
}

.segment-choice span {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: #4a534e;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.segment-choice input:checked + span {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.signup-confirmation,
.form-status {
  margin: 0;
  font-size: 13px;
  font-weight: 720;
}

.signup-confirmation {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(8, 123, 115, 0.25);
  border-radius: 8px;
  background: #eef8f5;
  color: var(--teal-strong);
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: var(--red);
}

.auth-submit {
  width: 100%;
}

.public-simple-hero {
  max-width: 980px;
  margin: clamp(26px, 5vw, 64px) auto 22px;
  padding: clamp(26px, 4vw, 46px);
}

.public-feature-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto clamp(36px, 6vw, 78px);
  padding: 0 clamp(16px, 3vw, 32px);
}

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

.public-feature-grid article,
.pricing-plan {
  padding: 22px;
}

.public-feature-grid article span,
.pricing-plan span {
  color: var(--teal-strong);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.public-feature-grid h3,
.pricing-plan h2 {
  margin: 10px 0;
}

.pricing-plan.featured {
  border-color: rgba(8, 123, 115, 0.4);
}

/* Application shell */
.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -8%, rgba(8, 123, 115, 0.055), transparent 34%),
    linear-gradient(180deg, #f2f4f0 0%, #eef1ed 46%, #edf1ec 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px;
  overflow-y: auto;
  border-right: 1px solid #272a26;
  background: var(--charcoal);
  color: #eef2ed;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 8px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #f5f6f2;
  color: var(--charcoal);
}

.brand-name {
  color: #ffffff;
  font-size: 17px;
  font-weight: 850;
}

.brand-domain {
  color: #a8b0aa;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav-label {
  margin: 18px 10px 5px;
  color: #88928c;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d8ddd8;
  font-weight: 720;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--charcoal-2);
  color: #ffffff;
}

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

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
}

.sidebar-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding: 16px 10px 4px;
  color: #a8b0aa;
  font-size: 12px;
  font-weight: 720;
}

.environment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.sidebar-scrim {
  display: none;
}

.workspace {
  min-width: 0;
  padding: 22px 28px 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.3fr);
  gap: 24px;
  align-items: start;
  margin: -22px -28px 22px;
  padding: 18px 28px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 241, 237, 0.94);
  backdrop-filter: blur(12px);
}

.page-title-group {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.menu-button {
  display: none;
}

.page-title-group h1,
.panel h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 780;
  font-size: 25px;
  line-height: 1.1;
}

.page-context {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 100%;
  overflow: hidden;
}

.page-context span {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 26ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-context span[aria-hidden="true"] {
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
}

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

.topbar > .actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, auto) 52px;
  gap: 10px;
  justify-content: end;
  align-items: center;
  min-width: 0;
}

.workspace-select {
  min-width: 190px;
  width: min(100%, 620px);
  justify-self: stretch;
}

.session-control {
  display: inline-flex;
  overflow: hidden;
  min-width: 0;
  max-width: 560px;
  justify-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.session-identity {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(420px, 34vw);
  min-height: 42px;
  padding: 0 12px;
  color: #3f4944;
  font-size: 13px;
  font-weight: 720;
  border-right: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-control .button {
  border: 0;
  border-radius: 0;
}

.page-host {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

.page-view {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.dropzone,
.panel,
.metric,
.analytics-tile,
.summary-card,
.job-card,
.exception-card,
.connector-card,
.access-section,
.support-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.dropzone {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  margin-bottom: 18px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.dropzone strong {
  display: block;
  color: var(--ink);
}

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

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

.checksum {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.summary-grid,
.analytics-grid,
.stats-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric,
.analytics-tile {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 104px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric strong,
.analytics-tile strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.metric-subtext,
.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.panel {
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.panel-heading,
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  min-height: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.app-shell .panel-heading h2 {
  font-size: 24px;
}

.panel-heading > div:first-child,
.dialog-heading > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.panel-heading p {
  margin-bottom: 0;
}

.panel-body,
.panel-content {
  padding: 18px 20px;
}

.app-shell h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.content-grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.access-grid,
.governance-grid,
.split-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  padding: 18px 20px;
}

.connector-oauth-grid,
.governance-grid {
  grid-template-columns: minmax(0, 1fr);
}

.access-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr));
}

.access-section {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: none;
}

.access-section > h3,
.app-shell .section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.app-shell .section-heading > * {
  min-width: 0;
}

.app-shell .section-heading h3 {
  overflow-wrap: anywhere;
}

.app-shell .section-heading .muted-text,
.access-section > .muted-text {
  color: var(--muted);
  font-size: 13px;
}

.access-section > .muted-text {
  padding: 12px 16px 0;
}

.access-section > .table-wrap {
  border-radius: 0;
}

.access-section > .table-wrap table,
.panel > .table-wrap table,
.table-divider table {
  margin: 0;
}

.table-divider {
  width: calc(100% - 40px);
  margin: 0 20px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  min-width: min(420px, 100%);
  max-width: 100%;
}

.toolbar > * {
  min-width: 0;
}

.toolbar > :not(.button):not(.icon-button):not(input):not(select):not(textarea):not(.segmented) {
  overflow-wrap: anywhere;
}

.toolbar .button {
  min-height: 40px;
  white-space: nowrap;
}

.toolbar .search {
  width: min(320px, 100%);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9f6;
  color: #45504a;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.1;
  white-space: nowrap;
}

.pill.complete {
  border-color: #b9dac2;
  background: #edf8ef;
  color: #1f6f39;
}

.pill.partial,
.pill.warning {
  border-color: #ead4ac;
  background: #fff8eb;
  color: #865414;
}

.pill.open {
  border-color: #e1bbb4;
  background: #fff3f0;
  color: #8a332d;
}

.pill.investigating {
  border-color: #bed1e7;
  background: #eef5ff;
  color: #255f9f;
}

.pill.ignored {
  border-color: #d8ded6;
  background: #f2f5f1;
  color: #65706a;
}

.pill.left,
.pill.right {
  border-color: #b8d8d3;
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.segmented {
  display: inline-flex;
  grid-template-columns: none;
  width: auto;
  max-width: 100%;
  gap: 3px;
  padding: 3px;
  border-color: var(--line-strong);
  background: #eef2ed;
}

.credential-segmented {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
}

.credential-segmented .segment-choice {
  box-sizing: border-box;
  min-width: 132px;
  overflow: hidden;
}

.credential-segmented .segment-choice span {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b544f;
  cursor: pointer;
  font-weight: 760;
}

.segment:hover {
  background: rgba(255, 255, 255, 0.64);
}

.segment.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 28, 24, 0.1);
}

.details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 4px 20px 20px;
}

.details-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 0.36fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #e7ebe5;
}

.details-list > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.details-list dt {
  color: #59625d;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.details-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

#sourcesGrid.source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 20px;
}

#sourcesGrid .source-item {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
}

#sourcesGrid .source-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

#sourcesGrid .source-title strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

#sourcesGrid .source-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#sourcesGrid .source-meta span {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  overflow-wrap: anywhere;
}

#sourcesGrid .source-meta > span:first-child {
  padding: 10px 11px;
  border: 1px solid #e2e8df;
  border-radius: 8px;
  background: #f8faf7;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.exception-detail {
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
}

.exception-detail-empty {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.exception-detail-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.exception-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.exception-brief-card,
.exception-proof-card,
.source-presence-card,
.next-step-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
}

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

.exception-brief-card h3 {
  max-width: 760px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 520;
  line-height: 1.08;
}

.exception-brief-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

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

.exception-signal {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1e7df;
  border-radius: 8px;
  background: #f8faf7;
}

.exception-signal span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.exception-signal strong {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

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

.source-presence-card {
  display: grid;
  gap: 10px;
}

.source-presence-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.source-presence-card h3,
.next-step-card h3,
.exception-proof-card h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 850;
}

.source-presence-card p,
.next-step-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.source-presence-meta {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.exception-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.exception-proof-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.exception-proof-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.exception-proof-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.exception-proof-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.next-step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.next-step-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.next-step-list span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #dce4da;
  border-radius: 999px;
  background: #f8faf7;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.row-values-card {
  display: grid;
  gap: 12px;
  max-height: 680px;
  overflow: auto;
}

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

.row-snapshot-card,
.field-comparison-note,
.field-comparison {
  min-width: 0;
  border: 1px solid #e0e7df;
  border-radius: 8px;
  background: #f8faf7;
}

.row-snapshot-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.row-snapshot-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.row-snapshot-card dl {
  display: grid;
  gap: 0;
  margin: 0;
  min-width: 0;
}

.row-snapshot-card dl > div {
  display: grid;
  grid-template-columns: minmax(108px, 0.32fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #e5ebe3;
}

.row-snapshot-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.row-snapshot-card dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.field-comparison-note {
  padding: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.field-comparison {
  display: grid;
  overflow: hidden;
}

.field-comparison h4 {
  margin: 0;
  padding: 12px 12px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.field-comparison table {
  min-width: 520px;
}

.field-comparison th,
.field-comparison td {
  padding: 10px 12px;
  font-size: 13px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.table-wrap.table-divider {
  width: 100%;
  margin: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 920px;
}

th,
td {
  min-width: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #e3e8e2;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: #f6f8f5;
  color: #59625d;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-size: 14px;
}

td .muted-text,
td .mono {
  max-width: 100%;
}

.cell-token {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.token-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.business-key-token,
.checksum-token {
  max-width: 22ch;
}

.source-path-token {
  max-width: 42ch;
}

.assignee-token {
  display: inline-block;
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.jobs-panel table,
#apiKeyPanel table {
  min-width: 1240px;
}

#operationsRunQueue table,
#webhookPanel table {
  min-width: 1120px;
}

#auditLogPanel table,
#backupPanel table {
  min-width: 1180px;
}

#auditLogPanel .audit-table-wrap {
  overflow: auto;
  border-top: 1px solid var(--line);
  scrollbar-gutter: stable both-edges;
}

#auditLogPanel .audit-table-wrap table {
  min-width: 2180px;
}

#auditLogPanel th:nth-child(1),
#auditLogPanel td:nth-child(1) {
  width: 112px;
}

#auditLogPanel th:nth-child(2),
#auditLogPanel td:nth-child(2) {
  width: 190px;
}

#auditLogPanel th:nth-child(3),
#auditLogPanel td:nth-child(3) {
  width: 230px;
}

#auditLogPanel th:nth-child(4),
#auditLogPanel td:nth-child(4),
#auditLogPanel th:nth-child(5),
#auditLogPanel td:nth-child(5),
#auditLogPanel th:nth-child(6),
#auditLogPanel td:nth-child(6) {
  width: 260px;
}

#auditLogPanel th:nth-child(7),
#auditLogPanel td:nth-child(7) {
  width: 120px;
}

#auditLogPanel th:nth-child(8),
#auditLogPanel td:nth-child(8) {
  width: 660px;
}

.audit-full-token {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  padding: 4px 6px;
  border: 1px solid #dfe7de;
  border-radius: 6px;
  background: #f8faf7;
  color: #18211d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-table-grid table,
.access-grid table {
  min-width: 780px;
}

tbody tr:hover {
  background: #f9fbf8;
}

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

td .icon-button,
.row-actions .icon-button {
  width: auto;
  min-width: 66px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(21, 22, 21, 0.04);
}

td .icon-button:hover,
.row-actions .icon-button:hover {
  box-shadow: 0 6px 16px rgba(18, 25, 21, 0.08);
}

.row-actions .pill {
  min-height: 34px;
}

.row-actions-compact {
  flex-wrap: nowrap;
}

.row-actions-compact .pill {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-menu {
  position: relative;
  min-width: 0;
}

.action-menu > summary {
  list-style: none;
}

.action-menu > summary::-webkit-details-marker {
  display: none;
}

.action-menu-panel {
  display: none;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 6px;
  min-width: 168px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.action-menu[open] .action-menu-panel {
  display: grid;
}

.action-menu-panel .icon-button {
  width: 100%;
}

.table-wrap td:last-child {
  min-width: 116px;
}

.empty-row td {
  padding: 22px 20px;
  color: var(--muted);
  font-weight: 650;
}

.inline-status {
  min-height: 20px;
  margin: 0;
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.compact-action-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  min-width: min(420px, 100%);
}

.compact-action-form input {
  width: min(280px, 100%);
}

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

.inline-admin-form .button {
  align-self: end;
  justify-self: start;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.dialog-body {
  display: grid;
  min-width: 0;
}

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

.field-span {
  grid-column: span 2;
}

.check-field {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: #39413d;
  font-size: 13px;
  font-weight: 760;
}

.check-field input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
}

.evidence-toggle {
  align-self: end;
  min-height: 42px;
  padding: 10px 0;
}

.role-options,
.policy-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.metric-strip,
.agent-health-strip,
.alert-health-strip,
.human-access-summary,
.agent-access-summary,
.connector-vault-summary,
.connector-oauth-summary,
.mapping-profile-summary,
.support-heading-actions,
.commercial-section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.status-pill,
.badge,
.tag,
.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
  color: #3e4742;
  font-size: 12px;
  font-weight: 780;
}

.status-success,
.success,
.badge-success {
  color: var(--green);
}

.status-warning,
.warning,
.badge-warning {
  color: var(--amber);
}

.status-error,
.error,
.badge-error,
.danger {
  color: var(--red);
}

.form-grid,
.support-case-form,
.integration-form,
.access-form,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px;
}

.wide {
  grid-column: span 2;
}

.full-width {
  grid-column: 1 / -1;
}

.support-case-form .button,
.form-grid .button {
  align-self: end;
}

.analytics-summary,
.support-summary,
.support-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.analytics-reasons,
.empty-state {
  padding: 14px 20px;
  color: var(--muted);
}

.job-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.22);
}

.job-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  min-width: 0;
}

.compact-dialog {
  width: min(780px, calc(100vw - 32px));
}

.job-dialog .dialog-body {
  max-height: calc(100vh - 210px);
  overflow: auto;
  overscroll-behavior: contain;
}

.job-dialog .form-grid,
.job-dialog .form-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.job-dialog .field-span {
  grid-column: span 2;
}

.job-dialog::backdrop {
  background: rgba(20, 22, 20, 0.48);
}

.confirm-dialog {
  width: min(460px, calc(100vw - 32px));
}

.confirm-dialog .form-section {
  gap: 10px;
  padding: 22px 22px 18px;
}

.confirm-dialog h2,
.confirm-dialog p {
  margin: 0;
}

.confirm-dialog h2 {
  font-size: 26px;
  line-height: 1.08;
}

.confirm-dialog p:not(.eyebrow) {
  color: var(--ink-soft);
}

.prompt-dialog {
  width: min(620px, calc(100vw - 32px));
}

.prompt-dialog .prompt-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  min-width: 0;
}

.prompt-dialog h2,
.prompt-dialog p {
  margin: 0;
}

.prompt-dialog h2 {
  font-size: 26px;
  line-height: 1.08;
}

.prompt-message {
  color: var(--ink-soft);
  line-height: 1.5;
}

.prompt-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.prompt-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #333d38;
  font-size: 13px;
  font-weight: 760;
}

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

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.credential-output {
  min-height: 120px;
}

/* Premium enterprise pass: shared console discipline */
:root {
  --paper: #f3f5f1;
  --paper-strong: #ffffff;
  --paper-muted: #e9eee8;
  --ink: #101412;
  --ink-soft: #3f4944;
  --muted: #6e7872;
  --line: #d8e0d8;
  --line-strong: #c1ccc3;
  --teal: #08766e;
  --teal-strong: #005f56;
  --teal-soft: #edf7f4;
  --red: #874139;
  --shadow: 0 22px 58px rgba(16, 23, 19, 0.08);
  --shadow-soft: 0 1px 2px rgba(16, 23, 19, 0.05), 0 10px 24px rgba(16, 23, 19, 0.04);
}

body {
  background:
    linear-gradient(180deg, #f8faf6 0%, #eef2ec 42%, #edf1eb 100%);
  text-rendering: optimizeLegibility;
}

.button,
.icon-button,
.menu-button,
input,
select,
textarea {
  border-color: var(--line-strong);
}

.button,
.icon-button,
.menu-button {
  min-height: 40px;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(16, 23, 19, 0.04);
}

.button.primary,
.icon-button.primary {
  background: linear-gradient(180deg, #08766e 0%, #005f56 100%);
  border-color: #005a52;
  box-shadow: 0 8px 18px rgba(0, 95, 86, 0.16);
}

.button.primary:hover,
.icon-button.primary:hover {
  background: linear-gradient(180deg, #0a8178 0%, #00665d 100%);
  box-shadow: 0 10px 22px rgba(0, 95, 86, 0.2);
}

.button.danger-action,
.icon-button.danger-action {
  border-color: #dacbc5;
  background: #fffaf7;
  color: #78342f;
  box-shadow: none;
}

.button.danger-action:hover,
.icon-button.danger-action:hover {
  border-color: #c8ada4;
  background: #fbf0ec;
}

input,
select,
textarea {
  min-height: 42px;
  box-shadow: inset 0 1px 0 rgba(16, 23, 19, 0.02);
}

.public-header {
  box-shadow: 0 1px 0 rgba(16, 23, 19, 0.04);
}

.public-nav a {
  border-radius: 8px;
}

.public-nav a:hover,
.public-nav a.active {
  background: #ecf1ec;
}

.workbench-hero,
.auth-layout,
.public-simple-hero {
  background:
    radial-gradient(circle at 76% 10%, rgba(8, 118, 110, 0.08), transparent 26%),
    linear-gradient(180deg, #f9faf6 0%, #f2f5f1 100%);
}

.recon-workbench,
.auth-card,
.public-feature-grid article,
.pricing-plan,
.method-grid article,
.control-table div {
  border-color: #d7e0d7;
  box-shadow: 0 20px 50px rgba(16, 23, 19, 0.07);
}

.app-shell {
  background:
    radial-gradient(circle at 24% -10%, rgba(8, 118, 110, 0.06), transparent 28%),
    linear-gradient(180deg, #f2f5f1 0%, #edf1ec 52%, #eaf0e9 100%);
}

.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell .panel-heading h2 {
  font-family: var(--font-sans);
  font-weight: 760;
  letter-spacing: 0;
}

.sidebar {
  background:
    linear-gradient(180deg, #111513 0%, #0f1311 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.brand {
  padding-bottom: 18px;
}

.brand-mark,
.public-brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.nav-item {
  min-width: 0;
  font-size: 14px;
}

.nav-item span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  background: #1c211e;
  box-shadow:
    inset 3px 0 0 #10a193,
    0 1px 0 rgba(255, 255, 255, 0.03);
}

.workspace {
  padding: 24px 30px 34px;
}

.topbar {
  margin: -24px -30px 24px;
  padding: 20px 30px 18px;
  background: rgba(242, 245, 241, 0.94);
  box-shadow: 0 1px 0 rgba(16, 23, 19, 0.03);
}

.page-title-group h1 {
  font-size: 27px;
  line-height: 1.05;
}

.page-context,
.session-identity,
.metric-subtext,
.muted-text {
  color: #63706a;
}

.session-control,
.workspace-select,
.topbar-icon {
  box-shadow: 0 1px 0 rgba(16, 23, 19, 0.04);
}

.dropzone,
.panel,
.metric,
.analytics-tile,
.summary-card,
.job-card,
.exception-card,
.connector-card,
.access-section,
.support-card {
  border-color: #d4ddd4;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.dropzone {
  min-height: 74px;
  padding: 16px 20px;
}

.summary-grid,
.analytics-grid,
.stats-grid,
.metric-grid {
  gap: 18px;
}

.metric,
.analytics-tile {
  min-height: 110px;
  padding: 20px 22px;
}

.metric-label,
th,
.details-list dt,
.exception-proof-list dt,
.row-snapshot-card dt {
  color: #57635d;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
}

.metric strong,
.analytics-tile strong {
  font-size: 29px;
  font-weight: 760;
}

.panel {
  overflow: hidden;
}

.panel-heading,
.dialog-heading {
  align-items: center;
  min-height: 86px;
  padding: 22px 26px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
}

.app-shell .panel-heading h2 {
  font-size: 24px;
  line-height: 1.12;
}

.panel-body,
.panel-content {
  padding: 20px 24px;
}

.access-grid,
.governance-grid,
.split-table-grid {
  padding: 20px 24px;
}

.access-section {
  border-color: #d8e0d8;
  background: #ffffff;
}

.access-section > h3,
.app-shell .section-heading {
  min-height: 54px;
  padding: 14px 18px;
  background: #f8faf7;
}

.toolbar,
.compact-action-form,
.support-heading-actions,
.commercial-section-heading,
.analytics-summary,
.support-summary,
.metric-strip,
.agent-health-strip,
.alert-health-strip,
.human-access-summary,
.agent-access-summary,
.connector-vault-summary,
.connector-oauth-summary,
.mapping-profile-summary {
  gap: 8px;
}

.pill,
.status-pill,
.badge,
.tag,
.risk-badge {
  min-height: 25px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 760;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  background: #ffffff;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #f2f5f1;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #c8d2ca;
  border: 2px solid #f2f5f1;
  border-radius: 999px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

th,
td {
  min-width: 0;
  padding: 13px 16px;
  border-bottom: 1px solid #e6ebe5;
  line-height: 1.34;
}

th {
  background: #f7f9f6;
  color: #56615c;
}

td {
  color: #141816;
}

td,
td strong,
td span,
td p,
.muted-text,
.mono {
  max-width: 100%;
  overflow-wrap: anywhere;
}

td strong {
  font-weight: 760;
}

.mono,
code {
  font-size: 0.92em;
}

.cell-token {
  max-width: 18ch;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-key-token,
.checksum-token {
  max-width: min(24ch, 100%);
}

.source-path-token {
  max-width: min(42ch, 100%);
}

.token-stack {
  max-width: 100%;
}

.row-actions {
  gap: 7px;
  align-items: flex-start;
}

td .icon-button,
.row-actions .icon-button,
.action-menu-panel .icon-button {
  min-width: 76px;
  min-height: 36px;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-actions-compact {
  flex-wrap: wrap;
}

.row-actions-compact .pill {
  max-width: 126px;
}

.action-menu-panel {
  min-width: 178px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(16, 23, 19, 0.1);
}

.jobs-panel table {
  min-width: 1320px;
}

.jobs-panel table.is-empty {
  min-width: 0;
  width: 100%;
}

#apiKeyPanel table,
#webhookPanel table,
#auditLogPanel table,
#backupPanel table,
#operationsRunQueue table {
  min-width: 1180px;
}

#apiKeyPanel table {
  min-width: 1660px;
}

#apiKeyPanel th:nth-child(2),
#apiKeyPanel td:nth-child(2),
#apiKeyPanel th:nth-child(5),
#apiKeyPanel td:nth-child(5),
#apiKeyPanel th:nth-child(7),
#apiKeyPanel td:nth-child(7) {
  width: 270px;
}

#apiKeyPanel th:nth-child(3),
#apiKeyPanel td:nth-child(3) {
  width: 190px;
}

#apiKeyPanel th:nth-child(6),
#apiKeyPanel td:nth-child(6) {
  width: 150px;
}

#apiKeyPanel td:nth-child(2) .cell-token,
#apiKeyPanel td:nth-child(5) .cell-token,
#apiKeyPanel td:nth-child(7) .cell-token {
  max-width: 31ch;
}

#webhookPanel table {
  min-width: 1440px;
}

#webhookPanel th:nth-child(1),
#webhookPanel td:nth-child(1),
#webhookPanel th:nth-child(2),
#webhookPanel td:nth-child(2),
#webhookPanel th:nth-child(3),
#webhookPanel td:nth-child(3) {
  width: 220px;
}

#backupPanel table {
  min-width: 1360px;
}

#platformUsersSection table {
  min-width: 1240px;
}

#platformUsersSection th:nth-child(2),
#platformUsersSection td:nth-child(2),
#platformUsersSection th:nth-child(4),
#platformUsersSection td:nth-child(4) {
  width: 260px;
}

#accessRequestPanel table {
  min-width: 1240px;
}

#accessRequestPanel th:nth-child(2),
#accessRequestPanel td:nth-child(2) {
  width: 260px;
}

#billingIntelligencePanel .split-table-grid table,
#billingIntelligencePanel > .table-wrap table {
  min-width: 1040px;
}

#billingIntelligencePanel th:nth-child(1),
#billingIntelligencePanel td:nth-child(1) {
  width: 260px;
}

#workspaceAdminPanel table {
  min-width: 1160px;
}

#workspaceAdminPanel th:nth-child(1),
#workspaceAdminPanel td:nth-child(1),
#workspaceAdminPanel th:nth-child(2),
#workspaceAdminPanel td:nth-child(2) {
  width: 260px;
}

.split-table-grid table,
.access-grid table {
  min-width: 680px;
}

.empty-row td {
  padding: 24px 20px;
  color: #6a746f;
}

.details-list dd,
.exception-proof-list dd,
.row-snapshot-card dd,
.source-presence-meta,
#sourcesGrid .source-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-values-card {
  max-height: 560px;
  background: #ffffff;
}

.form-grid,
.support-case-form,
.integration-form,
.access-form,
.settings-grid {
  gap: 16px;
}

.form-status {
  min-height: 20px;
  color: #63706a;
  overflow-wrap: anywhere;
}

.file-preview-intro {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d9e3da;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdfb 0%, #f4f8f5 100%);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.42;
}

.file-preview-intro strong {
  color: var(--ink);
  font-weight: 820;
}

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

.file-preview-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d7e1d8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(16, 23, 19, 0.04);
}

.file-preview-card.is-empty {
  background: #f8faf7;
  color: var(--muted);
}

.file-preview-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
}

.file-preview-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 840;
}

.file-preview-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.preview-warning {
  padding: 10px 12px;
  border: 1px solid #ead8b6;
  border-radius: 8px;
  background: #fffaf0;
  color: #79531c !important;
}

.column-recommendations,
.preview-column-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.column-recommendation {
  display: inline-flex;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #c9d8cf;
  border-radius: 999px;
  background: #f9fbf9;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.column-recommendation strong {
  min-width: 0;
  max-width: 28ch;
  overflow: hidden;
  color: var(--ink);
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-recommendation:hover {
  border-color: #8fbfb4;
  background: #edf8f5;
}

.column-recommendation.muted {
  cursor: default;
  opacity: 0.72;
}

.column-recommendation.muted:hover {
  border-color: #c9d8cf;
  background: #f9fbf9;
}

.mini-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e0e8df;
  border-radius: 8px;
  background: #fbfcfb;
}

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

.mini-preview-table th,
.mini-preview-table td {
  padding: 8px 10px;
  font-size: 12px;
}

.mini-preview-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-preview-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Enterprise data layout hardening */
.split-table-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(820px, 100%), 1fr));
}

.panel > .table-wrap,
.access-section > .table-wrap,
.table-divider {
  scrollbar-width: thin;
  scrollbar-color: #bac8c0 #f6f8f5;
}

.panel > .table-wrap,
.access-section > .table-wrap {
  max-height: min(680px, calc(100vh - 220px));
  overflow: auto;
}

#operationsRunQueue > .table-wrap,
#jobs > .table-wrap,
#auditLogPanel > .table-wrap,
#backupPanel > .table-wrap,
#apiKeyPanel > .table-wrap,
#usagePanel > .table-wrap,
#webhookPanel .table-wrap,
#userSessionsSection > .table-wrap {
  max-height: min(620px, calc(100vh - 260px));
}

#auditLogPanel > .table-wrap {
  max-height: min(580px, max(300px, calc(100vh - 430px)));
}

.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 #dfe6de;
}

.table-wrap tbody tr:nth-child(even) td {
  background: rgba(248, 250, 247, 0.58);
}

.table-wrap tbody tr:hover td {
  background: #f1f7f4;
}

.action-last-table thead th:last-child,
.action-last-table tbody tr:not(.empty-row) td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 132px;
  background: #fbfcfa;
  box-shadow:
    -1px 0 0 rgba(203, 214, 205, 0.9),
    -18px 0 28px -26px rgba(24, 32, 27, 0.48);
}

.action-last-table thead th:last-child {
  z-index: 4;
  background: #f6f8f5;
}

.action-last-table tbody tr:nth-child(even):not(.empty-row) td:last-child {
  background: #f8faf7;
}

.action-last-table tbody tr:hover:not(.empty-row) td:last-child {
  background: #f1f7f4;
}

.exception-list-wrap {
  display: grid;
  gap: 0;
  max-height: min(620px, calc(100vh - 300px));
  overflow: auto;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #bac8c0 #f6f8f5;
}

.exception-list-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.exception-list-wrap::-webkit-scrollbar-track {
  background: #f2f5f1;
}

.exception-list-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #f2f5f1;
  border-radius: 999px;
  background: #c8d2ca;
}

.exception-list-head,
.exception-card-grid {
  display: grid;
  grid-template-columns:
    minmax(138px, 0.9fr)
    minmax(260px, 1.45fr)
    minmax(320px, 1.65fr)
    minmax(150px, 0.85fr)
    minmax(214px, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 1080px;
}

.exception-list-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f7faf6;
  color: #55615b;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.exception-list {
  display: grid;
  min-width: 0;
}

.exception-inbox-card {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.exception-inbox-card:nth-child(even) {
  background: rgba(249, 251, 248, 0.7);
}

.exception-inbox-card:hover {
  background: #f3f8f5;
}

.exception-inbox-card.selected {
  background: #eef8f4;
  box-shadow: inset 4px 0 0 var(--teal);
}

.exception-card-grid {
  padding: 18px;
}

.exception-card-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.exception-card-cell label {
  color: #59655f;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.exception-status-cell {
  justify-items: start;
}

.exception-break-cell p {
  max-width: 56ch;
  margin: 0;
  color: #36423c;
  font-size: 14px;
  line-height: 1.45;
}

.exception-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.exception-title-line strong,
.exception-owner-cell strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-evidence-cell .token-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.exception-technical-token {
  max-width: min(100%, 34ch);
}

.exception-actions-cell {
  justify-items: end;
}

.exception-actions-cell .row-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.exception-actions-cell .row-actions-compact {
  flex-wrap: wrap;
}

.exception-actions-cell .row-actions .icon-button {
  width: auto;
  min-width: 76px;
}

.exception-actions-cell .action-menu {
  justify-self: end;
}

.exception-actions-cell .action-menu-panel {
  position: absolute;
  right: 0;
  z-index: 12;
  min-width: 196px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 23, 19, 0.14);
}

.exception-history-card {
  margin: 0 18px 18px;
  padding: 14px;
  border: 1px solid #d5e1d8;
  border-radius: 8px;
  background: #fbfdfb;
}

.exception-list-note,
.exception-empty {
  padding: 22px 24px;
  color: var(--muted);
  font-weight: 700;
}

.exception-empty {
  display: grid;
  gap: 4px;
}

.cell-token {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 28ch);
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #dce5dc;
  border-radius: 6px;
  background: linear-gradient(180deg, #fbfcfa 0%, #f2f6f1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #1f2b27;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-key-token {
  max-width: min(100%, 34ch);
}

.checksum-token {
  max-width: min(100%, 30ch);
}

.source-path-token {
  max-width: min(100%, 56ch);
}

.token-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
}

.details-list .cell-token,
.exception-proof-list .cell-token,
.source-presence-meta .cell-token {
  max-width: 100%;
}

/* Enterprise console refinement pass */
.workspace {
  background:
    linear-gradient(180deg, rgba(250, 252, 249, 0.92) 0%, rgba(239, 244, 239, 0.88) 100%),
    var(--paper);
}

.topbar {
  border-bottom-color: rgba(188, 199, 191, 0.72);
  background:
    linear-gradient(180deg, rgba(248, 251, 247, 0.96) 0%, rgba(238, 244, 239, 0.96) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78), 0 18px 34px rgba(24, 31, 27, 0.05);
}

.page-title-group h1 {
  font-family: var(--font-sans);
  font-weight: 820;
  line-height: 1.04;
}

.dropzone,
.panel,
.metric,
.analytics-tile,
.summary-card,
.job-card,
.exception-card,
.connector-card,
.access-section,
.support-card {
  border-color: rgba(190, 203, 193, 0.82);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 44px rgba(21, 29, 24, 0.06);
}

.panel,
.metric,
.analytics-tile,
.summary-card,
.job-card,
.exception-card,
.connector-card,
.access-section,
.support-card {
  border-radius: 8px;
}

.panel-heading,
.dialog-heading {
  gap: 14px;
  border-bottom-color: rgba(203, 214, 205, 0.9);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfa 70%, #f7faf6 100%);
}

.app-shell .panel-heading h2,
.access-section > h3,
.source-item strong,
.support-card h3 {
  font-family: var(--font-sans);
  font-weight: 820;
  letter-spacing: 0;
}

.button,
.icon-button,
.menu-button {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.button:hover,
.icon-button:hover,
.menu-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 18px rgba(19, 25, 22, 0.06);
}

.button:active,
.icon-button:active,
.menu-button:active {
  transform: translateY(0);
}

.button.primary,
.icon-button.primary {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 22px rgba(7, 95, 89, 0.16);
}

input,
select,
textarea {
  border-color: rgba(181, 196, 185, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #9fb3a7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(8, 123, 115, 0.55);
  box-shadow: 0 0 0 4px rgba(8, 123, 115, 0.1);
}

.table-wrap {
  border-color: rgba(203, 214, 205, 0.86);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

table {
  font-size: 14px;
}

th {
  background: #f5f8f4;
  color: #4d5b54;
  font-size: 11px;
  font-weight: 840;
}

td {
  vertical-align: top;
}

.table-wrap tbody tr {
  transition: background 130ms ease;
}

.table-wrap tbody tr:hover td {
  background: #eef7f3;
}

.cell-token {
  position: relative;
  max-width: min(100%, 34ch);
  min-height: 26px;
  padding: 4px 9px;
  border-color: #d4dfd6;
  background: linear-gradient(180deg, #fbfdfb 0%, #f2f7f2 100%);
  color: #17231f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 0 rgba(16, 23, 19, 0.04);
}

.cell-token::after,
.audit-full-token::after {
  content: none;
  display: none;
}

.business-key-token {
  max-width: min(100%, 38ch);
}

.checksum-token {
  max-width: min(100%, 34ch);
}

.source-path-token {
  max-width: min(100%, 62ch);
}

.exception-summary-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(126px, 1fr));
  gap: 10px;
  min-width: 1080px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(203, 214, 205, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 249, 245, 0.92) 100%);
}

.exception-summary-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #dbe5dc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.exception-summary-metric span {
  color: #58655f;
  font-size: 11px;
  font-weight: 840;
  text-transform: uppercase;
}

.exception-summary-metric strong {
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
}

.exception-summary-metric small {
  min-width: 0;
  color: #6b7670;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-summary-metric.warning {
  border-color: #e6d7bb;
  background: #fffaf0;
}

.exception-summary-metric.complete {
  border-color: #bfdcc8;
  background: #f3fbf5;
}

.exception-summary-metric.left {
  border-color: #bcdedb;
  background: #f1fbf9;
}

.exception-summary-metric.right {
  border-color: #cbd9ed;
  background: #f4f8fe;
}

.exception-summary-metric.partial {
  border-color: #dfd6c6;
  background: #fbf8f2;
}

.exception-list-wrap {
  border-radius: 0 0 8px 8px;
}

.exceptions-panel.is-empty .exception-list-wrap {
  overflow: hidden;
}

.exceptions-panel.is-empty .exception-list-head {
  display: none;
}

.exceptions-panel.is-empty .exception-list {
  min-width: 0;
}

.exceptions-panel.is-empty .exception-empty {
  margin: 18px;
  padding: 28px 30px;
  border: 1px dashed #cbd8ce;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbf7 100%);
}

.exceptions-panel.is-empty .exception-empty strong {
  color: var(--ink);
  font-size: 17px;
}

.exception-list-head {
  padding: 15px 22px;
  background: #f3f7f4;
  color: #506058;
}

.exception-card-grid {
  padding: 22px;
  grid-template-columns:
    minmax(146px, 0.82fr)
    minmax(292px, 1.46fr)
    minmax(350px, 1.66fr)
    minmax(160px, 0.88fr)
    minmax(214px, 0.92fr);
}

.exception-inbox-card {
  position: relative;
}

.exception-inbox-card.selected {
  background:
    linear-gradient(90deg, rgba(8, 123, 115, 0.08) 0%, rgba(240, 249, 245, 0.94) 42%, #ffffff 100%);
  box-shadow:
    inset 4px 0 0 var(--teal),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.exception-title-line strong,
.exception-owner-cell strong {
  font-size: 16px;
}

.exception-break-cell p {
  color: #2f3d37;
  font-size: 14.5px;
}

.exception-actions-cell .row-actions .icon-button {
  min-width: 88px;
  border-radius: 8px;
}

.exception-detail {
  gap: 20px;
  padding: 24px 26px 26px;
}

.exception-brief {
  grid-template-columns: minmax(0, 1.24fr) minmax(340px, 0.76fr);
  gap: 20px;
}

.exception-brief-card,
.exception-proof-card,
.source-presence-card,
.next-step-card {
  border-color: rgba(205, 218, 208, 0.96);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 30px rgba(20, 28, 23, 0.045);
}

.exception-brief-card {
  padding: 22px;
}

.exception-brief-card h3 {
  max-width: 860px;
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 830;
  letter-spacing: 0;
  line-height: 1.12;
}

.exception-brief-card p {
  max-width: 94ch;
}

.exception-signal {
  padding: 13px 14px;
  background: #f7faf6;
}

.next-step-card {
  padding: 20px;
}

.next-step-card h3,
.source-presence-card h3,
.exception-proof-card h3,
.row-values-card h3 {
  font-size: 16px;
  font-weight: 830;
}

.next-step-list li {
  gap: 12px;
  font-size: 14px;
}

.next-step-list span {
  border-color: #cfdcd2;
  background: #ffffff;
  color: var(--teal-strong);
}

.source-presence-grid {
  gap: 18px;
}

.source-presence-card {
  padding: 18px 20px;
}

.source-presence-meta {
  gap: 8px;
}

.exception-lower-grid {
  align-items: start;
  gap: 18px;
}

.exception-proof-card {
  min-height: 0;
  padding: 20px;
}

.exception-proof-list {
  gap: 8px;
}

.exception-proof-list div {
  padding: 2px 0;
}

.row-values-card {
  align-self: start;
  min-height: 0;
  max-height: min(720px, calc(100vh - 190px));
  padding: 20px;
  background: #ffffff;
}

.row-values-card > p {
  margin: 0;
}

.row-snapshot-list {
  gap: 12px;
}

.row-snapshot-card,
.field-comparison-note,
.field-comparison {
  border-color: #d8e3da;
  background: #fbfdfb;
}

.row-snapshot-card {
  padding: 14px 15px;
}

.row-snapshot-card header {
  padding-bottom: 8px;
  border-bottom: 1px solid #e2eae2;
}

.row-snapshot-card dl > div {
  padding: 9px 0;
}

.field-comparison-note {
  padding: 14px;
  color: #2f3e38;
  line-height: 1.45;
}

.source-item,
.access-section,
.support-card {
  overflow: hidden;
}

.source-item,
.connector-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
}

/* Enterprise token and table resilience */
.cell-token {
  box-sizing: border-box;
  display: inline-flex;
  max-width: min(100%, 28ch);
  min-width: 0;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.cell-token[data-copy-value],
.audit-full-token[data-copy-value] {
  cursor: default;
}

td .cell-token,
.access-section .cell-token,
#apiKeyPanel .cell-token,
#webhookPanel .cell-token,
#auditLogPanel .cell-token {
  max-width: 100%;
}

.table-wrap td strong {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  line-height: 1.28;
  vertical-align: bottom;
}

.table-wrap td strong + br {
  display: none;
}

.table-wrap td {
  min-width: 0;
}

.table-wrap td > .cell-token {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  margin-top: 4px;
}

.table-wrap td > .cell-token:first-child {
  margin-top: 0;
}

.table-wrap td > .cell-token + .cell-token {
  margin-top: 6px;
}

.token-stack {
  display: flex;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
}

td .token-stack,
.exception-evidence-cell .token-stack,
.exception-proof-list .token-stack {
  width: 100%;
}

.agent-access-panel .access-grid {
  grid-template-columns: minmax(0, 1fr);
}

.agent-access-panel .access-section > .table-wrap {
  max-height: none;
}

.agent-access-panel .access-section table {
  min-width: 820px;
}

.agent-access-panel .access-section th:nth-child(1),
.agent-access-panel .access-section td:nth-child(1) {
  width: 112px;
}

.agent-access-panel .access-section th:nth-child(2),
.agent-access-panel .access-section td:nth-child(2) {
  width: 240px;
}

.agent-access-panel .access-section th:nth-child(3),
.agent-access-panel .access-section td:nth-child(3) {
  width: 260px;
}

.agent-access-panel .access-section th:last-child,
.agent-access-panel .access-section td:last-child {
  width: 120px;
  white-space: nowrap;
}

.agent-access-panel .access-section:nth-child(2) table {
  min-width: 760px;
}

.agent-access-panel .access-section:nth-child(2) th:nth-child(3),
.agent-access-panel .access-section:nth-child(2) td:nth-child(3) {
  width: 170px;
}

.agent-access-panel .access-section td strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

#operationsRunQueue table {
  min-width: 1460px;
  table-layout: fixed;
}

#operationsRunQueue th:nth-child(1),
#operationsRunQueue td:nth-child(1) {
  width: 120px;
}

#operationsRunQueue th:nth-child(2),
#operationsRunQueue td:nth-child(2) {
  width: 210px;
}

#operationsRunQueue th:nth-child(3),
#operationsRunQueue td:nth-child(3) {
  width: 310px;
}

#operationsRunQueue th:nth-child(4),
#operationsRunQueue td:nth-child(4),
#operationsRunQueue th:nth-child(5),
#operationsRunQueue td:nth-child(5) {
  width: 120px;
}

#operationsRunQueue th:nth-child(6),
#operationsRunQueue td:nth-child(6) {
  width: 190px;
}

#operationsRunQueue th:nth-child(7),
#operationsRunQueue td:nth-child(7) {
  width: 150px;
}

#operationsRunQueue th:nth-child(8),
#operationsRunQueue td:nth-child(8) {
  width: 140px;
}

.jobs-panel table {
  min-width: 1480px;
}

.jobs-panel th:nth-child(1),
.jobs-panel td:nth-child(1) {
  width: 130px;
}

.jobs-panel th:nth-child(2),
.jobs-panel td:nth-child(2) {
  width: 230px;
}

.jobs-panel th:nth-child(3),
.jobs-panel td:nth-child(3),
.jobs-panel th:nth-child(4),
.jobs-panel td:nth-child(4),
.jobs-panel th:nth-child(5),
.jobs-panel td:nth-child(5),
.jobs-panel th:nth-child(6),
.jobs-panel td:nth-child(6),
.jobs-panel th:nth-child(7),
.jobs-panel td:nth-child(7) {
  width: 150px;
}

.jobs-panel th:nth-child(8),
.jobs-panel td:nth-child(8) {
  width: 150px;
}

.jobs-panel th:nth-child(9),
.jobs-panel td:nth-child(9) {
  width: 260px;
}

.exception-measure {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d6e4d9;
  border-radius: 999px;
  background: #f7faf6;
  color: #33423b;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.1;
  white-space: nowrap;
}

.exception-title-line .exception-measure {
  flex: 0 0 auto;
}

@media (max-width: 1500px) {
  .exception-list-wrap {
    max-height: none;
    overflow: visible;
  }

  .exception-list-head {
    display: none;
  }

  .exception-summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    min-width: 0;
  }

  .exception-card-grid {
    grid-template-columns:
      minmax(118px, 0.68fr)
      minmax(250px, 1.18fr)
      minmax(300px, 1.34fr);
    min-width: 0;
    gap: 16px;
  }

  .exception-inbox-card {
    border-bottom: 1px solid var(--line);
  }

  .exception-status-cell,
  .exception-owner-cell,
  .exception-actions-cell .row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .exception-owner-cell {
    grid-column: 1 / 2;
  }

  .exception-actions-cell {
    grid-column: 2 / -1;
  }

  .exception-actions-cell,
  .exception-actions-cell .action-menu {
    justify-items: start;
    justify-self: start;
  }

  .exception-actions-cell .row-actions {
    justify-content: flex-start;
  }

  .exception-actions-cell .action-menu-panel {
    right: auto;
    left: 0;
  }
}

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

  .topbar > .actions {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .workspace-select,
  .session-control,
  .topbar-icon {
    justify-self: stretch;
  }

  .workspace-select,
  .session-control {
    width: 100%;
    min-width: 0;
  }

  .session-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .session-identity {
    max-width: none;
  }

  .exception-list-wrap {
    max-height: none;
    overflow: visible;
  }

  .exception-summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    min-width: 0;
  }

  .exception-list-head {
    display: none;
  }

  .exception-card-grid {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 14px;
  }

  .exception-owner-cell,
  .exception-actions-cell {
    grid-column: auto;
  }

  .exception-inbox-card {
    border-bottom: 1px solid var(--line);
  }

  .exception-status-cell,
  .exception-owner-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .exception-actions-cell {
    justify-items: start;
  }

  .exception-actions-cell .row-actions {
    justify-content: flex-start;
  }

  .exception-actions-cell .action-menu-panel {
    right: auto;
    left: 0;
  }

  .exception-brief,
  .source-presence-grid,
  .exception-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .public-header,
  .workbench-hero,
  .workbench-section,
  .workbench-final,
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-header {
    align-items: start;
  }

  .public-nav,
  .public-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workbench-hero {
    min-height: 0;
  }

  .workbench-intro {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workbench-intro h1 {
    font-size: 64px;
  }

  .section-heading h2,
  .workbench-final h2,
  .auth-aside h1,
  .public-simple-hero h1 {
    font-size: 52px;
  }

  .workbench-final .button {
    justify-self: start;
  }

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

  .security-grid,
  .public-feature-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    width: min(304px, 86vw);
    transform: translateX(-105%);
    transition: transform 160ms ease-out;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(20, 22, 20, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease-out;
  }

  body.nav-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0 0 18px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .page-title-group,
  .actions {
    min-width: 0;
    width: 100%;
  }

  .menu-button {
    display: inline-flex;
  }

  .actions {
    justify-content: flex-start;
  }

  .topbar > .actions {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .workspace-select,
  .session-control,
  .topbar-icon {
    justify-self: stretch;
  }

  .workspace-select,
  .session-control {
    width: 100%;
    min-width: 0;
  }

  .session-identity {
    flex: 1 1 auto;
  }

  .session-control .button {
    flex: 0 0 auto;
  }

  .toolbar {
    justify-content: flex-start;
    min-width: 0;
  }

  .access-grid,
  .governance-grid,
  .split-table-grid,
  .file-preview-grid,
  .exception-brief,
  .source-presence-grid,
  .exception-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .compact-action-form {
    justify-content: flex-start;
    min-width: 0;
  }

  .session-identity {
    max-width: none;
  }

  .toolbar .search {
    width: 100%;
  }

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

  .details-list > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid #e7ebe5;
  }

  .details-list > div:last-child {
    border-bottom: 0;
  }

  .form-grid,
  .support-case-form,
  .integration-form,
  .access-form,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .public-header {
    position: static;
    gap: 10px;
    min-height: 0;
    padding: 14px;
  }

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

  .public-brand small {
    font-size: 11px;
  }

  .public-nav {
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .public-nav::-webkit-scrollbar {
    display: none;
  }

  .public-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .public-actions {
    width: 100%;
    flex-wrap: nowrap;
  }

  .public-actions .button {
    flex: 1 1 0;
    min-width: 0;
  }

  .workbench-intro,
  .recon-workbench,
  .workbench-section,
  .workbench-final,
  .auth-page {
    padding: 22px 16px;
  }

  .workbench-intro {
    gap: 16px;
  }

  .workbench-intro h1,
  .section-heading h2,
  .workbench-final h2,
  .auth-aside h1,
  .public-simple-hero h1 {
    font-size: 42px;
    line-height: 0.98;
  }

  .workbench-intro > p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.48;
  }

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

  .ledger-panels,
  .match-ticket,
  .workbench-strip,
  .method-grid,
  .source-grid,
  #sourcesGrid.source-grid,
  .exception-signal-grid,
  .control-table div,
  .auth-field-grid,
  .summary-grid,
  .analytics-grid,
  .stats-grid,
  .metric-grid,
  .security-grid,
  .public-feature-grid,
  .pricing-grid,
  .form-grid,
  .form-grid-wide,
  .support-case-form,
  .integration-form,
  .access-form,
  .settings-grid,
  .inline-admin-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench-strip span {
    min-height: 54px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .workbench-strip span:last-child {
    border-bottom: 0;
  }

  .row-snapshot-card dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .method-grid article {
    min-height: 164px;
  }

  .method-grid article strong {
    margin-top: 26px;
  }

  .dropzone,
  .panel-heading,
  .workbench-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dropzone-actions,
  .toolbar,
  .analytics-summary,
  .support-summary,
  .support-heading-actions {
    justify-content: flex-start;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1 1 0;
    min-width: 0;
  }

  .details-list {
    padding: 2px 16px 16px;
  }

  .exception-detail {
    padding: 16px;
  }

  .exception-summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .exception-brief-card h3 {
    font-size: 24px;
  }

  .exception-proof-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .details-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 12px 0;
  }

  .field-span {
    grid-column: auto;
  }

  .job-dialog .field-span {
    grid-column: auto;
  }

  .compact-action-form,
  .inline-admin-form .button {
    width: 100%;
  }

  .compact-action-form input,
  .compact-action-form .button,
  .inline-admin-form .button {
    width: 100%;
  }

  .wide {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .workbench-intro h1,
  .section-heading h2,
  .workbench-final h2,
  .auth-aside h1,
  .public-simple-hero h1 {
    font-size: 38px;
  }
}
