:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --surface-raised: #ffffff;
  --ink: #102033;
  --muted: #5c6c7d;
  --line: #d5e2f0;
  --brand: #0050a8;
  --brand-strong: #003f86;
  --accent: #1473d2;
  --ok: #177245;
  --warn: #b42318;
  --info: #0050a8;
  --attention: #9a6700;
  --neutral: #667085;
  --chart-blue: #0050a8;
  --chart-teal: #1473d2;
  --chart-amber: #6e9bc7;
  --chart-red: #274d73;
  --chart-gray: #77808d;
  --shadow: 0 10px 28px rgba(0, 55, 112, 0.08);
}

/* Patch 1.18.1: professional, backend-first Consultation filters. */
.consultation-filter-shell {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  overflow: visible;
}

.consultation-filter-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

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

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

.filter-section-heading h3,
.filter-section-heading p {
  margin: 0;
}

.filter-section-heading h3 {
  color: var(--ink);
  font-size: .86rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.filter-section-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
}

.consultation-main-grid {
  display: grid;
  grid-template-columns: minmax(130px, 2fr) minmax(190px, 3fr) minmax(150px, 2fr) minmax(280px, 5fr);
  gap: 12px;
  align-items: start;
}

.consultation-search-field input {
  width: 100%;
}

.status-section {
  position: relative;
  z-index: 8;
}

.status-filter-popover {
  position: relative;
  width: min(320px, 100%);
}

.status-filter-popover > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.status-filter-popover > summary::-webkit-details-marker { display: none; }
.status-filter-popover > summary::after { content: "⌄"; color: var(--muted); }
.status-filter-popover[open] > summary { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }

