/**
 * App styles: Bootstrap-first.
 * This file only maps brand tokens to Bootstrap CSS variables, optional motion,
 * autofill normalization, and tiny non-layout utilities that have no Bootstrap equivalent.
 * Layout, spacing, typography, cards, grids, nav, and tables use Bootstrap classes in EJS.
 */
@import url("/branding/tokens/brand-tokens.css");

:root,
[data-bs-theme="light"] {
  --bs-body-font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bs-body-color: #11203f;
  --bs-body-bg: #eef4ff;
  --bs-primary: var(--as-blue-700);
  --bs-primary-rgb: 10, 77, 165;
  --bs-link-color: var(--as-blue-700);
  --bs-link-hover-color: #0c2d66;
  --bs-success: var(--as-green-500);
  --bs-success-rgb: 28, 158, 131;
  --bs-border-radius: 0.5rem;
  --bs-border-radius-lg: 0.65rem;
  --bs-border-radius-xl: 0.85rem;
  /* Portal data lists: alternating row/card surfaces */
  --aa-list-row-a: #ffffff;
  --aa-list-row-b: rgba(var(--bs-primary-rgb), 0.075);
  --aa-list-bar-primary: rgba(var(--bs-primary-rgb), 0.22);
  --aa-list-bar-success: rgba(var(--bs-success-rgb), 0.28);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes aa-fade-up {
    from {
      opacity: 0;
      transform: translateY(0.35rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .aa-animate-fade-up {
    animation: aa-fade-up 0.45s ease-out both;
  }
}

/* Keep autofill from fighting Bootstrap form control visuals */
input.form-control:-webkit-autofill,
textarea.form-control:-webkit-autofill,
select.form-select:-webkit-autofill {
  -webkit-text-fill-color: var(--bs-body-color);
  box-shadow: 0 0 0 1000px var(--bs-body-bg) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Logo sizing (brand assets; not layout grid) */
.brand-logo-nav {
  height: 2rem;
  width: auto;
}

.brand-logo-hero {
  max-width: min(20rem, 88vw);
  height: auto;
}

.brand-logo-footer {
  height: 2rem;
  width: auto;
}

.public-auth-brand-logo {
  height: 2.5rem;
  width: auto;
}

/* Chart helpers: data-driven fills stay inline on the element; only geometry here */
.aa-chart-donut {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Workspace surfaces — same visual weight as Bootstrap cards, using BS vars */
/* Keeps prior layout (two columns, padded panels) without abandoning cards. */
/* -------------------------------------------------------------------------- */

.sec-panel,
.portal-panel {
  background-color: var(--bs-card-bg, #fff);
  color: var(--bs-body-color);
  border: var(--bs-card-border-width, 1px) solid var(--bs-card-border-color, rgba(0, 0, 0, 0.125));
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-sm, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075));
  padding: 1.25rem 1.5rem;
}

.portal-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.portal-two-column > * {
  min-width: 0;
}

.portal-two-column.engagement-doc-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 991.98px) {
  .portal-two-column,
  .portal-two-column.engagement-doc-grid {
    grid-template-columns: 1fr;
  }
}

.portal-section {
  margin-bottom: 3rem;
}

.portal-panel-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.portal-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.portal-panel-copy {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0;
}

.portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.portal-toolbar-tight .document-toolbar-copy {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}

.portal-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bs-primary);
}

.portal-eyebrow--success {
  color: var(--bs-success);
}

.portal-toolbar-meta {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}

.portal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.portal-empty-message {
  color: var(--bs-secondary-color);
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Keep form action buttons consistent across pages. */
form .btn:not(.btn-sm),
.pub-auth-card .btn:not(.btn-sm),
.auth-post-submit-note + .action-bar .btn:not(.btn-sm) {
  --bs-btn-font-size: 0.92rem;
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-padding-x: 1rem;
}

.form-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  border-bottom: 1px solid var(--bs-border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--bs-border-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge-success {
  background-color: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}

.status-badge-warning {
  background-color: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

.status-badge-danger {
  background-color: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}

.status-badge-dark {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
}

.dashboard-table {
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  background-color: var(--bs-tertiary-bg);
  border-bottom: 2px solid var(--bs-border-color);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.dashboard-table tbody td {
  vertical-align: middle;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--bs-border-color-translucent, var(--bs-border-color));
}

.dashboard-table tbody tr:nth-child(odd) {
  background-color: var(--aa-list-row-a);
}

.dashboard-table tbody tr:nth-child(even) {
  background-color: var(--aa-list-row-b);
}

.dashboard-table tbody tr:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.06);
}

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

.document-worktable tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Stacked portal cards (approvals, subscriptions, activity, firm detail) */
.approval-card,
.timeline-card,
.approval-compact-card,
.watchlist-row {
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--bs-box-shadow-sm);
  background-color: var(--bs-card-bg, #fff);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.approval-card {
  border-color: rgba(var(--bs-primary-rgb), 0.14);
}

.vstack > .approval-card:nth-child(odd),
.vstack > .approval-compact-card:nth-child(odd),
.vstack > .timeline-card:nth-child(odd),
.vstack > .watchlist-row:nth-child(odd) {
  background:
    linear-gradient(90deg, var(--aa-list-bar-primary) 0, var(--aa-list-bar-primary) 0.3rem, transparent 0.3rem),
    var(--aa-list-row-a);
}

.vstack > .approval-card:nth-child(even),
.vstack > .approval-compact-card:nth-child(even),
.vstack > .timeline-card:nth-child(even),
.vstack > .watchlist-row:nth-child(even) {
  background:
    linear-gradient(90deg, var(--aa-list-bar-success) 0, var(--aa-list-bar-success) 0.3rem, transparent 0.3rem),
    var(--aa-list-row-b);
}

.vstack > .approval-card:hover,
.vstack > .approval-compact-card:hover,
.vstack > .timeline-card:hover,
.vstack > .watchlist-row:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.22);
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.08);
}

