:root {
  --sonco-navy: #0b3a5b;
  --sonco-navy-900: #082b45;
  --sonco-navy-800: #0d456c;
  --sonco-red: #e62c33;
  --sonco-red-soft: #fff0f1;
  --blue-100: #eaf3f8;
  --blue-200: #d6e8f2;
  --blue-500: #3f7ea6;
  --green: #16845b;
  --green-soft: #e9f7f1;
  --amber: #a86600;
  --amber-soft: #fff6df;
  --danger: #bc2730;
  --ink: #1c2b36;
  --muted: #687b89;
  --muted-2: #8797a2;
  --line: #dfe7ec;
  --line-strong: #cbd7df;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --canvas: #f2f6f8;
  --sidebar: 264px;
  --topbar: 70px;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(14, 48, 70, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(72, 133, 171, 0.23), transparent 36%),
    linear-gradient(180deg, var(--sonco-navy) 0%, var(--sonco-navy-900) 100%);
}

body[data-app="data-portal"] .sidebar {
  background:
    radial-gradient(circle at 18% 12%, rgba(91, 171, 160, 0.25), transparent 36%),
    linear-gradient(180deg, #184d54 0%, #0b3037 100%);
}

body[data-app="data-portal"] .nav-link.is-active::after {
  background: #65c3ab;
}

body[data-app="data-portal"] .nav-icon {
  color: #a2d9cb;
}

.sidebar-brand {
  display: flex;
  height: var(--topbar);
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand__mark {
  display: flex;
  width: 126px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #fff;
}

.sidebar-brand__mark img {
  display: block;
  width: 106px;
  height: auto;
}

.sidebar-brand__environment {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-label {
  margin: 20px 22px 8px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 0 12px;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 600;
  transition: 160ms ease;
}

.nav-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
  color: #9fc5db;
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  box-sizing: border-box;
  content: "";
}

.icon-home::before {
  left: 5px;
  top: 8px;
  width: 14px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.icon-home::after {
  left: 8px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.icon-refresh::before {
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.icon-refresh::after {
  right: 3px;
  top: 5px;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 5px solid currentColor;
  transform: rotate(22deg);
}

.icon-connect::before {
  left: 5px;
  top: 9px;
  width: 5px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 10px 0 0 -1.5px currentColor;
}

.icon-connect::after {
  left: 9px;
  top: 11px;
  width: 6px;
  height: 1.5px;
  background: currentColor;
}

.icon-upload::before,
.icon-download::before {
  left: 5px;
  bottom: 4px;
  width: 14px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  border-radius: 0 0 2px 2px;
}

.icon-upload::after,
.icon-download::after {
  left: 9px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.icon-upload {
  background-color: rgba(255, 255, 255, 0.08);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: center 8px;
  background-size: 1.5px 10px;
}

.icon-download {
  background-color: rgba(255, 255, 255, 0.08);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: center 6px;
  background-size: 1.5px 10px;
}

.icon-download::after {
  top: 9px;
  transform: rotate(225deg);
}

.icon-users::before {
  left: 9px;
  top: 4px;
  width: 6px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.icon-users::after {
  left: 5px;
  top: 12px;
  width: 14px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.icon-shield::before {
  left: 6px;
  top: 4px;
  width: 12px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 6px 6px 8px 8px;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
}

.icon-shield::after {
  left: 11px;
  top: 8px;
  width: 3px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.icon-settings::before {
  left: 6px;
  top: 6px;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(10, 45, 57, 0.75);
}

.icon-settings::after {
  left: 11px;
  top: 3px;
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 0 currentColor;
  transform: rotate(45deg);
  opacity: 0.8;
}

.icon-key::before {
  left: 4px;
  top: 5px;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.icon-key::after {
  left: 10px;
  top: 12px;
  width: 11px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 5px 3px 0 -0.2px currentColor;
  transform: rotate(42deg);
  transform-origin: left center;
}

.icon-audit::before {
  left: 6px;
  top: 5px;
  width: 12px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.icon-audit::after {
  left: 10px;
  top: 10px;
  width: 5px;
  height: 3px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.icon-logs::before {
  left: 6px;
  top: 7px;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.icon-dashboard::before {
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.icon-dashboard::after {
  left: 8px;
  bottom: 8px;
  width: 2px;
  height: 4px;
  border-radius: 1px 1px 0 0;
  background: currentColor;
  box-shadow: 3px -3px 0 currentColor, 6px -6px 0 currentColor;
}

.icon-catalog::before {
  left: 6px;
  top: 6px;
  width: 5px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  box-shadow: 7px 0 0 -1.5px currentColor, 0 7px 0 -1.5px currentColor, 7px 7px 0 -1.5px currentColor;
}

.icon-flow::before {
  left: 4px;
  top: 5px;
  width: 5px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 11px 0 0 -1.5px currentColor, 11px 10px 0 -1.5px currentColor;
}

.icon-flow::after {
  left: 9px;
  top: 8px;
  width: 9px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.icon-bookmark::before {
  left: 7px;
  top: 4px;
  width: 10px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 2px 2px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 73%, 0 100%);
}

.icon-database::before {
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50% / 22%;
}

.icon-database::after {
  left: 5px;
  top: 10px;
  width: 14px;
  height: 5px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

.icon-rules::before {
  left: 6px;
  top: 4px;
  width: 12px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.icon-rules::after {
  left: 9px;
  top: 8px;
  width: 6px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}

.icon-calendar::before {
  left: 5px;
  top: 6px;
  width: 14px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.icon-calendar::after {
  left: 5px;
  top: 10px;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 3px 4px 0 -0.2px currentColor, 7px 4px 0 -0.2px currentColor;
}

.icon-quality::before {
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.icon-quality::after {
  left: 9px;
  top: 9px;
  width: 7px;
  height: 4px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link.is-active::after {
  position: absolute;
  inset: 9px auto 9px -12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--sonco-red);
  content: "";
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.55;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: var(--topbar);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar__left,
.topbar__right,
.user-chip,
.freshness,
.section-heading,
.panel-heading,
.page-actions,
.filter-row,
.legend-row,
.table-actions {
  display: flex;
  align-items: center;
}

.topbar__left {
  min-width: 0;
  gap: 14px;
}

.topbar__right {
  gap: 12px;
}

.timezone-picker {
  position: relative;
}

.timezone-trigger {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sonco-navy);
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.timezone-trigger:hover,
.timezone-trigger[aria-expanded="true"] {
  border-color: var(--blue-500);
  box-shadow: 0 4px 12px rgba(11, 58, 91, 0.08);
}

.timezone-trigger svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.timezone-trigger > span {
  display: grid;
  min-width: 72px;
  text-align: left;
}

.timezone-trigger small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.timezone-trigger strong {
  margin-top: 2px;
  font-size: 11px;
  white-space: nowrap;
}

.timezone-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(8, 43, 69, .18);
}

.timezone-popover[hidden] {
  display: none;
}

.timezone-popover__heading {
  display: grid;
  gap: 4px;
  margin-bottom: 15px;
}

.timezone-popover__heading strong {
  color: var(--sonco-navy);
  font-size: 14px;
}

.timezone-popover__heading span,
.timezone-popover p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.timezone-popover p {
  margin: 12px 0 0;
}

.timezone-popover p strong {
  color: var(--ink);
}

.localized-datetime {
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--sonco-navy);
  background: #fff;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.menu-toggle span {
  margin: 4px 0;
}

.breadcrumbs {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs strong {
  color: var(--sonco-navy);
  font-weight: 700;
}

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--sonco-navy);
  background: #fff;
  cursor: pointer;
}

.icon-button::before {
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.icon-button::after {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--sonco-red);
  content: "";
}

.user-chip {
  gap: 9px;
  padding: 5px 9px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

a.user-chip:hover {
  border-color: var(--blue-500);
  box-shadow: 0 4px 12px rgba(11, 58, 91, 0.08);
}

.user-chip__avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--sonco-navy);
  font-size: 11px;
  font-weight: 800;
}

.user-chip__text {
  display: grid;
  line-height: 1.1;
}

.user-chip__text strong {
  font-size: 12px;
}

.user-chip__text span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.panel-copy {
  min-height: 58px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 17px;
}

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

.field-label {
  display: grid;
  gap: 7px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-control {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(63, 126, 166, 0.12);
}

.text-button {
  padding: 0;
  color: var(--blue-500);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.check-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.check-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--sonco-navy);
}

.main {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 28px 30px 48px;
}

.view {
  display: none;
  animation: view-in 180ms ease;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--sonco-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading h1,
.page-heading h2,
.section-heading h2,
.panel-heading h3 {
  margin: 0;
  color: var(--sonco-navy);
}

.page-heading h1 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.035em;
}

.page-heading p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.page-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.btn {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--sonco-navy);
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: 160ms ease;
}

.btn:hover {
  border-color: var(--sonco-navy);
  transform: translateY(-1px);
}

.btn--primary {
  border-color: var(--sonco-navy);
  color: #fff;
  background: var(--sonco-navy);
}

.btn--danger {
  border-color: var(--sonco-red);
  color: #fff;
  background: var(--sonco-red);
}

.btn--small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 11px;
}

.info-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px 13px;
  border: 1px solid #f2d2d4;
  border-radius: 10px;
  color: #7b3035;
  background: #fff8f8;
  font-size: 11px;
}

.info-note::before {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--sonco-red);
  content: "i";
  font-size: 11px;
  font-weight: 800;
}

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

.metric-card,
.panel,
.dashboard-card,
.integration-card,
.flash-group,
.entity-card,
.upload-zone {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 18px;
}

.metric-card::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blue-500);
  content: "";
}

.metric-card--red::after { background: var(--sonco-red); }
.metric-card--green::after { background: var(--green); }
.metric-card--amber::after { background: #d99a24; }

.metric-card__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.metric-card__value {
  display: block;
  margin-top: 13px;
  color: var(--sonco-navy);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.metric-card__context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.delta {
  color: var(--green);
  font-weight: 800;
}

.delta--negative { color: var(--danger); }
.delta--neutral { color: var(--muted); }

.grid-2,
.grid-3,
.dashboard-grid,
.integration-grid,
.flash-grid,
.ranking-grid,
.entity-grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flash-grid { grid-template-columns: 1.05fr 1.05fr 1.45fr; }
.ranking-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  min-width: 0;
  padding: 18px;
}

.panel--span-2 { grid-column: span 2; }
.panel--flush { padding: 0; overflow: hidden; }

.panel-heading,
.section-heading {
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading h3 {
  font-size: 14px;
}

.panel-heading p,
.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.section-heading {
  margin: 28px 0 14px;
}

.section-heading h2 {
  font-size: 18px;
}

.freshness {
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.freshness::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
  content: "";
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef3f6;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.badge--green { color: #0d6947; background: var(--green-soft); }
.badge--amber { color: #7b5200; background: var(--amber-soft); }
.badge--red { color: #90212a; background: var(--sonco-red-soft); }
.badge--blue { color: var(--sonco-navy); background: var(--blue-100); }

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

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--muted-2);
}

.status-dot--green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-dot--red { background: var(--danger); box-shadow: 0 0 0 4px var(--sonco-red-soft); }
.status-dot--amber { background: #d6911f; box-shadow: 0 0 0 4px var(--amber-soft); }

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.bar-row strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f5;
}

.bar-fill {
  display: block;
  width: var(--value, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sonco-navy), var(--blue-500));
}

.bar-fill--red { background: linear-gradient(90deg, #cf343b, #ed777c); }
.bar-fill--green { background: linear-gradient(90deg, #16845b, #54b78e); }
.bar-fill--amber { background: linear-gradient(90deg, #b77a14, #e8b85e); }

.mini-chart {
  display: flex;
  height: 104px;
  align-items: flex-end;
  gap: 9px;
  padding-top: 12px;
  border-bottom: 1px solid var(--line);
}

.mini-chart span {
  position: relative;
  flex: 1;
  height: var(--height, 50%);
  min-width: 7px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #5e91b2, var(--sonco-navy));
}

.mini-chart span.is-alert { background: linear-gradient(180deg, #ef7378, var(--sonco-red)); }

.axis-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 9px;
}

.line-chart {
  width: 100%;
  height: auto;
  min-height: 210px;
}

.line-chart .grid-line {
  stroke: #e8eef2;
  stroke-width: 1;
}

.line-chart .series-primary {
  fill: none;
  stroke: var(--sonco-navy);
  stroke-width: 3;
}

.line-chart .series-secondary {
  fill: none;
  stroke: var(--sonco-red);
  stroke-width: 2.5;
}

.line-chart .series-tertiary {
  fill: none;
  stroke: #56a386;
  stroke-width: 2.5;
}

.line-chart .area-primary {
  fill: rgba(63, 126, 166, 0.09);
}

.legend-row {
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
}

.legend-row span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--legend, var(--sonco-navy));
  content: "";
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  padding: 11px 14px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #fbfcfd;
}

.table-actions {
  gap: 6px;
}

.integration-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 17px;
}

.integration-card__mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  color: var(--sonco-navy);
  background: var(--blue-100);
  font-size: 14px;
  font-weight: 900;
}

.integration-card__body strong {
  display: block;
  color: var(--sonco-navy);
  font-size: 13px;
}

.integration-card__body span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-card {
  position: relative;
  display: flex;
  min-height: 212px;
  flex-direction: column;
  overflow: hidden;
  transition: 180ms ease;
}

.dashboard-card:hover {
  border-color: #b7c9d5;
  box-shadow: 0 12px 30px rgba(14, 48, 70, 0.1);
  transform: translateY(-2px);
}

.dashboard-card__visual {
  position: relative;
  display: grid;
  height: 96px;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 7px;
  padding: 16px;
  background: linear-gradient(135deg, #edf4f8, #f8fafb);
}

.dashboard-card__visual span {
  display: block;
  border-radius: 5px;
  background: rgba(11, 58, 91, 0.12);
}

.dashboard-card__visual span:first-child {
  background: linear-gradient(180deg, rgba(11, 58, 91, 0.72), rgba(11, 58, 91, 0.18));
}

.dashboard-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px 16px 16px;
}

.dashboard-card__body strong {
  color: var(--sonco-navy);
  font-size: 14px;
}

.dashboard-card__body p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.dashboard-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.dashboard-card--disabled {
  box-shadow: none;
}

.dashboard-card--disabled .dashboard-card__visual,
.dashboard-card--disabled .dashboard-card__body {
  opacity: 0.65;
}

.flash-group {
  padding: 17px;
}

.flash-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--sonco-navy);
  font-size: 14px;
  font-weight: 750;
}

.period-grid {
  display: grid;
  grid-template-columns: 70px repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.period-grid > div {
  min-height: 67px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.period-grid .period {
  display: flex;
  align-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 800;
}

.period-grid .period-value strong {
  display: block;
  color: var(--sonco-navy);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.period-grid .period-value span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.flash-gp-notice {
  margin: 0 0 18px;
  color: #735015;
  font-size: 14px;
  line-height: 1.6;
}
.flash-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 16px;
}

.flash-summary {
  min-width: 0;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.flash-summary h2 {
  margin: 0 0 14px;
  color: var(--sonco-navy);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.flash-summary:not(.flash-summary--budget) {
  display: flex;
  flex-direction: column;
}

.flash-kpi-table,
.budget-kpi-table {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.flash-kpi-table {
  flex: 1;
  grid-auto-rows: 1fr;
  grid-template-columns: 48px minmax(0, 1.05fr) minmax(0, 0.65fr) minmax(0, 1.3fr) minmax(0, 0.65fr);
}

.budget-kpi-table {
  grid-template-columns: 44px repeat(5, minmax(0, 1fr));
}

.flash-period,
.flash-kpi {
  min-width: 0;
  min-height: 72px;
  padding: 11px 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flash-period {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sonco-navy);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.flash-kpi {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.flash-kpi strong {
  display: block;
  color: var(--sonco-navy);
  font-size: clamp(14px, 0.95vw, 19px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
  white-space: nowrap;
}

.flash-kpi strong em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-weight: 620;
}

.flash-kpi span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.dashboard-updated {
  display: grid;
  min-width: 132px;
  gap: 2px;
  padding-right: 14px;
  border-right: 1px solid var(--line-strong);
  text-align: right;
}

.dashboard-updated small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-updated strong {
  color: var(--sonco-navy);
  font-size: 11px;
}

.budget-head {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  margin-bottom: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.flash-kpi--featured {
  min-height: 76px;
}

.flash-budget-box { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flash-budget-box > .flash-kpi { border: 0; }
.flash-conversion-detail, .flash-order-statuses { margin: 0 8px 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.flash-conversion-detail { display: grid; gap: 8px; }
.flash-conversion-detail > span { display: grid; gap: 3px; }
.flash-conversion-detail strong { color: var(--sonco-navy); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.flash-order-statuses__heading { display: block; margin-bottom: 5px; }
.flash-order-statuses > div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.flash-status-count { white-space: nowrap; }
.flash-status-count b { color: var(--sonco-navy); font-variant-numeric: tabular-nums; }

.flash-kpi--featured strong {
  font-size: clamp(18px, 1.55vw, 24px);
}

.flash-budget-box > .flash-kpi--action { padding-right: 22px; padding-left: 8px; }

.flash-kpi--action {
  position: relative;
  width: 100%;
  padding-right: 44px;
  padding-left: 44px;
  border-top: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 0;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.flash-kpi--action:hover,
.flash-kpi--action:focus-visible {
  z-index: 1;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--blue-500);
  outline: 0;
}

.expand-detail-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background-color: var(--sonco-navy);
  background-image: linear-gradient(45deg, transparent 42%, currentColor 43%, currentColor 57%, transparent 58%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  box-shadow: 0 3px 9px rgba(8, 47, 70, 0.2);
  transform: translateY(-50%);
}

.expand-detail-icon::before,
.expand-detail-icon::after {
  position: absolute;
  width: 7px;
  height: 7px;
  content: "";
}

.expand-detail-icon::before {
  right: 6px;
  top: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.expand-detail-icon::after {
  left: 6px;
  bottom: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.flash-kpi--action:hover .expand-detail-icon,
.flash-kpi--action:focus-visible .expand-detail-icon {
  background-color: var(--blue-500);
  transform: translateY(-50%) scale(1.04);
}

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

.flash-ranking-panel {
  padding: 16px;
}

.flash-ranking-panel .panel-heading {
  min-height: 32px;
  margin-bottom: 8px;
}

.flash-ranking-panel .panel-heading h3 {
  color: var(--sonco-navy);
  font-size: 14px;
}

.flash-rank-mode-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3f6;
}

.flash-rank-mode-toggle button {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.flash-rank-mode-toggle button[aria-pressed="true"] {
  color: var(--sonco-navy);
  background: #fff;
  box-shadow: 0 1px 4px rgba(14, 48, 70, 0.12);
}

.flash-rank-mode-toggle button:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 1px;
}

.flash-rank-header,
.flash-rank-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.6fr) minmax(132px, 1.25fr) minmax(70px, 0.7fr);
  gap: 8px;
  align-items: center;
}

.flash-rank-header {
  padding: 0 8px 7px 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.flash-rank-header span:first-child {
  text-align: left;
}

.flash-rank-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-color: #b9c5cd #edf1f4;
  scrollbar-width: thin;
}

.flash-rank-scroll::-webkit-scrollbar {
  width: 7px;
}

.flash-rank-scroll::-webkit-scrollbar-track {
  border-radius: 8px;
  background: #edf1f4;
}

.flash-rank-scroll::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #b9c5cd;
}

.flash-rank-row {
  min-height: 42px;
}

.flash-rank-row > strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.flash-rank-empty {
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.flash-rank-measure {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(28px, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.flash-rank-measure i {
  display: block;
  width: var(--value, 50%);
  height: 18px;
  border-radius: 1px;
  background: #91afe5;
}

.flash-rank-measure--gp i {
  background: #d1d5d8;
}

.flash-rank-measure small {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.flash-sales-row {
  display: block;
}

.flash-operational-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.flash-chart-panel {
  min-height: 390px;
}

.flash-sales-row .flash-chart-panel {
  min-height: 500px;
}

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

.flash-chart-panel .panel-heading p {
  max-width: 360px;
}

.flash-chart-panel .panel-heading h3 {
  font-size: 16px;
}

.flash-chart-panel .legend-row {
  font-size: 11.5px;
}

.title-accent {
  color: var(--blue-500);
}

.flash-month-chart,
.flash-cumulative-chart {
  min-height: 330px;
}

.flash-month-chart {
  min-height: 405px;
}

.flash-grid-line,
.flash-section-line {
  stroke: #e5ebef;
  stroke-width: 1;
}

.flash-section-line {
  stroke-dasharray: 3 4;
}

.flash-series {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.flash-series--budget { stroke: #e8595f; }
.flash-series--sales-cy { stroke: #102f44; stroke-width: 3; }
.flash-series--sales-py { stroke: #9aa5ad; }
.flash-series--orders-cy { stroke: #42a17d; }
.flash-series--outlier-cy { stroke: #3f79ad; }
.flash-series--outlier-py { stroke: #ef8b2c; }

.flash-point {
  stroke: #fff;
  stroke-width: 1.5;
}

.flash-point--budget { fill: #e8595f; }
.flash-point--sales-cy { fill: #102f44; }
.flash-point--sales-py { fill: #9aa5ad; }
.flash-point--orders-cy { fill: #42a17d; }
.flash-point--outlier-cy { fill: #3f79ad; }
.flash-point--outlier-py { fill: #ef8b2c; }

.flash-value-label {
  font-size: 10px;
  font-weight: 650;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}

.flash-value-label--budget { fill: #e8595f; }
.flash-value-label--sales-cy { fill: #102f44; }
.flash-value-label--sales-py { fill: #87949d; }
.flash-value-label--orders-cy { fill: #42a17d; }
.flash-value-label--outlier-cy { fill: #3f79ad; }
.flash-value-label--outlier-py { fill: #ef8b2c; }

.flash-axis-label,
.flash-axis-title {
  fill: var(--muted);
  font-size: 11px;
}

.flash-axis-title {
  font-size: 9px;
  font-weight: 700;
  writing-mode: vertical-rl;
}

.flash-change-bar {
  fill: #38d65c;
}

.flash-change-label {
  fill: #22af42;
  font-size: 10.5px;
  font-weight: 800;
}

.outlier-panel {
  min-width: 0;
}

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

.outlier-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px 10px;
}

.outlier-heading h3 {
  margin: 0;
  color: var(--sonco-navy);
  font-size: 13px;
  line-height: 1.3;
}

.outlier-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.data-table--compact {
  table-layout: auto;
  font-size: 10.5px;
}

.data-table--compact th,
.data-table--compact td {
  padding: 9px 8px;
  white-space: nowrap;
}

.data-table--compact th:last-child,
.data-table--compact td:last-child {
  text-align: right;
}

.table-total td {
  color: var(--sonco-navy);
  background: var(--surface-soft);
  font-weight: 800;
}

.open-orders-dialog {
  width: min(1080px, calc(100vw - 40px));
  max-width: none;
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgba(5, 28, 43, 0.35);
}

.open-orders-dialog[open] {
  display: flex;
  flex-direction: column;
}

.open-orders-dialog::backdrop {
  background: rgba(5, 27, 42, 0.64);
  backdrop-filter: blur(4px);
}

.open-orders-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f7fafc, #fff 70%);
}

.open-orders-dialog__head h2 {
  margin: 4px 0 0;
  color: var(--sonco-navy);
  font-size: 23px;
  letter-spacing: -0.03em;
}

.open-orders-dialog__head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-close {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--surface-soft);
}

.modal-close span::before,
.modal-close span::after {
  position: absolute;
  left: 10px;
  top: 17px;
  width: 15px;
  height: 1.5px;
  background: var(--sonco-navy);
  content: "";
}

.modal-close span::before { transform: rotate(45deg); }
.modal-close span::after { transform: rotate(-45deg); }

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

.open-orders-summary > div {
  padding: 16px 22px;
  background: #fff;
}

.open-orders-summary span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.open-orders-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--sonco-navy);
  font-size: 21px;
  letter-spacing: -0.03em;
}

.open-orders-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.open-orders-search {
  display: flex;
  min-width: 260px;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.open-orders-search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.icon-search-small {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.icon-search-small::after {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 5px;
  height: 1.5px;
  background: var(--muted);
  content: "";
  transform: rotate(45deg);
}

.open-orders-asof {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.open-orders-table-wrap {
  min-height: 250px;
  overflow: auto;
}

.open-orders-table {
  font-size: 12.5px;
}

.open-orders-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}

.open-orders-table th,
.open-orders-table td {
  padding: 11px 16px;
}

.open-orders-table th {
  font-size: 10.5px;
}

.open-orders-table .badge {
  padding: 5px 9px;
  font-size: 10px;
}

.open-orders-table th:last-child,
.open-orders-table td:last-child {
  text-align: right;
}

.open-orders-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.open-orders-dialog__footer strong {
  color: var(--sonco-navy);
}

.inventory-view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 18px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.inventory-view-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.inventory-view-tabs button:hover {
  color: var(--sonco-navy);
  background: rgba(255, 255, 255, 0.75);
}

.inventory-view-tabs button.is-active {
  color: #fff;
  background: var(--sonco-navy);
  box-shadow: 0 4px 12px rgba(6, 43, 65, 0.18);
}

.inventory-view-panel[hidden] {
  display: none;
}

.inventory-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.inventory-metric-action {
  width: 100%;
  padding-right: 58px;
  border: 1px solid var(--line);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.inventory-metric-action:hover,
.inventory-metric-action:focus-visible {
  border-color: var(--blue-500);
  box-shadow: 0 9px 24px rgba(18, 58, 80, 0.11);
  outline: 0;
}

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

.inventory-measure-list,
.inventory-customer-scroll {
  display: grid;
}

.inventory-measure-list > div,
.inventory-customer-scroll > div {
  display: grid;
  min-height: 43px;
  grid-template-columns: minmax(130px, 0.9fr) minmax(160px, 1.45fr) minmax(105px, 0.75fr);
  align-items: center;
  gap: 12px;
}

.inventory-measure-list strong,
.inventory-customer-scroll strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-measure-list > div > span,
.inventory-customer-scroll > div > span {
  display: block;
  height: 20px;
  border-radius: 2px;
  background: #eef2f4;
}

.inventory-measure-list i,
.inventory-customer-scroll i {
  display: block;
  width: var(--value, 50%);
  height: 100%;
  border-radius: 2px;
  background: #6f91c7;
}

.inventory-customer-scroll i {
  background: #87add2;
}

.inventory-measure-list i.is-green { background: #57ad8b; }
.inventory-measure-list i.is-yellow { background: #d1bc3e; }
.inventory-measure-list i.is-orange { background: #ed9b36; }
.inventory-measure-list i.is-red { background: #e96b70; }

.inventory-measure-list em,
.inventory-customer-scroll em {
  color: var(--ink);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.inventory-measure-list .is-total {
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.inventory-measure-list .is-total strong,
.inventory-measure-list .is-total em {
  color: var(--sonco-navy);
  font-weight: 800;
}

.inventory-customer-scroll {
  max-height: 344px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-color: #b9c5cd #edf1f4;
  scrollbar-width: thin;
}

.inventory-chart-panel {
  min-height: 470px;
}

.inventory-wide-chart {
  min-height: 410px;
}

.inventory-grid-line {
  stroke: #e6ecef;
  stroke-width: 1;
}

.inventory-series {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.inventory-series--navy { stroke: var(--sonco-navy); }
.inventory-series--blue { stroke: #3f79ad; }
.inventory-series--amber { stroke: #e8a02b; }
.inventory-series--red { stroke: #d94b51; }

.inventory-point {
  stroke: #fff;
  stroke-width: 1.5;
}

.inventory-point--navy { fill: var(--sonco-navy); }
.inventory-point--blue { fill: #3f79ad; }
.inventory-point--amber { fill: #e8a02b; }
.inventory-point--red { fill: #d94b51; }

.inventory-value-label {
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.inventory-value-label--navy { fill: var(--sonco-navy); }
.inventory-value-label--blue { fill: #3f79ad; }
.inventory-value-label--amber { fill: #c98516; }
.inventory-value-label--red { fill: #d94b51; }

.inventory-axis-label {
  fill: var(--muted);
  font-size: 10px;
}

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

.inventory-position-grid .entity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.inventory-aging-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.inventory-aging-grid > div {
  display: grid;
  padding: 18px;
  background: #fff;
}

.inventory-aging-grid strong {
  color: var(--muted);
  font-size: 11px;
}

.inventory-aging-grid span {
  margin-top: 12px;
  color: var(--sonco-navy);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.inventory-aging-grid em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.inventory-aging-grid i {
  display: block;
  width: var(--value, 50%);
  height: 5px;
  margin-top: 16px;
  border-radius: 5px;
  background: var(--blue-500);
}

.inventory-aging-grid i.is-red { background: var(--danger); }
.inventory-aging-grid i.is-yellow { background: #d99a24; }

.entity-card {
  padding: 17px;
}

.entity-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.entity-card__head strong {
  color: var(--sonco-navy);
  font-size: 13px;
}

.entity-card__total {
  margin-bottom: 13px;
  color: var(--sonco-navy);
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.stacked-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f5;
}

.stacked-bar span:nth-child(1) { background: var(--green); }
.stacked-bar span:nth-child(2) { background: #65b496; }
.stacked-bar span:nth-child(3) { background: #e4b752; }
.stacked-bar span:nth-child(4) { background: var(--sonco-red); }

.upload-zone {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 32px;
  border: 1.5px dashed #b9cbd6;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  transition: 160ms ease;
}

.upload-zone:hover,
.upload-zone.is-selected {
  border-color: var(--sonco-navy);
  background: #fafdff;
}

.upload-zone__mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 15px;
  color: var(--sonco-navy);
  background: var(--blue-100);
  font-size: 20px;
  font-weight: 900;
}

.upload-zone strong {
  color: var(--sonco-navy);
  font-size: 15px;
}

.upload-zone p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.filter-row {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-control {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.tab-row {
  display: flex;
  gap: 5px;
  margin-bottom: 17px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #edf3f6;
}

.tab-row button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.tab-row button.is-active {
  color: var(--sonco-navy);
  background: #fff;
  box-shadow: 0 2px 7px rgba(14, 48, 70, 0.08);
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.auth-page {
  min-height: 100vh;
  background: #eef3f6;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(460px, 1.12fr) minmax(420px, 0.88fr);
}

.auth-context {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 42px 54px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(91, 163, 204, 0.32), transparent 28%),
    radial-gradient(circle at 12% 82%, rgba(230, 44, 51, 0.12), transparent 32%),
    linear-gradient(145deg, var(--sonco-navy-900), var(--sonco-navy));
}

.auth-shell--bi .auth-context {
  background:
    radial-gradient(circle at 78% 22%, rgba(89, 169, 138, 0.25), transparent 30%),
    radial-gradient(circle at 18% 78%, rgba(63, 126, 166, 0.25), transparent 33%),
    linear-gradient(145deg, #071f34, var(--sonco-navy));
}

body[data-app="data-portal-login"] .auth-context {
  background:
    radial-gradient(circle at 78% 20%, rgba(103, 194, 171, 0.28), transparent 31%),
    radial-gradient(circle at 16% 80%, rgba(75, 143, 151, 0.25), transparent 34%),
    linear-gradient(145deg, #092b31, #184d54);
}

.auth-context::after {
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(255, 255, 255, 0.025), 0 0 0 128px rgba(255, 255, 255, 0.018);
  content: "";
}

.auth-context__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.auth-context__brand img {
  width: 130px;
  padding: 8px 11px;
  border-radius: 9px;
  background: #fff;
}

.auth-context__brand span {
  padding-left: 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.auth-context__content {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  margin: auto 0;
}

.eyebrow--light {
  color: #9bc9e3;
}

.auth-context__content h1 {
  max-width: 620px;
  margin: 16px 0 20px;
  color: #fff;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.auth-context__content > p {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.65;
}

.auth-context__footer {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 42px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 80% 20%, var(--blue-200), transparent 40%);
}

.auth-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(14, 48, 70, 0.12);
}

.auth-card__heading {
  margin-bottom: 28px;
}

.auth-product {
  color: var(--sonco-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card__heading h2 {
  margin: 10px 0 7px;
  color: var(--sonco-navy);
  font-size: 34px;
  letter-spacing: -0.035em;
}

.auth-card__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.btn--wide {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  margin-top: 5px;
}

.microsoft-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(16, 49, 69, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.microsoft-button:hover {
  border-color: var(--blue-500);
  box-shadow: 0 7px 18px rgba(16, 49, 69, 0.09);
  transform: translateY(-1px);
}

.microsoft-mark {
  display: grid;
  width: 18px;
  height: 18px;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }

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

.workspace-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-card__head,
.table-actions {
  display: flex;
  align-items: center;
}

.workspace-card__head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.workspace-card__head .nav-icon {
  color: var(--blue-500);
  background: var(--blue-100);
}

.workspace-card h3 {
  margin: 0 0 8px;
  color: var(--sonco-navy);
  font-size: 16px;
}

.workspace-card > p {
  min-height: 42px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.compact-list,
.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.compact-list div,
.detail-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.compact-list dt,
.detail-list dt {
  color: var(--muted);
  font-size: 11px;
}

.compact-list dd,
.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.workspace-card .table-actions {
  gap: 8px;
  margin-top: 18px;
}

.activity-list {
  display: grid;
}

.activity-list > div {
  position: relative;
  display: grid;
  min-height: 54px;
  grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 2px 0 14px;
}

.activity-list > div:not(:last-child)::after {
  position: absolute;
  left: 5px;
  top: 17px;
  bottom: -1px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.activity-dot {
  z-index: 1;
  grid-row: 1 / span 2;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.activity-dot--green {
  background: var(--green);
}

.activity-list strong {
  color: var(--ink);
  font-size: 12px;
}

.activity-list small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.notification-list {
  display: grid;
}

.notification-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  width: 100%;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

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

.notification-item:hover,
.notification-item--unread {
  background: var(--surface-soft);
}

.notification-item > span:last-child {
  display: grid;
  gap: 4px;
}

.notification-item strong {
  color: var(--sonco-navy);
  font-size: 12px;
}

.notification-item small,
.notification-item time {
  color: var(--muted);
  font-size: 10px;
}

.notification-item time {
  margin-top: 3px;
}

.notification-mark {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--blue-500);
}

.notification-mark--green { background: var(--green); }
.notification-mark--amber { background: var(--amber); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: 340px;
  padding: 13px 15px;
  border-radius: 10px;
  color: #fff;
  background: var(--sonco-navy);
  box-shadow: 0 16px 40px rgba(5, 33, 51, 0.25);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-overlay {
  display: none;
}

@media (max-width: 1450px) {
  .flash-ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .inventory-kpi-grid--four,
  .inventory-position-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flash-grid { grid-template-columns: 1fr; }
  .flash-summary-grid,
  .flash-operational-row { grid-template-columns: 1fr; }
  .flash-summary--budget { grid-column: auto; }
  .inventory-detail-grid { grid-template-columns: 1fr; }
  .inventory-aging-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-context { min-height: 44vh; padding: 30px 32px; }
  .auth-context__content { margin: 56px 0; }
  .auth-context__content h1 { font-size: clamp(34px, 7vw, 52px); }
  .auth-panel { min-height: 56vh; padding: 36px 24px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 190ms ease;
  }

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

  .workspace { margin-left: 0; }
  .menu-toggle { display: block; }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(5, 27, 42, 0.46);
  }

  body.is-menu-open .mobile-overlay { display: block; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .auth-context { min-height: auto; padding: 24px 20px 34px; }
  .auth-context__brand { align-items: flex-start; flex-direction: column; gap: 10px; }
  .auth-context__brand span { padding: 0; border-left: 0; }
  .auth-context__content { margin: 48px 0; }
  .auth-context__content h1 { font-size: 36px; }
  .auth-context__content > p { font-size: 14px; }
  .auth-context__footer { display: none; }
  .auth-panel { min-height: auto; padding: 24px 14px; }
  .auth-card { padding: 28px 22px; }

  .topbar { padding: 0 16px; }
  .topbar__right .icon-button,
  .user-chip__text { display: none; }
  .timezone-trigger { width: 38px; min-height: 38px; justify-content: center; padding: 0; border-radius: 10px; }
  .timezone-trigger > span { display: none; }
  .main { padding: 22px 16px 38px; }

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

  .page-actions { justify-content: flex-start; }
  .metric-grid,
  .grid-2,
  .dashboard-grid,
  .workspace-card-grid,
  .integration-grid,
  .ranking-grid,
  .flash-ranking-grid,
  .entity-grid { grid-template-columns: 1fr; }
  .inventory-kpi-grid,
  .inventory-kpi-grid--four,
  .inventory-position-grid,
  .inventory-aging-grid { grid-template-columns: 1fr; }
  .panel--span-2 { grid-column: auto; }
  .bar-row { grid-template-columns: minmax(84px, 1fr) minmax(90px, 1.3fr) auto; }
  .period-grid { grid-template-columns: 58px repeat(2, minmax(0, 1fr)); }
  .flash-summary { overflow-x: auto; }
  .flash-rank-header,
  .flash-rank-row { grid-template-columns: minmax(130px, 1.5fr) minmax(110px, 1.15fr) minmax(62px, 0.65fr); }
  .flash-chart-panel { min-height: auto; }
  .dashboard-updated { min-width: 0; padding-right: 0; border-right: 0; text-align: left; }
  .open-orders-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .open-orders-toolbar { align-items: stretch; flex-direction: column; }
  .open-orders-search { min-width: 0; }
  .open-orders-asof { margin-left: 0; }
  .open-orders-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 12px; }
  .open-orders-dialog__head { padding: 20px; }
  .open-orders-dialog__head h2 { font-size: 20px; }
  .open-orders-dialog__footer { align-items: flex-start; flex-direction: column; }
  .inventory-view-tabs { display: grid; grid-template-columns: 1fr; width: 100%; }
  .inventory-measure-list > div,
  .inventory-customer-scroll > div { grid-template-columns: minmax(96px, 0.8fr) minmax(100px, 1.15fr) auto; gap: 8px; }
  .inventory-chart-panel { min-height: auto; }
  .inventory-wide-chart { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Data Portal application foundation */
.auth-card--wide { width: min(520px, 100%); }

.page-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #f7fafc;
  font-size: 13px;
  line-height: 1.45;
}

.page-message--success { border-color: #a7d8c7; color: #145b47; background: #eef9f5; }
.page-message--error { border-color: #efb4b6; color: #8e2025; background: #fff3f3; }
.page-message--warning { border-color: #ead39b; color: #735719; background: #fff9e9; }
.page-message--info { border-color: #acc9dc; color: #174d70; background: #f0f7fb; }

.mfa-setup-card {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #b9d8d0;
  border-radius: 12px;
  background: #f1faf7;
}

.mfa-setup-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.mfa-qr-panel {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #c9ded8;
  border-radius: 12px;
  background: #fff;
}

.mfa-qr-panel img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.mfa-qr-panel span,
.mfa-manual-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.mfa-manual-panel { display: grid; gap: 10px; min-width: 0; }
.mfa-manual-panel p { text-align: left; }

.secret-value,
.uri-value {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--sonco-navy);
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
}

.mfa-setup-card details { color: var(--muted); font-size: 12px; }
.mfa-setup-card summary { margin-bottom: 8px; cursor: pointer; }
.mfa-code { font-size: 23px; font-weight: 700; letter-spacing: 0.34em; text-align: center; }
.auth-secondary-action { margin-top: 18px; text-align: center; }

.logout-form { margin: 0; }
.icon-button--logout::before {
  width: 14px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-right: 0;
  border-radius: 2px 0 0 2px;
}
.icon-button--logout::after {
  top: 17px;
  right: 8px;
  width: 10px;
  height: 1.8px;
  border: 0;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 4px -3px 0 -1px currentColor, 4px 3px 0 -1px currentColor;
}

.status-list { display: grid; }
.status-list > div {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(170px, 1.25fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.status-list > div:last-child { border-bottom: 0; }
.status-list > div > span:first-child { color: var(--muted); }

.role-summary { display: grid; gap: 12px; }
.role-summary > div { display: grid; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.role-summary strong { color: var(--sonco-navy); font-size: 13px; }
.role-summary span { color: var(--muted); font-size: 12px; }

.table-secondary { color: var(--muted); font-size: 11px; }
.empty-cell { padding: 30px !important; color: var(--muted); text-align: center; }
.table-actions { display: flex; align-items: center; gap: 7px; }
.table-actions form { margin: 0; }
.bi-user-access-form { display: flex; min-width: 360px; align-items: center; gap: 7px; }
.bi-user-access-form .table-control { min-width: 120px; }
.pending-access-actions { margin-top: 20px; }

.form-panel { max-width: 980px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid--token { margin-top: 18px; }
.field-hint { color: var(--muted); font-size: 10px; font-weight: 500; }
.form-check { margin-top: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.permission-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.permission-group { display: grid; align-content: start; gap: 13px; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.permission-group legend { padding: 0 7px; color: var(--sonco-navy); font-size: 12px; font-weight: 800; }
.permission-group .check-control { align-items: flex-start; }
.permission-group .check-control span { display: grid; gap: 2px; }
.permission-group .check-control strong { color: var(--ink); font-size: 12px; }
.permission-group .check-control small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }

.role-card { display: flex; min-height: 225px; flex-direction: column; }
.role-card .btn { align-self: flex-start; margin-top: auto; }

.create-panel { margin-bottom: 16px; }
.create-panel > summary { color: var(--sonco-navy); font-size: 13px; font-weight: 800; cursor: pointer; }
.secret-reveal { display: grid; grid-template-columns: minmax(170px, .7fr) minmax(260px, 1.5fr) auto; gap: 16px; align-items: center; margin-bottom: 16px; padding: 16px 18px; border: 1px solid #e1c06d; border-radius: 12px; background: #fff9e8; }
.secret-reveal p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.secret-reveal code { overflow: auto; padding: 10px; border-radius: 7px; background: rgba(255,255,255,.75); color: var(--sonco-navy); font-size: 11px; white-space: nowrap; }
.page-filters { margin-bottom: 16px; }

@media (max-width: 1000px) {
  .permission-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secret-reveal { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .form-grid,
  .permission-groups { grid-template-columns: 1fr; }
  .status-list > div { grid-template-columns: 1fr; gap: 5px; }
  .topbar__right .icon-button--logout { display: grid; }
  .mfa-setup-layout { grid-template-columns: 1fr; }
}

/* Data operations */
.integration-grid--operations { align-items: stretch; }
.integration-card--detail { align-items: start; }
.card-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.compact-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 15px 0 0; }
.compact-details div { min-width: 0; }
.compact-details dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.compact-details dd { margin: 5px 0 0; overflow: hidden; color: var(--ink); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.card-action-stack { display: grid; gap: 7px; }
.card-action-stack form { margin: 0; }
.card-action-stack .btn { width: 100%; }
.metric-grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-card--compact { min-height: 104px; }
.metric-card--compact .metric-card__value { margin-top: 8px; font-size: 28px; }
.inline-operation-form { display: grid; grid-template-columns: minmax(260px, 520px) auto; align-items: end; gap: 12px; margin-top: 18px; }
.inline-operation-form .btn { margin-bottom: 1px; }
.table-code { color: var(--muted); font-size: 9px; }
.table-error { display: inline-block; max-width: 230px; margin-top: 5px; color: var(--danger); font-size: 10px; line-height: 1.35; }
.storage-key { display: inline-block; max-width: 300px; overflow: hidden; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.upload-zone--form { display: grid; min-height: 0; grid-template-columns: minmax(220px, .65fr) minmax(500px, 1.5fr); align-items: center; gap: 30px; padding: 22px; border-style: solid; text-align: left; cursor: default; }
.upload-zone--form:hover { border-color: var(--line); background: var(--surface); }
.upload-form { display: grid; grid-template-columns: minmax(140px, .55fr) minmax(230px, 1fr) auto; align-items: end; gap: 12px; }
.file-control { display: block; width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--muted); background: #fff; font-size: 11px; }
.file-control::file-selector-button { margin-right: 10px; padding: 6px 10px; border: 0; border-radius: 6px; color: var(--sonco-navy); background: var(--blue-100); font-size: 11px; font-weight: 800; cursor: pointer; }
.text-control--textarea { min-height: 112px; padding-top: 11px; resize: vertical; }
.check-row { display: flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 22px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
.format-fields-panel { overflow: visible; }
.format-fields-table { min-width: 1180px; }
.format-fields-table th:nth-child(1) { width: 17%; }
.format-fields-table th:nth-child(2) { width: 15%; }
.format-fields-table th:nth-child(3) { width: 10%; }
.format-fields-table th:nth-child(4) { width: 7%; text-align: center; }
.format-fields-table th:nth-child(5) { width: 12%; }
.format-fields-table th:nth-child(6) { width: 10%; }
.format-fields-table th:nth-child(7) { width: 24%; }
.table-control { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; outline: none; color: var(--ink); background: #fff; font-size: 11px; }
.table-control:focus { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(63, 126, 166, .12); }
.table-control--code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.format-required-cell { text-align: center; }
.format-required-cell input { width: 17px; height: 17px; accent-color: var(--sonco-navy); }
.row-remove { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; color: var(--danger); background: var(--sonco-red-soft); font-size: 19px; line-height: 1; cursor: pointer; }
.preview-context { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 14px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 11px; }
.preview-context strong { margin-right: 5px; color: var(--ink); }
.validation-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; }
.validation-banner strong { font-size: 12px; }
.validation-banner--success { border-color: #bfe4d4; color: #0d6947; background: var(--green-soft); }
.validation-banner--error { border-color: #f0c4c7; color: #90212a; background: var(--sonco-red-soft); }
.metric-card__value--text { max-width: 100%; overflow: hidden; font-size: clamp(18px, 1.6vw, 24px); white-space: nowrap; text-overflow: ellipsis; }
.preview-panel { max-height: 620px; }
.preview-panel .table-wrap { max-height: 620px; overflow: auto; }
.preview-table { width: max-content; min-width: 100%; }
.preview-table th { position: sticky; top: 0; z-index: 2; min-width: 135px; border-bottom: 1px solid var(--line); }
.preview-table th:first-child { left: 0; z-index: 3; min-width: 48px; }
.preview-table td { position: relative; max-width: 280px; min-width: 135px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 48px; background: var(--surface-soft); }
.preview-row-number { color: var(--muted); font-weight: 800; text-align: center; }
.preview-cell--error { padding-bottom: 26px !important; color: #8b2229; background: var(--sonco-red-soft) !important; }
.cell-issue { position: absolute; right: 8px; bottom: 5px; left: 14px; overflow: hidden; color: var(--danger); font-size: 8px; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 1260px) {
  .metric-grid--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .upload-zone--form { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .integration-grid--operations { grid-template-columns: 1fr; }
  .upload-form { grid-template-columns: 1fr; }
  .upload-form .btn { justify-self: start; }
}

@media (max-width: 720px) {
  .metric-grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-details { grid-template-columns: 1fr; }
  .inline-operation-form { grid-template-columns: 1fr; }
}

/* Governed data access */
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-card { display: flex; min-height: 300px; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: 160ms ease; }
.catalog-card:hover { border-color: #9ec9c0; box-shadow: 0 12px 28px rgba(14, 48, 70, .1); transform: translateY(-2px); }
.catalog-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.catalog-card__icon { position: relative; display: block; width: 38px; height: 38px; border-radius: 10px; color: #28766d; background: #e7f5f1; }
.catalog-card__icon.icon-database::before { left: 8px; top: 8px; width: 22px; height: 22px; }
.catalog-card__icon.icon-database::after { left: 8px; top: 16px; width: 22px; height: 8px; }
.catalog-card__domain { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.catalog-card h2 { margin: 8px 0 9px; color: var(--sonco-navy); font-size: 18px; line-height: 1.25; }
.catalog-card p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.catalog-card__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: auto; }
.catalog-card__meta span { display: grid; gap: 3px; padding: 10px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 9px; text-align: center; }
.catalog-card__meta strong { color: var(--sonco-navy); font-size: 14px; }
.catalog-card__footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; }
.contract-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.contract-summary article { display: grid; gap: 7px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.contract-summary span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.contract-summary strong { overflow: hidden; color: var(--sonco-navy); font-size: 12px; text-overflow: ellipsis; }
.endpoint-panel { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.2fr); align-items: center; gap: 28px; border-left: 3px solid var(--green); }
.endpoint-panel strong { color: var(--sonco-navy); font-size: 15px; }
.endpoint-panel p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.endpoint-panel > code { overflow: auto; padding: 15px; border-radius: 9px; color: #d9f4eb; background: #113b42; font-size: 11px; white-space: nowrap; }
.relation-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.relation-panel span { color: var(--muted); font-size: 11px; font-weight: 700; }
.relation-panel code { padding: 8px 10px; border-radius: 7px; color: var(--sonco-navy); background: var(--blue-100); }
.scope-field { display: grid; align-content: start; gap: 10px; margin: 0; padding: 13px; border: 1px solid var(--line-strong); border-radius: 9px; }
.scope-field legend { padding: 0 5px; color: var(--ink); font-size: 12px; font-weight: 700; }
.badge-list { display: flex; min-width: 180px; flex-wrap: wrap; gap: 5px; }
.panel-table-heading { padding: 18px; border-bottom: 1px solid var(--line); }
.panel-table-heading h2 { margin: 0; color: var(--sonco-navy); font-size: 16px; }
.panel-table-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

@media (max-width: 1260px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .catalog-grid,
  .endpoint-panel { grid-template-columns: 1fr; }
  .contract-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .catalog-grid,
  .contract-summary { grid-template-columns: 1fr; }
}

.catalog-metrics { margin-bottom: 16px; }
.catalog-filters { display: grid; grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(145px, .7fr)) auto; align-items: end; gap: 12px; }
.catalog-filter-actions { display: flex; gap: 8px; padding-bottom: 1px; }
.catalog-source-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.catalog-source-list span { padding: 5px 8px; border: 1px solid #cde1dc; border-radius: 999px; color: #28675f; background: #f1faf7; font-size: 9px; font-weight: 750; }
.catalog-lineage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.catalog-lineage-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.catalog-lineage-card > p { min-height: 34px; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.catalog-lineage-card .compact-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contract-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ETL landscape */
.etl-architecture { padding: 0; overflow: hidden; }
.etl-architecture__flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 22px; background: linear-gradient(135deg, #f8fbfc 0%, #f3f8f6 100%); }
.etl-stage { position: relative; display: grid; min-height: 116px; align-content: center; gap: 7px; padding: 16px 20px; border: 1px solid var(--line); border-right: 0; background: rgba(255,255,255,.94); }
.etl-stage:first-child { border-radius: 11px 0 0 11px; }
.etl-stage:last-child { border-right: 1px solid var(--line); border-radius: 0 11px 11px 0; }
.etl-stage:not(:last-child)::after { position: absolute; z-index: 2; top: 50%; right: -7px; width: 12px; height: 12px; border-top: 2px solid #4c9688; border-right: 2px solid #4c9688; background: #fff; content: ""; transform: translateY(-50%) rotate(45deg); }
.etl-stage__index { color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.etl-stage strong { color: var(--sonco-navy); font-size: 13px; }
.etl-stage small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.etl-pipeline-list { display: grid; gap: 14px; }
.etl-pipeline-card { padding: 0; overflow: hidden; }
.etl-pipeline-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.etl-pipeline-card__header h2 { margin: 4px 0 3px; color: var(--sonco-navy); font-size: 18px; }
.etl-pipeline-card__header p { margin: 0; color: var(--muted); font-size: 11px; }
.etl-pipeline-status { display: grid; justify-items: end; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.etl-pipeline-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 18px 20px; background: var(--surface-soft); }
.etl-flow-node { position: relative; display: grid; min-width: 0; align-content: center; gap: 5px; padding: 13px 16px; border: 1px solid var(--line); border-right: 0; background: #fff; }
.etl-flow-node:first-child { border-radius: 9px 0 0 9px; }
.etl-flow-node:last-child { border-right: 1px solid var(--line); border-radius: 0 9px 9px 0; }
.etl-flow-node:not(:last-child)::after { position: absolute; z-index: 1; top: 50%; right: -6px; width: 9px; height: 9px; border-top: 1.5px solid #5d9b91; border-right: 1.5px solid #5d9b91; background: #fff; content: ""; transform: translateY(-50%) rotate(45deg); }
.etl-flow-node small { color: var(--green); font-size: 8px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.etl-flow-node strong { overflow: hidden; color: var(--sonco-navy); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.etl-flow-node span { overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.etl-pipeline-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 20px 18px; }
.etl-pipeline-metrics { display: grid; min-width: 0; flex: 1; grid-template-columns: minmax(160px, 1.4fr) repeat(5, minmax(76px, .55fr)); gap: 14px; margin: 0; }
.etl-pipeline-metrics div { min-width: 0; }
.etl-pipeline-metrics dt { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.etl-pipeline-metrics dd { margin: 4px 0 0; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.etl-observability-grid { align-items: stretch; margin-top: 20px; }
.etl-observability-grid > .panel { min-width: 0; }
.etl-volume-panel, .etl-transform-panel { padding: 0; overflow: hidden; }
.etl-volume-chart { display: grid; gap: 10px; padding: 18px; }
.etl-volume-row { display: grid; grid-template-columns: 74px minmax(90px, 1fr) 135px; align-items: center; gap: 12px; }
.etl-volume-date { color: var(--muted); font-size: 10px; font-weight: 700; }
.etl-volume-track { height: 11px; overflow: hidden; border-radius: 999px; background: #edf1f3; }
.etl-volume-bar { display: block; height: 100%; border-radius: inherit; }
.etl-volume-bar--read { background: linear-gradient(90deg, #3d7da5, #55a294); }
.etl-volume-values { display: grid; gap: 1px; text-align: right; }
.etl-volume-values strong { color: var(--sonco-navy); font-size: 11px; }
.etl-volume-values span { color: var(--muted); font-size: 8px; }
.etl-transform-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 18px; border-bottom: 1px solid var(--line); }
.etl-transform-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 11px; color: #fff; background: #ff694b; font-size: 13px; font-weight: 900; }
.etl-transform-status > div { display: grid; gap: 4px; min-width: 0; }
.etl-transform-status strong { color: var(--sonco-navy); font-size: 13px; }
.etl-transform-status span { color: var(--muted); font-size: 9px; }
.etl-transform-panel .status-list { padding: 5px 18px 12px; }

@media (max-width: 1260px) {
  .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-filter-actions { align-self: end; }
  .etl-architecture__flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .etl-stage, .etl-stage:first-child, .etl-stage:last-child { border: 1px solid var(--line); border-radius: 9px; }
  .etl-stage::after { display: none; }
  .etl-pipeline-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .catalog-lineage-grid { grid-template-columns: 1fr; }
  .etl-pipeline-flow { grid-template-columns: 1fr; gap: 7px; }
  .etl-flow-node, .etl-flow-node:first-child, .etl-flow-node:last-child { border: 1px solid var(--line); border-radius: 8px; }
  .etl-flow-node::after { display: none; }
  .etl-pipeline-card__footer { align-items: stretch; flex-direction: column; }
}

@media (max-width: 640px) {
  .catalog-filters, .etl-architecture__flow, .etl-pipeline-metrics { grid-template-columns: 1fr; }
  .catalog-filter-actions { flex-wrap: wrap; }
  .etl-volume-row { grid-template-columns: 65px minmax(70px, 1fr); }
  .etl-volume-values { grid-column: 1 / -1; text-align: left; }
  .etl-transform-status { grid-template-columns: auto minmax(0, 1fr); }
  .etl-transform-status .badge { grid-column: 1 / -1; justify-self: start; }
}

/* Sonco BI application states and configuration */
.flash-comparison-legends { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 16px; }
.flash-comparison-legends .legend-row { flex-wrap: wrap; font-size: 12px; }
.flash-comparison-legends b { color: var(--muted); font-weight: 500; }
.flash-rank-measure--negative i { background: #cc3b45; }
.flash-rank-measure--negative small { color: #a82731; }
.flash-change--negative { fill: #cc3b45; }
.flash-point-target { cursor: help; }
.flash-point-target:focus { outline: none; stroke: #103d5b; stroke-width: 2; }
.dashboard-date-form { margin: 0; }
.dashboard-state { display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; align-items: center; gap: 22px; min-height: 180px; border-left: 4px solid var(--danger); }
.dashboard-state__icon { position: relative; display: block; width: 46px; height: 46px; border-radius: 12px; color: var(--danger); background: var(--sonco-red-soft); }
.dashboard-state__icon.icon-connect::before { left: 10px; top: 16px; width: 8px; height: 8px; }
.dashboard-state__icon.icon-connect::after { left: 18px; top: 20px; width: 12px; }
.dashboard-state h2 { margin: 0; color: var(--sonco-navy); font-size: 22px; }
.dashboard-state p { margin: 7px 0 10px; color: var(--muted); font-size: 13px; }
.dashboard-state code { color: var(--danger); font-size: 10px; }
.bi-config-grid { align-items: start; }
.bi-config-grid .form-panel { max-width: none; }
.bi-config-grid .validation-banner { align-items: flex-start; flex-direction: column; margin-top: 18px; }
.btn:disabled { border-color: var(--line); color: var(--muted-2); background: var(--surface-soft); cursor: not-allowed; transform: none; }

@media (max-width: 760px) {
  .dashboard-state { grid-template-columns: 1fr; }
}
/* Data Portal: aggregate quality diagnostics; no source-row data is exposed. */
.quality-daily { display: grid; gap: 18px; margin-bottom: 32px; }
.quality-daily > .section-heading, .quality-daily > h3 { margin-bottom: 0; }
.quality-coverage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.quality-coverage-card { padding: 24px; }
.quality-coverage-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.quality-coverage-values strong { display: block; font-size: 30px; line-height: 1.2; color: #103d5b; }
.quality-coverage-values span { display: block; font-size: 14px; margin-top: 6px; }
.quality-check-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.quality-action-cell { white-space: normal !important; min-width: 240px; max-width: 540px; }
.quality-daily .data-table { font-size: 14px; }
.quality-daily .data-table th { font-size: 11px; }
.quality-daily .table-secondary { font-size: 13px; }
.quality-coverage-card .section-heading { margin-top: 0; }
@media (max-width: 1050px) { .quality-coverage-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .quality-coverage-values { grid-template-columns: 1fr; } }