.status-popover-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(360px, calc(100vw - 48px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.status-search-field { margin-bottom: 8px; }
.status-filter-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.status-filter-actions .ghost { padding: 6px 9px; font-size: .75rem; }
.status-checkbox-list { display: grid; grid-template-columns: 1fr; gap: 5px; max-height: 240px; overflow: auto; padding-right: 4px; }

.status-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.filter-chip,
.filter-chip-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  color: var(--ink);
  font-size: .75rem;
}

.filter-chip { cursor: pointer; }
.filter-chip-more { color: var(--muted); }

.compact-action { padding: 7px 10px; }
.date-filter-list { display: grid; gap: 9px; }

.date-filter-row {
  display: grid;
  grid-template-columns: 28px minmax(180px, 2fr) minmax(145px, 1.3fr) minmax(145px, 1fr) minmax(145px, 1fr) 38px;
  gap: 10px;
  align-items: end;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
}

.date-filter-index {
  align-self: center;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.date-filter-single { grid-column: 4; }
.date-filter-no-value { grid-column: 4 / 6; align-self: center; color: var(--muted); font-size: .8rem; }
.date-filter-remove { grid-column: 6; align-self: end; color: var(--muted); }
.date-filter-remove:hover { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.date-filter-empty { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }

.consultation-sort-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  max-width: 640px;
}

.consultation-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.applied-filter-count {
  margin-right: auto;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.live-pill.is-synced {
  background: color-mix(in srgb, var(--neutral) 12%, var(--surface));
  color: var(--neutral);
}

@media (max-width: 1050px) {
  .consultation-main-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-filter-row { grid-template-columns: 28px repeat(2, minmax(0, 1fr)) 38px; }
  .date-filter-row > .field:nth-of-type(n+3), .date-filter-single { grid-column: auto; }
  .date-filter-no-value { grid-column: 2 / 4; }
  .date-filter-remove { grid-column: 4; grid-row: 1; }
}

@media (max-width: 680px) {
  .consultation-filter-section { padding: 14px; }
  .consultation-main-grid,
  .consultation-sort-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-section-heading { align-items: flex-start; flex-direction: column; }
  .filter-section-heading .compact-action { width: 100%; }
  .date-filter-row { grid-template-columns: 28px minmax(0, 1fr) 38px; align-items: stretch; }
  .date-filter-row > .field,
  .date-filter-single,
  .date-filter-no-value { grid-column: 2; }
  .date-filter-remove { grid-column: 3; grid-row: 1; }
  .consultation-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .applied-filter-count { grid-column: 1 / -1; }
  .consultation-form-actions .primary { width: 100%; }
}

/* Patch 1.18.0: backend-driven consultations. */
.status-filter-field {
  min-width: 250px;
  max-width: 360px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.status-filter-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.status-filter-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.status-filter-actions .ghost {
  padding: 5px 8px;
  font-size: .72rem;
}

.status-checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  max-height: 120px;
  overflow: auto;
}

.query-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.sla-breach-strip {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, #ef4444 55%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, #ef4444 10%, transparent);
}

.sla-breach-strip > strong {
  display: block;
  margin-bottom: 8px;
  color: #ef4444;
}

.sla-breach-strip > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sla-breach-button {
  border: 1px solid color-mix(in srgb, #ef4444 45%, var(--line));
  border-radius: 999px;
  padding: 6px 10px;
  color: inherit;
  background: var(--panel);
  cursor: pointer;
}

@media (max-width: 900px) {
  .status-filter-field { max-width: none; width: 100%; }
}

html {
  scrollbar-gutter: stable;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #061426;
  --surface: #0b2038;
  --surface-soft: #102b49;
  --surface-raised: #0e2743;
  --ink: #ffffff;
  --muted: #b8c8d9;
  --line: #234769;
  --brand: #4da3ff;
  --brand-strong: #7fbcff;
  --accent: #65b0ff;
  --ok: #43c17a;
  --warn: #ff6b6b;
  --info: #7fbcff;
  --attention: #f1c75b;
  --neutral: #a9bed2;
  --chart-blue: #4da3ff;
  --chart-teal: #7fbcff;
  --chart-amber: #2f7fcb;
  --chart-red: #a8d2ff;
  --chart-gray: #a9bed2;
  --shadow: 0 16px 38px rgba(0, 5, 14, 0.36);
}

* {
  box-sizing: border-box;
}

img,
svg,
canvas {
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.4;
}

.initial-load {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(5px);
}

.initial-load[hidden] {
  display: none;
}

.initial-load[data-blocking="false"] {
  inset: 14px 14px auto;
  place-items: start center;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.initial-load-card {
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 22px 60px rgba(0, 36, 76, 0.2);
}

.initial-load[data-blocking="false"] .initial-load-card {
  width: min(430px, calc(100vw - 28px));
  padding: 15px 17px;
  box-shadow: var(--shadow);
}

.initial-load-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.initial-load-heading img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.initial-load-heading h2 {
  margin: 3px 0 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.initial-load-card > p {
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.initial-load-details {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.initial-load-detail {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.initial-load-detail i {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--warn);
}

.initial-load-detail[data-ok="true"] i {
  background: var(--ok);
}

.initial-load-detail strong {
  display: block;
  font-size: 0.79rem;
}

.initial-load-detail small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.initial-load-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.initial-load[data-blocking="false"] .initial-load-card {
  pointer-events: auto;
}

.initial-load-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.initial-load-progress-row progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: var(--surface-soft);
  accent-color: var(--brand);
}

.initial-load-progress-row progress::-webkit-progress-bar {
  background: var(--surface-soft);
  border-radius: 5px;
}

.initial-load-progress-row progress::-webkit-progress-value {
  background: var(--brand);
  border-radius: 5px;
  transition: width 220ms ease;
}

.initial-load-progress-row progress::-moz-progress-bar {
  background: var(--brand);
  border-radius: 5px;
}

.initial-load-progress-row strong {
  color: var(--brand-strong);
  font-size: 0.78rem;
  text-align: right;
}

.initial-load[data-status="error"] .initial-load-progress-row progress {
  accent-color: var(--warn);
}

.initial-load[data-status="error"] .initial-load-progress-row progress::-webkit-progress-value {
  background: var(--warn);
}

.initial-load[data-status="error"] .initial-load-progress-row progress::-moz-progress-bar {
  background: var(--warn);
}

.initial-load-retry-visible {
  margin-top: 16px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent);
  outline-offset: 2px;
}

input[type="checkbox"] {
  accent-color: var(--brand);
}

.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 44px;
  min-width: 0;
}

.app,
.view,
.panel,
.metric-card,
.dashboard-grid > *,
.indicators-chart-grid > *,
.process-layout > *,
.access-layout > *,
.integration-grid > *,
.update-layout > * {
  min-width: 0;
}

.auth-panel {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 44px;
}

.auth-copy h1,
.app-header h1 {
  margin: 6px 0 0;
  line-height: 1;
  letter-spacing: 0;
}

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

.brand-logo {
  width: 81px;
  height: 81px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 9px 14px rgba(0, 55, 112, 0.2));
}

.auth-brand {
  align-items: center;
  margin-bottom: 20px;
}

.auth-brand .brand-logo {
  width: 154px;
  height: 154px;
}

.auth-brand h1,
.app-brand h1 {
  overflow-wrap: anywhere;
}

.auth-copy h1 {
  font-size: 3.25rem;
}

.app-header h1 {
  font-size: 2rem;
}

.auth-copy .muted {
  max-width: 560px;
  font-size: 1.05rem;
}

.auth-card,
.panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 24px;
}

.auth-tabs,
.theme-switch,
.language-switch,
.app-tabs {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
}

.tab,
.ghost,
.primary,
.small-action,
.theme-switch button,
.language-switch button,
.app-tabs button {
  border: 0;
  border-radius: 6px;
  min-height: 40px;
}

.tab,
.theme-switch button,
.language-switch button,
.app-tabs button {
  background: transparent;
  color: var(--muted);
}

.tab.active,
.theme-switch button.active,
.language-switch button.active,
.app-tabs button.active {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 4px 14px rgba(20, 35, 48, 0.1);
}

body[data-theme="dark"] .tab.active,
body[data-theme="dark"] .theme-switch button.active,
body[data-theme="dark"] .language-switch button.active,
body[data-theme="dark"] .app-tabs button.active {
  color: var(--ink);
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.85rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--ink);
  padding: 0 12px;
}

.field input,
.field select {
  min-height: 44px;
}

.field textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-color: var(--brand);
}

.auth-card .field + .field,
.primary,
.form-message {
  margin-top: 14px;
}

.primary {
  width: 100%;
  background: var(--brand);
  color: #fff;
  font-weight: 750;
}

body[data-theme="dark"] .primary {
  color: #ffffff;
}

.primary.inline {
  width: auto;
  padding: 0 18px;
}

.ghost {
  padding: 0 14px;
  background: var(--surface-soft);
  color: var(--brand-strong);
}

.ghost:hover,
.theme-switch button:hover,
.app-tabs button:hover {
  background: color-mix(in srgb, var(--brand) 9%, var(--surface-soft));
  color: var(--brand-strong);
}

.ghost.inline-gap {
  margin-top: 12px;
  width: fit-content;
}

.small-action {
  padding: 0 10px;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
}

body[data-theme="dark"] .small-action {
  color: #ffffff;
}

.small-action.remove {
  background: rgba(184, 76, 67, 0.12);
  color: var(--warn);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-open-action,
.follow-action {
  flex: 1 1 86px;
  min-width: 0;
  min-height: 40px;
  padding-inline: 9px;
  white-space: normal;
}

.follow-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.follow-action.is-loading {
  opacity: 0.72;
}

.follow-action.is-saved,
body[data-theme="dark"] .follow-action.is-saved {
  background: var(--ok);
  color: #fff;
}

.follow-action.is-saved:disabled {
  cursor: default;
  opacity: 1;
}

.follow-check {
  position: relative;
  width: 0;
  height: 18px;
  flex: 0 0 auto;
  margin-right: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: width 180ms ease, margin 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.follow-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.follow-action.is-saved .follow-check {
  width: 18px;
  margin-right: 7px;
  opacity: 1;
  transform: scale(1);
}

.follow-action.is-confirmed .follow-check {
  animation: follow-check-pop 520ms cubic-bezier(0.2, 0.9, 0.25, 1.35);
}

@keyframes follow-check-pop {
  0% { transform: scale(0); }
  58% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

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

.form-message {
  min-height: 22px;
}

.app-header,
.header-actions,
.user-chip,
.panel-heading,
.saved-row,
.saved-main,
.saved-meta {
  display: flex;
  align-items: center;
}

.app-header {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.header-actions {
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
}

.theme-switch button {
  padding: 0 12px;
}

.language-switch button { padding: 0 12px; }

.user-chip {
  gap: 12px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.user-chip span {
  padding-left: 8px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--bg) 82%, transparent);
}

.app-tabs button {
  min-height: 44px;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.master-nav { display:flex; flex-wrap:wrap; gap:8px; }
.master-nav button { padding:10px 14px; border:1px solid var(--border); border-radius:8px; cursor:pointer; }
.master-nav button.active { background:#123d5b; color:white; }
.master-module { min-width:0; overflow-x:auto; }
.master-module table { width:100%; border-collapse:collapse; font-size:0.85rem; }
.master-module td,.master-module th { padding:9px; border-bottom:1px solid #d8e0e8; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.master-module pre { white-space:pre-wrap; max-height:300px; overflow:auto; }
.master-danger { border:1px solid #bd3b3b; padding:16px; margin-top:20px; border-radius:10px; }
.master-danger summary { color:#b22b2b; cursor:pointer; font-weight:700; }
.master-metric { padding:16px; border:1px solid #d8e0e8; border-radius:10px; }
.master-metric strong { display:block; font-size:1.5rem; }
.master-audit-detail { max-width: 32rem; max-height: 24rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
@media(max-width:700px) { #masterSummary { grid-template-columns:repeat(2,minmax(0,1fr)); } .master-nav button { flex:1 1 45%; } }
.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

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

.metric-grid > *,
.dashboard-grid > *,
.dashboard-custom-grid > *,
.indicators-chart-grid > * {
  height: 100%;
}

.metric-card {
  padding: 18px;
  min-height: 106px;
  display: grid;
  align-content: space-between;
  border-top: 3px solid color-mix(in srgb, var(--brand) 52%, transparent);
}

.metric-card span {
  color: var(--muted);
}

.metric-card strong {
  font-size: 2.15rem;
  line-height: 1;
}

.metric-card.alert strong {
  color: var(--warn);
}

.dashboard-grid,
.contact-grid,
.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.indicator-heading h2,
.indicator-section-heading h2 {
  margin: 4px 0 3px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.indicator-filter-panel {
  display: grid;
  gap: 14px;
}

.period-segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.period-segmented button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.period-segmented button.active {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 3px 10px rgba(0, 55, 112, 0.12);
}

.indicator-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.indicator-refresh {
  min-height: 44px;
}

.indicator-filter-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.indicator-metric-grid .metric-card:nth-child(3) strong {
  color: var(--ok);
}

.indicator-sla-section {
  display: grid;
  gap: 14px;
  padding: 4px 0;
}

.indicator-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.indicator-section-heading > .muted {
  max-width: 430px;
  text-align: right;
  font-size: 0.82rem;
}

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

.sla-card {
  min-width: 0;
  min-height: 196px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--neutral);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sla-card.good {
  border-top-color: var(--ok);
}

.sla-card.attention {
  border-top-color: var(--attention);
}

.sla-card.critical {
  border-top-color: var(--warn);
}

.sla-card.unavailable {
  opacity: 0.72;
}

.sla-title-row,
.sla-result-row,
.sla-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sla-title-row h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
}

.sla-limit {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.sla-route {
  min-height: 34px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.sla-result-row strong {
  font-size: 1.8rem;
  line-height: 1;
}

.sla-result-row span,
.sla-meta-row {
  color: var(--muted);
  font-size: 0.76rem;
}

.sla-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 12px 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  appearance: none;
  background: var(--surface-soft);
}

.sla-progress::-webkit-progress-bar {
  border-radius: 4px;
  background: var(--surface-soft);
}

.sla-progress::-webkit-progress-value {
  border-radius: 4px;
  background: var(--neutral);
}

.sla-progress::-moz-progress-bar {
  border-radius: 4px;
  background: var(--neutral);
}

.sla-card.good .sla-progress::-webkit-progress-value {
  background: var(--ok);
}

.sla-card.good .sla-progress::-moz-progress-bar {
  background: var(--ok);
}

.sla-card.attention .sla-progress::-webkit-progress-value {
  background: var(--attention);
}

.sla-card.attention .sla-progress::-moz-progress-bar {
  background: var(--attention);
}

.sla-card.critical .sla-progress::-webkit-progress-value {
  background: var(--warn);
}

.sla-card.critical .sla-progress::-moz-progress-bar {
  background: var(--warn);
}

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

.indicator-chart-card {
  min-height: 355px;
  min-width: 0;
  overflow: hidden;
  contain: layout paint;
}

.indicator-chart-card.wide {
  grid-column: 1 / -1;
}

.indicator-chart-card canvas {
  height: 275px;
  min-height: 275px;
}

.indicator-chart-card.wide canvas {
  height: 300px;
  min-height: 300px;
}

.dashboard-grid > .panel,
.dashboard-custom-grid > .panel,
.custom-chart-card {
  min-width: 0;
  overflow: hidden;
  contain: layout paint;
}

.indicator-empty {
  margin: 0;
  padding: 14px;
  border-left: 3px solid var(--attention);
  background: color-mix(in srgb, var(--attention) 8%, transparent);
}

.report-page-heading h2 {
  margin: 4px 0 3px;
  font-size: 1.25rem;
}

.performance-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.performance-report-form,
.performance-report-preview {
  min-width: 0;
}

.performance-report-preview {
  position: sticky;
  top: 72px;
}

.report-form-grid,
.report-sla-grid,
.report-section-grid,
.report-period-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-span-2 {
  grid-column: 1 / -1;
}

.report-fieldset {
  min-width: 0;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.report-fieldset legend {
  padding: 0 12px 0 0;
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 800;
}

.report-period-options {
  margin-bottom: 14px;
}

.report-period-fields:empty {
  display: none;
}

.report-section-grid .check-field {
  min-height: 36px;
  padding: 8px 0;
}

.report-section-grid input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}

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

.report-separation-toggle.active,
.report-separation-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-strong, var(--accent));
}

.performance-overview-preview {
  margin: 4px 0 18px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 5%, var(--panel));
}

.performance-overview-preview h3 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.9rem;
  line-height: 1.35;
}

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

.performance-overview-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.performance-overview-metric span,
.performance-overview-metric strong {
  display: block;
  overflow-wrap: anywhere;
}

.performance-overview-metric span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.performance-overview-metric strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: 1rem;
}

.performance-preview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2px 0 22px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.performance-preview-metrics > div {
  min-width: 0;
  min-height: 86px;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.performance-preview-metrics span,
.performance-preview-metrics strong {
  display: block;
}

.performance-preview-metrics span {
  color: var(--muted);
  font-size: 0.75rem;
}

.performance-preview-metrics strong {
  margin-top: 9px;
  font-size: 1.55rem;
}

.performance-preview-block {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.performance-preview-block > .muted {
  display: block;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 750;
}

.preview-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preview-block-heading > .muted {
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.preview-export-action {
  min-height: 34px;
  padding: 6px 10px;
  flex: 0 0 auto;
  font-size: 0.72rem;
}

.preview-distribution,
.preview-sla-list,
.preview-field-list,
.preview-anomaly-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.preview-anomaly-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.preview-anomaly-row {
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--attention);
  background: color-mix(in srgb, var(--attention) 6%, transparent);
}

.preview-anomaly-row strong,
.preview-anomaly-row span {
  display: block;
  overflow-wrap: anywhere;
}

.preview-anomaly-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.preview-anomaly-row p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.45;
}

.preview-field-list {
  max-height: 310px;
  overflow-y: auto;
  padding-right: 4px;
}

.preview-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 0 8px 11px;
  border-left: 3px solid var(--attention);
}

.preview-field-row.missing-column,
.preview-field-row.empty {
  border-left-color: var(--warn);
}

.preview-field-row strong,
.preview-field-row span {
  min-width: 0;
  font-size: 0.75rem;
}

.preview-field-row strong {
  overflow-wrap: anywhere;
}

.preview-field-row span {
  color: var(--muted);
  text-align: right;
}

.preview-fields-complete {
  margin: 0;
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 750;
}

.preview-distribution-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(80px, 1fr) 28px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 0.75rem;
}

.preview-distribution-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.preview-distribution-row > div {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-soft);
}

.preview-distribution-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.preview-distribution-row strong {
  text-align: right;
}

.preview-sla-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding-left: 10px;
  border-left: 3px solid var(--neutral);
}

.preview-sla-row > strong {
  flex: 0 0 auto;
}

.preview-sla-row.good {
  border-left-color: var(--ok);
}

.preview-sla-row.attention {
  border-left-color: var(--attention);
}

.preview-sla-row.critical {
  border-left-color: var(--warn);
}

.preview-sla-row > div {
  min-width: 0;
}

.preview-sla-row strong,
.preview-sla-row span {
  display: block;
}

.preview-sla-row > div > strong {
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 0.78rem;
}

.preview-sla-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.preview-placeholder {
  margin: 0;
  font-size: 0.8rem;
}

.panel {
  padding: 18px;
  overflow: hidden;
}

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-heading > div,
.process-hero > div,
.indicator-section-heading > div {
  min-width: 0;
}

.panel-heading h2,
.quiet-panel h2 {
  margin: 4px 0 0;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.live-pill {
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--ok);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.live-pill.loading {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.search-controls {
  display: grid;
  grid-template-columns: 150px minmax(190px, 0.8fr) 220px minmax(250px, 1.2fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.search-submit-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search-submit-group button {
  min-width: 112px;
}

button.is-loading {
  cursor: wait;
  opacity: 0.78;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 18px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
  text-align: right;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.footer-brand img {
  width: 39px;
  height: 39px;
  display: block;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 5px 8px rgba(0, 55, 112, 0.16));
}

.filter-reset {
  min-height: 44px;
  white-space: nowrap;
}

.sort-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: -2px 0 16px;
}

.sort-toolbar.wallet-sort {
  margin: 0 0 14px;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
  margin: 2px 0 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-toolbar-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-toolbar-summary span,
.report-modal-footer span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.report-toolbar-summary strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.report-actions,
.report-presets,
.report-column-toolbar,
.report-modal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-actions {
  justify-content: flex-end;
}

.report-actions button,
.report-presets button {
  min-height: 38px;
}

.report-download {
  min-width: 74px;
  font-weight: 800;
}

#exportExcelButton:not(:disabled) {
  color: var(--ok);
}

#exportPdfButton:not(:disabled) {
  color: var(--brand-strong);
}

.report-message {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
}

.report-message:empty {
  display: none;
}

.field.compact {
  min-width: min(260px, 100%);
}

.table-wrap {
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 560px;
  overscroll-behavior: contain;
}

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

.result-row td {
  min-width: 0;
  overflow-wrap: anywhere;
}

.result-row td:has(.process-cell) {
  min-width: 0;
}

.result-row td:last-child {
  min-width: 0;
}

th,
td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--ink);
  overflow-wrap: anywhere;
}

td {
  color: var(--ink);
}

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

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

.saved-row {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  min-width: 0;
  max-height: 180px;
  overflow: hidden;
  transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, padding 220ms ease, border-width 220ms ease;
}

.saved-row.is-removing {
  opacity: 0;
  transform: translateX(12px);
  max-height: 0;
  padding-block: 0;
  border-width: 0;
  pointer-events: none;
}

.saved-main {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}

.saved-main strong,
.saved-main span {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.saved-main span,
.saved-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.saved-meta {
  gap: 8px;
  flex-wrap: wrap;
}

.saved-context {
  line-height: 1.35;
}

.wallet .saved-row {
  min-height: 88px;
}

.contact-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.integration-form {
  display: grid;
  gap: 14px;
}

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

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.batch-access {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.batch-access-rows { display: grid; gap: 10px; }

.batch-access-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.batch-access-row.is-valid { border-color: var(--ok); }
.batch-access-row.is-invalid { border-color: var(--warn); }

.batch-row-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.batch-access-row.is-invalid .batch-row-status { color: var(--warn); }
.batch-access-actions { gap: 8px; }

.integration-status {
  align-content: start;
}

.test-result {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  white-space: pre-wrap;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.compact-check {
  align-items: center;
  font-size: 0.84rem;
}

.check-field input {
  margin-top: 3px;
}

.quiet-panel {
  align-content: start;
}

canvas {
  display: block;
  width: 100%;
  height: 320px;
  min-width: 0;
}

.auth-heading {
  margin-bottom: 20px;
}

.auth-heading h2 {
  margin: 5px 0 0;
  font-size: 1.25rem;
}

.view-toolbar,
.preview-actions,
.permission-actions,
.saved-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.view-toolbar {
  justify-content: space-between;
}

.process-detail-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.process-detail-actions {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 8px 24px rgba(20, 52, 78, 0.06);
}

.process-detail-actions button {
  min-height: 44px;
  margin: 0;
}

.process-detail-actions .primary {
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 22%, transparent);
}

.process-detail-actions .secondary-action:not(.remove) {
  border: 1px solid color-mix(in srgb, var(--brand) 50%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--surface-raised));
  color: var(--brand-strong);
}

.process-operation-status {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--info) 42%, var(--line));
  border-left: 4px solid var(--info);
  border-radius: 8px;
  background: color-mix(in srgb, var(--info) 7%, var(--surface-raised));
}

.process-operation-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--info) 13%, transparent);
}

.process-operation-copy {
  min-width: 0;
}

.process-operation-copy strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 0.88rem;
}