/* Findings, issues, billing history, engagement-documents rule grids */
.workflow-run-list,
.rule-selection-grid {
  display: grid;
  gap: 1rem;
}

.workflow-run-card,
.rule-selection-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl);
  box-shadow: var(--bs-box-shadow-sm);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.workflow-run-list > .workflow-run-card:nth-child(odd),
.rule-selection-grid > .rule-selection-card:nth-child(odd) {
  background:
    linear-gradient(90deg, var(--aa-list-bar-primary) 0, var(--aa-list-bar-primary) 0.28rem, transparent 0.28rem),
    var(--aa-list-row-a);
}

.workflow-run-list > .workflow-run-card:nth-child(even),
.rule-selection-grid > .rule-selection-card:nth-child(even) {
  background:
    linear-gradient(90deg, var(--aa-list-bar-success) 0, var(--aa-list-bar-success) 0.28rem, transparent 0.28rem),
    var(--aa-list-row-b);
}

.workflow-run-list > .workflow-run-card:hover,
.rule-selection-grid > .rule-selection-card:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.22);
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.08);
}

.rule-selection-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.55rem;
}

.rule-selection-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.rule-selection-details {
  margin-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.75rem;
}

.rule-selection-details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--bs-emphasis-color);
}

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

.rule-selection-details summary::after {
  content: "+";
  float: right;
  color: var(--bs-secondary-color);
}

.rule-selection-details[open] summary::after {
  content: "−";
}

.rule-selection-details-body {
  margin-top: 0.65rem;
}

.audit-rule-selection-list {
  display: grid;
  gap: 0.6rem;
}

.audit-rule-selection-item {
  padding: 0.65rem 0.75rem;
  border-radius: var(--bs-border-radius-lg);
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--bs-box-shadow-sm);
}

.audit-rule-selection-list > .audit-rule-selection-item:nth-child(odd) {
  background:
    linear-gradient(90deg, var(--aa-list-bar-primary) 0, var(--aa-list-bar-primary) 0.22rem, transparent 0.22rem),
    var(--aa-list-row-a);
}

.audit-rule-selection-list > .audit-rule-selection-item:nth-child(even) {
  background:
    linear-gradient(90deg, var(--aa-list-bar-success) 0, var(--aa-list-bar-success) 0.22rem, transparent 0.22rem),
    var(--aa-list-row-b);
}

/* Engagement documents — desk as stacked cards (clearer than a dense table) */
.document-desk-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.document-desk-card {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 1rem 1.15rem;
  background: var(--aa-list-row-a);
}

.document-desk-stack > .document-desk-card:nth-child(even) {
  background: var(--aa-list-row-b);
}

.document-desk-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--bs-border-color-translucent, var(--bs-border-color));
}

.document-desk-card-section {
  margin-top: 0.65rem;
}

.document-desk-upload {
  padding-top: 0.35rem;
}

/* Accordion rows — mobile-friendly (vertical, large tap targets, no tab overflow) */
.document-desk-accordion-toolbar {
  align-items: center;
}

.document-desk-accordion {
  padding: 0;
  overflow: hidden;
}

.document-desk-accordion > .document-desk-accordion-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.15rem;
  margin: 0;
  cursor: pointer;
  list-style: none;
  min-height: 2.75rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.document-desk-accordion[open] > .document-desk-accordion-summary {
  border-bottom-color: var(--bs-border-color-translucent, var(--bs-border-color));
}

.document-desk-accordion > .document-desk-accordion-summary::-webkit-details-marker {
  display: none;
}

.document-desk-accordion-summary-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.document-desk-accordion-title {
  display: block;
}

.document-desk-accordion-meta {
  display: block;
  font-weight: 500;
  margin-top: 0.2rem;
}

.document-desk-accordion-summary-status {
  flex-shrink: 0;
  text-align: end;
  margin-left: auto;
}

.document-desk-accordion-body {
  padding: 1rem 1.15rem 1.05rem;
}

.document-desk-accordion-body .document-desk-card-section:first-child {
  margin-top: 0;
}

.document-desk-accordion-body .document-desk-hint {
  margin-bottom: 0.75rem;
}

.document-desk-accordion-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  transition: transform 0.15s ease;
}

.document-desk-accordion-chevron::after {
  content: "";
  display: block;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--bs-body-color);
  border-bottom: 2px solid var(--bs-body-color);
  transform: translateY(-0.1rem) rotate(45deg);
}

.document-desk-accordion[open] .document-desk-accordion-chevron {
  transform: rotate(180deg);
}

.document-desk-hint summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.document-desk-hint summary::-webkit-details-marker {
  display: none;
}

.rule-selection-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
  margin-top: 0.85rem;
}

.rule-selection-field .form-label {
  margin-bottom: 0.25rem;
}

.rule-selection-action {
  display: flex;
  align-items: flex-end;
}

.rule-selection-action .btn {
  width: 100%;
}

.audit-rule-doc-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.5rem;
}

.audit-rule-doc-type-item {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
}

.data-highlight {
  border-radius: var(--bs-border-radius-lg);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
  background: rgba(var(--bs-primary-rgb), 0.06);
  padding: 0.85rem 1rem;
}

.data-highlight-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bs-primary);
  margin-bottom: 0.35rem;
}

.portal-disclosure {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-card-bg, #fff);
  box-shadow: var(--bs-box-shadow-sm);
  margin-bottom: 1rem;
}

.portal-disclosure summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 1rem;
  list-style-position: outside;
}

.portal-disclosure-body {
  padding: 0 1rem 1rem;
}

.document-rule-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: var(--bs-border-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

.document-rule-chip.is-active {
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}

.document-rule-chip.is-idle {
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
}

.portal-stat-card--tone-success {
  border-top: 3px solid var(--bs-success);
}

.portal-stat-card--tone-warning {
  border-top: 3px solid var(--bs-warning);
}

.portal-stat-card--tone-danger {
  border-top: 3px solid var(--bs-danger);
}

.dashboard-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.95fr);
}

.dashboard-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-primary-rgb), 0.03)),
    var(--bs-card-bg, #fff);
}

.dashboard-stage-title {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.2;
  margin: 0.45rem 0 0.85rem;
  font-weight: 800;
}

.dashboard-stage-copy {
  color: var(--bs-secondary-color);
  max-width: 48rem;
  margin-bottom: 1rem;
}

.dashboard-health-card {
  display: flex;
  flex-direction: column;
}

.dashboard-health-list {
  display: grid;
  gap: 0.85rem;
}

.dashboard-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.85rem 1rem;
}

.dashboard-health-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}

.dashboard-health-value {
  font-weight: 700;
  color: var(--bs-body-color);
}

.workspace-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.workspace-shortcut-card {
  background: var(--bs-card-bg, #fff);
  border: 1px solid var(--bs-card-border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 1.1rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1rem;
  align-items: start;
}

.workspace-shortcut-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}

.workspace-shortcut-body {
  min-width: 0;
}

.workspace-shortcut-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.workspace-shortcut-copy {
  font-size: 0.88rem;
  color: var(--bs-secondary-color);
}

.workspace-shortcut-action {
  grid-column: 1 / -1;
}

.engagement-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.engagement-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-success-rgb), 0.15), rgba(var(--bs-success-rgb), 0.03)),
    var(--bs-card-bg, #fff);
}

.engagement-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.engagement-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.engagement-health-list {
  display: grid;
  gap: 0.75rem;
}

.engagement-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.engagement-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.engagement-health-value {
  font-weight: 700;
}

.document-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.document-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.14), rgba(var(--bs-primary-rgb), 0.03)),
    var(--bs-card-bg, #fff);
}

.document-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.document-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.document-health-list {
  display: grid;
  gap: 0.75rem;
}

.document-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.document-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.document-health-value {
  font-weight: 700;
}

.rules-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.rules-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-success-rgb), 0.05)),
    var(--bs-card-bg, #fff);
}

.rules-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.rules-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.rules-health-list {
  display: grid;
  gap: 0.75rem;
}

.rules-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.rules-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.rules-health-value {
  font-weight: 700;
}

.findings-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.findings-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-warning-rgb), 0.2), rgba(var(--bs-primary-rgb), 0.04)),
    var(--bs-card-bg, #fff);
}

.findings-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.findings-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.findings-health-list {
  display: grid;
  gap: 0.75rem;
}

.findings-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.findings-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.findings-health-value {
  font-weight: 700;
}

.issues-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.issues-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-danger-rgb), 0.14), rgba(var(--bs-primary-rgb), 0.04)),
    var(--bs-card-bg, #fff);
}

.issues-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.issues-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.issues-health-list {
  display: grid;
  gap: 0.75rem;
}

.issues-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.issues-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.issues-health-value {
  font-weight: 700;
}

.users-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.users-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-info-rgb), 0.16), rgba(var(--bs-primary-rgb), 0.04)),
    var(--bs-card-bg, #fff);
}

.users-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.users-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.users-health-list {
  display: grid;
  gap: 0.75rem;
}

.users-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.users-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.users-health-value {
  font-weight: 700;
}

.clients-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.clients-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-success-rgb), 0.15), rgba(var(--bs-primary-rgb), 0.04)),
    var(--bs-card-bg, #fff);
}

.clients-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.clients-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.clients-health-list {
  display: grid;
  gap: 0.75rem;
}

.clients-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.clients-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.clients-health-value {
  font-weight: 700;
}

.billing-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.billing-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.13), rgba(var(--bs-warning-rgb), 0.06)),
    var(--bs-card-bg, #fff);
}

.billing-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.billing-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.billing-health-list {
  display: grid;
  gap: 0.75rem;
}

.billing-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.billing-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.billing-health-value {
  font-weight: 700;
}