.process-operation-status .form-message {
  margin: 0;
  min-height: 0;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.process-operation-status[data-tone="loading"] .process-operation-indicator {
  border: 2px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-top-color: var(--brand);
  background: transparent;
  box-shadow: none;
  animation: button-spinner-rotate 760ms linear infinite;
}

.process-operation-status[data-tone="success"] {
  border-color: color-mix(in srgb, var(--ok) 46%, var(--line));
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 7%, var(--surface-raised));
}

.process-operation-status[data-tone="success"] .process-operation-indicator {
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 13%, transparent);
}

.process-operation-status[data-tone="warning"],
.process-operation-status[data-tone="error"] {
  border-color: color-mix(in srgb, var(--warn) 44%, var(--line));
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 7%, var(--surface-raised));
}

.process-operation-status[data-tone="warning"] .process-operation-indicator,
.process-operation-status[data-tone="error"] .process-operation-indicator {
  background: var(--warn);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 12%, transparent);
}

.process-operation-status .form-message.is-error {
  color: var(--warn);
}

.process-retry-button {
  min-height: 40px;
  margin: 0;
  white-space: nowrap;
}

.button-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: currentColor;
  border-radius: 50%;
  vertical-align: -2px;
  animation: button-spinner-rotate 720ms linear infinite;
}