.tenant-rules-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.tenant-rules-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-success-rgb), 0.05)),
    var(--bs-card-bg, #fff);
}

.tenant-rules-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.tenant-rules-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.tenant-rules-health-list {
  display: grid;
  gap: 0.75rem;
}

.tenant-rules-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.tenant-rules-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.tenant-rules-health-value {
  font-weight: 700;
}

.rules-command-card {
  padding: 1rem 1.05rem;
  background:
    linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.06), rgba(var(--bs-primary-rgb), 0.02)),
    var(--bs-card-bg, #fff);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.11);
}

.rules-command-grid {
  display: grid;
  gap: 1rem;
}

.rules-command-stage {
  border-radius: var(--bs-border-radius-lg);
  background: rgba(var(--bs-body-bg-rgb), 0.78);
  padding: 0.85rem 0.9rem;
}

.rules-command-stage :is(.document-stage-title, .rules-stage-title, .tenant-rules-stage-title, .ops-stage-title) {
  margin-top: 0.4rem;
  margin-bottom: 0.7rem;
}

.rules-command-stage :is(.document-stage-copy, .rules-stage-copy, .tenant-rules-stage-copy, .ops-stage-copy) {
  margin-bottom: 0.95rem;
  max-width: 68ch;
}

.rules-command-health {
  border-top: 1px solid rgba(var(--bs-border-color-rgb), 0.8);
  padding-top: 0.85rem;
  border-radius: var(--bs-border-radius-lg);
  background: rgba(var(--bs-tertiary-bg-rgb), 0.58);
  padding: 0.85rem 0.85rem;
}

.rules-command-health :is(.document-health-list, .rules-health-list, .tenant-rules-health-list, .ops-health-list, .engagement-health-list, .users-health-list, .clients-health-list, .findings-health-list, .issues-health-list, .billing-health-list, .dashboard-health-list) {
  gap: 0.65rem;
}

.rules-command-health :is(.document-health-item, .rules-health-item, .tenant-rules-health-item, .ops-health-item, .engagement-health-item, .users-health-item, .clients-health-item, .findings-health-item, .issues-health-item, .billing-health-item, .dashboard-health-item) {
  padding: 0.72rem 0.88rem;
}

.rules-command-health :is(.document-health-label, .rules-health-label, .tenant-rules-health-label, .ops-health-label, .engagement-health-label, .users-health-label, .clients-health-label, .findings-health-label, .issues-health-label, .billing-health-label, .dashboard-health-label) {
  font-size: 0.68rem;
  letter-spacing: 0.075em;
}

@media (min-width: 992px) {
  .rules-command-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.8fr);
    align-items: start;
    gap: 1.15rem;
  }

  .rules-command-health {
    border-top: none;
    border-left: 1px solid rgba(var(--bs-border-color-rgb), 0.8);
    padding: 0.9rem 0.9rem 0.9rem 1rem;
  }
}

.ops-stage-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.95fr);
}

.ops-stage-card {
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.11), rgba(var(--bs-info-rgb), 0.05)),
    var(--bs-card-bg, #fff);
}

.ops-stage-title {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
  margin: 0.45rem 0 0.75rem;
  font-weight: 800;
}

.ops-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.ops-health-list {
  display: grid;
  gap: 0.75rem;
}

.ops-health-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  padding: 0.8rem 0.95rem;
}

.ops-health-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}

.ops-health-value {
  font-weight: 700;
}

/* Auth marketing card (register / login) — same surface as .card */
.pub-auth-card {
  background: var(--bs-card-bg, #fff);
  border: 1px solid var(--bs-card-border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 2rem 1.75rem;
}

@media (min-width: 576px) {
  .pub-auth-card {
    padding: 2.25rem 2rem;
  }
}

.pub-auth-card--wide {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.pub-auth-card--narrow {
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
}

.pub-auth-card--unified {
  max-width: 72rem;
  margin: 0 auto;
}

.pub-auth-unified-grid {
  display: grid;
  gap: 1rem;
}

.pub-auth-unified-form {
  min-width: 0;
  border-radius: calc(var(--bs-border-radius-lg) - 0.15rem);
  background: linear-gradient(160deg, rgba(var(--bs-primary-rgb), 0.03), rgba(var(--bs-primary-rgb), 0.01));
  padding: 0.85rem 0.8rem;
}

.pub-auth-unified-info .pub-auth-info-panel {
  background: linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.08), rgba(var(--bs-info-rgb), 0.04));
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  box-shadow: none;
  border-radius: calc(var(--bs-border-radius-lg) - 0.15rem);
  padding: 0.95rem 0.95rem;
}

.pub-auth-info-panel {
  background: linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-info-rgb), 0.06)), #fff;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.14);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 1.35rem 1.25rem;
}

.pub-auth-info-title {
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 0.6rem;
  color: var(--bs-emphasis-color);
}

.pub-auth-info-copy {
  color: var(--bs-secondary-color);
  margin: 0 0 0.95rem;
}

.pub-auth-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.pub-auth-info-list li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.55rem;
  align-items: start;
  color: #203454;
  font-size: 0.9rem;
}

.pub-auth-info-list i {
  color: var(--bs-primary);
  margin-top: 0.1rem;
}

@media (min-width: 992px) {
  .pub-auth-unified-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 1.4rem;
  }

  .pub-auth-unified-info {
    border-right: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    padding-right: 1.15rem;
  }

  .pub-auth-unified-form {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

.pub-auth-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pub-auth-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--bs-border-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  font-size: 1.35rem;
}

.pub-auth-title {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--bs-emphasis-color);
  margin-bottom: 0.5rem;
}

.pub-auth-lead {
  font-size: 0.95rem;
  color: var(--bs-secondary-color);
  line-height: 1.55;
  margin-bottom: 0;
}

.pub-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.pub-kicker--accent {
  color: var(--bs-primary);
}

.pub-stage-shell {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  background:
    linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-primary-rgb), 0.03)),
    var(--bs-card-bg, #fff);
  border-radius: var(--bs-border-radius-xl);
  padding: 1.2rem 1.25rem;
}

.pub-stage-shell--compact {
  margin-bottom: 1rem;
}

.pub-stage-title {
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  color: var(--bs-emphasis-color);
}

.pub-stage-copy {
  color: var(--bs-secondary-color);
  margin-bottom: 0;
}

/* Public marketing shell */
.public-shell--marketing-v3 {
  background:
    radial-gradient(circle at 8% -8%, rgba(var(--bs-primary-rgb), 0.14), transparent 32%),
    radial-gradient(circle at 92% -12%, rgba(var(--bs-success-rgb), 0.12), transparent 30%),
    #edf3ff;
}

.public-topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(var(--bs-border-color-rgb), 0.55);
}

.public-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.public-topbar-link {
  color: var(--bs-secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.public-topbar-link.active,
.public-topbar-link:hover {
  color: var(--bs-emphasis-color);
}

.public-topbar-center {
  gap: 0.25rem;
}

.public-header-scrolled {
  box-shadow: 0 0.45rem 1.1rem rgba(15, 23, 42, 0.08);
}

.public-site-main {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

.pub-section {
  margin-bottom: 1.4rem;
}

.pub-surface {
  background: #fff;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.72);
  border-radius: 1rem;
  box-shadow:
    0 0.45rem 1rem rgba(15, 23, 42, 0.06),
    0 1.1rem 2rem rgba(15, 23, 42, 0.04);
}

.pub-surface--pad {
  padding: 1.2rem 1.25rem;
}

.pub-h1 {
  font-size: clamp(1.75rem, 2.55vw, 2.75rem);
  line-height: 1.14;
  font-weight: 800;
  margin-bottom: 0.7rem;
  color: #0f1f40;
}

.pub-h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 0.55rem;
  color: #13264a;
}

.pub-h3 {
  font-size: 1.12rem;
  line-height: 1.28;
  font-weight: 750;
  margin-bottom: 0.35rem;
  color: #162c53;
}

.pub-lead {
  color: #2d3f60;
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 42rem;
}

.pub-text {
  color: var(--bs-secondary-color);
  line-height: 1.55;
}

.pub-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.pub-metric {
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.75);
  border-radius: 0.75rem;
  padding: 0.65rem 0.7rem;
  background: rgba(var(--bs-primary-rgb), 0.03);
}

.pub-metric-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.pub-metric-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bs-emphasis-color);
}

.pub-mini-stat {
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.75);
  border-radius: 0.7rem;
  background: rgba(var(--bs-primary-rgb), 0.02);
  padding: 0.7rem 0.75rem;
}

.pub-cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

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

.pub-cap-card {
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.75);
  border-radius: 0.9rem;
  padding: 0.95rem;
  background: #fff;
}

.pub-cap-card-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), 0.11);
  color: var(--bs-primary);
  margin-bottom: 0.55rem;
}

.pub-plan-card,
.pub-faq-item,
.pub-teaser,
.pub-notice {
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.8);
  border-radius: 0.95rem;
  background: #fff;
}

.pub-plan-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
}

.pub-plan-spec {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

.pub-plan-spec i {
  color: var(--bs-primary);
  margin-top: 0.1rem;
}

.pub-faq-item {
  padding: 0.95rem 1rem;
}

.pub-faq-q {
  font-weight: 800;
  color: var(--bs-emphasis-color);
  margin-bottom: 0.35rem;
}

.pub-faq-a {
  margin-bottom: 0;
  color: var(--bs-secondary-color);
  line-height: 1.52;
}

.pub-cta {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.16);
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  background:
    linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.09), rgba(var(--bs-success-rgb), 0.03)),
    #fff;
  box-shadow:
    0 0.6rem 1.2rem rgba(15, 23, 42, 0.07),
    0 1.4rem 2.2rem rgba(15, 23, 42, 0.05);
}

.pub-teaser {
  padding: 0.85rem 0.95rem;
}

.public-footer-v2 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92)),
    var(--bs-body-bg);
  border-top: 1px solid rgba(var(--bs-border-color-rgb), 0.7);
}

.public-footer-shell {
  border-top-left-radius: 1.1rem;
  border-top-right-radius: 1.1rem;
}

.footer-lead {
  max-width: 31rem;
  color: #3d4f70;
}

.footer-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
  font-weight: 560;
}

.footer-link:hover {
  color: var(--bs-emphasis-color);
}