@keyframes button-spinner-rotate {
  to { transform: rotate(360deg); }
}

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

.numbers-hidden .metric-card strong,
.numbers-hidden .dashboard-grid canvas,
.numbers-hidden .dashboard-custom-grid canvas {
  visibility: hidden;
}

.numbers-hidden .metric-card::after {
  content: "•••";
  color: var(--muted);
  font-size: 1.4rem;
  font-weight: 800;
}

.numbers-hidden .metric-card strong + * {
  display: none;
}

.consultation-summary {
  margin: 4px 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dashboard-builder {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.builder-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr 180px auto;
  gap: 12px;
  align-items: end;
}

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

.custom-chart-card {
  min-height: 360px;
}

.custom-chart-card canvas {
  height: 270px;
}

.compact-heading {
  align-items: flex-start;
  margin-bottom: 8px;
}

.compact-heading h2 {
  margin-bottom: 2px;
}

.icon-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.insight-strip article {
  min-width: 0;
  padding-left: 12px;
  border-left: 3px solid var(--brand);
}

.insight-strip span,
.detail-item span,
.access-user span,
.access-user small,
.timeline-step span {
  color: var(--muted);
}

.insight-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

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

.mini-chart {
  min-width: 0;
}

.mini-chart + .mini-chart {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.mini-chart h3 {
  margin: 4px 0 2px;
  font-size: 1rem;
}

.mini-chart canvas {
  height: 220px;
}

.process-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-strong);
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

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

.process-cell {
  align-items: flex-start;
  flex-wrap: wrap;
}

.saved-title-line {
  align-items: flex-start;
  flex-wrap: wrap;
}

.process-cell .process-link,
.saved-title-line > strong,
.saved-title-line > .process-link {
  flex: 0 0 auto;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
}

.process-cell .process-status,
.saved-title-line .process-status {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.saved-process-link {
  line-height: 1.35;
}

.process-title-line h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.process-link:hover,
.process-link:focus-visible {
  text-decoration-color: currentColor;
}

.result-row.expanded td {
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.result-detail td {
  padding: 0;
  background: var(--surface-soft);
}

.result-preview {
  padding: 18px;
}

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

.preview-grid {
  margin-bottom: 16px;
}

.preview-grid div,
.detail-item {
  min-width: 0;
}

.preview-grid span,
.preview-grid strong,
.detail-item span,
.detail-item strong {
  display: block;
}

.preview-grid span,
.detail-item span {
  margin-bottom: 4px;
  font-size: 0.76rem;
}

.preview-grid strong,
.detail-item strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.detail-item.is-empty {
  opacity: 0.68;
}

.detail-item.is-empty strong {
  color: var(--muted);
  font-weight: 500;
}

.process-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 2px 4px;
}

.process-hero h2 {
  margin: 5px 0 4px;
  font-size: 1.75rem;
}

.process-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--neutral) 35%, var(--line));
  border-left: 3px solid var(--neutral);
  border-radius: 6px;
  background: color-mix(in srgb, var(--neutral) 8%, var(--surface));
  color: var(--neutral);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: none;
  min-width: max-content;
  max-width: min(440px, 100%);
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.process-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.process-status.status-complete {
  border-color: color-mix(in srgb, var(--ok) 38%, var(--line));
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  color: var(--ok);
}