.footer-heading {
  color: #1b315a;
  letter-spacing: 0.08em;
}

.footer-link-static {
  color: #5a6c8d;
  font-weight: 500;
}

.site-footer-bar {
  border-top: 1px dashed rgba(var(--bs-border-color-rgb), 0.8);
}

.pub-auth-card--wide {
  max-width: 64rem;
}

.public-auth-register-container {
  max-width: 1540px;
  margin-left: auto;
  margin-right: auto;
}

.public-shell-auth-register .pub-auth-card--wide {
  max-width: none;
  width: 100%;
}

.public-shell-auth-register .pub-auth-card {
  padding: 1.6rem 1.5rem;
}

@media (min-width: 992px) {
  .public-shell-auth-register .pub-auth-card {
    padding: 1.9rem 2rem;
  }
}

.auth-trust-strip {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.auth-trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #3c4f72;
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.75);
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.05);
  padding: 0.28rem 0.58rem;
}

.auth-trust-strip i {
  color: var(--bs-primary);
}

.form-section-title-auth {
  margin-bottom: 0.4rem;
}

.auth-section-copy {
  margin: 0;
  font-size: 0.86rem;
  color: var(--bs-secondary-color);
}

.auth-form-register {
  row-gap: 0.85rem !important;
}

.auth-form-register .form-label {
  margin-bottom: 0.3rem;
}

.auth-form .form-control-lg,
.auth-form .form-select-lg {
  min-height: 2.75rem;
}

.auth-form-register .form-control-lg,
.auth-form-register .form-select-lg {
  min-height: 2.6rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.auth-login-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #49608b;
}

.auth-post-submit-note {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  color: #4c607f;
  font-size: 0.84rem;
}

.auth-post-submit-note i {
  color: var(--bs-primary);
  margin-right: 0.35rem;
}

@media (max-width: 991.98px) {
  .pub-cap-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 575.98px) {
  .pub-cap-grid,
  .pub-cap-grid--4 {
    grid-template-columns: 1fr;
  }

  .pub-surface--pad {
    padding: 1rem 0.9rem;
  }
}

/* Homepage refresh: stronger cards + depth */
.pub-landing--cards .pub-surface {
  border-radius: 1rem;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  box-shadow:
    0 0.5rem 1.25rem rgba(15, 23, 42, 0.08),
    0 1.5rem 2.75rem rgba(15, 23, 42, 0.06);
}

.pub-landing--cards .pub-marketing-sideboard,
.pub-landing--cards .pub-feature-row,
.pub-landing--cards .pub-mini-stat,
.pub-landing--cards .pub-plan-card,
.pub-landing--cards .pub-faq-item,
.pub-landing--cards .pub-teaser,
.pub-landing--cards .pub-notice,
.pub-landing--cards .pub-cta {
  box-shadow:
    0 0.4rem 1rem rgba(15, 23, 42, 0.08),
    0 1.2rem 2.2rem rgba(15, 23, 42, 0.05);
}

.pub-landing--cards .pub-feature-row,
.pub-landing--cards .pub-mini-stat,
.pub-landing--cards .pub-faq-item,
.pub-landing--cards .pub-teaser {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
}

/* Login page: force fit inside viewport without scroll */
.public-shell-auth-login-fit {
  height: 100vh;
  overflow: hidden;
}

.public-shell-auth-login-fit .public-auth-brand-bar {
  padding-top: 1.1rem !important;
  padding-bottom: 0.65rem !important;
}

.public-shell-auth-login-fit .public-auth-brand-logo {
  max-height: 2rem;
}

.public-shell-auth-login-fit .public-auth-login-main {
  display: flex;
  justify-content: center;
  align-items: center;
}

.public-shell-auth-recovery-fit {
  height: 100vh;
  overflow: hidden;
}

.public-shell-auth-recovery-fit .public-auth-brand-bar {
  padding-top: 1rem !important;
  padding-bottom: 0.6rem !important;
}

.public-shell-auth-recovery-fit .public-auth-brand-logo {
  max-height: 2rem;
}

.public-shell-auth-recovery-fit .public-auth-recovery-main {
  display: flex;
  justify-content: center;
  align-items: center;
}

.public-shell-auth-recovery-fit .pub-auth-card {
  padding: 1.3rem 1.15rem;
}

.public-shell-auth-recovery-fit .pub-auth-head {
  margin-bottom: 0.85rem;
}

.public-shell-auth-recovery-fit .pub-auth-footer {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

.public-shell-error-fit .public-error-main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.public-shell-error-fit .public-site-main > .container {
  width: 100%;
}

.public-shell-error-fit .pub-surface--pad {
  padding: 1.45rem 1.3rem;
}

.error-page-wrap {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-height: calc(100vh - 8.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-page-card {
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
}

.error-page-home-btn {
  --bs-btn-font-size: 0.92rem;
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-padding-x: 1rem;
}

.public-shell-error-fit .public-topbar {
  min-height: 3.25rem;
}

.public-shell-error-fit .public-footer-v2 {
  padding-top: 0;
}

.public-shell-error-fit .public-footer-shell {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

@media (max-width: 767.98px) {
  .error-page-wrap {
    min-height: calc(100vh - 7.75rem);
  }
}

.public-shell-auth-login-fit .pub-auth-card {
  padding: 1.35rem 1.2rem;
}

.public-shell-auth-login-fit .pub-auth-head {
  margin-bottom: 0.9rem;
}

.public-shell-auth-login-fit .pub-auth-footer {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

@media (min-width: 576px) {
  .public-shell-auth-login-fit .pub-auth-card {
    padding: 1.55rem 1.45rem;
  }

  .public-shell-auth-recovery-fit .pub-auth-card {
    padding: 1.5rem 1.4rem;
  }
}

.pub-home-v4 .pub-home-hero-shell {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.16);
  border-radius: 1.15rem;
  box-shadow:
    0 0.65rem 1.45rem rgba(15, 23, 42, 0.08),
    0 1.8rem 3.25rem rgba(15, 23, 42, 0.07);
  background:
    radial-gradient(circle at top right, rgba(var(--bs-primary-rgb), 0.16), transparent 48%),
    linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.07), rgba(var(--bs-success-rgb), 0.03)),
    var(--bs-card-bg, #fff);
}

.pub-home-v4 .pub-home-hero-title {
  max-width: 38rem;
}

.pub-home-command-card {
  background: var(--bs-body-bg);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.14);
  border-radius: 1rem;
  padding: 1rem 1rem 0.95rem;
  box-shadow:
    0 0.45rem 1.1rem rgba(15, 23, 42, 0.08),
    0 1.1rem 2rem rgba(15, 23, 42, 0.06);
}

.pub-home-command-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.pub-home-command-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 0.2rem;
  margin-bottom: 0.75rem;
}

.pub-home-command-list {
  display: grid;
  gap: 0.55rem;
}

.pub-home-command-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
}

.pub-home-command-item i {
  margin-top: 0.15rem;
  color: var(--bs-primary);
}

.pub-home-outcome-card {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  border-radius: 0.95rem;
  background: var(--bs-body-bg);
  padding: 1rem;
  box-shadow:
    0 0.35rem 0.95rem rgba(15, 23, 42, 0.07),
    0 0.95rem 1.75rem rgba(15, 23, 42, 0.05);
}

.pub-home-outcome-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}

.pub-home-flow-list {
  display: grid;
  gap: 0.65rem;
}

.pub-home-flow-item {
  border: 1px solid rgba(var(--bs-border-color-rgb), 0.7);
  border-radius: 0.85rem;
  padding: 0.7rem 0.8rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: var(--bs-body-bg);
}

.pub-home-flow-item span {
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.12);
}

.pub-home-flow-item p {
  margin: 0.1rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.92rem;
}

/* —— Toast notifications (top-right, auto-dismiss + animated timer) —— */
.flash-alert-stack {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 1085;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-width: 100%;
  pointer-events: none;
}

.flash-alert {
  position: relative;
  width: 100%;
  max-width: 22.5rem;
  border-radius: var(--bs-border-radius-xl);
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  box-shadow:
    0 0.35rem 1rem rgba(15, 23, 42, 0.08),
    0 1.25rem 2.5rem rgba(15, 23, 42, 0.06);
  overflow: hidden;
  pointer-events: auto;
  animation: flashToastIn 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flash-alert.is-closing {
  animation: flashToastOut 240ms ease-in forwards;
}

.flash-alert-progress {
  position: relative;
  min-height: 1.55rem;
  padding: 0.4rem 0.75rem 0.38rem;
}

.flash-alert-timer-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.3rem;
  background: var(--bs-tertiary-bg);
  overflow: hidden;
}

.flash-alert-timer-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  border-radius: 0 2px 2px 0;
}

.flash-alert-timer-fill.is-running {
  animation-name: flashAlertTimerShrink;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.flash-alert-timer-shine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0.85;
  pointer-events: none;
  animation: flashTimerShine 1.35s ease-in-out infinite;
}

.flash-alert-countdown {
  position: absolute;
  top: 0.35rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  color: var(--bs-secondary-color);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.flash-alert-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 0.85rem;
  align-items: start;
  padding: 0.85rem 0.95rem 0.95rem;
}

.flash-alert-icon {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.flash-alert-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--bs-emphasis-color);
  margin-bottom: 0.15rem;
  line-height: 1.25;
}

.flash-alert-message {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  line-height: 1.45;
}

.flash-alert-dismiss {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.flash-alert-dismiss:hover,
.flash-alert-dismiss:focus-visible {
  background: var(--bs-secondary-bg);
  color: var(--bs-emphasis-color);
}

.flash-alert-dismiss:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.45);
  outline-offset: 2px;
}

.flash-alert-success {
  border-color: rgba(25, 135, 84, 0.35);
  background: linear-gradient(165deg, rgba(25, 135, 84, 0.07), var(--bs-body-bg) 42%);
}

.flash-alert-success .flash-alert-icon {
  background: rgba(25, 135, 84, 0.15);
  color: rgb(21, 115, 71);
}

.flash-alert-success .flash-alert-timer-fill {
  background: linear-gradient(90deg, rgb(32, 145, 88), rgb(60, 185, 120));
}

.flash-alert-success .flash-alert-countdown {
  color: rgb(21, 115, 71);
  border-color: rgba(25, 135, 84, 0.25);
}