.process-status.status-info {
  border-color: color-mix(in srgb, var(--info) 38%, var(--line));
  border-left-color: var(--info);
  background: color-mix(in srgb, var(--info) 10%, var(--surface));
  color: var(--info);
}

.process-status.status-attention {
  border-color: color-mix(in srgb, var(--attention) 42%, var(--line));
  border-left-color: var(--attention);
  background: color-mix(in srgb, var(--attention) 11%, var(--surface));
  color: var(--attention);
}

.process-status.status-critical {
  border-color: color-mix(in srgb, var(--warn) 42%, var(--line));
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
  color: var(--warn);
}

.process-status.inline-status {
  max-width: min(360px, 100%);
  padding: 5px 7px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: 0.72rem;
}

.process-layout,
.access-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.process-panorama-section {
  display: grid;
  gap: 14px;
  padding: 4px 0;
}

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

.panorama-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 114px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--chart-gray);
  border-radius: 8px;
  background: var(--surface);
}

.panorama-item > div:last-child {
  min-width: 0;
}

.panorama-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--brand-strong);
}

.panorama-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.panorama-item span,
.panorama-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.panorama-item span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.panorama-item strong {
  font-size: 0.86rem;
  line-height: 1.42;
}

.panorama-item strong + strong {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 650;
}

.panorama-air {
  border-top-color: var(--chart-blue);
}

.panorama-sea {
  border-top-color: var(--chart-teal);
}

.panorama-road,
.panorama-rail {
  border-top-color: var(--attention);
}

.panorama-schedule {
  border-top-color: var(--chart-amber);
}

.panorama-route {
  border-top-color: var(--chart-teal);
}

.panorama-customs {
  border-top-color: var(--brand);
}

.panorama-empty,
.timeline-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.panorama-empty {
  grid-column: 1 / -1;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.access-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: start;
}

.process-timeline {
  display: grid;
  gap: 0;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  min-height: 56px;
}

.timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: -1px;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.timeline-step.complete:not(:last-child)::before {
  background: var(--ok);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-step.complete .timeline-dot {
  background: var(--ok);
  box-shadow: 0 0 0 1px var(--ok);
}

.timeline-step strong,
.timeline-step span {
  display: block;
}

.timeline-step span {
  margin-top: 3px;
  font-size: 0.82rem;
}

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

.access-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.column-permissions {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.column-permissions legend {
  padding: 0 6px;
  font-weight: 800;
}

.field-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.field .field-note {
  margin: -2px 0 0;
}

.permission-actions {
  margin-bottom: 12px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.global-filter-admin-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.global-filter-admin-row {
  display: grid;
  grid-template-columns: minmax(15rem, 1.4fr) minmax(12rem, 1fr) 8rem minmax(12rem, 1fr) 5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--border-color, #d9dee8);
  border-radius: 0.75rem;
}

.global-filter-admin-row[data-available="false"] { opacity: 0.62; }
.global-filter-admin-row small { display: block; overflow-wrap: anywhere; }
.global-filter-admin-row input[type="number"] { width: 4.5rem; }
.global-filter-preview { margin-top: 1rem; }

@media (max-width: 980px) {
  .global-filter-admin-row { grid-template-columns: 1fr 1fr; }
}

.module-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-permission {
  align-items: center;
  min-height: 44px;
}

.division-permission-grid {
  max-height: 220px;
}

.permission-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: 0.82rem;
  line-height: 1.3;
}

.permission-option span {
  overflow-wrap: anywhere;
}

.permission-option.required {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}

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

.refresh-all-users {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.refresh-all-users svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.refresh-all-users.is-loading svg {
  animation: refresh-spin 850ms linear infinite;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.access-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.access-user div {
  min-width: 0;
}

.access-user strong,
.access-user span,
.access-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-user small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.access-user span,
.access-user small {
  margin-top: 3px;
  font-size: 0.8rem;
}

.profile-badge {
  display: inline-flex !important;
  max-width: 220px;
  margin-left: 6px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand-strong) !important;
  font-size: 0.72rem !important;
  font-weight: 800;
  vertical-align: middle;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 18, 26, 0.52);
}

.modal-card {
  width: min(480px, 100%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-card .field {
  margin-top: 12px;
}

.report-modal-card {
  width: min(780px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-column-toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.report-column-toolbar > strong {
  color: var(--brand-strong);
  font-size: 0.84rem;
  white-space: nowrap;
}

.report-column-grid {
  min-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-column-option {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.86rem;
}

.report-column-option:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.report-column-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.report-column-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-modal-footer {
  justify-content: space-between;
  margin-top: 14px;
}

.integration-overview,
.integration-section-heading,
.integration-footer,
.connection-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.integration-overview {
  padding: 4px 2px 18px;
}

.integration-overview h2,
.integration-section-heading h2 {
  margin: 4px 0 5px;
}

.integration-overview > div:first-child,
.integration-section-heading > div {
  min-width: 0;
}

.connection-summary {
  flex: 0 1 360px;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
  text-align: right;
}

.connection-summary small {
  max-width: 360px;
  color: var(--muted);
}

.connection-badge,
.method-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.connection-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.connection-badge.is-ready,
.connection-badge.is-success {
  border-color: color-mix(in srgb, var(--ok) 34%, var(--line));
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
  color: var(--ok);
}

.connection-badge.is-warning {
  border-color: color-mix(in srgb, var(--attention) 38%, var(--line));
  background: color-mix(in srgb, var(--attention) 8%, var(--surface));
  color: var(--attention);
}

.connection-badge.is-testing {
  border-color: color-mix(in srgb, var(--info) 38%, var(--line));
  background: color-mix(in srgb, var(--info) 8%, var(--surface));
  color: var(--info);
}

.connection-badge.is-error {
  border-color: color-mix(in srgb, var(--warn) 38%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
  color: var(--warn);
}

.method-badge.recommended {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
  color: var(--brand);
}

.integration-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.integration-tabs button {
  min-height: 46px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.integration-tabs button:last-child {
  border-right: 0;
}

.integration-tabs button.active {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand);
}

.integration-workspace,
.integration-panel,
.integration-config-panel,
.integration-checklist {
  display: grid;
  gap: 18px;
  min-width: 0;
}

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

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

.setup-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.setup-step > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
  font-weight: 850;
}

.setup-step strong {
  display: block;
  margin-bottom: 5px;
}

.setup-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.integration-notice {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--info);
  background: color-mix(in srgb, var(--info) 7%, var(--surface));
  color: var(--ink);
}

.integration-notice span {
  min-width: 0;
  color: var(--muted);
}

.integration-notice.warning {
  border-left-color: var(--attention);
  background: color-mix(in srgb, var(--attention) 7%, var(--surface));
}

.integration-config-panel {
  padding: 18px;
}

.field-note {
  color: var(--muted);
  line-height: 1.45;
}

.official-links {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}

.official-links a {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.graph-setup-grid,
.integration-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.graph-setup-grid > *,
.integration-diagnostic-grid > * {
  min-width: 0;
}

.graph-mode-fields {
  margin-top: 14px;
}

.environment-status-list {
  display: grid;
  gap: 0;
  margin: 16px 0;
  border-top: 1px solid var(--line);
}

.environment-status-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.environment-status-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
}

.environment-status-list strong {
  flex: 0 0 auto;
  font-size: 0.78rem;
}

.environment-status-list .is-configured {
  color: var(--ok);
}

.environment-status-list .is-missing {
  color: var(--warn);
}

.env-template {
  max-width: 100%;
  margin: 0 0 12px;
  padding: 13px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.55;
}

.technical-details {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.technical-details .field {
  margin-top: 12px;
}

.integration-checklist {
  gap: 0;
  margin-top: 10px;
}

.integration-check {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.integration-check:last-child {
  border-bottom: 0;
}

.integration-check-icon {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--neutral);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--neutral) 12%, transparent);
}

.integration-check.ok .integration-check-icon {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 12%, transparent);
}

.integration-check.warning .integration-check-icon {
  background: var(--attention);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--attention) 12%, transparent);
}

.integration-check.missing .integration-check-icon,
.integration-check.error .integration-check-icon {
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 12%, transparent);
}

.integration-check strong,
.integration-check small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.integration-check small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.integration-footer {
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.integration-footer > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.integration-footer .form-message {
  margin: 0;
  text-align: right;
}

.update-overview,
.update-section-heading,
.update-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.update-overview {
  align-items: flex-start;
  padding: 4px 2px 18px;
}

.update-overview h2 {
  margin: 4px 0 5px;
}

.update-version-summary {
  flex: 0 0 auto;
  min-width: 150px;
  padding-left: 18px;
  border-left: 2px solid var(--brand);
  text-align: right;
}

.update-version-summary span,
.update-version-summary strong {
  display: block;
}

.update-version-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.update-version-summary strong {
  margin-top: 3px;
  color: var(--brand);
  font-size: 1.35rem;
}

.update-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.update-installer,
.update-monitor {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.validation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.validation-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.validation-badge.is-checking {
  color: var(--info);
  border-color: color-mix(in srgb, var(--info) 36%, var(--line));
  background: color-mix(in srgb, var(--info) 7%, var(--surface));
}

.validation-badge.is-valid {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 36%, var(--line));
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
}

.validation-badge.is-error {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 36%, var(--line));
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
}

.update-dropzone {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.update-dropzone:hover,
.update-dropzone.is-dragging {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.update-upload-icon {
  grid-row: span 2;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.update-dropzone strong,
.update-dropzone > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.update-dropzone > span:last-child {
  color: var(--muted);
  font-size: 0.84rem;
}

.update-actions {
  align-items: flex-start;
}

.update-actions .form-message {
  flex: 1 1 auto;
  margin: 7px 0 0;
  text-align: right;
}

.update-preview {
  display: grid;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.update-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-block: 1px solid var(--line);
}

.update-summary-grid > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.update-summary-grid > div:last-child {
  border-right: 0;
}

.update-summary-grid span,
.update-summary-grid strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.update-summary-grid span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  text-transform: uppercase;
}

.update-summary-grid strong {
  margin-top: 4px;
}

.update-section-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.update-section-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

.update-file-list {
  max-height: 210px;
  overflow-y: auto;
}

.update-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}

.update-file-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
}

.update-file-item small {
  color: var(--muted);
}

.protected-paths {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid var(--ok);
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
}

.protected-paths span {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.update-confirmation {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.update-confirmation .check-field {
  min-height: 43px;
  margin: 0;
}

.update-safety-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: update-step;
}

.update-safety-list li {
  counter-increment: update-step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.update-safety-list li::before {
  content: counter(update-step);
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 850;
}

.update-progress {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.update-progress-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--info) 12%, transparent);
}

.update-progress[data-status="success"] .update-progress-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 12%, transparent);
}

.update-progress[data-status="rolled_back"] .update-progress-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 12%, transparent);
}

.update-progress p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.update-history-section,
.update-history {
  display: grid;
  gap: 10px;
}

.update-history-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.update-history-mark {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ok);
}

.update-history-item.is-error .update-history-mark {
  background: var(--warn);
}

.update-history-item strong,
.update-history-item small {
  display: block;
}

.update-history-item small {
  margin-top: 2px;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .button-spinner,
  .process-operation-status[data-tone="loading"] .process-operation-indicator {
    animation: none;
  }

  .follow-check,
  .follow-action.is-confirmed .follow-check {
    animation: none;
    transition: none;
  }

  .saved-row,
  .saved-row.is-removing {
    transition: none;
    transform: none;
  }
}