.flash-alert-danger {
  border-color: rgba(220, 53, 69, 0.38);
  background: linear-gradient(165deg, rgba(220, 53, 69, 0.06), var(--bs-body-bg) 42%);
}

.flash-alert-danger .flash-alert-icon {
  background: rgba(220, 53, 69, 0.12);
  color: rgb(176, 42, 55);
}

.flash-alert-danger .flash-alert-timer-fill {
  background: linear-gradient(90deg, rgb(185, 48, 62), rgb(220, 90, 105));
}

.flash-alert-danger .flash-alert-countdown {
  color: rgb(150, 35, 48);
  border-color: rgba(220, 53, 69, 0.28);
}

.flash-alert-warning {
  border-color: rgba(255, 193, 7, 0.45);
  background: linear-gradient(165deg, rgba(255, 193, 7, 0.1), var(--bs-body-bg) 42%);
}

.flash-alert-warning .flash-alert-icon {
  background: rgba(255, 193, 7, 0.2);
  color: rgb(120, 78, 10);
}

.flash-alert-warning .flash-alert-timer-fill {
  background: linear-gradient(90deg, rgb(200, 145, 40), rgb(235, 190, 80));
}

.flash-alert-warning .flash-alert-countdown {
  color: rgb(102, 77, 3);
  border-color: rgba(200, 150, 40, 0.35);
}

.flash-alert-info {
  border-color: rgba(13, 110, 253, 0.28);
  background: linear-gradient(165deg, rgba(13, 110, 253, 0.06), var(--bs-body-bg) 42%);
}

.flash-alert-info .flash-alert-icon {
  background: rgba(13, 110, 253, 0.1);
  color: rgb(10, 88, 202);
}

.flash-alert-info .flash-alert-timer-fill {
  background: linear-gradient(90deg, rgb(13, 110, 253), rgb(70, 140, 255));
}

.flash-alert-info .flash-alert-countdown {
  color: rgb(10, 88, 202);
  border-color: rgba(13, 110, 253, 0.25);
}

@keyframes flashToastIn {
  from {
    opacity: 0;
    transform: translate3d(12px, -6px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes flashToastOut {
  to {
    opacity: 0;
    transform: translate3d(14px, -4px, 0) scale(0.97);
  }
}

@keyframes flashAlertTimerShrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@keyframes flashTimerShine {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(260%);
    opacity: 0;
  }
}

@media (max-width: 575.98px) {
  .flash-alert-stack {
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: max(0.5rem, env(safe-area-inset-left, 0px));
    width: auto;
    align-items: stretch;
  }

  .flash-alert {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-alert,
  .flash-alert.is-closing {
    animation: none !important;
  }

  .flash-alert-timer-fill.is-running,
  .flash-alert-timer-shine {
    animation: none !important;
  }
}

/* Engagement documents — parse & check detail modal */
.batch-detail-modal .modal-content {
  border-radius: var(--bs-border-radius-xl);
  overflow: hidden;
}

.batch-detail-hero {
  border-radius: var(--bs-border-radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.batch-detail-hero--ok {
  border-color: rgba(25, 135, 84, 0.35);
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.08), rgba(25, 135, 84, 0.02));
}

.batch-detail-hero--warning {
  border-color: rgba(255, 193, 7, 0.45);
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 193, 7, 0.03));
}

.batch-detail-hero--danger {
  border-color: rgba(220, 53, 69, 0.45);
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.02));
}

.batch-detail-hero-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.batch-detail-section {
  margin-bottom: 1.35rem;
}

.batch-detail-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.65rem;
}

.batch-detail-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}

.batch-detail-pill--success {
  border-color: rgba(25, 135, 84, 0.45);
  color: rgb(21, 115, 71);
  background: rgba(25, 135, 84, 0.1);
}

.batch-detail-pill--danger {
  border-color: rgba(220, 53, 69, 0.45);
  color: rgb(176, 42, 55);
  background: rgba(220, 53, 69, 0.1);
}

.batch-detail-pill--warning {
  border-color: rgba(255, 193, 7, 0.55);
  color: rgb(102, 77, 3);
  background: rgba(255, 193, 7, 0.15);
}

.batch-detail-pill--info {
  border-color: rgba(13, 110, 253, 0.35);
  color: rgb(10, 88, 202);
  background: rgba(13, 110, 253, 0.08);
}

.batch-detail-pill--muted {
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
}

.batch-detail-issue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.batch-detail-issue {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.75rem 0.85rem;
  background: var(--bs-body-bg);
}

.batch-detail-issue-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  margin-left: 0.35rem;
  color: var(--bs-secondary-color);
}

.batch-detail-issue-msg {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.batch-detail-nested {
  margin-top: 0.5rem;
}

.batch-detail-nested summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bs-primary);
}

.batch-detail-json {
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0.65rem 0.75rem;
  border-radius: var(--bs-border-radius);
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  max-height: 16rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.batch-detail-job-card {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.85rem 0.95rem;
  background: var(--bs-body-bg);
}

.batch-detail-upload-block {
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
}

.batch-detail-upload-block:last-child {
  margin-bottom: 0;
}

.batch-detail-dataset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.batch-detail-dataset-row:last-child {
  border-bottom: 0;
}

.batch-detail-alert {
  font-size: 0.88rem;
}