@media (max-width: 1180px) {
  .app-tabs {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }

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

  .indicator-filter-grid,
  .indicator-sla-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .indicator-refresh {
    width: fit-content;
  }

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

  .filter-reset {
    width: fit-content;
  }

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

@media (max-width: 980px) {
  .app-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .app-tabs::-webkit-scrollbar {
    display: none;
  }

  .app-tabs button {
    flex: 0 0 auto;
    min-width: 132px;
    scroll-snap-align: center;
  }

  .auth-panel,
  .dashboard-grid,
  .dashboard-custom-grid,
  .indicators-chart-grid,
  .performance-report-layout,
  .contact-grid,
  .integration-grid,
  .update-layout {
    grid-template-columns: 1fr;
  }

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

  .update-confirmation .primary {
    grid-column: 1 / -1;
    width: 100%;
  }

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

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

  .indicator-chart-card.wide {
    grid-column: auto;
  }

  .process-layout,
  .access-layout,
  .consultation-charts {
    grid-template-columns: 1fr;
  }

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

  .mini-chart + .mini-chart {
    padding-left: 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

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

  .search-controls {
    grid-template-columns: 1fr;
  }

  .batch-access-row {
    grid-template-columns: 1fr;
  }

  .batch-row-status {
    grid-column: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .graph-setup-grid,
  .integration-diagnostic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .consultation-table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .consultation-table-wrap table {
    min-width: 0;
    table-layout: auto;
  }

  .consultation-table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .consultation-table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .consultation-table-wrap tr,
  .consultation-table-wrap td {
    display: block;
    width: 100%;
  }

  .consultation-table-wrap .result-row {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-raised);
  }

  .consultation-table-wrap .result-row.expanded {
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
  }

  .consultation-table-wrap .result-row td {
    display: grid;
    grid-template-columns: minmax(98px, 0.34fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
  }

  .consultation-table-wrap .result-row td + td {
    border-top: 1px solid var(--line);
  }

  .consultation-table-wrap .result-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .consultation-table-wrap .result-row td:last-child .result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .consultation-table-wrap .result-row td:last-child .result-actions button {
    width: 100%;
  }

  .consultation-table-wrap .result-detail {
    margin-top: -12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--surface-soft);
  }

  .consultation-table-wrap .result-detail td,
  .consultation-table-wrap .result-detail .result-preview {
    border: 0;
  }

  .consultation-table-wrap .result-preview {
    padding: 14px;
  }
}

@media (max-width: 680px) {
  .performance-overview-grid {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    align-items: flex-start;
    gap: 12px;
  }

  .auth-brand .brand-logo {
    width: 107px;
    height: 107px;
  }

  .app-brand {
    gap: 10px;
  }

  .app-brand .brand-logo {
    width: 65px;
    height: 65px;
  }

  .preview-block-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-export-action {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-footer p {
    text-align: left;
  }

  .performance-report-form > .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .performance-report-form > .panel-heading button {
    width: 100%;
  }

  .performance-report-preview {
    position: static;
  }

  .report-form-grid,
  .report-sla-grid,
  .report-section-grid,
  .report-period-fields {
    grid-template-columns: 1fr;
  }

  .report-span-2 {
    grid-column: auto;
  }

  .report-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-form-actions button {
    width: 100%;
  }

  .shell {
    width: min(100% - 20px, 1440px);
    padding-top: 14px;
    padding-bottom: 28px;
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .report-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .report-actions button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  .report-column-toolbar,
  .report-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .report-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .report-presets button,
  .report-modal-footer .primary {
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .report-column-grid {
    grid-template-columns: 1fr;
  }

  .report-column-option:nth-child(odd) {
    border-right: 0;
  }

  .filter-reset {
    width: 100%;
  }

  .auth-panel {
    min-height: auto;
    gap: 24px;
    padding: 28px 0;
  }

  .auth-copy h1 {
    font-size: 2.2rem;
    overflow-wrap: anywhere;
  }

  .app-header h1 {
    font-size: 1.75rem;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .user-chip {
    width: 100%;
  }

  .header-actions {
    align-items: stretch;
  }

  .theme-switch,
  .language-switch,
  .user-chip {
    flex: 1;
  }

  .user-chip {
    justify-content: space-between;
  }

  .user-chip span {
    max-width: calc(100% - 76px);
  }

  .app-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .app-tabs::-webkit-scrollbar {
    display: none;
  }

  .app-tabs button {
    flex: 0 0 auto;
    min-width: 126px;
    padding: 0 12px;
    scroll-snap-align: center;
  }

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

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

  .metric-card {
    min-height: 96px;
  }

  .metric-card strong {
    font-size: 1.55rem;
    overflow-wrap: anywhere;
  }

  .insight-strip,
  .builder-grid,
  .indicator-filter-grid,
  .indicator-sla-grid,
  .process-panorama,
  .preview-grid,
  .detail-grid,
  .detail-grid.full,
  .permission-grid,
  .module-permission-grid {
    grid-template-columns: 1fr;
  }

  .process-hero {
    flex-direction: column;
  }

  .process-hero h2 {
    font-size: 1.5rem;
  }

  .process-title-line,
  .process-cell,
  .saved-title-line {
    flex-wrap: wrap;
  }

  .process-cell .process-status,
  .saved-title-line .process-status {
    flex: 0 1 auto;
    min-width: 0;
  }

  .saved-row,
  .access-user {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-actions {
    width: 100%;
  }

  .saved-main strong,
  .saved-main span,
  .access-user strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .saved-actions button,
  .access-user > button {
    flex: 1 1 auto;
  }

  .process-status.inline-status {
    max-width: min(250px, 100%);
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .integration-overview,
  .integration-section-heading,
  .integration-footer,
  .update-overview,
  .update-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .update-version-summary {
    padding: 10px 0 0;
    border-top: 2px solid var(--brand);
    border-left: 0;
    text-align: left;
  }

  .update-actions .form-message {
    margin-top: 0;
    text-align: left;
  }

  .update-actions button {
    width: 100%;
  }

  .update-summary-grid,
  .update-confirmation {
    grid-template-columns: 1fr;
  }

  .update-summary-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .update-summary-grid > div:last-child {
    border-bottom: 0;
  }

  .update-confirmation .primary {
    grid-column: auto;
  }

  .update-dropzone {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 14px;
  }

  .update-upload-icon {
    width: 44px;
    height: 44px;
  }

  .connection-summary {
    flex: 0 0 auto;
    align-items: flex-start;
    text-align: left;
  }

  .integration-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .integration-tabs button {
    flex: 0 0 152px;
  }

  .setup-step-grid {
    grid-template-columns: 1fr;
  }

  .integration-notice {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .integration-footer > div,
  .integration-footer button {
    width: 100%;
  }

  .integration-footer .form-message {
    text-align: left;
  }

  .period-segmented {
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .period-segmented button {
    min-height: 52px;
    padding: 6px;
    white-space: normal;
  }

  .indicator-refresh {
    width: 100%;
  }

  .indicator-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .indicator-section-heading > .muted {
    text-align: left;
  }

  .view-toolbar {
    align-items: flex-start;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1 1 140px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .access-form > .panel-heading,
  .integration-form > .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .access-form > .panel-heading button,
  .integration-form > .panel-heading button {
    width: 100%;
  }

  #acessosView .access-layout > aside .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #acessosView .refresh-all-users {
    justify-content: center;
    width: 100%;
  }

  .permission-actions .compact-check {
    flex-basis: 100%;
  }

  .form-actions .primary {
    width: 100%;
  }

  #processoView > .view-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  #processoView > .process-detail-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .process-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .process-operation-status {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .process-retry-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  #processoView > .view-toolbar button {
    min-height: 50px;
    padding: 8px;
    white-space: normal;
  }

  #carteiraView .panel-heading > button,
  .contact-form .primary.inline,
  .quiet-panel .ghost.inline-gap {
    width: 100%;
  }

  .test-result {
    overflow-wrap: anywhere;
  }

  canvas,
  .indicator-chart-card canvas,
  .indicator-chart-card.wide canvas,
  .custom-chart-card canvas {
    height: 235px;
  }

  .mini-chart canvas {
    height: 205px;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  table {
    min-width: 0;
  }

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

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .result-row {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-raised);
  }

  .result-row.expanded {
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
  }

  .result-row td {
    display: grid;
    grid-template-columns: minmax(84px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
  }

  .result-row td + td {
    border-top: 1px solid var(--line);
  }

  .result-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .result-row td:first-child {
    display: block;
    min-width: 0;
    padding: 13px 12px;
    background: var(--surface-soft);
  }

  .result-row td:last-child {
    min-width: 0;
  }

  .result-row td:first-child::before {
    display: none;
  }

  .result-row td:last-child .result-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-row td:last-child .result-actions button {
    width: 100%;
  }

  .result-detail {
    margin-top: -12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--surface-soft);
  }

  .result-detail td,
  .result-detail .result-preview {
    border: 0;
  }

  .result-preview {
    padding: 14px;
  }

  .preview-actions button {
    width: 100%;
  }

  .panel,
  .auth-card,
  .metric-card {
    padding: 14px;
  }
}
.detail-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line, #d9e2ef);
  border-radius: 12px;
  background: var(--surface-soft, #f7f9fc);
}

.detail-edit-field span {
  color: var(--muted, #607089);
  font-size: 0.76rem;
  font-weight: 700;
}

.detail-edit-field input {
  width: 100%;
  border: 1px solid var(--line, #d9e2ef);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface, #fff);
  color: inherit;
}

.detail-edit-field small {
  min-height: 1em;
  color: var(--muted, #607089);
  font-size: 0.7rem;
}

.detail-edit-field input:invalid {
  border-color: var(--danger, #b84c43);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger, #b84c43) 16%, transparent);
}

.backup-settings {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line, #d9e2ef);
}

@media (max-width: 900px) {
  .process-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-detail-actions button {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
    white-space: normal;
  }
}

@media (max-width: 680px) {
  .process-detail-actions {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .process-operation-status {
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: start;
    padding: 12px;
  }

  .process-operation-indicator {
    margin-top: 5px;
  }

  .process-retry-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.diagnostic-code-block {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font: 0.78rem/1.55 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diagnostic-code-block.is-error {
  border-color: var(--warn);
  color: var(--warn);
}

.status-filter-popover .status-checkbox-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.sql-migration-popup {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(56, 157, 255, .45);
  border-radius: 12px;
  background: var(--panel, #102945);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}
.sql-migration-popup.is-minimized { width: auto; padding: 8px 12px; }
.sql-migration-popup.is-minimized .sql-migration-popup__body,
.sql-migration-popup.is-minimized .sql-migration-popup__actions { display: none; }
.sql-migration-popup__head,
.sql-migration-popup__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sql-migration-popup__body { display: grid; gap: 7px; margin: 10px 0; }
.sql-migration-popup__body > span { color: var(--accent, #51a9ff); font-weight: 700; }
.sql-migration-popup__track { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.12); }
.sql-migration-popup__track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #51a9ff; transition: width .25s ease; }
.sql-migration-popup small { color: var(--muted, #abc0d7); line-height: 1.4; }
.sql-migration-popup .ghost { min-width: 30px; padding: 4px 8px; }
@media (max-width: 680px) {
  .sql-migration-popup { right: 12px; bottom: 12px; }
}

/* PRÉ-2.0.0-03: stable dimensions prevent chart and table content collisions. */
.view,
.view > section,
.view > header,
.panel,
.panel-heading,
.panel-heading > div,
.view-toolbar,
.management-heading,
.integration-overview,
.hybrid-tab-panel,
.hybrid-detail-panel,
.mini-chart,
.chart-card,
.management-chart-card { min-width: 0; }

.panel-heading h2,
.panel-heading h3,
.management-heading h2,
.management-heading p,
.view-toolbar h2,
.view-toolbar p,
.field-note,
.muted,
.form-message,
.source-pill,
.live-pill {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.mini-chart,
.management-chart-card,
[data-query-chart],
[data-chart-card] { position: relative; overflow: hidden; }

.mini-chart canvas,
.management-chart-card canvas,
.chart-card canvas,
canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 180px;
}

.table-wrap,
.table-shell,
.consultation-table-wrap,
.manager-table-wrap,
.manager-process-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: stable;
}

table th,
table td {
  max-width: 360px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  vertical-align: top;
}

.manager-process-table,
.manager-indicators-table { min-width: 980px; table-layout: fixed; }
.manager-process-table th,
.manager-process-table td { min-width: 92px; }
.manager-process-table th:first-child,
.manager-process-table td:first-child { min-width: 140px; }

.progress,
progress,
.hybrid-progress-track,
.sql-consolidation-track { min-width: 0; overflow: hidden; }

button,
.button-link,
input,
select,
textarea { max-width: 100%; }

.consultation-view-actions,
.master-spreadsheet-toolbar,
.master-spreadsheet-status { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.master-spreadsheet-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.master-spreadsheet-toggle button { border: 0; border-radius: 9px; padding: 8px 14px; background: transparent; color: var(--muted); cursor: pointer; }
.master-spreadsheet-toggle button.active { background: var(--surface); color: var(--brand-strong); box-shadow: var(--shadow-soft); }
.master-spreadsheet { display: grid; gap: 14px; }
.master-spreadsheet-toolbar { align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.master-spreadsheet-toolbar .field:first-child { flex: 1 1 320px; }
.master-spreadsheet-toolbar .field { min-width: 160px; }
.master-spreadsheet-status { justify-content: space-between; color: var(--muted); }
.master-spreadsheet-grid-wrap { max-height: 68vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.master-spreadsheet-grid { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.master-spreadsheet-grid th { position: sticky; top: 0; z-index: 3; min-width: 170px; padding: 10px; text-align: left; background: var(--surface-strong, var(--surface)); border-bottom: 1px solid var(--line); }
.master-spreadsheet-grid td { padding: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; }
.master-spreadsheet-grid .sheet-row-state { position: sticky; left: 0; z-index: 2; min-width: 115px; padding: 9px; background: var(--surface); }
.master-spreadsheet-grid th.sheet-row-state { z-index: 4; }
.sheet-cell-input { width: 100%; min-width: 170px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; color: var(--ink); }
.sheet-cell-input:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--surface); }
.sheet-cell-checkbox { min-width: 44px; }
.sheet-readonly { display: block; min-width: 170px; padding: 10px; color: var(--muted); }
.master-spreadsheet-grid td.is-dirty { box-shadow: inset 0 0 0 2px var(--warning, #c78a12); background: color-mix(in srgb, var(--warning, #c78a12) 9%, transparent); }
.master-spreadsheet-grid td.is-locked { background: var(--surface-soft); }
.sync-state { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--success-soft, #e8f5ee); color: var(--success, #23734b); white-space: nowrap; }
.sync-state.is-warning { background: var(--warning-soft, #fff4d8); color: var(--warning-strong, #8a5b00); }

@media (max-width: 780px) {
  .consultation-view-actions { align-items: center; }
  .master-spreadsheet-toolbar { display: grid; grid-template-columns: 1fr; }
}

#masterSettingsEditor { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
