@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/Inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/Inter-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/Inter-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/Inter-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F;
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/InterTight-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F;
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/InterTight-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0100-017F, U+0180-024F;
}

:root {
  /* SmartiX UI-2B0: primitive tokens */
  --sx-green-900: #08301F;
  --sx-green-800: #0C4A31;
  --sx-green-700: #0E6B4F;
  --sx-green-600: #0F8A63;
  --sx-green-500: #12A576;
  --sx-green-300: #5FCFA6;
  --sx-green-200: #9FE7C8;
  --sx-green-100: #D3F5E6;
  --sx-green-50: #EDFBF4;

  --sx-ink-900: #15181C;
  --sx-ink-700: #343A41;
  --sx-ink-500: #5E656D;
  --sx-ink-400: #878D95;
  --sx-ink-300: #B8BCC2;
  --sx-line-control: #7D838A;
  --sx-line-strong: #C6CACF;
  --sx-line: #E1E4E7;
  --sx-line-soft: #F0F1F3;
  --sx-canvas: #F7F8F9;
  --sx-surface: #FFFFFF;

  /* SmartiX UI-2B0: semantic tokens */
  --sx-bg-app: var(--sx-canvas);
  --sx-bg-surface: var(--sx-surface);
  --sx-bg-surface-soft: var(--sx-green-50);
  --sx-bg-surface-muted: var(--sx-line-soft);
  --sx-bg-brand-strong: var(--sx-green-900);
  --sx-bg-brand-hover: var(--sx-green-800);
  --sx-bg-brand-soft: var(--sx-green-100);
  --sx-bg-hover: var(--sx-line-soft);
  --sx-bg-selected: var(--sx-green-100);
  --sx-fg-strong: var(--sx-ink-900);
  --sx-fg-default: var(--sx-ink-700);
  --sx-fg-muted: var(--sx-ink-500);
  --sx-fg-subtle: var(--sx-ink-400);
  --sx-fg-disabled: var(--sx-ink-300);
  --sx-fg-brand: var(--sx-green-700);
  --sx-fg-on-brand: var(--sx-surface);
  --sx-fg-on-brand-muted: var(--sx-green-200);
  --sx-fg-on-brand-accent: var(--sx-green-300);
  --sx-brand-primary: var(--sx-green-700);
  --sx-border-default: var(--sx-line);
  --sx-border-soft: var(--sx-line-soft);
  --sx-border-strong: var(--sx-line-strong);
  --sx-border-control: var(--sx-line-control);
  --sx-border-brand: var(--sx-green-200);

  --sx-status-success-bg: #E3FBEC;
  --sx-status-success-fg: #056A3C;
  --sx-status-success-border: #6FD6A0;
  --sx-status-warning-bg: #FFF5DC;
  --sx-status-warning-fg: #8F4E00;
  --sx-status-warning-border: #EFBB55;
  --sx-status-danger-bg: #FFEAE7;
  --sx-status-danger-fg: #A4180F;
  --sx-status-danger-border: #F29B90;
  --sx-status-info-bg: #E6F1FE;
  --sx-status-info-fg: #12509E;
  --sx-status-info-border: #8FBBEE;
  --sx-status-neutral-bg: #F0F1F3;
  --sx-status-neutral-fg: #343A41;
  --sx-status-neutral-border: #D3D7DB;
  --sx-status-locked-bg: #ECEEF2;
  --sx-status-locked-fg: #3D4756;
  --sx-status-locked-border: #BFC6D1;

  --sx-chart-result: #0E6B4F;
  --sx-chart-reference: #7C8A9C;
  --sx-chart-3: #1F6FEB;
  --sx-chart-4: #8B4BD8;
  --sx-chart-5: #C2620A;
  --sx-chart-6: #0E8FA8;
  --sx-chart-grid: #E7E9EC;
  --sx-chart-axis: #5E656D;
  --sx-mark-accent: #12A576;
  --sx-mark-base: #FFFFFF;

  --sx-space-1: 4px;
  --sx-space-2: 8px;
  --sx-space-3: 12px;
  --sx-space-4: 16px;
  --sx-space-5: 24px;
  --sx-space-6: 32px;
  --sx-space-7: 48px;
  --sx-space-8: 64px;
  --sx-radius-sm: 6px;
  --sx-radius-md: 10px;
  --sx-radius-lg: 14px;
  --sx-radius-tile: 22%;
  --sx-shadow-none: none;
  --sx-shadow-raise: 0 1px 2px rgba(15,46,38,.06);
  --sx-shadow-float: 0 12px 32px rgba(15,46,38,.14);
  --sx-focus-ring: 0 0 0 3px rgba(46,125,99,.45);
  --sx-focus-offset: 2px;
  --sx-hover-surface: var(--sx-line-soft);
  --sx-selected-surface: var(--sx-green-100);
  --sx-selected-marker: var(--sx-green-500);

  --sx-font-fallback: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --sx-font-ui: "Inter", var(--sx-font-fallback);
  --sx-font-display: "Inter Tight", "Inter", var(--sx-font-fallback);

  /* SmartiX UI-2B0: component tokens required by the frozen current shell */
  --sx-nav-bg: var(--sx-bg-brand-strong);
  --sx-nav-bg-hover: var(--sx-bg-brand-hover);
  --sx-nav-fg: var(--sx-fg-on-brand);
  --sx-nav-item-fg: var(--sx-fg-on-brand-muted);
  --sx-nav-icon-fg: var(--sx-fg-on-brand-muted);
  --sx-nav-muted-fg: var(--sx-fg-on-brand-muted);
  --sx-nav-label-fg: var(--sx-fg-on-brand-accent);
  --sx-nav-health-fg: var(--sx-fg-on-brand-muted);
  --sx-nav-border: rgba(255,255,255,.10);
  --sx-nav-item-hover-bg: rgba(255,255,255,.06);
  --sx-nav-item-active-bg: rgba(220,237,229,.14);
  --sx-nav-item-active-marker: var(--sx-fg-on-brand-accent);
  --sx-nav-health-border: rgba(255,255,255,.11);
  --sx-nav-health-bg: rgba(255,255,255,.045);
  --sx-nav-health-dot: var(--sx-fg-on-brand-accent);
  --sx-nav-health-glow: rgba(127,184,162,.13);
  --sx-card-alt-bg: var(--sx-bg-surface);
  --sx-card-alt-hover-bg: var(--sx-bg-hover);
  --sx-meter-track: var(--sx-border-soft);
  --sx-topbar-bg: rgba(255,255,255,.88);
  --sx-chip-glass-bg: rgba(255,255,255,.62);
  --sx-chart-bg-start: var(--sx-bg-surface);
  --sx-chart-bg-end: var(--sx-bg-app);
  --sx-chart-border: var(--sx-chart-grid);
  --sx-recommend-border: var(--sx-border-brand);
  --sx-segmented-shadow: rgba(15,46,38,.08);
  --sx-login-glow-1: rgba(27,94,75,.10);
  --sx-login-glow-2: rgba(122,140,134,.08);
  --sx-skeleton-shine: rgba(255,255,255,.60);
  --sx-scrim: rgba(15,46,38,.42);
}

* { box-sizing: border-box; }
html { background: var(--sx-bg-app); }
body {
  margin: 0;
  color: var(--sx-fg-default);
  background:
    linear-gradient(180deg, var(--sx-bg-app) 0, var(--sx-bg-app) 280px);
  font-family: var(--sx-font-ui);
  font-size: 14px;
}
button, input, select { font: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: 0; font-family: var(--sx-font-display); }
h1 { font-size: 28px; line-height: 1.1; font-weight: 760; }
h2 { font-size: 17px; line-height: 1.2; font-weight: 730; }
h3 { font-size: 14px; line-height: 1.25; font-weight: 720; }
p { margin: 0; }
.muted { color: var(--sx-fg-muted); }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login form {
  width: min(430px, 100%);
  padding: 30px;
  display: grid;
  gap: 15px;
  background: color-mix(in srgb, var(--sx-bg-surface) 94%, transparent);
  border: 1px solid var(--sx-border-default);
  border-radius: 14px;
  box-shadow: var(--sx-shadow-float);
}

label {
  display: grid;
  gap: 7px;
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
input, select {
  min-height: 42px;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  box-shadow: var(--sx-shadow-raise);
}
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  border-color: var(--sx-brand-primary);
  outline: none;
  box-shadow: var(--sx-focus-ring);
}
input.password-placeholder:disabled {
  color: var(--sx-fg-muted);
  background: var(--sx-bg-surface-soft);
  border-color: var(--sx-border-default);
  box-shadow: none;
  cursor: not-allowed;
}
.password-field {
  position: relative;
  display: grid;
}
.password-field input {
  padding-right: 48px;
}
.password-eye-button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--sx-fg-muted);
  border-color: transparent;
  border-radius: 8px;
  box-shadow: none;
}
.password-eye-button:hover,
.password-eye-button.is-visible {
  background: var(--sx-bg-brand-soft);
  color: var(--sx-brand-primary);
}
.password-eye-button .nav-icon {
  width: 18px;
  height: 18px;
}
button {
  border: 1px solid transparent;
  background: var(--sx-fg-default);
  color: var(--sx-fg-on-brand);
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 700;
}
button:hover { filter: brightness(1.03); }
button.secondary {
  background: color-mix(in srgb, var(--sx-bg-surface) 8%, transparent);
  color: var(--sx-bg-surface);
  border-color: color-mix(in srgb, var(--sx-bg-surface) 16%, transparent);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
  transition: grid-template-columns .18s ease;
}
.app-shell.nav-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sx-nav-bg);
  color: var(--sx-fg-on-brand);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--sx-nav-border);
}
.brand {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 4px 6px 14px;
  border-bottom: 1px solid var(--sx-nav-border);
}
.brand img {
  width: 160px;
  max-width: 100%;
  display: block;
  border-radius: 6px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--sx-fg-strong) 24%, transparent);
}
.brand span {
  color: var(--sx-nav-muted-fg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  grid-column: 1 / -1;
}
.collapse-nav {
  min-height: 34px;
  width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--sx-nav-muted-fg);
  border-color: var(--sx-nav-border);
  border-radius: 10px;
}
.collapse-nav:hover {
  background: var(--sx-nav-bg-hover);
  color: var(--sx-bg-surface);
}
.nav {
  display: grid;
  gap: 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--sx-bg-surface) 25%, transparent) transparent;
}
.nav::-webkit-scrollbar { width: 7px; }
.nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--sx-bg-surface) 24%, transparent);
  border-radius: 999px;
}
.nav-group {
  display: grid;
  gap: 6px;
}
.nav-group-title {
  padding: 0 12px 4px;
  color: var(--sx-nav-muted-fg);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
button.tab {
  min-height: 44px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--sx-bg-surface);
  border-color: transparent;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
button.tab:hover {
  background: var(--sx-nav-bg-hover);
  color: var(--sx-bg-surface);
}
button.tab.active {
  background: var(--sx-nav-item-active-marker);
  color: var(--sx-nav-bg);
  border-color: var(--sx-nav-item-active-marker);
  box-shadow: none;
}
.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--sx-nav-item-active-marker);
  color: var(--sx-nav-bg);
  font-weight: 900;
}
.user-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.user-meta strong,
.user-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-collapsed .brand {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-inline: 0;
}
.nav-collapsed .brand img,
.nav-collapsed .brand-text,
.nav-collapsed .nav-group-title,
.nav-collapsed .tab-label {
  display: none;
}
.nav-collapsed .collapse-nav {
  transform: rotate(180deg);
}
.nav-collapsed button.tab {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 12px 0;
}
.content {
  padding: 20px 28px 28px;
  display: grid;
  gap: 16px;
  align-content: start;
  max-width: 1540px;
  width: 100%;
}
.page-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}
.accountbar {
  justify-self: end;
  display: grid;
  grid-template-columns: 54px minmax(140px, auto) auto;
  gap: 12px;
  align-items: center;
  max-width: min(100%, 500px);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--sx-bg-surface) 88%, transparent);
  border: 1px solid var(--sx-border-default);
  border-radius: 12px;
  box-shadow: var(--sx-shadow-raise);
}
.account-avatar {
  width: 54px;
  height: 54px;
  background: var(--sx-nav-bg);
  color: var(--sx-fg-on-brand);
  overflow: hidden;
  border: 2px solid var(--sx-nav-bg);
}
.account-avatar.has-photo {
  background: var(--sx-fg-strong);
}
.account-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.account-meta {
  color: var(--sx-fg-muted);
  font-size: 13px;
}
.account-meta strong {
  color: var(--sx-fg-default);
  font-size: 15px;
}
.account-logout {
  min-height: 38px;
  padding: 8px 14px;
  background: var(--sx-nav-bg);
  color: var(--sx-fg-on-brand);
  border-radius: 9px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.page-top > .topbar {
  min-width: 0;
  align-items: flex-start;
}
.topbar p { margin-top: 7px; }
/* Section headers flow with their card; only .app-topbar is application chrome. */
.topbar:not(.app-topbar) { min-width: 0; height: auto; position: static; }
.page-question {
  color: var(--sx-fg-default);
  font-size: 15px;
  font-weight: 650;
}
.grid { display: grid; gap: 16px; }
.grid > *,
.content > *,
.panel > * {
  min-width: 0;
}
.kpis { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.executive-kpis { grid-template-columns: repeat(5, minmax(170px, 1fr)); }
.executive-sections {
  display: grid;
  grid-template-columns: 1.15fr .9fr 1.15fr;
  gap: 16px;
  align-items: start;
}
.executive-section {
  align-content: start;
}
.executive-section-kpis {
  grid-template-columns: 1fr;
  gap: 12px;
}
.executive-section .card {
  min-height: 108px;
}
.two { grid-template-columns: 1.2fr .8fr; }
.cards { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.yoy-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.payment-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.panel, .card {
  background: color-mix(in srgb, var(--sx-bg-surface) 96%, transparent);
  border: 1px solid var(--sx-border-default);
  border-radius: 14px;
  box-shadow: var(--sx-shadow-raise);
}
.panel {
  padding: 18px;
  display: grid;
  gap: 15px;
  min-width: 0;
}
.control-panel {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--sx-bg-surface) 82%, transparent);
}
.control-panel label { width: min(330px, 100%); }
.control-panel.align-left { justify-content: flex-start; }
.plan-chart-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.plan-chart-panel {
  min-width: 0;
  align-content: start;
}
.chart-topbar {
  align-items: flex-start;
}
.chart-topbar h2 {
  min-width: 0;
}
.chart-topbar .legend {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
}
.card {
  padding: 16px;
  display: grid;
  gap: 11px;
}
.kpis .card {
  min-height: 116px;
  border: 0;
  background:
    linear-gradient(180deg, var(--sx-bg-surface) 0, var(--sx-bg-surface) 100%);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--sx-fg-strong) 7%, transparent);
}
.kpis .card::before {
  content: "";
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: var(--sx-fg-subtle);
}
.kpis .card.status-good::before { background: var(--sx-status-success-fg); }
.kpis .card.status-warn::before { background: var(--sx-status-warning-border); }
.kpis .card.status-bad::before { background: var(--sx-status-danger-fg); }
.kpis .card.status-good {
  border: 1px solid var(--sx-status-success-border);
  background: var(--sx-status-success-bg);
}
.kpis .card.status-warn {
  border: 1px solid var(--sx-status-warning-border);
  background: var(--sx-status-warning-bg);
}
.kpis .card.status-bad {
  border: 1px solid var(--sx-status-danger-border);
  background: var(--sx-status-danger-bg);
}
.metric {
  font-size: 26px;
  font-weight: 820;
  line-height: 1.05;
}
.metric .metric-unit {
  margin-left: 5px;
  font-size: .48em;
  font-weight: 800;
  color: var(--sx-fg-muted);
  vertical-align: baseline;
}
.metric .metric-amount {
  white-space: nowrap;
}
.kpi-compare {
  display: grid;
  gap: 5px;
  color: var(--sx-fg-muted);
  font-size: 12px;
  line-height: 1.25;
}
.kpi-compare-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.kpi-compare-row strong {
  color: var(--sx-fg-default);
  text-align: right;
  white-space: nowrap;
}
.kpi-compare-row strong.positive { color: var(--sx-status-success-fg); }
.kpi-compare-row strong.negative { color: var(--sx-status-danger-fg); }
.active-compare {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}
.active-period {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 800;
}
.period-value {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.period-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.period-pill.small {
  font-size: 10px;
  padding: 3px 6px;
}
.new-customer-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}
.new-customer-month {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--sx-border-soft);
  background: var(--sx-bg-surface);
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.new-customer-month:hover {
  border-color: color-mix(in srgb, var(--sx-status-info-fg) 30%, transparent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--sx-bg-brand-strong) 8%, transparent);
  transform: translateY(-1px);
}
.new-customer-month:disabled {
  cursor: default;
  opacity: .65;
  transform: none;
  box-shadow: none;
}
.new-customer-months b {
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}
.new-customer-months strong {
  color: var(--sx-fg-default);
  font-size: 11px;
  white-space: nowrap;
}
.new-customer-podium {
  display: grid;
  gap: 5px;
}
.new-customer-podium-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid var(--sx-border-soft);
  background: var(--sx-bg-surface);
}
.podium-medal {
  font-size: 14px;
  line-height: 1;
}
.podium-name {
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.new-customer-podium-row strong {
  color: var(--sx-status-info-fg);
  font-size: 12px;
  white-space: nowrap;
}
.new-customer-podium-row.rank-1 {
  border-color: color-mix(in srgb, var(--sx-status-warning-border) 45%, transparent);
  background: color-mix(in srgb, var(--sx-status-warning-border) 8%, transparent);
}
.new-customer-sales-summary {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
}
.new-customer-sales-summary > strong {
  color: var(--sx-fg-default);
  font-size: 13px;
  font-weight: 850;
}
.new-customer-sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.new-customer-sales-card {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 8px;
  background: var(--sx-bg-surface);
}
.new-customer-sales-card span {
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.new-customer-sales-card b {
  color: var(--sx-status-info-fg);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}
.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  color: var(--sx-fg-muted);
  font-size: 12px;
}
.compare-row strong {
  color: var(--sx-fg-default);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}
.compare-row strong.positive { color: var(--sx-status-success-fg); }
.compare-row strong.negative { color: var(--sx-status-danger-fg); }
.positive { color: var(--sx-status-success-fg); }
.negative { color: var(--sx-status-danger-fg); font-weight: 820; }
.neutral { color: var(--sx-fg-muted); }
small { font-size: 12px; }

.bar {
  height: 9px;
  border-radius: 999px;
  background: var(--sx-line);
  overflow: hidden;
  display: flex;
}
.fill { height: 100%; background: linear-gradient(90deg, var(--sx-green-700), var(--sx-green-500)); }
.fill.good { background: var(--sx-status-success-fg); }
.fill.bad { background: var(--sx-status-danger-fg); }
.fill.steel { background: var(--sx-fg-muted); }

.yoy-card {
  position: relative;
  overflow: hidden;
}
.yoy-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--sx-status-success-fg);
}
.yoy-card.is-negative::before { background: var(--sx-status-danger-fg); }
.yoy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.trend-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}
.trend-pill.positive {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
  border: 1px solid color-mix(in srgb, var(--sx-status-success-fg) 22%, transparent);
}
.trend-pill.negative {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
  border: 1px solid color-mix(in srgb, var(--sx-status-danger-fg) 22%, transparent);
}
.trend-pill.neutral-pill {
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  border: 1px solid var(--sx-border-soft);
}
.risk-head-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.yoy-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.yoy-delta {
  text-align: right;
  display: grid;
  gap: 4px;
}
.yoy-revenue {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--sx-fg-muted);
  font-size: 12px;
}
.active-base-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
}
.active-base-row strong {
  font-size: 16px;
}
.active-base-box {
  display: grid;
  gap: 6px;
}
.active-trend-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.active-trend-mini span {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 8px;
}
.active-trend-mini small {
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 800;
}
.active-trend-mini b {
  color: var(--sx-fg-default);
  font-size: 13px;
  line-height: 1;
}
.yoy-customer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.yoy-customer-grid > div {
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  padding: 9px;
  display: grid;
  gap: 4px;
}
.yoy-customer-grid strong {
  font-size: 16px;
}
.segment-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}
.segment-definition {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  font-size: 12px;
}
.segment-definition strong {
  color: var(--sx-fg-default);
  font-size: 12px;
}
.segment-rules {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.segment-rules span {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-soft);
  color: var(--sx-fg-default);
  font-weight: 750;
}
.segment-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.active-base-chart,
.segment-total,
.trend-point {
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
}
.active-base-chart {
  min-height: 250px;
  padding: 12px 12px 8px;
  display: grid;
  gap: 8px;
}
.active-base-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.active-base-chart-head strong {
  color: var(--sx-fg-default);
  font-size: 13px;
  font-weight: 850;
}
.active-base-svg {
  min-height: 205px;
  overflow-x: auto;
  overflow-y: hidden;
}
.active-base-svg svg {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 760px;
}
.segment-total {
  padding: 13px;
  display: grid;
  gap: 7px;
  justify-items: start;
}
.segment-total .active-period {
  margin-top: -2px;
  justify-self: center;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  white-space: nowrap;
  line-height: 1.15;
}
.segment-trend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.trend-point {
  min-height: 76px;
  padding: 11px 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  align-content: stretch;
  justify-items: center;
  text-align: center;
}
.trend-point span {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-wrap: anywhere;
}
.trend-point strong {
  font-size: 22px;
  line-height: 1;
  align-self: center;
}
.segment-card {
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 7px;
}
.segment-card strong {
  font-size: 22px;
  line-height: 1;
}
.segment-card .bar {
  height: 7px;
}
.segment-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.segment-strip span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  color: var(--sx-fg-muted);
  font-size: 12px;
}
.segment-strip b {
  color: var(--sx-fg-default);
}
.card-risk-summary {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}
.card-risk-title {
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.card-risk-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.risk-month-button {
  min-height: 54px;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 8px 9px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-default);
  border: 1px solid var(--sx-border-soft);
  border-radius: 9px;
  text-align: left;
}
.risk-month-button span {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 850;
}
.risk-month-button strong {
  color: var(--sx-fg-default);
  font-size: 18px;
  line-height: 1;
}
.risk-month-button.has-risk {
  background: var(--sx-bg-surface-soft);
  border-color: var(--sx-border-soft);
}
.risk-month-button.has-risk strong {
  color: var(--sx-status-danger-fg);
}
.risk-month-button:hover {
  filter: none;
  border-color: var(--sx-brand-primary);
  background: var(--sx-bg-surface);
}
.risk-panel {
  border-left: 4px solid var(--sx-status-danger-fg);
}
.risk-count {
  min-width: 96px;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--sx-fg-muted);
}
.risk-count strong {
  color: var(--sx-status-danger-fg);
  font-size: 26px;
  line-height: 1;
}
.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.risk-card {
  align-content: start;
}
.risk-table {
  max-height: 320px;
}
.risk-table table {
  min-width: 560px;
}
.positive-notice {
  border-color: var(--sx-status-success-border);
  border-left-color: var(--sx-status-success-fg);
  background: var(--sx-bg-surface-soft);
  color: var(--sx-status-success-fg);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--sx-fg-strong) 55%, transparent);
}
.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 22px 18px 18px;
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-default);
  border-radius: 12px;
  box-shadow: var(--sx-shadow-float);
}
.modal-card .modal-head {
  align-items: flex-start;
  position: static;
  top: auto;
  z-index: auto;
  height: auto;
  min-height: 0;
  padding: 0 68px 0 0;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}
.modal-close-corner,
.modal-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  background: var(--sx-bg-brand-strong);
  color: var(--sx-bg-surface);
  border: 1px solid var(--sx-bg-brand-strong);
  border-radius: 10px;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--sx-fg-strong) 10%, transparent);
  font-size: 0;
  line-height: 1;
  appearance: none;
}
.modal-close-corner {
  position: absolute;
  top: 12px;
  right: 24px;
  z-index: 40;
}
.modal-close {
  position: relative;
  flex: 0 0 40px;
}
.modal-close-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: inherit;
  pointer-events: none;
}
.modal-close-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  overflow: visible;
  stroke: currentColor;
}
.modal-close-corner:hover,
.modal-close:hover {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
  border-color: var(--sx-status-danger-fg);
}
.modal-close-corner:focus,
.modal-close-corner:focus-visible,
.modal-close:focus,
.modal-close:focus-visible {
  color: var(--sx-status-danger-fg);
  border-color: var(--sx-status-danger-fg);
  box-shadow: var(--sx-focus-ring);
}
.toast-bubble {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 70;
  min-width: min(360px, calc(100vw - 48px));
  padding: 18px 24px;
  background: color-mix(in srgb, var(--sx-status-locked-fg) 94%, transparent);
  color: var(--sx-bg-surface);
  border: 1px solid color-mix(in srgb, var(--sx-bg-surface) 18%, transparent);
  border-radius: 18px;
  box-shadow: var(--sx-shadow-float);
  font-weight: 800;
  text-align: center;
}
.modal-risk-count {
  justify-items: start;
}
.modal-risk-table {
  max-height: 460px;
}
.payment-count-grid {
  grid-template-columns: repeat(3, 1fr);
}
.payment-average-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 4px;
}
.payment-average-box > div {
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.payment-average-box strong {
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mustsell-reps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.mustsell-reps.is-filtered {
  grid-template-columns: minmax(220px, 320px);
}
.mustsell-rep .metric {
  color: var(--sx-status-success-fg);
}
.report-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
}
.report-toolbar h2 {
  font-size: 15px;
}
.report-toolbar p {
  margin-top: 4px;
  font-size: 12px;
}
.report-controls {
  display: grid;
  gap: 7px;
}
.export-pdf-button {
  background: var(--sx-status-success-fg);
  color: var(--sx-bg-surface);
  border-color: var(--sx-status-success-fg);
}
.export-pdf-button:hover {
  background: var(--sx-status-success-fg);
  border-color: var(--sx-status-success-fg);
}
.report-preview {
  display: grid;
  gap: 16px;
}
.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: var(--sx-nav-bg);
  color: var(--sx-bg-surface);
  border-radius: 12px;
  border-bottom: 4px solid var(--sx-nav-item-active-marker);
}
.report-hero .muted,
.report-period span {
  color: var(--sx-nav-muted-fg);
}
.report-hero h2 {
  margin-top: 4px;
  font-size: 28px;
}
.report-period {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.report-period strong {
  font-size: 18px;
}
.report-kpis {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}
.report-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  padding-top: 2px;
}
.report-section-title h3 {
  color: var(--sx-fg-default);
  font-size: 15px;
  font-weight: 850;
}
.report-ytd-kpis .card {
  background: var(--sx-bg-surface);
}
.report-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.report-preview > .report-actions {
  display: none;
}
.report-action-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-default);
  border-left: 4px solid var(--sx-brand-primary);
  border-radius: 10px;
  box-shadow: var(--sx-shadow-raise);
  text-align: left;
}
button.report-action-card {
  font: inherit;
  cursor: pointer;
}
.report-action-clickable:hover {
  border-color: var(--sx-brand-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sx-status-info-fg) 8%, transparent), var(--sx-shadow-raise);
  transform: translateY(-1px);
}
.report-action-card.report-action-warning {
  border-left-color: var(--sx-status-warning-fg);
}
.report-action-card.report-action-warning strong {
  color: var(--sx-status-warning-fg);
}
.report-action-card span {
  color: var(--sx-fg-default);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.report-action-card strong {
  color: var(--sx-brand-primary);
  font-size: 26px;
  line-height: 1;
}
.report-action-card.report-action-good {
  border-left-color: var(--sx-status-success-fg);
}
.report-action-card.report-action-good strong {
  color: var(--sx-status-success-fg);
}
.report-action-card.report-action-bad {
  border-left-color: var(--sx-status-danger-fg);
}
.report-action-card.report-action-bad strong {
  color: var(--sx-status-danger-fg);
}
.report-action-card p {
  color: var(--sx-fg-muted);
  font-size: 12px;
  line-height: 1.35;
}
.report-action-center {
  gap: 14px;
}
.action-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.action-category-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--sx-border-default);
  border-left: 4px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.action-category-card.active {
  border-color: color-mix(in srgb, var(--sx-status-info-fg) 28%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sx-status-info-fg) 8%, transparent);
}
.action-category-card.tone-bad { border-left-color: var(--sx-status-danger-fg); }
.action-category-card.tone-warning { border-left-color: var(--sx-status-warning-fg); }
.action-category-card.tone-good { border-left-color: var(--sx-status-success-fg); }
.action-category-card span {
  color: var(--sx-fg-default);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.action-category-card strong {
  color: var(--sx-fg-default);
  font-size: 24px;
  line-height: 1.05;
}
.action-category-card.tone-bad strong { color: var(--sx-status-danger-fg); }
.action-category-card.tone-warning strong { color: var(--sx-status-warning-fg); }
.action-category-card.tone-good strong { color: var(--sx-status-success-fg); }
.action-category-card small,
.action-category-card p {
  color: var(--sx-fg-muted);
  font-size: 12px;
  line-height: 1.35;
}
.action-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
}
.action-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.action-detail-head h3 {
  color: var(--sx-fg-default);
  font-size: 15px;
  font-weight: 900;
}
.action-detail-panel .table-scroll {
  max-height: 380px;
  background: var(--sx-bg-surface);
}
.action-priority {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: var(--sx-chart-grid);
  color: var(--sx-fg-muted);
}
.action-priority.priority-1 {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
}
.action-priority.priority-2 {
  background: var(--sx-bg-brand-soft);
  color: var(--sx-status-warning-fg);
}
.action-priority.priority-3 {
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.action-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.action-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--sx-border-default);
  border-radius: 999px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.action-filter-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-default);
  font-size: 12px;
}
.action-filter-chip.active {
  border-color: color-mix(in srgb, var(--sx-status-info-fg) 36%, transparent);
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.action-list {
  display: grid;
  gap: 12px;
}
.action-item-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--sx-border-default);
  border-left: 5px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  box-shadow: var(--sx-shadow-raise);
}
.action-item-card.priority-urgent { border-left-color: var(--sx-status-danger-fg); }
.action-item-card.priority-month { border-left-color: var(--sx-status-warning-fg); }
.action-item-card.priority-growth { border-left-color: var(--sx-status-success-fg); }
.action-item-card.priority-strategic { border-left-color: var(--sx-status-info-fg); }
.action-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.action-category-label {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.action-item-head h3 {
  margin-top: 3px;
  color: var(--sx-fg-default);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.2;
}
.action-item-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.action-priority-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 950;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}
.action-priority-pill.priority-urgent {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
}
.action-priority-pill.priority-month {
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
  box-shadow: inset 0 0 0 1px var(--sx-status-warning-border);
}
.action-priority-pill.priority-monthly {
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
  box-shadow: inset 0 0 0 1px var(--sx-status-warning-border);
}
.action-priority-pill.priority-growth {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}
.action-priority-pill.priority-development {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}
.action-priority-pill.priority-strategic {
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.action-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.action-item-grid > div,
.action-evidence > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 8px;
  background: var(--sx-bg-surface-soft);
}
.action-item-grid span,
.action-evidence span {
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.action-item-grid strong {
  color: var(--sx-fg-default);
  font-size: 12px;
  line-height: 1.35;
}
.action-evidence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.action-evidence p {
  margin: 0;
  color: var(--sx-fg-default);
  font-size: 12px;
  line-height: 1.4;
}
.action-center-page {
  gap: 16px;
}
.action-center-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.action-filter-panel {
  gap: 14px;
}
.action-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.action-workspace {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
  width: 100%;
}
.action-copilot-panel {
  gap: 12px;
  border-color: color-mix(in srgb, var(--sx-status-info-fg) 18%, transparent);
  background: linear-gradient(180deg, var(--sx-bg-surface) 0%, var(--sx-status-info-bg) 100%);
}
.copilot-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.5fr);
  gap: 10px;
  align-items: stretch;
}
.copilot-facts > div,
.copilot-facts > p {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 8px;
  background: var(--sx-bg-surface);
}
.copilot-facts span {
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.copilot-facts strong,
.copilot-facts p {
  color: var(--sx-fg-default);
  font-size: 12px;
  line-height: 1.35;
}
.action-list-panel,
.action-detail-side {
  min-width: 0;
  min-height: 520px;
}
.action-list-panel {
  padding: 14px;
}
.smart-action-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  gap: 9px;
  align-items: stretch;
  max-height: 780px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 5px 2px 2px;
}
.smart-action-card {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  padding: 12px 14px;
  border: 1px solid var(--sx-border-default);
  border-left: 5px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  text-align: left;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden !important;
  box-shadow: var(--sx-shadow-raise);
  cursor: pointer;
}
.smart-action-card,
.smart-action-card * {
  box-sizing: border-box;
  max-width: 100%;
}
.smart-action-card:hover {
  border-color: color-mix(in srgb, var(--sx-status-info-fg) 32%, transparent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--sx-fg-strong) 8%, transparent);
}
.smart-action-card.active {
  border-color: color-mix(in srgb, var(--sx-status-info-fg) 35%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sx-status-info-fg) 10%, transparent), var(--sx-shadow-raise);
}
.smart-action-card:focus,
.smart-action-card:focus-visible {
  outline: none;
  box-shadow: var(--sx-focus-ring);
}
.smart-action-card.priority-urgent { border-left-color: var(--sx-status-danger-fg); }
.smart-action-card.priority-monthly { border-left-color: var(--sx-status-warning-fg); }
.smart-action-card.priority-development { border-left-color: var(--sx-status-success-fg); }
.smart-action-card.priority-strategic { border-left-color: var(--sx-status-info-fg); }
.smart-action-head {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
  margin-top: 0;
}
.smart-action-title {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--sx-fg-default);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.smart-action-meta-line {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--sx-fg-muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.smart-action-signal {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.smart-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 950;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.smart-tag.priority-urgent { background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); }
.smart-tag.priority-monthly { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); box-shadow: inset 0 0 0 1px var(--sx-status-warning-border); }
.smart-tag.priority-development { background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.smart-tag.priority-strategic { background: var(--sx-status-info-bg); color: var(--sx-status-info-fg); }
.smart-tag.status-open { background: var(--sx-status-info-bg); color: var(--sx-status-info-fg); }
.smart-tag.status-in_progress { background: var(--sx-status-info-bg); color: var(--sx-status-info-fg); box-shadow: inset 0 0 0 1px var(--sx-status-info-border); }
.smart-tag.status-completed { background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.smart-tag.status-postponed { background: var(--sx-border-soft); color: var(--sx-fg-muted); }
.smart-tag.status-dismissed { background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); }
.smart-tag.tag-score { background: var(--sx-bg-surface); color: var(--sx-fg-muted); border: 1px solid var(--sx-border-soft); }
.action-status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}
.action-status-badge.status-open { background: var(--sx-status-info-bg); color: var(--sx-status-info-fg); }
.action-status-badge.status-in_progress { background: var(--sx-status-info-bg); color: var(--sx-status-info-fg); box-shadow: inset 0 0 0 1px var(--sx-status-info-border); }
.action-status-badge.status-completed { background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.action-status-badge.status-postponed { background: var(--sx-border-soft); color: var(--sx-fg-muted); }
.action-status-badge.status-dismissed { background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); }
.action-detail-side {
  position: sticky;
  top: 18px;
  gap: 14px;
}
.action-detail-section {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
}
.action-detail-section p,
.action-detail-section li {
  color: var(--sx-fg-default);
  font-size: 13px;
  line-height: 1.45;
}
.action-detail-section ul {
  margin: 0;
  padding-left: 18px;
}
.action-workflow-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--sx-status-info-fg) 18%, transparent);
  border-radius: 10px;
  background: var(--sx-status-info-bg);
  min-width: 0;
}
/* Polja moraju da se skupljaju u uskom detaljnom panelu - inace input zadrzi
   podrazumevanu sirinu i prelije se preko susedne kolone. */
.action-workflow-form label { min-width: 0; }
.action-workflow-form input,
.action-workflow-form select,
.action-workflow-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.action-workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
/* Status i Rok dele gornji red; Odgovorna osoba ide preko cele sirine ispod. */
.action-workflow-grid .field-wide { grid-column: 1 / -1; order: 2; }
.action-workflow-grid > label:not(.field-wide) { order: 1; }
@media (max-width: 520px) {
  .action-workflow-grid { grid-template-columns: 1fr; }
}
.action-outcome-section {
  border-color: color-mix(in srgb, var(--sx-status-success-fg) 22%, transparent);
  background: var(--sx-bg-app);
}
.feedback-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.feedback-list {
  display: grid;
  gap: 12px;
}
.feedback-entry {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--sx-border-default);
  border-left: 5px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  box-shadow: var(--sx-shadow-raise);
}
.feedback-entry.status-new { border-left-color: var(--sx-status-info-fg); }
.feedback-entry.status-reviewed { border-left-color: var(--sx-status-warning-fg); }
.feedback-entry.status-planned { border-left-color: var(--sx-chart-4); }
.feedback-entry.status-implemented { border-left-color: var(--sx-status-success-fg); }
.feedback-entry.status-rejected { border-left-color: var(--sx-status-danger-fg); }
.feedback-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.feedback-entry h3 {
  margin-top: 4px;
  color: var(--sx-fg-default);
  font-size: 15px;
  line-height: 1.35;
}
.feedback-meta {
  color: var(--sx-fg-muted);
  font-size: 12px;
}
.feedback-admin-comment {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 8px;
  background: var(--sx-bg-surface-soft);
}
.feedback-admin-comment strong {
  color: var(--sx-fg-muted);
  font-size: 11px;
  text-transform: uppercase;
}
.feedback-workflow {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-status-info-bg);
}
.feedback-question-panel { gap: 16px; }
.feedback-question-form { display: grid; grid-template-columns: minmax(180px, .45fr) minmax(320px, 1.55fr) auto; gap: 12px; align-items: end; }
.feedback-question-form label { display: grid; gap: 6px; color: var(--sx-fg-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.feedback-question-form select,
.feedback-question-form textarea { width: 100%; min-width: 0; }
.feedback-question-form button { min-height: 42px; white-space: nowrap; }
.scoped-yoy-flow-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feedback-history summary {
  color: var(--sx-status-info-fg);
  cursor: pointer;
  font-weight: 850;
}
textarea {
  min-height: 42px;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  box-shadow: var(--sx-shadow-raise);
  resize: vertical;
  font: inherit;
}
button.ghost-button {
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  border-color: var(--sx-border-default);
  box-shadow: var(--sx-shadow-raise);
}
.ai-assistant-panel {
  gap: 14px;
}
.ai-assistant-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: start;
}
.ai-question-form,
.ai-admin-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface);
}
.ai-question-form textarea {
  min-height: 118px;
  resize: vertical;
}
.ai-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.ai-summary-cards > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 8px;
  background: var(--sx-bg-surface-soft);
}
.ai-summary-cards span {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 850;
}
.ai-summary-cards strong {
  color: var(--sx-status-info-fg);
  font-size: 22px;
}
.ai-summary-cards small {
  color: var(--sx-fg-muted);
  font-size: 10px;
}
.muted-box {
  background: var(--sx-bg-surface-soft);
}
.muted-box p {
  color: var(--sx-fg-muted);
  line-height: 1.45;
}
.report-recovery-trend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.report-recovery-chip {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px;
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-default);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}
.report-recovery-chip:hover {
  border-color: var(--sx-brand-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sx-status-info-fg) 8%, transparent);
}
.report-recovery-chip span {
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 850;
}
.report-recovery-chip strong {
  color: var(--sx-fg-default);
  font-size: 15px;
  line-height: 1;
}
.report-recovery-chip small {
  color: var(--sx-fg-muted);
  font-size: 9px;
}
.report-recovery-chip.is-good {
  border-color: var(--sx-status-success-border);
  background: var(--sx-status-success-bg);
}
.report-recovery-chip.is-good strong {
  color: var(--sx-status-success-fg);
}
.report-recovery-chip.is-bad {
  border-color: var(--sx-status-danger-border);
  background: var(--sx-status-danger-bg);
}
.report-recovery-chip.is-bad strong {
  color: var(--sx-status-danger-fg);
}
.recovery-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.modal-risk-count.positive strong {
  color: var(--sx-status-success-fg);
}
.modal-risk-count.negative strong {
  color: var(--sx-status-danger-fg);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-width: 70px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--sx-chart-grid);
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 850;
}
.status-pill.ok {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}
.status-pill.bad {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
}
.status-pill.warn {
  background: var(--sx-bg-brand-soft);
  color: var(--sx-status-warning-fg);
}
.status-pill.info {
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.report-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.report-risk-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}
.report-segment-structure {
  display: grid;
  gap: 12px;
}
.report-top-customers .table-scroll table {
  min-width: 560px;
}
.ranked-customer {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  font-weight: 800;
}
.ranked-customer b {
  color: var(--sx-brand-primary);
}
.report-segment-chart {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.segment-donut {
  position: relative;
  width: 140px;
  aspect-ratio: 1;
}
.segment-donut svg {
  width: 100%;
  height: 100%;
  display: block;
}
.segment-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 2px;
}
.segment-donut-center strong {
  font-size: 24px;
  line-height: 1;
  color: var(--sx-fg-default);
}
.segment-donut-center span {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 800;
}
.report-segment-total {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
}
.report-segment-total strong {
  font-size: 20px;
  color: var(--sx-fg-default);
}
.segment-dot-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 850;
}
.segment-dot-label::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--sx-fg-subtle);
}
.segment-dot-label.segment-a::before { background: var(--sx-chart-3); }
.segment-dot-label.segment-b::before { background: var(--sx-status-success-fg); }
.segment-dot-label.segment-c::before { background: var(--sx-chart-5); }
.segment-dot-label.segment-d::before { background: var(--sx-chart-4); }
.segment-dot-label.segment-e::before { background: var(--sx-status-danger-fg); }
.table-scroll {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--sx-border-soft);
  border-radius: 12px;
}
.table-scroll table {
  min-width: 760px;
}
.mustsell-matrix th:first-child,
.mustsell-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  background: var(--sx-bg-surface);
}
.mustsell-matrix th:first-child {
  background: var(--sx-bg-surface-soft);
  z-index: 2;
}
.mustsell-matrix {
  table-layout: fixed;
}
.mustsell-matrix th:nth-child(2),
.mustsell-matrix td:nth-child(2) {
  width: 360px;
  min-width: 360px;
}
.mustsell-matrix td:nth-child(2) strong,
.mustsell-matrix td:nth-child(2) small {
  display: block;
}
.mustsell-matrix td:nth-child(2) small {
  margin-top: 4px;
}
.center { text-align: center; }
.sell-dot {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sx-chart-grid);
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 820;
}
.sell-dot.sold {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}

.chart {
  height: 350px;
  width: 100%;
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-soft);
  border-radius: 12px;
  padding: 12px;
  overflow: hidden;
}
.chart svg {
  display: block;
  width: 100%;
  height: 100%;
}
.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--sx-fg-muted);
  font-size: 13px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.swatch {
  width: 24px;
  height: 4px;
  display: inline-block;
  border-radius: 999px;
}
.swatch.accent { background: var(--sx-brand-primary); }
.swatch.steel { background: var(--sx-fg-muted); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  overflow: hidden;
}
th, td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--sx-border-soft);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--sx-fg-muted);
  background: var(--sx-bg-surface-soft);
  font-weight: 760;
  position: sticky;
  top: 0;
  text-transform: uppercase;
  font-size: 11px;
}
tbody tr:hover td { background: var(--sx-bg-brand-soft); }

/* ---- UI-2B3 shared table / filter / badge / state primitives ---- */
.smart-table-shell {
  position: relative;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  box-sizing: border-box;
  contain: inline-size;
  overflow-x: auto;
  overflow-y: auto;
  border-color: var(--sx-border-default);
  border-radius: 12px;
  background: var(--sx-bg-surface);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}
.smart-table-shell:focus,
.smart-table-shell:focus-visible {
  outline: none;
  box-shadow: var(--sx-focus-ring);
}
.smart-table-shell::after {
  content: "";
  position: sticky;
  right: 0;
  top: 0;
  display: block;
  width: 18px;
  height: 0;
  margin-left: auto;
  pointer-events: none;
  box-shadow: inset -12px 0 14px color-mix(in srgb, var(--sx-bg-surface) 82%, transparent);
}
.smart-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--sx-bg-surface);
  font-variant-numeric: tabular-nums;
}
.smart-table-head-cell {
  background: var(--sx-line-soft);
  border-bottom: 1px solid var(--sx-line-strong);
  color: var(--sx-fg-strong);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.smart-table-shell-sticky .smart-table-head-cell {
  position: sticky;
  top: 0;
  z-index: 3;
}
.smart-table-cell {
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  vertical-align: middle;
}
.smart-table-row:hover .smart-table-cell {
  background: var(--sx-bg-brand-soft);
}
.smart-table-row.is-selected .smart-table-cell:first-child {
  box-shadow: inset 4px 0 0 var(--sx-brand-primary);
}
.smart-table-cell-money,
.smart-table-cell-num,
.smart-table-cell-pct,
.smart-table-cell-growth,
.smart-table-cell-risk,
.smart-table-head-cell.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.smart-th-sort-btn {
  min-height: 40px;
}
.smart-filter-toolbar {
  gap: var(--sx-space-3);
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.smart-filter-row {
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
}
.smart-filter-field,
.smart-filter-search-wrap {
  min-width: 0;
  max-width: 100%;
}
.smart-filter-field select,
.smart-filter-search {
  min-height: 42px;
  max-width: 100%;
  box-sizing: border-box;
}
.readonly-scope-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 640;
}
.readonly-scope-filter-value {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--sx-border-default);
  border-radius: var(--sx-radius-md);
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-strong);
  font-size: 13px;
  font-weight: 700;
}
.smart-filter-search-wrap {
  min-width: min(280px, 100%);
}
.smart-filter-reset {
  min-height: 42px;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--sx-border-default);
  border-radius: var(--sx-radius-md);
  padding: 9px 12px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}
.smart-filter-reset:hover:not(:disabled) {
  border-color: var(--sx-brand-primary);
  color: var(--sx-fg-brand);
}
.smart-filter-reset:focus,
.smart-filter-reset:focus-visible {
  outline: none;
  box-shadow: var(--sx-focus-ring);
}
.smart-filter-reset:disabled {
  cursor: default;
  color: var(--sx-fg-subtle);
  background: var(--sx-bg-surface-soft);
}
.smart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.smart-badge-neutral {
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  border-color: var(--sx-border-default);
}
.smart-badge-success {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
  border-color: var(--sx-status-success-border);
}
.smart-badge-warning {
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
  border-color: var(--sx-status-warning-border);
}
.smart-badge-danger {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
  border-color: var(--sx-status-danger-border);
}
.smart-badge-info {
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
  border-color: var(--sx-status-info-border);
}
.smart-badge-locked {
  background: var(--sx-status-locked-bg);
  color: var(--sx-status-locked-fg);
  border-color: var(--sx-status-locked-border);
}
.smart-unavailable {
  color: var(--sx-fg-muted);
  font-weight: 720;
}
.smart-state {
  border: 1px dashed var(--sx-border-strong);
  border-radius: var(--sx-radius-lg);
  padding: 24px;
  color: var(--sx-fg-muted);
  background: var(--sx-bg-surface);
}
.smart-state h3 {
  margin: 0 0 6px;
  color: var(--sx-fg-strong);
  font-size: 15px;
}
.smart-state p {
  margin: 0;
  max-width: 560px;
  font-size: 13px;
}
.smart-state-error {
  border-color: var(--sx-status-danger-border);
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
}
.smart-state-permissionDenied,
.smart-state-warning {
  border-color: var(--sx-status-warning-border);
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
}
.smart-state-modulePreparation,
.smart-state-info {
  border-color: var(--sx-status-info-border);
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.smart-table-empty-state {
  text-align: center;
}
.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.form-grid label,
.user-form label {
  display: grid;
  gap: 6px;
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 760;
}
.form-grid input,
.form-grid select,
.user-form input,
.user-form select {
  width: 100%;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--sx-fg-default);
  background: var(--sx-bg-surface);
}
.permission-panel {
  display: grid;
  gap: 10px;
}
.permission-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.utility-button {
  background: var(--sx-border-soft);
  color: var(--sx-fg-default);
  border-color: var(--sx-border-default);
}
.utility-button:hover {
  background: var(--sx-border-default);
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-default);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.check-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--sx-border-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sx-fg-strong) 8%, transparent);
  transition: background .18s ease;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--sx-bg-surface);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--sx-fg-strong) 24%, transparent);
  transition: transform .18s ease;
}
.check-row input:checked + .toggle-switch {
  background: var(--sx-status-success-fg);
}
.check-row input:checked + .toggle-switch::after {
  transform: translateX(18px);
}
.check-row:has(input:checked) {
  background: var(--sx-status-success-bg);
  border-color: color-mix(in srgb, var(--sx-status-success-fg) 28%, transparent);
}
.check-row span {
  user-select: none;
}
.check-row input:focus + .toggle-switch,
.check-row input:focus-visible + .toggle-switch {
  outline: none;
  box-shadow: var(--sx-focus-ring);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.save-user-button {
  background: var(--sx-status-success-fg);
  color: var(--sx-fg-on-brand);
  border-color: var(--sx-status-success-fg);
}
.save-user-button:disabled {
  background: var(--sx-border-strong);
  color: var(--sx-chart-axis);
  border-color: var(--sx-border-strong);
  cursor: not-allowed;
  filter: none;
}
.form-help {
  font-size: 12px;
}
.status-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}
.status-badge.active {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}
.status-badge.inactive {
  background: var(--sx-status-danger-bg);
  color: var(--sx-status-danger-fg);
}
.small-button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}
.edit-user-button {
  background: var(--sx-nav-bg);
  color: var(--sx-bg-surface);
  border-color: var(--sx-nav-bg);
  white-space: nowrap;
}
.edit-user-button:hover {
  background: var(--sx-status-info-fg);
  border-color: var(--sx-status-info-fg);
}
.notice {
  border: 1px solid var(--sx-status-danger-border);
  border-left: 4px solid var(--sx-brand-primary);
  border-radius: 10px;
  padding: 12px 13px;
  background: var(--sx-bg-brand-soft);
  color: var(--sx-status-danger-fg);
}
.error { color: var(--sx-status-danger-fg); }
.locked { opacity: .75; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .nav { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .kpis, .two { grid-template-columns: 1fr 1fr; }
  .executive-sections { grid-template-columns: 1fr; }
  .executive-section-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-center-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feedback-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-workspace { grid-template-columns: 1fr; }
  .action-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copilot-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-detail-side { position: static; }
  .plan-chart-row { grid-template-columns: 1fr; }
  .yoy-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-actions,
  .report-grid-2,
  .action-category-grid,
  .action-item-grid,
  .action-evidence,
  .ai-assistant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segment-overview { grid-template-columns: 1fr; }
  .risk-grid { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid,
  .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .content { padding: 16px; }
  .page-top { grid-template-columns: 1fr; }
  .accountbar { justify-self: stretch; grid-template-columns: 38px minmax(0, 1fr) auto; }
  .kpis, .two { grid-template-columns: 1fr; }
  .executive-section-kpis { grid-template-columns: 1fr; }
  .action-center-kpis,
  .feedback-kpis,
  .action-filter-grid,
  .copilot-facts { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .upload-row { grid-template-columns: 1fr; }
  .chart { height: 320px; }
  .chart-topbar .legend { justify-content: flex-start; }
  .yoy-cards { grid-template-columns: 1fr; }
  .payment-cards { grid-template-columns: 1fr; }
  .report-toolbar,
  .report-actions,
  .report-grid-2,
  .action-category-grid,
  .action-item-grid,
  .action-evidence,
  .ai-assistant-grid,
  .report-risk-row,
  .report-kpis { grid-template-columns: 1fr; }
  .report-segment-chart { grid-template-columns: 1fr; justify-items: center; }
  .report-segment-total { justify-self: stretch; width: 100%; }
  .report-hero { align-items: flex-start; flex-direction: column; }
  .report-period { justify-items: start; }
  .payment-average-box { grid-template-columns: 1fr; }
  .payment-count-grid { grid-template-columns: 1fr; }
  .segment-trend { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: 1fr; }
  .form-grid,
  .permission-grid { grid-template-columns: 1fr; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 9mm;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  html,
  body {
    background: var(--sx-bg-surface) !important;
  }
  body {
    font-size: 10.5px;
  }
  .sidebar,
  .page-top,
  .report-toolbar,
  .toast-bubble,
  .modal-backdrop {
    display: none !important;
  }
  .app-shell,
  .content {
    display: block !important;
    min-height: 0 !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .content > .grid > *:not(.report-preview) {
    display: none !important;
  }
  .report-preview {
    display: grid !important;
    gap: 8px !important;
  }
  .report-hero {
    padding: 11px 13px !important;
    border-radius: 6px !important;
  }
  .report-hero h2 {
    font-size: 20px !important;
  }
  .report-period strong {
    font-size: 13px !important;
  }
  .report-kpis {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 7px !important;
  }
  .report-actions {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 7px !important;
  }
  .report-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .report-risk-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 7px !important;
  }
  .card,
  .panel,
  .report-action-card {
    box-shadow: none !important;
    border-radius: 6px !important;
    padding: 8px !important;
    break-inside: avoid;
  }
  .metric {
    font-size: 18px !important;
  }
  .report-action-card strong {
    font-size: 20px !important;
  }
  .segment-overview {
    grid-template-columns: 1fr !important;
  }
  .report-segment-chart {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .trend-point {
    min-height: 54px !important;
    padding: 6px !important;
    gap: 4px !important;
  }
  .trend-point span {
    min-height: 18px !important;
    font-size: 8.5px !important;
  }
  .segment-total .active-period {
    min-width: 48px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 8.5px !important;
  }
  .trend-point strong {
    font-size: 15px !important;
  }
  .segment-donut {
    width: 96px !important;
  }
  .segment-donut-center strong {
    font-size: 17px !important;
  }
  .table-scroll {
    overflow: visible !important;
    border-radius: 6px !important;
  }
  .table-scroll table {
    min-width: 0 !important;
    width: 100% !important;
  }
  th,
  td {
    padding: 5px 6px !important;
    font-size: 9.5px !important;
  }
}

/* === Smart Action Center: radna lista po komercijalisti === */
.action-section-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 820px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 5px 2px 2px;
}
.action-salesperson-section {
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.action-section-head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--sx-fg-default);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.action-section-head .muted {
  margin: 2px 0 0;
  font-size: 11px;
}
.action-section-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.smart-action-list.section-list {
  max-height: none;
  overflow: visible;
  padding: 0;
}
button.ghost-button.action-show-more {
  align-self: center;
  width: 100%;
  justify-content: center;
}

/* === Executive Summary: V2 kompaktni red kartica === */
.executive-compact-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1200px) { .executive-compact-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .executive-compact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-compact {
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-soft);
  border-left: 4px solid var(--sx-border-default);
  border-radius: 10px;
  box-shadow: var(--sx-shadow-raise);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.stat-compact.tone-good   { border-left-color: var(--sx-status-success-fg); }
.stat-compact.tone-bad    { border-left-color: var(--sx-status-danger-fg); }
.stat-compact.tone-warn   { border-left-color: var(--sx-nav-item-active-marker); }
.stat-compact.tone-accent { border-left-color: var(--sx-brand-primary); }
.stat-compact .sc-label {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sx-fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-compact .sc-value {
  font-size: 21px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em;
  color: var(--sx-fg-default); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-compact .sc-value .sc-unit { font-size: 11px; font-weight: 700; color: var(--sx-fg-muted); margin-left: 4px; }
.stat-compact .sc-delta { font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.stat-compact .sc-delta.up   { color: var(--sx-status-success-fg); }
.stat-compact .sc-delta.down { color: var(--sx-status-danger-fg); }
.stat-compact .sc-delta.flat { color: var(--sx-fg-muted); }

/* === Istorija akcije: klikabilni redovi + pop-up === */
.history-hint { margin: 0 0 8px; font-size: 11px; }
.history-table { table-layout: fixed; width: 100%; }
.history-table th, .history-table td { min-width: 0; }
.history-table td { vertical-align: top; }
.history-table th:first-child, .history-table td.history-time { width: 27%; }
.history-table th:last-child, .history-table td:last-child { width: 22%; }
.history-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-row.has-note { cursor: pointer; transition: background .12s ease; }
.history-row.has-note:hover { background: var(--sx-bg-brand-soft); }
.history-row.has-note:focus,
.history-row.has-note:focus-visible { background: var(--sx-bg-brand-soft); outline: none; box-shadow: inset 0 0 0 2px var(--sx-brand-primary), var(--sx-focus-ring); }
.history-event-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.history-open-tag {
  color: var(--sx-brand-primary);
  font-weight: 800;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  flex: 0 0 auto;
}
.history-note-preview {
  display: block;
  margin-top: 3px;
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-modal-card { max-width: 560px; }
.history-modal-status { margin: 4px 0 0; }
.history-modal-body { margin-top: 14px; }
.history-modal-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--sx-fg-muted); margin: 0 0 8px; }
.history-modal-text {
  margin: 0;
  padding: 14px 16px;
  background: var(--sx-bg-surface-soft);
  border: 1px solid var(--sx-border-soft);
  border-radius: 10px;
  color: var(--sx-fg-default);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* === Dugovanja: sortabilna tabela kupaca + pretraga === */
.debt-customers-head { align-items: center; gap: 14px; flex-wrap: wrap; }
.debt-search-wrap { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.debt-search {
  min-height: 38px;
  flex: 0 0 auto;
  width: 280px;
  max-width: 60vw;
  border: 1px solid var(--sx-border-default);
  border-radius: 9px;
  padding: 7px 12px;
  background: var(--sx-bg-surface);
  box-shadow: var(--sx-shadow-raise);
}
.debt-search-count {
  flex: 0 0 auto;
  min-width: 84px;
  font-size: 11px;
  white-space: nowrap;
}
.sortable-table { width: 100%; }
.sortable-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color .12s ease, background .12s ease;
}
.sortable-table th.sortable:hover { color: var(--sx-brand-primary); }
.sortable-table th.sortable .sort-caret {
  margin-left: 6px;
  font-size: 10px;
  color: var(--sx-fg-muted);
  opacity: .55;
}
.sortable-table th.sortable.sorted { color: var(--sx-brand-primary); }
.sortable-table th.sortable.sorted .sort-caret { color: var(--sx-brand-primary); opacity: 1; }
.sortable-table th.num, .sortable-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Fiksne sirine kolona da se ne pomeraju tokom pretrage */
.sortable-table.fixed-cols { table-layout: fixed; }
.sortable-table.fixed-cols th,
.sortable-table.fixed-cols td { overflow: hidden; }
.sortable-table.fixed-cols td:not(.num) {
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sortable-table.fixed-cols td.num,
.sortable-table.fixed-cols th.num { white-space: nowrap; }

/* Fiksna visina tabele kupaca + unutrasnji scroll: broj rezultata pretrage
   ne menja spoljnu visinu stranice, pa glavni scroll ne skace. */
.debt-table-scroll {
  height: min(60vh, 640px);
  overflow: auto;
}
.debt-table-scroll.empty {
  height: auto;
  border: 0;
}
.debt-table-scroll .sortable-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--sx-bg-surface-soft);
}
.debt-filter-bar .filter-search-wrap { flex: 1 1 260px; }
.debt-locked-field .locked-select {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--sx-border-default);
  border-radius: 8px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-default);
  font-weight: 700;
}
.debt-aging-head { align-items: flex-start; }
.debt-aging-chart {
  display: grid;
  gap: 10px;
}
.debt-aging-row {
  display: grid;
  grid-template-columns: minmax(86px, 120px) minmax(160px, 1fr) minmax(120px, auto);
  align-items: center;
  gap: 12px;
}
.debt-aging-label {
  color: var(--sx-fg-muted);
  font-weight: 720;
  font-size: 13px;
}
.debt-aging-track {
  height: 10px;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  overflow: hidden;
}
.debt-aging-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--sx-status-warning-border);
}
.debt-aging-value {
  text-align: right;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.debt-table {
  min-width: 920px;
}
.debt-table .status-cell {
  white-space: nowrap;
}
.debt-status-badge {
  min-width: 92px;
}
.debt-status-overdue {
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
}
.debt-status-mixed {
  background: var(--sx-bg-brand-soft);
  color: var(--sx-fg-default);
}
.debt-status-notdue {
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}
.debt-status-credit,
.debt-status-credit-included {
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.debt-status-na {
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
}
.debt-credit-note {
  border-color: var(--sx-status-info-border);
  background: var(--sx-status-info-bg);
  color: var(--sx-fg-default);
}
.debt-outside-detail-row td {
  background: color-mix(in srgb, var(--sx-status-info-bg) 62%, var(--sx-bg-surface));
}
.debt-outside-detail-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.debt-outside-detail-copy strong {
  color: var(--sx-fg-strong);
  line-height: 1.3;
}
.debt-outside-detail-copy span {
  color: var(--sx-fg-muted);
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}
.debt-negative-value {
  color: var(--sx-status-info-fg);
  font-weight: 800;
}
.debt-empty-state {
  margin-top: 0;
}

/* UI-2B6 — Naplata i Dugovanja na zajednickoj finansijskoj hijerarhiji. */
.ui2b6-finance-page {
  min-width: 0;
  gap: var(--sx-space-5);
}
.ui2b6-finance-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  align-items: center;
  gap: var(--sx-space-6);
  padding: var(--sx-space-6);
  overflow: hidden;
}
.ui2b6-finance-copy { min-width: 0; }
.ui2b6-finance-copy h2 {
  margin: var(--sx-space-2) 0 var(--sx-space-2);
  color: var(--sx-fg-strong);
  font-family: var(--sx-font-display);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.ui2b6-finance-copy p {
  max-width: 720px;
  margin: 0;
  color: var(--sx-fg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.ui2b6-finance-answer {
  min-width: 0;
  padding: var(--sx-space-4);
  border: 1px solid var(--sx-border-default);
  border-radius: var(--sx-radius-lg);
  background: var(--sx-bg-surface-soft);
}
.ui2b6-finance-answer span,
.ui2b6-finance-answer small {
  display: block;
  color: var(--sx-fg-muted);
}
.ui2b6-finance-answer span {
  margin-bottom: var(--sx-space-2);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ui2b6-finance-answer strong {
  display: block;
  color: var(--sx-fg-strong);
  font-size: clamp(24px, 3vw, 36px);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ui2b6-finance-answer small { margin-top: var(--sx-space-2); }
.ui2b6-finance-kpis {
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ui2b6-finance-kpis > * { min-width: 0; }
.ui2b6-finance-note {
  border-color: var(--sx-border-default);
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
}
#naplata-table-host,
#debt-table-host {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  .ui2b6-finance-intro { grid-template-columns: minmax(0, 1fr); }
  .ui2b6-finance-page .ui2b6-finance-kpis.grid.kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }
  .ui2b6-finance-page .ui2b6-finance-kpis.grid.kpis > .card {
    min-width: 0;
    width: auto;
  }
}

@media (max-width: 640px) {
  .ui2b6-finance-page { gap: var(--sx-space-4); }
  .ui2b6-finance-intro { padding: var(--sx-space-4); gap: var(--sx-space-4); }
  .ui2b6-finance-page .ui2b6-finance-kpis.grid.kpis {
    grid-template-columns: minmax(0, 1fr);
  }
  .debt-aging-row {
    grid-template-columns: minmax(76px, 96px) minmax(100px, 1fr);
    gap: var(--sx-space-2);
  }
  .debt-aging-value { grid-column: 2; }
}


/* ============================================================================
   PHASE 2B.1 (+2B.1.1) — DATA COMMAND CENTER · vizuelna osnova
   Sve boje preko semantickih :root tokena (tacka 6). AA kontrast (tacka 7).
   Ostali moduli zadrzavaju postojeci interni markup (rekolorisan preko tokena).
   ============================================================================ */
body { background: var(--sx-bg-app); color: var(--sx-fg-default); font-family: "Inter", "Segoe UI Variable", "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.45; }
:focus-visible { outline: none; box-shadow: var(--sx-focus-ring); border-radius: 8px; }

/* ---- App shell ---- */
.app { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.app.nav-collapsed { grid-template-columns: 74px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sx-bg-brand-strong); color: var(--sx-nav-fg); padding: 20px 14px 16px; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; }
.brand { display: flex; flex-direction: row; align-items: center; gap: 10px; width: 100%; min-width: 0; box-sizing: border-box; padding: 2px 6px 20px; border-bottom: 1px solid var(--sx-nav-border); }
.brand img { width: 40px; height: 40px; flex: 0 0 auto; }
.brand-copy strong { display: block; font-size: 17px; letter-spacing: .08em; color: var(--sx-nav-fg); }
.brand-copy span { display: block; color: var(--sx-nav-muted-fg); font-size: 9px; letter-spacing: .15em; margin-top: 1px; }
.brand-collapse { margin-left: auto; flex: 0 0 36px; border: 0; padding: 0; background: var(--sx-nav-item-hover-bg); color: var(--sx-nav-icon-fg); width: 36px; height: 36px; min-width: 36px; min-height: 36px; border-radius: 9px; display: grid; place-items: center; line-height: 1; }
.brand-collapse .nav-icon { width: 20px; height: 20px; display: grid; place-items: center; background: transparent; }
.brand-collapse .nav-icon svg { width: 18px; height: 18px; display: block; margin: 0; transform-origin: 50% 50%; }
.brand-collapse:hover { background: var(--sx-nav-item-active-bg); }
.app.nav-collapsed .brand-copy { display: none; }
.app.nav-collapsed .brand { flex-direction: column; justify-content: center; gap: 10px; padding: 2px 0 16px; }
/* KLJUCNO: dugme za skupljanje/sirenje OSTAJE vidljivo i u skupljenom rezimu (inace nema povratka) */
.app.nav-collapsed .brand-collapse { display: grid; margin-left: 0; }
.app.nav-collapsed .brand-collapse svg { transform: scaleX(-1); }  /* pokazuje "»" = prosiri */
.nav { padding-top: 16px; display: grid; gap: 15px; }
.nav-group { display: grid; gap: 4px; }
.nav-label { padding: 0 10px 4px; color: var(--sx-nav-label-fg); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.app.nav-collapsed .nav-label { visibility: hidden; height: 6px; }
.nav-btn { border: 0; background: transparent; color: var(--sx-nav-item-fg); display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; text-align: left; font-weight: 560; font-size: 13px; width: 100%; }
.nav-btn:hover { background: var(--sx-nav-item-hover-bg); }
.nav-btn.active { background: var(--sx-nav-item-active-bg); color: var(--sx-nav-fg); }
.nav-btn.active .nav-icon { background: var(--sx-nav-item-active-marker); color: var(--sx-bg-brand-strong); }
.nav-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--sx-nav-icon-fg); flex: 0 0 auto; }
.nav-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.app.nav-collapsed .nav-btn { justify-content: center; padding: 9px 0; }
.app.nav-collapsed .nav-btn .nav-label-text { display: none; }
.sidebar-foot { margin-top: auto; padding: 14px 4px 2px; }
.data-health { display: flex; flex-direction: row; align-items: center; gap: 9px; border: 1px solid var(--sx-nav-health-border); background: var(--sx-nav-health-bg); border-radius: 12px; padding: 11px; }
.health-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--sx-nav-health-dot); box-shadow: 0 0 0 4px var(--sx-nav-health-glow); flex: 0 0 auto; }
.data-health span { font-size: 11px; color: var(--sx-nav-health-fg); }
.data-health strong { font-size: 12px; display: block; color: var(--sx-nav-fg); }
.app.nav-collapsed .data-health span, .app.nav-collapsed .data-health strong { display: none; }
.app.nav-collapsed .sidebar-foot { padding: 14px 0 2px; }
.app.nav-collapsed .data-health { justify-content: center; }

/* ---- Topbar ---- */
.shell { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { min-height: 72px; padding: 8px 28px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--sx-border-default); background: var(--sx-topbar-bg); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.crumb { display: flex; flex-direction: row; align-items: center; gap: 9px; color: var(--sx-fg-muted); font-size: 12px; min-width: 0; }
.crumb strong { color: var(--sx-fg-default); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-brand, .mobile-menu { display: none; }
.account { position: relative; }
.account-btn { display: flex; flex-direction: row; align-items: center; gap: 11px; border: 1px solid transparent; background: transparent; padding: 5px 6px 5px 10px; border-radius: 12px; }
.account-btn:hover { border-color: var(--sx-border-default); background: var(--sx-bg-surface-soft); }
.account-text { text-align: right; }
.account-text strong { display: block; font-size: 12px; color: var(--sx-fg-default); }
.account-text span { font-size: 11px; color: var(--sx-fg-muted); }
.avatar { width: 34px; height: 34px; border-radius: 12px; background: var(--sx-bg-brand-soft); border: 1px solid var(--sx-border-brand); display: grid; place-items: center; font-weight: 760; color: var(--sx-bg-brand-strong); overflow: hidden; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu { position: absolute; right: calc(100% + 8px); top: 50%; width: 116px; transform: translateY(-50%); background: var(--sx-bg-surface); border: 1px solid var(--sx-border-default); border-radius: 12px; box-shadow: var(--sx-shadow-float); padding: 5px; display: none; z-index: 60; }
.account-menu.open { display: block; }
.account-menu .am-head { display: none; }
.account-menu .am-head strong { display: block; font-size: 13px; color: var(--sx-fg-strong); }
.account-menu .am-head span { font-size: 11px; color: var(--sx-fg-muted); }
.account-menu button { width: 100%; text-align: left; border: 0; background: transparent; border-radius: 9px; padding: 9px 10px; font-size: 12px; color: var(--sx-fg-default); display: flex; align-items: center; gap: 9px; }
.account-menu button:hover { background: var(--sx-bg-surface-soft); }
.account-menu button.danger { color: var(--sx-status-danger-fg); }

/* ---- Main + page head ---- */
.main { padding: 26px 28px 44px; max-width: 1540px; margin: 0 auto; width: 100%; overflow-x: clip; }
.page-head { display: flex; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.manager-scope-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--sx-status-info-border);
  border-left: 4px solid var(--sx-status-info-fg);
  border-radius: 12px;
  background: var(--sx-status-info-bg);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--sx-status-info-fg) 6%, transparent);
}
.manager-scope-copy { display: grid; gap: 3px; min-width: 0; }
.manager-scope-copy .eyebrow { margin: 0; color: var(--sx-status-info-fg); }
.manager-scope-copy strong { color: var(--sx-fg-strong); font-size: 15px; }
.manager-scope-copy small { color: var(--sx-fg-muted); line-height: 1.4; }
.manager-scope-switcher > label { display: grid; flex: 0 0 min(360px, 38%); gap: 6px; color: var(--sx-status-info-fg); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.manager-scope-switcher select { width: 100%; min-height: 42px; border-color: var(--sx-status-info-border); background: var(--sx-bg-surface); color: var(--sx-fg-strong); font-weight: 750; }
.eyebrow { color: var(--sx-fg-brand); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 5px; }
.page-head h1 { margin: 0; font-size: 29px; line-height: 1.15; letter-spacing: -.035em; color: var(--sx-fg-strong); font-weight: 730; }
.page-head p { margin: 7px 0 0; color: var(--sx-fg-muted); font-size: 13px; }
.period-chip { border: 1px solid var(--sx-border-default); background: var(--sx-chip-glass-bg); padding: 9px 12px; border-radius: 12px; color: var(--sx-fg-muted); font-size: 11px; white-space: nowrap; }
.period-chip strong { color: var(--sx-fg-default); font-weight: 680; }

/* ---- Kartice / KPI (globalno) ---- */
.card { background: var(--sx-bg-surface); border: 1px solid var(--sx-border-default); border-radius: var(--sx-radius-lg); box-shadow: var(--sx-shadow-raise); }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 15px 15px 13px; min-width: 0; }
.kpi-top { display: flex; flex-direction: row; justify-content: space-between; gap: 8px; align-items: center; }
.kpi-label { color: var(--sx-fg-muted); font-size: 10px; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.tone-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--sx-brand-primary); flex: 0 0 auto; }
.tone-dot.warm { background: var(--sx-status-warning-border); }
.tone-dot.danger { background: var(--sx-status-danger-fg); }
.tone-dot.success { background: var(--sx-status-success-fg); }
.kpi-value { font-size: 23px; line-height: 1.08; font-weight: 720; letter-spacing: -.035em; color: var(--sx-fg-strong); margin: 10px 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 10px; color: var(--sx-fg-muted); font-weight: 650; letter-spacing: .02em; }
/* Ne-numericki fallback ("Nedostaje podatak"): citljiv u celosti, bez ellipsis-a (tacka 5) */
.kpi-value.is-missing { font-size: 13px; font-weight: 600; line-height: 1.25; letter-spacing: 0; white-space: normal; color: var(--sx-fg-muted); }
.trend { display: flex; flex-direction: row; align-items: center; gap: 5px; font-size: 10.5px; color: var(--sx-fg-muted); }
.trend.good { color: var(--sx-status-success-fg); }
.trend.bad { color: var(--sx-status-danger-fg); }

/* ---- UI-2B2: Executive + shared KPI/chart foundation ---- */
.executive-dashboard {
  display: grid;
  gap: var(--sx-space-4);
  min-width: 0;
}
.executive-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sx-space-3);
  min-width: 0;
  margin-top: calc(var(--sx-space-2) * -1);
  color: var(--sx-fg-muted);
  font-size: 11px;
}
.executive-context-period,
.executive-context-scope {
  min-width: 0;
  border: 1px solid var(--sx-border-default);
  border-radius: 999px;
  background: var(--sx-bg-surface);
  padding: 6px 10px;
  font-weight: 700;
}
.executive-context-scope {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.executive-zone {
  display: grid;
  gap: var(--sx-space-3);
  min-width: 0;
}
.executive-zone-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.executive-zone-mark {
  width: 4px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--sx-brand-primary);
}
.executive-zone-risk .executive-zone-mark { background: var(--sx-status-warning-fg); }
.executive-zone-action .executive-zone-mark { background: var(--sx-status-info-fg); }
.executive-zone-head h2 {
  margin: 0;
  color: var(--sx-fg-strong);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
}
.executive-zone-head p {
  margin: 2px 0 0;
  color: var(--sx-fg-muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.executive-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}
.executive-secondary-grid,
.executive-risk-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.executive-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.executive-risk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.smart-kpi {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 13px 14px;
  overflow: hidden;
}
.smart-kpi > * {
  position: relative;
  z-index: 1;
}
.smart-kpi-secondary,
.smart-kpi-risk,
.smart-kpi-unavailable { min-height: 94px; }
.smart-kpi.tone-good {
  border-color: var(--sx-status-success-border);
  background: var(--sx-status-success-bg);
}
.smart-kpi.tone-warn {
  border-color: var(--sx-status-warning-border);
  background: var(--sx-status-warning-bg);
}
.smart-kpi.tone-bad {
  border-color: var(--sx-status-danger-border);
  background: var(--sx-status-danger-bg);
}
.smart-kpi.tone-neutral {
  border-color: var(--sx-status-neutral-border);
  background: var(--sx-status-neutral-bg);
}
.smart-kpi.tone-good::before,
.smart-kpi.tone-warn::before,
.smart-kpi.tone-bad::before,
.smart-kpi.tone-neutral::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .72;
}
.smart-kpi.tone-good::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sx-status-success-border) 42%, transparent), transparent 64%);
}
.smart-kpi.tone-warn::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sx-status-warning-border) 42%, transparent), transparent 64%);
}
.smart-kpi.tone-bad::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sx-status-danger-border) 42%, transparent), transparent 64%);
}
.smart-kpi.tone-neutral::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sx-status-neutral-border) 36%, transparent), transparent 68%);
}
.smart-kpi-secondary,
.smart-kpi-secondary.tone-good,
.smart-kpi-secondary.tone-warn,
.smart-kpi-secondary.tone-bad,
.smart-kpi-secondary.tone-neutral {
  border-color: var(--sx-border-default);
  background: var(--sx-bg-surface);
}
.smart-kpi-secondary::before,
.smart-kpi-risk::before {
  display: none;
}
.smart-kpi-risk { border-top: 0; }
.smart-kpi-risk.tone-good {
  border-color: var(--sx-status-success-border);
  background: var(--sx-status-success-bg);
}
.smart-kpi-risk.tone-warn {
  border-color: var(--sx-status-warning-border);
  background: var(--sx-status-warning-bg);
}
.smart-kpi-risk.tone-bad {
  border-color: var(--sx-status-danger-border);
  background: var(--sx-status-danger-bg);
}
.smart-kpi-risk.tone-neutral {
  border-color: var(--sx-status-neutral-border);
  background: var(--sx-status-neutral-bg);
}
.smart-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.smart-kpi-label {
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .065em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.smart-kpi-tone {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 3px;
  border-radius: 99px;
  background: var(--sx-border-strong);
  opacity: .62;
}
.smart-kpi-tone.tone-good { background: var(--sx-status-success-fg); }
.smart-kpi-tone.tone-warn { background: var(--sx-status-warning-fg); }
.smart-kpi-tone.tone-bad { background: var(--sx-status-danger-fg); }
.smart-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  color: var(--sx-fg-strong);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.smart-kpi-value small {
  color: var(--sx-fg-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}
.smart-kpi-value.is-missing {
  color: var(--sx-fg-muted);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0;
}
.smart-kpi-period {
  color: var(--sx-fg-muted);
  font-size: 9.5px;
  font-weight: 700;
}
.smart-kpi-signal {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  margin-top: auto;
  color: var(--sx-fg-muted);
  font-size: 10px;
  line-height: 1.35;
}
.smart-kpi-signal-icon { flex: 0 0 auto; font-size: 9px; line-height: 1.5; }
.smart-kpi-signal.signal-up { color: var(--sx-status-success-fg); }
.smart-kpi-signal.signal-down { color: var(--sx-status-danger-fg); }
.smart-kpi-signal.signal-unavailable { color: var(--sx-fg-muted); }
.executive-lead-kpi {
  align-content: space-between;
  min-height: 196px;
  padding: 20px;
  border-color: var(--sx-border-brand);
  background: linear-gradient(145deg, var(--sx-bg-surface), var(--sx-bg-brand-soft));
}
.executive-lead-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.executive-lead-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 9px 0 7px;
  color: var(--sx-fg-strong);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
.executive-lead-value small {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.executive-lead-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 8px;
}
.executive-lead-facts div {
  min-width: 0;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  background: color-mix(in srgb, var(--sx-bg-surface) 72%, transparent);
  padding: 8px 9px;
}
.executive-lead-facts dt {
  margin: 0 0 3px;
  color: var(--sx-fg-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.executive-lead-facts dd {
  margin: 0;
  min-width: 0;
  color: var(--sx-fg-strong);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.executive-lead-interpretation {
  margin: -2px 0 4px;
  color: var(--sx-fg-muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.smart-status-badge {
  flex: 0 0 auto;
  border: 1px solid var(--sx-border-default);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.smart-status-badge.success { border-color: var(--sx-status-success-border); background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.smart-status-badge.warning { border-color: var(--sx-status-warning-border); background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.executive-plan-meter { display: grid; gap: 8px; }
.executive-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--sx-fg-muted);
  font-size: 10px;
}
.executive-meter-head strong { color: var(--sx-fg-strong); font-size: 13px; }
.executive-meter-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: var(--sx-line);
  overflow: visible;
}
.executive-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sx-green-700), var(--sx-green-500));
}
.executive-meter-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 17px;
  border-radius: 2px;
  background: var(--sx-ink-500);
}
.executive-plan-meter > small { color: var(--sx-fg-muted); font-size: 9px; }
.executive-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}
.smart-chart-card { min-width: 0; padding: 16px; }
.smart-chart-head { margin-bottom: 10px; }
.smart-chart-head h3 { margin: 0; color: var(--sx-fg-strong); font-size: 15px; }
.smart-chart-summary {
  margin: 9px 2px 0;
  color: var(--sx-fg-muted);
  font-size: 10px;
  line-height: 1.45;
}
.executive-insight-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}
.executive-insight-eyebrow { color: var(--sx-fg-brand); font-size: 9px; font-weight: 850; letter-spacing: .11em; }
.executive-insight-head h3 { margin: 3px 0 0; color: var(--sx-fg-strong); font-size: 15px; }
.executive-insight-list { display: grid; gap: 8px; }
.executive-insight-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--sx-border-default);
  border-left: 3px solid var(--sx-status-warning-fg);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
  padding: 9px 10px;
  color: var(--sx-fg-default);
  text-align: left;
  cursor: pointer;
}
.executive-insight-action.tone-danger { border-left-color: var(--sx-status-danger-fg); }
.executive-insight-action:hover { border-color: var(--sx-border-strong); background: var(--sx-bg-brand-soft); }
.executive-insight-action:focus-visible { outline: 3px solid var(--sx-focus-ring); outline-offset: 2px; }
.executive-insight-copy { display: grid; gap: 2px; min-width: 0; }
.executive-insight-copy strong { color: var(--sx-fg-strong); font-size: 11px; line-height: 1.3; }
.executive-insight-copy small { color: var(--sx-fg-muted); font-size: 9.5px; line-height: 1.35; }
.executive-insight-arrow { color: var(--sx-fg-brand); font-size: 20px; }
.executive-insight-neutral {
  display: grid;
  gap: 4px;
  border: 1px dashed var(--sx-border-strong);
  border-radius: 10px;
  padding: 14px;
  color: var(--sx-fg-muted);
  font-size: 10px;
}
.executive-insight-neutral strong { color: var(--sx-fg-default); font-size: 11px; }

/* ---- Prethodni Executive helperi ostaju kompatibilni za rollback/test fixture ---- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .8fr); gap: 16px; }
.panel { padding: 19px; }
.panel-head { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-head h2 { font-size: 15px; margin: 0; color: var(--sx-fg-strong); }
.panel-head p { font-size: 11px; color: var(--sx-fg-muted); margin: 4px 0 0; }
.segmented { display: flex; background: var(--sx-bg-surface-soft); border: 1px solid var(--sx-border-default); border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 6px 9px; font-size: 10px; color: var(--sx-fg-muted); }
.segmented button.active { background: var(--sx-bg-surface); color: var(--sx-fg-default); box-shadow: 0 2px 8px var(--sx-segmented-shadow); }
.exec-chart { width: 100%; min-width: 0; border-radius: 12px; background: linear-gradient(180deg, var(--sx-chart-bg-start), var(--sx-chart-bg-end)); border: 1px solid var(--sx-chart-border); padding: 8px; overflow: hidden; }
.exec-chart-svg { width: 100%; height: 272px; }
.exec-chart svg { width: 100%; height: 100%; display: block; }
.exec-chart .gridline { stroke: var(--sx-chart-grid); stroke-width: 1; }
.exec-chart .axis-label { fill: var(--sx-chart-axis); font-size: 10px; }
.exec-chart .axis-label-y,
.exec-chart .axis-unit { font-weight: 650; }
.exec-chart .axis-unit { fill: var(--sx-chart-axis); font-size: 10px; }
.exec-chart .line-sales { fill: none; stroke: var(--sx-chart-result); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.exec-chart .line-plan { fill: none; stroke: var(--sx-chart-reference); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 5 5; }
.exec-chart .area { fill: url(#execarea); }
.exec-chart .area-stop-top { stop-color: var(--sx-chart-result); stop-opacity: .18; }
.exec-chart .area-stop-bottom { stop-color: var(--sx-chart-result); stop-opacity: 0; }
.exec-chart .point-sales { fill: var(--sx-bg-surface); stroke: var(--sx-chart-result); stroke-width: 2.5; }
.exec-chart .point-plan { fill: var(--sx-bg-surface); stroke: var(--sx-chart-reference); stroke-width: 2.2; }
.exec-chart-legend { flex: 0 0 auto; }
.swatch.exec-sales { background: var(--sx-chart-result); }
.swatch.exec-plan { background: var(--sx-chart-reference); }
.focus-list { display: grid; gap: 9px; }
.focus-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--sx-border-default); border-radius: 12px; padding: 12px; background: var(--sx-card-alt-bg); text-align: left; width: 100%; }
.focus-item:hover { border-color: var(--sx-border-strong); background: var(--sx-card-alt-hover-bg); }
.focus-rank { width: 28px; height: 28px; border-radius: 9px; background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: 0 0 auto; }
.focus-rank.warm { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.focus-rank.sage { background: var(--sx-bg-brand-soft); color: var(--sx-bg-brand-strong); }
.focus-copy { display: flex; flex-direction: column; }
.focus-copy strong { font-size: 12px; display: block; color: var(--sx-fg-strong); }
.focus-copy span { font-size: 10px; color: var(--sx-fg-muted); }
.focus-empty { border: 1px dashed var(--sx-border-strong); border-radius: 12px; padding: 16px; text-align: center; color: var(--sx-fg-muted); font-size: 12px; }
.arrow { color: var(--sx-fg-subtle); font-size: 18px; }
.health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.health-card { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; }
.health-copy { display: flex; flex-direction: column; }
.health-copy span { font-size: 10px; color: var(--sx-fg-muted); }
.health-copy strong { font-size: 16px; display: block; margin-top: 2px; color: var(--sx-fg-strong); }
.meter { width: 78px; height: 6px; border-radius: 99px; background: var(--sx-line); overflow: hidden; flex: 0 0 auto; }
.meter span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sx-green-700), var(--sx-green-500)); }

/* ---- Dugmad ---- */
.soft-btn, .ghost-button, .export-pdf-button, .small-button, .utility-button { border: 1px solid var(--sx-border-default); background: var(--sx-bg-surface); border-radius: 10px; padding: 8px 12px; font-size: 11px; font-weight: 650; color: var(--sx-fg-default); }
.soft-btn:hover, .ghost-button:hover, .export-pdf-button:hover, .small-button:hover, .utility-button:hover { border-color: var(--sx-border-strong); background: var(--sx-bg-surface-soft); }
.primary-btn, .save-user-button { border: 0; background: var(--sx-bg-brand-strong); color: var(--sx-nav-fg); border-radius: 10px; padding: 10px 14px; font-size: 11px; font-weight: 680; }
.primary-btn:hover, .save-user-button:hover { background: var(--sx-bg-brand-hover); }

/* ---- Bottom nav (mobilno) + "Vise" sheet ---- */
.bottom-nav { display: none; }
.more-sheet-backdrop { display: none; }
.more-sheet-backdrop.open { display: block; position: fixed; inset: 0; background: var(--sx-scrim); z-index: 80; }
.more-sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--sx-bg-surface); border-radius: 20px 20px 0 0; box-shadow: var(--sx-shadow-float); padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); z-index: 81; max-height: 74vh; overflow: auto; }
.more-sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 10px; }
.more-sheet h3 { margin: 0 4px; font-size: 13px; color: var(--sx-fg-strong); }
.more-sheet .sheet-close { flex-basis: 40px; }
.more-sheet .sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-sheet .sheet-item { display: flex; flex-direction: row; align-items: center; gap: 10px; border: 1px solid var(--sx-border-default); border-radius: 12px; padding: 12px; background: var(--sx-bg-surface); font-size: 12px; font-weight: 600; color: var(--sx-fg-default); text-align: left; }
.more-sheet .sheet-item.active { border-color: var(--sx-brand-primary); background: var(--sx-bg-brand-soft); }
.more-sheet .sheet-item .nav-icon { color: var(--sx-brand-primary); }
.more-sheet .sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--sx-border-strong); margin: 2px auto 8px; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1100px 520px at 15% -10%, var(--sx-login-glow-1), transparent 60%),
  radial-gradient(900px 480px at 100% 0%, var(--sx-login-glow-2), transparent 55%),
  var(--sx-bg-app); }
.login-card { width: 100%; max-width: 420px; background: var(--sx-bg-surface); border: 1px solid var(--sx-border-default); border-radius: var(--sx-radius-lg); box-shadow: var(--sx-shadow-float); padding: 30px 30px 26px; }
.login-brand { display: flex; flex-direction: row; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand img { width: 46px; height: 46px; }
.login-brand strong { display: block; font-size: 18px; letter-spacing: .06em; color: var(--sx-fg-strong); }
.login-brand span { display: block; font-size: 10px; letter-spacing: .09em; color: var(--sx-fg-muted); margin-top: 2px; }
.login-lede { color: var(--sx-fg-muted); font-size: 13px; margin: 0 0 22px; }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sx-fg-muted); }
.login-card input { border: 1px solid var(--sx-border-default); background: var(--sx-bg-surface-soft); border-radius: 10px; padding: 11px 12px; font-size: 14px; color: var(--sx-fg-default); }
.login-card input:focus-visible { border-color: var(--sx-brand-primary); }
.login-card .primary-btn { padding: 12px; font-size: 13px; margin-top: 4px; }
.login-card .error { background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); border-radius: 10px; padding: 10px 12px; font-size: 12px; }

/* ---- Primitivi: skeleton / refreshing / empty / error ---- */
.skeleton { position: relative; overflow: hidden; background: var(--sx-bg-surface-soft); border-radius: 10px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--sx-skeleton-shine), transparent); animation: smartix-shimmer 1.25s infinite; }
.skel-kpi { height: 88px; }
.skel-line { height: 12px; margin: 8px 0; }
.skel-chart { height: 272px; }
.skel-panel { height: 200px; }
@keyframes smartix-shimmer { 100% { transform: translateX(100%); } }
.is-refreshing { position: relative; }
.is-refreshing::before { content: "Osvežavanje…"; position: absolute; top: 10px; right: 14px; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--sx-bg-brand-strong); background: var(--sx-bg-brand-soft); border: 1px solid var(--sx-recommend-border); border-radius: 99px; padding: 4px 10px; z-index: 5; }
.empty-state, .error-state { border: 1px dashed var(--sx-border-strong); border-radius: var(--sx-radius-lg); padding: 34px 24px; text-align: center; color: var(--sx-fg-muted); background: var(--sx-bg-surface); }
.empty-state h3, .error-state h3 { margin: 0 0 6px; font-size: 15px; color: var(--sx-fg-strong); }
.empty-state p, .error-state p { margin: 0 auto; max-width: 460px; font-size: 13px; }
.error-state { border-color: var(--sx-status-danger-border); background: var(--sx-status-danger-bg); }
.error-state .retry-btn { margin-top: 14px; border: 1px solid var(--sx-status-danger-border); background: var(--sx-bg-surface); color: var(--sx-status-danger-fg); border-radius: 10px; padding: 9px 16px; font-size: 12px; font-weight: 650; }

/* ---- Kompatibilnost: stari KPI blok ---- */
.kpis { grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; }
.kpis .card { padding: 15px; overflow: hidden; }
.kpis .card::before { display: none !important; }
.kpis .card .metric, .metric { font-size: 22px; font-weight: 720; letter-spacing: -.03em; color: var(--sx-fg-strong); font-variant-numeric: tabular-nums; }
.metric-unit, .metric-amount small { font-size: 10px; color: var(--sx-fg-muted); font-weight: 650; }

/* Baza kupaca: kompaktan KPI red i sira kartica novih kupaca. */
.yoy-kpis {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(125px, .68fr)) minmax(520px, 2.65fr);
  gap: 10px;
  align-items: stretch;
}
.yoy-kpis .card {
  min-width: 0;
  min-height: 190px;
  align-content: space-between;
}
.yoy-kpis > .card:not(.new-customers-kpi) {
  padding: 13px 12px;
  grid-template-rows: 86px auto minmax(54px, 1fr);
  align-content: stretch;
}
.yoy-kpis > .card:not(.new-customers-kpi) .metric {
  font-size: 20px;
  align-self: start;
}
.yoy-kpis > .card:not(.new-customers-kpi) > small {
  align-self: end;
}
.yoy-kpis .new-customers-kpi {
  display: grid;
  grid-template-columns: minmax(112px, .72fr) minmax(155px, 1fr) minmax(180px, 1.12fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  column-gap: 0;
  row-gap: 6px;
  align-content: stretch;
  padding: 13px 14px;
}
.new-customers-kpi > .muted {
  grid-column: 1;
  grid-row: 1;
}
.new-customers-kpi > .metric {
  grid-column: 1;
  grid-row: 2;
}
.new-customers-kpi > .new-customer-compact {
  display: contents;
}
.new-customer-compact-summary {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}
.new-customer-section-title {
  color: var(--sx-fg-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .02em;
  line-height: 1.25;
}
.new-customer-card-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--sx-border-default);
}
.new-customer-month-section {
  grid-column: 2;
  grid-row: 1 / span 3;
}
.new-customer-sales-section {
  grid-column: 3;
  grid-row: 1 / span 3;
}
.new-customer-month-section .new-customer-months {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  gap: 6px;
}
.new-customer-month-section .new-customer-month {
  padding: 6px 7px;
}
.new-customer-sales-section .new-customer-podium { margin-top: 0; }
.new-customer-empty {
  color: var(--sx-fg-muted);
  font-size: 11px;
}

/* ============================================================================
   UI-2B4 - Plan vs ostvarenje + Baza final module redesign
   Runtime-only presentation layer; business payloads remain unchanged.
   ============================================================================ */
.ui2b4-module {
  gap: 14px;
  min-width: 0;
}
.ui2b4-page-intro {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
}
.ui2b4-intro-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.ui2b4-intro-copy h2 {
  margin: 0;
  color: var(--sx-fg-strong);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.05;
  letter-spacing: -.04em;
}
.ui2b4-intro-copy p {
  margin: 0;
  color: var(--sx-fg-muted);
  font-size: 13px;
}
.ui2b4-page-intro .smart-filter-toolbar {
  margin: 0;
  box-shadow: none;
  background: var(--sx-bg-surface-soft);
}
.ui2b4-result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr) auto;
  gap: 16px;
  align-items: stretch;
  border-left: 4px solid var(--sx-status-success-fg);
  background: linear-gradient(135deg, var(--sx-status-success-bg), var(--sx-bg-surface));
}
.ui2b4-result-main {
  display: grid;
  align-content: center;
  gap: 7px;
}
.ui2b4-result-main h2 {
  margin: 0;
  color: var(--sx-fg-strong);
  font-size: 18px;
}
.ui2b4-result-main p {
  margin: 0;
  color: var(--sx-fg-muted);
  font-size: 12px;
}
.ui2b4-result-value {
  color: var(--sx-fg-strong);
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 850;
  line-height: .95;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
.ui2b4-result-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ui2b4-result-facts div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--sx-border-soft);
  border-radius: 12px;
  background: var(--sx-bg-surface);
  padding: 10px 11px;
}
.ui2b4-result-facts span {
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ui2b4-result-facts strong {
  color: var(--sx-fg-strong);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ui2b4-support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ui2b4-support-grid .smart-kpi {
  min-height: 118px;
}
.ui2b4-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ui2b4-table-panel {
  padding: 16px;
}
.ui2b4-table-panel .topbar {
  height: auto;
  padding: 0 0 12px;
}
.ui2b4-table-panel h2 {
  margin: 3px 0 0;
}
.ui2b4-baza-kpi-layout {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(0, 1.65fr);
  gap: 12px;
  min-width: 0;
}
.ui2b4-baza-primary {
  min-height: 176px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  background: linear-gradient(135deg, var(--sx-status-success-bg), var(--sx-bg-surface));
  border-color: var(--sx-status-success-border);
}
.ui2b4-baza-primary-value {
  color: var(--sx-fg-strong);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 860;
  line-height: .95;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.ui2b4-baza-primary p {
  margin: 0;
  color: var(--sx-fg-muted);
  font-size: 12px;
  line-height: 1.45;
}
.ui2b4-baza-secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ui2b4-baza-secondary-grid .smart-kpi {
  min-height: 176px;
}
.ui2b4-baza-page > .smart-chart-card {
  padding: 18px;
}
.ui2b4-baza-page .active-base-chart {
  border: 0;
  background: transparent;
  padding: 0;
}
.ui2b4-baza-page .active-base-chart-head {
  display: none;
}
.ui2b4-baza-page .active-base-svg {
  min-height: 250px;
}
.ui2b4-segment-panel {
  display: grid;
  gap: 12px;
}
.segment-comparison-shell {
  margin-top: 2px;
}
.segment-comparison-table {
  min-width: 620px;
}
.ui2b4-segment-panel .segment-grid {
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
}
.ui2b4-segment-panel .segment-card {
  padding: 10px;
  gap: 6px;
}
.ui2b4-segment-panel .segment-card strong {
  font-size: 18px;
}
.ui2b4-segment-panel .segment-card small {
  font-size: 10px;
  line-height: 1.35;
}

/* ---- Backstop protiv horizontalnog page overflow-a ---- */
.permission-panel, .permission-grid, .action-item-grid, .mustsell-matrix,
.sortable-table, .risk-table, .history-table, .report-top-customers,
.debt-table-scroll, .table-scroll, .action-section-scroll, .new-customer-sales-grid {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
}

/* ============================================================================
   RESPONSIVE — mobile-first korekcije preko desktop osnove
   ============================================================================ */
@media (max-width: 1100px) {
  .executive-result-layout { grid-template-columns: 1fr; }
  .executive-secondary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .executive-risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .kpi-grid, .kpis { grid-template-columns: repeat(3, 1fr); }
  .ui2b4-page-intro,
  .ui2b4-result-card,
  .ui2b4-baza-kpi-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui2b4-support-grid,
  .ui2b4-baza-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ui2b4-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .yoy-kpis {
    grid-template-columns: repeat(4, minmax(125px, .68fr)) minmax(520px, 2.65fr);
    overflow-x: auto;
    padding-bottom: 5px;
  }
  .dash-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .app, .app.nav-collapsed { display: block; grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .app-topbar { min-height: 60px; padding: 8px 14px; }
  .crumb { display: none; }
  .mobile-menu { display: grid; border: 1px solid var(--sx-border-default); background: var(--sx-bg-surface); width: 36px; height: 36px; border-radius: 10px; place-items: center; color: var(--sx-fg-default); }
  .mobile-menu svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
  .mobile-brand { display: flex; flex-direction: row; align-items: center; gap: 9px; font-weight: 720; font-size: 14px; color: var(--sx-fg-strong); }
  .mobile-brand img { width: 30px; height: 30px; }
  .mobile-brand-copy { min-width: 0; line-height: 1.05; }
  .mobile-brand-copy strong { display: block; font-size: 14px; }
  .mobile-brand-copy span { display: block; margin-top: 2px; color: var(--sx-fg-muted); font-size: 8px; font-weight: 650; letter-spacing: .04em; white-space: nowrap; }
  .account-text { display: none; }
  .executive-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-action-grid { grid-template-columns: 1fr; }
  .executive-lead-kpi { min-height: 204px; }
  .smart-chart-card .exec-chart-svg { height: 230px; }
  .main { padding: 18px 14px 96px; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head h1 { font-size: 23px; }
  .period-chip { display: none; }
  .kpi-grid, .kpis { display: flex; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-right: -14px; -webkit-overflow-scrolling: touch; }
  .kpi, .kpis .card { flex: 0 0 156px; scroll-snap-align: start; }
  .yoy-kpis .new-customers-kpi { flex-basis: min(560px, calc(100vw - 42px)); }
  .kpi-value, .kpis .card .metric, .metric { font-size: 20px; }
  .health-grid { grid-template-columns: 1fr; }
  .bottom-nav { position: fixed; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50; background: var(--sx-topbar-bg); border: 1px solid var(--sx-border-default); box-shadow: var(--sx-shadow-float); border-radius: 16px; padding: 7px 5px; backdrop-filter: blur(18px); }
  .bottom-nav button { border: 0; background: transparent; border-radius: 10px; padding: 7px 2px; color: var(--sx-fg-muted); font-size: 9px; font-weight: 650; display: grid; justify-items: center; gap: 4px; }
  .bottom-nav button .bn-ic { width: 20px; height: 20px; }
  .bottom-nav button .bn-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; }
  .bottom-nav button.active { background: var(--sx-bg-brand-soft); color: var(--sx-bg-brand-strong); }
  .table-scroll, .debt-table-scroll, .action-section-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 620px) {
  .executive-risk-grid { grid-template-columns: 1fr; }
  .ui2b4-result-facts,
  .ui2b4-support-grid,
  .ui2b4-baza-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ui2b4-page-intro,
  .ui2b4-result-card,
  .ui2b4-table-panel,
  .ui2b4-baza-page > .smart-chart-card,
  .ui2b4-segment-panel {
    padding: 14px;
  }
  .ui2b4-result-card {
    gap: 12px;
  }
  .ui2b4-support-grid .smart-kpi,
  .ui2b4-baza-secondary-grid .smart-kpi,
  .ui2b4-baza-primary {
    min-height: 116px;
  }
  .ui2b4-baza-page .active-base-svg svg {
    min-width: 760px;
  }
  .ui2b4-segment-panel .segment-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .ui2b4-segment-panel .segment-card {
    flex: 0 0 132px;
  }
}
@media (max-width: 520px) {
  .executive-dashboard { gap: 14px; }
  .executive-context { align-items: stretch; flex-direction: column; gap: 6px; }
  .executive-context-period,
  .executive-context-scope { width: 100%; white-space: normal; }
  .executive-zone { gap: 9px; }
  .executive-zone-head { align-items: flex-start; }
  .executive-secondary-grid,
  .executive-risk-grid { grid-template-columns: 1fr; }
  .smart-kpi-secondary,
  .smart-kpi-risk { min-height: 96px; }
  .executive-lead-kpi { min-height: 222px; padding: 16px; }
  .executive-lead-top { gap: 10px; }
  .executive-lead-value { font-size: clamp(31px, 10.8vw, 42px); }
  .executive-lead-facts { grid-template-columns: 1fr; gap: 6px; }
  .executive-lead-facts div { padding: 7px 8px; }
  .smart-status-badge { padding: 5px 7px; font-size: 9px; }
  .executive-meter-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .smart-chart-card { padding: 13px; }
  .smart-chart-head { align-items: flex-start; flex-direction: column; }
  .smart-chart-card .exec-chart-svg { height: 205px; }
  .page-head p { font-size: 12px; }
  .exec-chart-svg { height: 210px; }
  .panel { padding: 14px; }
  .login-card { padding: 24px 20px; }
  .yoy-kpis .new-customers-kpi {
    flex-basis: calc(100vw - 42px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .new-customers-kpi > .muted,
  .new-customers-kpi > .metric,
  .new-customer-compact-summary,
  .new-customer-month-section,
  .new-customer-sales-section {
    grid-column: 1;
    grid-row: auto;
  }
  .new-customer-card-section {
    margin: 6px 0 0;
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--sx-border-default);
  }
  .new-customer-month-section .new-customer-months {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ui2b4-intro-copy h2 {
    font-size: 25px;
  }
  .ui2b4-result-value,
  .ui2b4-baza-primary-value {
    font-size: 38px;
  }
  .ui2b4-result-facts strong {
    white-space: normal;
  }
  .ui2b4-page-intro .smart-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Pristupacnost ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .skeleton::after { display: none; }
}

/* ============================================================================
   PHASE 2B.2 — interni redizajn modula (Plan prvi)
   Filter-bar sa removable chips + tabele (badge umesto crvene celije).
   Sve boje preko :root tokena (Calm Intelligence). AA kontrast.
   ============================================================================ */
.filter-bar { display: flex; flex-direction: column; gap: var(--sx-space-3); }
.filter-bar-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sx-space-4); }
.filter-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 640; color: var(--sx-fg-muted); }
.filter-field select { min-width: 210px; }
.filter-search-wrap { position: relative; margin-left: auto; display: flex; align-items: center; }
.filter-search { width: min(280px, 62vw); padding: 9px 12px; border: 1px solid var(--sx-border-default); border-radius: var(--sx-radius-md); background: var(--sx-bg-surface); color: var(--sx-fg-default); font-size: 13px; }
.filter-search::placeholder { color: var(--sx-fg-subtle); }
.filter-search:focus,
.filter-search:focus-visible { box-shadow: var(--sx-focus-ring); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 660; line-height: 1; }
.chip-group { display: inline-flex; gap: 6px; padding: 4px; background: var(--sx-bg-surface-soft); border: 1px solid var(--sx-border-default); border-radius: 999px; }
.chip-toggle { border: 0; background: transparent; color: var(--sx-fg-muted); cursor: pointer; }
.chip-toggle:hover { color: var(--sx-fg-default); }
.chip-toggle.is-on { background: var(--sx-brand-primary); color: var(--sx-nav-fg); }
.active-filters-wrap:empty { display: none; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-filters-label { font-size: 12px; font-weight: 640; }
.chip-removable { background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); border: 1px solid var(--sx-border-default); padding-right: 6px; }
.chip-x { border: 0; background: transparent; color: var(--sx-fg-brand); font-size: 15px; line-height: 1; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; }
.chip-x:hover { background: var(--sx-border-strong); }

/* Badge (umesto crvene celije) */
.badge { display: inline-grid; place-items: center; min-width: 64px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 760; font-variant-numeric: tabular-nums; line-height: 1.15; }
.badge-success { background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.badge-warm { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.badge-danger { background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); }
.badge-neutral { background: var(--sx-bg-surface-soft); color: var(--sx-fg-muted); }
.pct-cell { text-align: right; }

/* Plan tabela — sticky header + tabularni brojevi (obrazac kao Dugovanja) */
.plan-table-head { align-items: baseline; }
/* Sortiranje dostupno tastaturom: fokusabilno dugme u zaglavlju */
.plan-table th.sortable, .yoy-table th.sortable, .naplata-table th.sortable { padding: 0; }
.th-sort-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 10px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 760;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: inherit;
  cursor: pointer;
  text-align: left;
}
.plan-table th.num .th-sort-btn, .yoy-table th.num .th-sort-btn, .naplata-table th.num .th-sort-btn { justify-content: flex-end; }
.th-sort-btn:hover { color: var(--sx-brand-primary); }
.th-sort-btn:focus,
.th-sort-btn:focus-visible { box-shadow: var(--sx-focus-ring); border-radius: 8px; }
.plan-table th.sorted .th-sort-btn, .yoy-table th.sorted .th-sort-btn, .naplata-table th.sorted .th-sort-btn { color: var(--sx-brand-primary); }

/* Naplata tabela — sticky header + scroll (isti obrazac kao Plan/YoY) */
.naplata-table { min-width: 1120px; }
.naplata-table-scroll { max-height: min(62vh, 660px); overflow: auto; }
.naplata-table-scroll.empty { max-height: none; border: 0; }
.naplata-table-scroll .sortable-table thead th { position: sticky; top: 0; z-index: 2; background: var(--sx-line-soft); }
/* Razlika (delta) tekst — tokeni, bez obojene ćelije */
.delta-pos { color: var(--sx-status-success-fg); font-variant-numeric: tabular-nums; font-weight: 680; }
.delta-neg { color: var(--sx-status-danger-fg); font-variant-numeric: tabular-nums; font-weight: 680; }

/* YoY tabela — sticky header + scroll (isti obrazac kao Plan) */
.yoy-table { min-width: 920px; }               /* 7 kolona: dovoljno prostora, uzak ekran dobija horizontalni scroll */
.yoy-table-scroll { max-height: min(62vh, 660px); overflow: auto; }
.yoy-table-scroll.empty { max-height: none; border: 0; }
.yoy-table-scroll .sortable-table thead th { position: sticky; top: 0; z-index: 2; background: var(--sx-line-soft); }
/* N/A ćelija i dugme za broj kupaca u riziku (otvara modal) */
.na-cell { color: var(--sx-fg-subtle); font-variant-numeric: tabular-nums; }
.link-count { border: 0; background: transparent; color: var(--sx-fg-brand); font: inherit; font-weight: 720; font-variant-numeric: tabular-nums; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.link-count:hover { background: var(--sx-bg-brand-soft); text-decoration: underline; }
.link-count:focus,
.link-count:focus-visible { box-shadow: var(--sx-focus-ring); }
.link-count.has-risk { color: var(--sx-status-warning-fg); }
.link-count.has-risk:hover { background: var(--sx-status-warning-bg); }
.plan-table-scroll { max-height: min(62vh, 660px); overflow: auto; }
.plan-table-scroll.empty { max-height: none; border: 0; }
.plan-table-scroll .sortable-table thead th { position: sticky; top: 0; z-index: 2; background: var(--sx-line-soft); }
#plan-table-host,
#yoy-table-host {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 640px) {
  .filter-bar-row { gap: var(--sx-space-3); }
  .filter-field select { min-width: 0; width: 100%; }
  .filter-field { flex: 1 1 100%; }
  .filter-search-wrap { margin-left: 0; flex: 1 1 100%; }
  .filter-search { width: 100%; }
  .smart-filter-toolbar .smart-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .smart-filter-toolbar .smart-filter-field,
  .smart-filter-toolbar .smart-filter-search-wrap,
  .smart-filter-toolbar .smart-filter-reset {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .smart-filter-toolbar .smart-filter-field select,
  .smart-filter-toolbar .smart-filter-search {
    width: 100%;
  }
}
/* Must Sell Top 50 */
.mustsell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mustsell-head h2 {
  margin: 0;
}

.mustsell-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mustsell-filter-panel {
  padding-bottom: 14px;
}

.mustsell-filterbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(260px, 2fr);
  column-gap: 16px;
  row-gap: 18px;
  align-items: end;
}

.mustsell-filterbar label {
  min-width: 0;
  gap: 9px;
}

.mustsell-filterbar select,
.mustsell-filterbar input {
  width: 100%;
}

.mustsell-category-revenue .topbar {
  align-items: baseline;
}

.mustsell-category-revenue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
}

.mustsell-category-revenue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  min-width: 0;
}

.mustsell-category-revenue-label {
  min-width: 0;
  color: var(--sx-fg-strong);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.mustsell-category-revenue-value {
  color: var(--sx-fg-strong);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mustsell-category-revenue-stats {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.mustsell-category-revenue-share {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mustsell-category-revenue-compare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 122px;
  min-height: 26px;
  box-sizing: border-box;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.mustsell-category-revenue-compare.up {
  color: var(--sx-status-success-fg);
  background: var(--sx-status-success-bg);
  border-color: var(--sx-border-control);
  border-left-color: var(--sx-status-success-fg);
}

.mustsell-category-revenue-compare.down {
  color: var(--sx-status-danger-fg);
  background: var(--sx-status-danger-bg);
  border-color: var(--sx-status-danger-fg);
  border-left-color: var(--sx-status-danger-fg);
}

.mustsell-category-revenue-compare.same {
  color: var(--sx-fg-default);
  background: var(--sx-border-soft);
  border-color: var(--sx-border-strong);
  border-left-color: var(--sx-fg-muted);
}

.mustsell-category-revenue-track {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
}

.mustsell-category-revenue-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--sx-brand-primary);
}

@media (max-width: 1200px) {
  .mustsell-filterbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .mustsell-filterbar {
    grid-template-columns: 1fr;
  }

  .mustsell-category-revenue .topbar {
    align-items: flex-start;
  }

  .mustsell-category-revenue-grid {
    grid-template-columns: 1fr;
  }
}

.mustsell-rep-button {
  appearance: none;
  border: 1px solid var(--sx-border-default);
  color: var(--sx-fg-default);
  text-align: left;
  cursor: pointer;
}

.mustsell-rep-button h3 {
  color: var(--sx-fg-strong);
  margin-bottom: 8px;
}

.mustsell-rep-button:hover {
  border-color: var(--sx-brand-primary);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--sx-fg-default) 4%, transparent);
}

.mustsell-table-wrap {
  max-height: 640px;
}

.mustsell-table {
  min-width: 1180px;
}

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

.mustsell-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--sx-bg-surface-soft);
}

.mustsell-table-context {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.mustsell-table-reference {
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mustsell-table td:first-child,
.mustsell-table th:first-child,
.mustsell-matrix td:first-child,
.mustsell-matrix th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: inherit;
}

.mustsell-table td:nth-child(2),
.mustsell-table th:nth-child(2),
.mustsell-matrix td:nth-child(2),
.mustsell-matrix th:nth-child(2) {
  position: sticky;
  left: 58px;
  z-index: 3;
  background: inherit;
}

.sort-head {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.sort-head:focus,
.sort-head:focus-visible {
  outline: none;
  box-shadow: var(--sx-focus-ring);
  border-radius: 8px;
}

.status-badge.mustsell-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 800;
  font-size: 12px;
}

.status-badge.mustsell-status.sold {
  color: var(--sx-status-success-fg);
  background: var(--sx-status-success-bg);
}

.status-badge.mustsell-status.missing {
  color: var(--sx-status-warning-fg);
  background: var(--sx-status-warning-bg);
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

.removable-chip {
  cursor: pointer;
}

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

.verified-mustsell-kpis .card {
  min-width: 0;
  min-height: 142px;
}

.verified-mustsell-kpis .metric {
  font-size: clamp(22px, 2vw, 30px);
  overflow-wrap: anywhere;
}

.verified-mustsell-filter-panel { padding: 20px 24px; }
.verified-mustsell-filterbar {
  display: grid;
  grid-template-columns: 1.1fr 1.15fr 1fr .9fr .9fr 1.45fr;
  gap: 14px;
  align-items: end;
}

.verified-mustsell-filterbar label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.verified-mustsell-filterbar select,
.verified-mustsell-filterbar input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--sx-border-strong);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-strong);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-transform: none;
}

.verified-mustsell-filterbar select:disabled { background: var(--sx-bg-surface-soft); color: var(--sx-fg-muted); cursor: not-allowed; }
.verified-mustsell-filter-panel .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.verified-filter-chip {
  max-width: 100%;
  min-height: 34px;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  border-color: var(--sx-border-brand);
  background: var(--sx-bg-brand-soft);
}

.verified-filter-chip-label {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

button.verified-filter-chip-remove {
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid var(--sx-border-brand);
  border-radius: 50%;
  background: var(--sx-bg-surface);
}

.verified-filter-chip-xmark {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
}

.verified-filter-chip-xmark::before,
.verified-filter-chip-xmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.verified-filter-chip-xmark::before { transform: translate(-50%, -50%) rotate(45deg); }
.verified-filter-chip-xmark::after { transform: translate(-50%, -50%) rotate(-45deg); }

button.verified-filter-chip-remove:hover { border-color: var(--sx-brand-primary); background: var(--sx-border-strong); }
button.verified-filter-chip-remove:focus,
button.verified-filter-chip-remove:focus-visible { box-shadow: var(--sx-focus-ring); }

.verified-mustsell-reps .topbar { align-items: flex-start; }
.verified-reach-help { max-width: 760px; margin: 5px 0 0; line-height: 1.45; }
.verified-rep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.verified-rep-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--sx-border-default);
  border-radius: 12px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 18px color-mix(in srgb, var(--sx-fg-default) 4%, transparent);
}

.verified-rep-card:hover { border-color: var(--sx-brand-primary); }
.verified-rep-card.active { border-color: var(--sx-brand-primary); box-shadow: inset 0 3px 0 var(--sx-brand-primary), var(--sx-shadow-raise); }
.verified-rep-card:disabled { cursor: default; opacity: 1; }
.verified-rep-name { color: var(--sx-fg-strong); font-size: 16px; overflow-wrap: anywhere; }
.verified-rep-coverage { color: var(--sx-fg-brand); font-size: 28px; font-weight: 850; font-variant-numeric: tabular-nums; }
.verified-rep-label { color: var(--sx-fg-muted); font-size: 12px; }
.verified-rep-reach { display: flex; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid var(--sx-border-default); font-size: 13px; }
.verified-rep-reach span { color: var(--sx-fg-muted); text-align: right; }
.verified-rep-totals { display: flex; justify-content: space-between; gap: 10px; color: var(--sx-fg-default); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.verified-mustsell-items { min-width: 0; }
.verified-table-salesperson { color: var(--sx-fg-brand); }
.verified-mustsell-table-scroll { max-height: 680px; border: 1px solid var(--sx-border-default); border-radius: 10px; }
.verified-mustsell-table { width: 100%; min-width: 986px; table-layout: fixed; }
.verified-mustsell-table.has-company-average { min-width: 1052px; }
.verified-mustsell-table th,
.verified-mustsell-table td { padding: 10px 5px; vertical-align: middle; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.verified-mustsell-table th {
  padding: 10px 4px;
  vertical-align: middle;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.verified-mustsell-table th.num { text-align: center; }
.verified-mustsell-table th[aria-sort] { padding: 0; }
.verified-mustsell-table thead th { position: sticky; top: 0; z-index: 3; background: var(--sx-bg-surface-soft); }
.verified-mustsell-table col.ms-col-rank { width: 48px; }
.verified-mustsell-table col.ms-col-category { width: 88px; }
.verified-mustsell-table col.ms-col-name { width: 210px; }
.verified-mustsell-table col.ms-col-barcode { width: 108px; }
.verified-mustsell-table col.ms-col-status { width: 84px; }
.verified-mustsell-table col.ms-col-buyers { width: 54px; }
.verified-mustsell-table col.ms-col-penetration { width: 86px; }
.verified-mustsell-table col.ms-col-opportunity { width: 74px; }
.verified-mustsell-table col.ms-col-quantity { width: 68px; }
.verified-mustsell-table col.ms-col-company-average { width: 66px; }
.verified-mustsell-table col.ms-col-value { width: 90px; }
.verified-mustsell-table col.ms-col-average-buyer { width: 76px; }
.verified-mustsell-table .th-sort-btn {
  min-width: 0;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.verified-mustsell-table .ms-header-label { min-width: 0; white-space: nowrap; }
.verified-mustsell-table .ms-header-label.is-multiline { line-height: 1.15; text-align: center; white-space: normal; }
.verified-mustsell-table .sort-caret { flex: 0 0 auto; }
.verified-mustsell-table td.ms-col-category,
.verified-mustsell-table td.ms-col-name { text-align: left; }
.verified-mustsell-table td.ms-col-rank,
.verified-mustsell-table td.ms-col-barcode,
.verified-mustsell-table td.ms-col-status,
.verified-mustsell-table td.ms-col-buyers,
.verified-mustsell-table td.ms-col-penetration,
.verified-mustsell-table td.ms-col-opportunity,
.verified-mustsell-table td.ms-col-quantity,
.verified-mustsell-table td.ms-col-company-average,
.verified-mustsell-table td.ms-col-value,
.verified-mustsell-table td.ms-col-average-buyer { text-align: center; white-space: nowrap; }
.verified-mustsell-table th.ms-col-average-buyer,
.verified-mustsell-table td.ms-col-average-buyer { padding-left: 3px; padding-right: 7px; }
.verified-average-comparison {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.verified-average-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 19px;
  flex: 0 0 16px;
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}
.verified-average-arrow.is-up { color: var(--sx-status-success-fg); }
.verified-average-arrow.is-down { color: var(--sx-status-danger-fg); }
.verified-mustsell-item-name { color: var(--sx-fg-strong); font-size: 12px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.verified-mustsell-table td.ms-col-barcode,
.verified-mustsell-table td.ms-col-value { font-size: 10.5px; }
.verified-mustsell-table .verified-status-badge { justify-content: center; min-height: 24px; padding: 3px 6px; font-size: 11px; }
.verified-mustsell-table .opportunity-link { min-width: 36px; min-height: 28px; }

#verified-mustsell-mobile-sort-controls,
#verified-mustsell-mobile-host {
  display: none;
}

.verified-mobile-sort {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.verified-mobile-sort label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.verified-mobile-sort select,
.verified-mobile-sort-direction {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--sx-border-strong);
  border-radius: 9px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.verified-mobile-sort select { width: 100%; }
.verified-mobile-sort-direction { padding-inline: 14px; white-space: nowrap; }

.verified-mustsell-mobile-articles {
  display: grid;
  gap: 12px;
}

.verified-mobile-article-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--sx-border-default);
  border-radius: 12px;
  background: var(--sx-bg-surface);
  box-shadow: var(--sx-shadow-raise);
}

.verified-mobile-article-meta,
.verified-mobile-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.verified-mobile-rank {
  flex: 0 0 auto;
  color: var(--sx-fg-brand);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.verified-mobile-category {
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.verified-mobile-article-card h3 {
  margin: 0;
  color: var(--sx-fg-strong);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.verified-mobile-barcode {
  color: var(--sx-fg-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.verified-mobile-status-row {
  color: var(--sx-fg-muted);
  font-size: 12px;
}

.verified-mobile-article-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-border-default);
}

.verified-mobile-article-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  background: var(--sx-bg-surface-soft);
}

.verified-mobile-article-metrics span {
  color: var(--sx-fg-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  text-transform: uppercase;
}

.verified-mobile-article-metrics strong {
  color: var(--sx-fg-strong);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.verified-mobile-company-average { grid-column: 1 / -1; }

.verified-mobile-opportunity-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--sx-border-brand);
  border-radius: 9px;
  background: var(--sx-bg-brand-soft);
  color: var(--sx-fg-brand);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.verified-mobile-opportunity-button strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.verified-mobile-opportunity-button:disabled {
  border-color: var(--sx-border-default);
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  cursor: default;
}

.verified-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.verified-status-badge.sold { color: var(--sx-status-success-fg); background: var(--sx-status-success-bg); }
.verified-status-badge.missing { color: var(--sx-status-warning-fg); background: var(--sx-status-warning-bg); }

.opportunity-link {
  min-width: 42px;
  min-height: 30px;
  border: 1px solid var(--sx-border-brand);
  border-radius: 8px;
  background: var(--sx-bg-brand-soft);
  color: var(--sx-fg-brand);
  font-weight: 850;
  cursor: pointer;
}
.opportunity-link:hover { background: var(--sx-brand-primary); color: var(--sx-bg-surface); }
.verified-mustsell-empty { padding: 42px 24px; color: var(--sx-fg-muted); text-align: center; }

.verified-mustsell-error {
  padding: 28px;
  border: 1px solid var(--sx-status-danger-border);
  border-left: 5px solid var(--sx-status-danger-fg);
  border-radius: 12px;
  background: var(--sx-status-danger-bg);
  color: var(--sx-fg-default);
}
.verified-mustsell-error h2 { margin: 0 0 8px; color: var(--sx-status-danger-fg); }
.verified-mustsell-error p { max-width: 760px; margin: 0 0 18px; }

.verified-opportunity-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  background: var(--sx-scrim);
}
.verified-opportunity-drawer {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
  width: min(540px, 100vw);
  height: 100%;
  padding: 28px;
  overflow: hidden;
  background: var(--sx-bg-surface);
  box-shadow: var(--sx-shadow-float);
}
.verified-opportunity-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.verified-opportunity-head h2 { margin: 4px 0; font-size: 22px; line-height: 1.25; }
.verified-opportunity-head p { margin: 0; }
.verified-opportunity-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.verified-opportunity-search input { min-width: 0; height: 44px; border: 1px solid var(--sx-border-strong); border-radius: 9px; }
.verified-opportunity-list { min-height: 0; overflow-y: auto; border-top: 1px solid var(--sx-border-default); }
.verified-opportunity-customer { display: grid; gap: 4px; padding: 14px 2px; border-bottom: 1px solid var(--sx-border-default); }
.verified-opportunity-customer strong { color: var(--sx-fg-strong); }
.verified-opportunity-customer span { color: var(--sx-fg-muted); font-size: 13px; }
.verified-opportunity-error { padding: 18px; border-radius: 9px; background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); }
.verified-opportunity-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--sx-border-default); color: var(--sx-fg-muted); font-variant-numeric: tabular-nums; }
.verified-opportunity-pagination > div { display: flex; gap: 8px; }

/* MS-3A4 Potential frontend staging. Skriven je dok oba staging flaga nisu aktivna. */
.mustsell-with-potential,
.potential-stage,
.potential-overview,
.potential-bundles,
.potential-pool {
  min-width: 0;
}

.mustsell-section-switch,
.potential-tabs {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-surface-soft);
}

.mustsell-section-switch button,
.potential-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--sx-fg-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.mustsell-section-switch button.active,
.potential-tabs button.active {
  background: var(--sx-bg-surface);
  color: var(--sx-fg-brand);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--sx-fg-default) 9%, transparent);
}

.staging-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sx-status-warning-border);
}

.potential-stage {
  display: grid;
  gap: 18px;
}

.potential-staging-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid var(--sx-status-warning-border);
  border-left: 4px solid var(--sx-status-warning-border);
  border-radius: 8px;
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
}

.potential-staging-notice span { color: var(--sx-fg-default); }

.potential-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.potential-context > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 68px;
  padding: 15px 18px;
  border-right: 0;
}

.potential-context > div:last-child { border-right: 0; }
.potential-context span { color: var(--sx-fg-muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.potential-context strong { color: var(--sx-fg-strong); font-size: 15px; overflow-wrap: anywhere; }

.potential-cell-filters,
.potential-bundle-filterbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.potential-cell-filters label,
.potential-bundle-filterbar label,
.potential-pool-filterbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--sx-fg-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.potential-cell-filters select,
.potential-cell-filters input,
.potential-bundle-filterbar select,
.potential-bundle-filterbar input,
.potential-pool-filterbar select,
.potential-pool-filterbar input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--sx-border-strong);
  border-radius: 8px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-transform: none;
}

.potential-cell-filters form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.potential-cell-table-scroll,
.potential-pool-table-scroll {
  max-height: 620px;
  border: 1px solid var(--sx-border-default);
  border-radius: 8px;
}

.potential-cell-table { min-width: 1280px; }
.potential-pool-table { min-width: 1080px; }
.potential-cell-table th,
.potential-cell-table td,
.potential-pool-table th,
.potential-pool-table td { padding: 12px; vertical-align: middle; font-variant-numeric: tabular-nums; }
.potential-cell-table thead th,
.potential-pool-table thead th { position: sticky; top: 0; z-index: 2; background: var(--sx-bg-surface-soft); }
.potential-cell-barcode { display: block; margin-top: 3px; color: var(--sx-fg-muted); font-size: 11px; }
.potential-cell-table .num,
.potential-pool-table .num { text-align: right; }

.potential-selected-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--sx-border-brand);
  border-radius: 8px;
  background: var(--sx-bg-brand-soft);
  color: var(--sx-fg-brand);
  font: inherit;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.potential-selected-count:hover { border-color: var(--sx-brand-primary); background: var(--sx-brand-primary); color: var(--sx-bg-surface); }
.potential-selected-count:focus,
.potential-selected-count:focus-visible { border-color: var(--sx-brand-primary); background: var(--sx-brand-primary); color: var(--sx-bg-surface); box-shadow: var(--sx-focus-ring); }
.potential-selected-drawer { grid-template-rows: auto auto minmax(0, 1fr); }
.potential-selected-summary { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--sx-status-warning-border); border-radius: 9px; background: var(--sx-status-warning-bg); }
.potential-selected-summary strong { color: var(--sx-fg-strong); }
.potential-selected-summary span { color: var(--sx-fg-muted); font-size: 12px; }
.potential-selected-customer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.potential-selected-customer-head strong { min-width: 0; overflow-wrap: anywhere; }
.potential-selected-customer-head .potential-status { flex: 0 0 auto; }

.potential-cell-cards,
.potential-pool-cards { display: none; }

/* MS-3B1 admin-only AVG26 shadow target plan */
.shadow-plan-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.shadow-plan-head label { min-width: 250px; }
.shadow-plan-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.shadow-plan-explanations { display: grid; gap: 8px; }
.shadow-plan-explanations p { margin: 0; }
.shadow-plan-table { min-width: 1080px; }
.shadow-plan-table th,
.shadow-plan-table td { padding: 12px; vertical-align: middle; }
.shadow-plan-table td:nth-child(1) { width: 54px; }
.shadow-plan-table td:nth-child(4),
.shadow-plan-table td:nth-child(5) { width: 145px; }
.shadow-plan-table td:nth-child(6) { width: 205px; }
.shadow-plan-table td:nth-child(7) { width: 135px; }
.shadow-customer-detail > td { background: var(--sx-bg-surface-soft); padding: 16px; }
.shadow-customer-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shadow-customer-groups h4 { margin: 0 0 8px; }
.shadow-customer-list { display: grid; gap: 7px; max-height: 340px; overflow: auto; }
.shadow-customer-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(110px, .7fr) minmax(150px, .9fr) minmax(170px, 1fr); gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--sx-border-default); border-radius: 9px; background: var(--sx-bg-surface); }

/* MS-3B2B strict-admin immutable target plan lifecycle */
.target-plan-stage { min-width: 0; }
.mustsell-loading-shell,
.target-plan-loading-shell { min-width: 0; }
.mustsell-shell-head,
.target-plan-loading-panel {
  display: grid;
  gap: 14px;
  border-color: var(--sx-border-brand);
  background: linear-gradient(180deg, var(--sx-bg-surface), var(--sx-bg-surface-soft));
}
.target-plan-qa-review { border: 1px solid var(--sx-status-warning-border); background: var(--sx-status-warning-bg); }
.target-plan-qa-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.target-plan-qa-review-head h2 { margin: 4px 0 0; color: var(--sx-fg-strong); }
.target-plan-qa-review-badge { flex: 0 0 auto; border-radius: 999px; padding: 7px 11px; background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); font-size: 11px; font-weight: 800; }
.target-plan-qa-review-warning { margin: 14px 0 5px; color: var(--sx-status-warning-fg); font-weight: 850; }
.target-plan-qa-review ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; margin: 16px 0 0; padding-left: 22px; }
.target-plan-qa-review li { padding-left: 3px; color: var(--sx-fg-default); font-size: 12px; line-height: 1.5; }
.target-plan-review-overview { gap: 14px; }
.target-plan-review-head { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(520px, 1.3fr); gap: 18px; align-items: center; }
.target-plan-review-head h2 { margin: 4px 0 0; color: var(--sx-fg-strong); }
.target-plan-review-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-border-default); }
.target-plan-review-kpis > div { display: grid; gap: 4px; padding: 11px 12px; background: var(--sx-bg-surface); }
.target-plan-review-kpis span { color: var(--sx-fg-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.target-plan-review-kpis strong { color: var(--sx-fg-strong); font-size: 18px; font-variant-numeric: tabular-nums; }
.target-plan-readiness { padding: 11px 13px; border-radius: 9px; font-size: 12px; font-weight: 800; }
.target-plan-readiness.pending { border: 1px solid var(--sx-status-warning-border); background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-readiness.ready { border: 1px solid var(--sx-border-brand); background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.target-plan-review-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.target-plan-review-list button { display: grid; min-width: 0; gap: 8px; padding: 10px; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-bg-surface); color: var(--sx-fg-default); text-align: left; cursor: pointer; }
.target-plan-review-list button:hover,
.target-plan-review-list button.active { border-color: var(--sx-border-brand); background: var(--sx-bg-brand-soft); }
.target-plan-review-list button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.target-plan-review-status { display: inline-flex; align-items: center; width: max-content; max-width: 100%; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.target-plan-review-status.not_reviewed { background: var(--sx-bg-surface-soft); color: var(--sx-fg-muted); }
.target-plan-review-status.in_review { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-review-status.reviewed { background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.target-plan-review-confirmation { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.target-plan-review-confirmation-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.target-plan-review-confirmation-copy h2 { margin: 0 0 4px; color: var(--sx-fg-strong); }
.target-plan-review-confirmation-copy p { margin: 0; }
.target-plan-review-confirmation-actions { display: grid; justify-items: end; gap: 5px; }
.target-plan-review-confirm-btn { min-height: 44px; padding-inline: 18px; font-size: 12px; }
.target-plan-review-confirm-btn:disabled { opacity: .55; cursor: not-allowed; }
.target-plan-selector {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(380px, .8fr);
  gap: 24px;
  align-items: end;
  padding: 22px 24px;
}
.target-plan-selector h2,
.target-plan-salespeople h2,
.target-plan-items h2,
.target-plan-detail h2 { margin: 0 0 5px; color: var(--sx-fg-strong); }
.target-plan-selector p,
.target-plan-salespeople p,
.target-plan-items p,
.target-plan-detail p { margin: 0; }
.target-plan-selector-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.target-plan-selector label,
.target-plan-edit-form label { display: grid; gap: 7px; color: var(--sx-fg-muted); font-size: 11px; font-weight: 750; }
.target-plan-selector select,
.target-plan-edit-form input,
.target-plan-edit-form textarea,
.target-plan-candidates input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--sx-border-default);
  border-radius: 9px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  font: inherit;
  padding: 9px 11px;
}
.target-plan-meta {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  padding: 0;
  background: var(--sx-border-default);
}
.target-plan-meta > div { display: grid; gap: 5px; min-width: 0; padding: 14px; background: var(--sx-bg-surface); }
.target-plan-meta span { color: var(--sx-fg-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.target-plan-meta strong { color: var(--sx-fg-strong); font-size: 13px; overflow-wrap: anywhere; }
.target-plan-meta > .target-plan-locked-banner {
  grid-column: 1 / -1;
  display: block;
  padding: 14px 16px;
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
  font-weight: 800;
}
.target-plan-actions { display: flex; justify-content: flex-end; }
.danger-outline-btn,
.danger-btn {
  min-height: 42px;
  border-radius: 9px;
  padding: 10px 15px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.danger-outline-btn { border: 1px solid var(--sx-status-danger-border); background: var(--sx-bg-surface); color: var(--sx-status-danger-fg); }
.danger-btn { border: 1px solid var(--sx-status-danger-fg); background: var(--sx-status-danger-fg); color: var(--sx-bg-surface); }
.danger-outline-btn:hover { background: var(--sx-status-danger-bg); }
.danger-btn:disabled,
.danger-outline-btn:disabled,
.target-plan-edit-form button:disabled { opacity: .5; cursor: not-allowed; }
.target-plan-salespeople,
.target-plan-items,
.target-plan-detail { min-width: 0; padding: 20px 22px; }
.target-plan-rep-tabs { display: flex; gap: 8px; overflow-x: auto; padding-top: 14px; }
.target-plan-rep-tabs button,
.target-plan-candidate-filters button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--sx-border-default);
  border-radius: 999px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-muted);
  padding: 8px 13px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.target-plan-rep-tabs button.active,
.target-plan-candidate-filters button.active { border-color: var(--sx-border-brand); background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); }
.target-plan-read-status { color: var(--sx-fg-muted); font-size: 11px; font-weight: 750; }
.target-plan-table-scroll { max-height: 620px; margin-top: 14px; border: 1px solid var(--sx-border-default); border-radius: 10px; }
.target-plan-table { width: 100%; min-width: 1030px; table-layout: fixed; }
.target-plan-table th,
.target-plan-table td { padding: 10px 8px; vertical-align: middle; font-size: 11.5px; }
.target-plan-table thead th { position: sticky; top: 0; z-index: 2; background: var(--sx-bg-surface-soft); white-space: normal; line-height: 1.2; }
.target-plan-table th:nth-child(1) { width: 48px; }
.target-plan-table th:nth-child(2) { width: 130px; }
.target-plan-table th:nth-child(3) { width: 250px; text-align: left; }
.target-plan-table th:nth-child(4),
.target-plan-table th:nth-child(5),
.target-plan-table th:nth-child(6) { width: 135px; }
.target-plan-table th:nth-child(7) { width: 160px; }
.target-plan-table td.num { text-align: center; font-variant-numeric: tabular-nums; }
.target-plan-table tbody tr { cursor: pointer; }
.target-plan-table tbody tr:hover,
.target-plan-table tbody tr.selected { background: var(--sx-bg-brand-soft); }
.target-plan-table tbody tr.selected { box-shadow: inset 3px 0 0 var(--sx-brand-primary); }
.target-plan-item-cards { display: none; }
.target-plan-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.target-plan-status { flex: 0 0 auto; border-radius: 999px; padding: 7px 11px; font-size: 11px; font-weight: 800; }
.target-plan-status.draft { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-status.locked { background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); }
.target-plan-decision-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 18px; overflow: hidden; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-border-default); }
.target-plan-decision-grid > div { display: grid; align-content: start; gap: 7px; min-height: 126px; padding: 14px; background: var(--sx-bg-surface-soft); }
.target-plan-decision-grid > div.system { background: var(--sx-bg-brand-soft); }
.target-plan-decision-grid > div.admin { background: var(--sx-status-warning-bg); }
.target-plan-decision-grid span { color: var(--sx-fg-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.target-plan-decision-grid strong { color: var(--sx-fg-strong); font-size: 24px; font-variant-numeric: tabular-nums; }
.target-plan-decision-grid small { color: var(--sx-fg-muted); font-size: 10.5px; line-height: 1.4; }
.target-plan-equal-note,
.target-plan-locked-note,
.target-plan-history-note,
.target-plan-lock-confirmation { margin-top: 14px; padding: 11px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.target-plan-equal-note { background: var(--sx-bg-surface-soft); color: var(--sx-fg-muted); }
.target-plan-locked-note { background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); }
.target-plan-history-note { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-edit-form { display: grid; grid-template-columns: minmax(180px, .35fr) minmax(320px, 1fr) auto; gap: 12px; align-items: end; margin-top: 16px; padding: 16px; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-bg-surface-soft); }
.target-plan-edit-form textarea { min-height: 64px; resize: vertical; }
.target-plan-edit-form .primary-btn { min-height: 42px; }
.target-plan-edit-form .target-plan-save-btn { min-height: 46px; padding-inline: 18px; font-size: 12px; font-weight: 850; box-shadow: 0 7px 18px color-mix(in srgb, var(--sx-brand-primary) 18%, transparent); }
.target-plan-form-error,
.target-plan-form-hint { grid-column: 1 / -1; padding: 10px 12px; border-radius: 8px; font-size: 12px; }
.target-plan-form-error { border: 1px solid var(--sx-status-danger-border); background: var(--sx-status-danger-bg); color: var(--sx-status-danger-fg); }
.target-plan-form-hint { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-audit { margin-top: 18px; }
.target-plan-audit h3,
.target-plan-candidates h3 { margin: 0; color: var(--sx-fg-strong); font-size: 15px; }
.target-plan-audit-list { display: grid; gap: 8px; margin-top: 10px; }
.target-plan-audit-list > div { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--sx-border-default); border-radius: 8px; background: var(--sx-bg-surface-soft); }
.target-plan-candidates { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--sx-border-default); }
.target-plan-candidates .topbar { align-items: end; }
.target-plan-candidates .topbar input { width: min(280px, 100%); }
.target-plan-candidate-filters { display: flex; gap: 7px; overflow-x: auto; padding: 13px 0; }
.target-plan-candidate-list { display: grid; gap: 7px; max-height: 440px; overflow-y: auto; }
.target-plan-candidate-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .6fr) 140px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--sx-border-default); border-radius: 8px; background: var(--sx-bg-surface-soft); }
.target-plan-candidate-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.target-plan-candidate-status { width: max-content; max-width: 100%; border-radius: 999px; padding: 5px 8px; font-size: 10.5px; font-weight: 800; }
.target-plan-candidate-status.bought_previous_month { background: var(--sx-status-success-bg); color: var(--sx-status-success-fg); }
.target-plan-candidate-status.historical_buyer { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-candidate-status.never_buyer { background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); }
.target-plan-empty { padding: 34px; text-align: center; }
.target-plan-empty h2 { margin: 6px 0 8px; }
.target-plan-lock-backdrop { z-index: 90; }
.target-plan-lock-modal { width: min(560px, calc(100vw - 28px)); }
.target-plan-edit-modal { width: min(640px, 100%); max-height: calc(100dvh - 32px); }
.target-plan-edit-head { padding-right: 40px; overflow-wrap: anywhere; }
.target-plan-edit-head h2, .target-plan-edit-head h3 { margin: 6px 0; }
.target-plan-edit-modal .target-plan-edit-form { grid-template-columns: 1fr; margin: 0; }
.target-plan-edit-modal .target-plan-edit-form input,
.target-plan-edit-modal .target-plan-edit-form textarea { width: 100%; min-width: 0; font-size: 16px; }
.target-plan-edit-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.target-plan-edit-actions button { min-height: 44px; }
.target-plan-edit-backdrop { padding: 16px; }
.target-plan-lock-modal h2 { margin: 0 0 8px; color: var(--sx-fg-strong); }
.target-plan-lock-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin-top: 16px; border: 1px solid var(--sx-border-default); border-radius: 9px; background: var(--sx-border-default); }
.target-plan-lock-summary > div { display: grid; gap: 4px; padding: 11px; background: var(--sx-bg-surface-soft); }
.target-plan-lock-summary span { color: var(--sx-fg-muted); font-size: 10px; text-transform: uppercase; }
.target-plan-lock-checkbox { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 13px; border: 1px solid var(--sx-status-danger-border); border-radius: 9px; background: var(--sx-status-danger-bg); color: var(--sx-fg-strong); font-size: 12px; font-weight: 700; line-height: 1.45; cursor: pointer; }
.target-plan-lock-checkbox input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--sx-status-danger-fg); }
.target-plan-qa-lock-note { margin-top: 12px; padding: 11px 13px; border: 1px solid var(--sx-status-warning-border); border-radius: 9px; background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); font-size: 12px; font-weight: 750; line-height: 1.45; }
.target-plan-lock-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.target-plan-month-lock { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; max-width: 100%; }
.target-plan-month-lock p { flex: 1 1 240px; overflow-wrap: anywhere; }
.target-plan-month-lock button { min-height: 44px; white-space: normal; max-width: 100%; }

/* MS-3B4 read-only financial potential for the current AVG26 draft */
.target-plan-value-summary,
.target-plan-value-history,
.target-plan-value-comparison { min-width: 0; padding: 20px 22px; }
.target-plan-value-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.target-plan-value-head h2 { margin: 4px 0 6px; color: var(--sx-fg-strong); }
.target-plan-value-head p { max-width: 820px; margin: 0; color: var(--sx-fg-muted); line-height: 1.5; }
.target-plan-value-period { flex: 0 0 auto; border-radius: 999px; padding: 7px 11px; background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); font-size: 11px; font-weight: 800; white-space: nowrap; }
.target-plan-value-notice { margin-top: 14px; padding: 11px 13px; border: 1px solid var(--sx-status-warning-border); border-radius: 9px; background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); font-size: 12px; font-weight: 750; line-height: 1.45; }
.target-plan-value-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.target-plan-value-card { display: grid; align-content: space-between; gap: 10px; min-width: 0; min-height: 142px; padding: 14px; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-bg-surface-soft); }
.target-plan-value-card.value-card-1 { border-color: var(--sx-border-brand); background: var(--sx-bg-brand-soft); }
.target-plan-value-card.value-card-3 { border-color: var(--sx-status-warning-border); background: var(--sx-status-warning-bg); }
.target-plan-value-card > span { color: var(--sx-fg-muted); font-size: 10px; font-weight: 800; line-height: 1.35; text-transform: uppercase; }
.target-plan-value-card strong { color: var(--sx-fg-strong); font-size: clamp(17px, 1.5vw, 23px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.target-plan-value-card small { color: var(--sx-fg-muted); font-size: 10.5px; line-height: 1.4; }
.target-plan-history-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.target-plan-history-month { display: grid; align-content: space-between; gap: 8px; min-width: 0; min-height: 92px; padding: 11px; border: 1px solid var(--sx-border-default); border-radius: 9px; background: var(--sx-bg-surface-soft); }
.target-plan-history-month > span { color: var(--sx-fg-muted); font-size: 10px; font-weight: 850; }
.target-plan-history-month strong { color: var(--sx-fg-strong); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.target-plan-history-month small { color: var(--sx-fg-brand); font-size: 9px; font-weight: 800; }
.target-plan-history-month.to_date { border-color: var(--sx-border-brand); background: var(--sx-bg-brand-soft); }
.target-plan-history-month.unavailable { background: var(--sx-bg-surface); }
.target-plan-history-month.unavailable strong { color: var(--sx-fg-muted); font-size: 11px; }
.target-plan-value-table { width: 100%; min-width: 960px; }
.target-plan-value-table th,
.target-plan-value-table td { padding: 11px 12px; }
.target-plan-value-table th:first-child,
.target-plan-value-table td:first-child { text-align: left; }
.target-plan-value-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.target-plan-finance-detail { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sx-border-default); }
.target-plan-finance-detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.target-plan-finance-detail-head h3 { margin: 0; color: var(--sx-fg-strong); font-size: 16px; }
.target-plan-finance-detail-head p { margin: 0; }
.target-plan-finance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 12px; overflow: hidden; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-border-default); }
.target-plan-finance-grid > div { display: grid; align-content: start; gap: 7px; min-height: 112px; padding: 13px; background: var(--sx-bg-surface-soft); }
.target-plan-finance-grid > div:nth-child(4) { background: var(--sx-bg-brand-soft); }
.target-plan-finance-grid span { color: var(--sx-fg-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.target-plan-finance-grid strong { color: var(--sx-fg-strong); font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.target-plan-finance-grid small { color: var(--sx-fg-muted); font-size: 10.5px; line-height: 1.4; }

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

.potential-bundle-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-surface);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--sx-fg-default) 4%, transparent);
}

.potential-bundle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.potential-bundle-head > div { display: grid; gap: 4px; min-width: 0; }
.potential-bundle-head h3 { margin: 0; color: var(--sx-fg-strong); font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.potential-bundle-count { display: grid; flex: 0 0 auto; justify-items: end; gap: 2px; max-width: 150px; color: var(--sx-fg-brand); text-align: right; }
.potential-bundle-count strong { font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1; }
.potential-bundle-count span { color: var(--sx-fg-muted); font-size: 9px; font-weight: 800; line-height: 1.25; text-transform: uppercase; }
.potential-bundle-count.review span { color: var(--sx-status-warning-fg); }

.potential-bundle-metrics {
  display: grid;
  grid-template-columns: 1.4fr .7fr .7fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--sx-border-default);
  border-radius: 8px;
  background: var(--sx-border-default);
}
.potential-bundle-metrics > div { display: grid; gap: 5px; min-width: 0; padding: 10px; background: var(--sx-bg-surface-soft); }
.potential-bundle-metrics span { color: var(--sx-fg-muted); font-size: 10px; text-transform: uppercase; }
.potential-bundle-metrics strong { color: var(--sx-fg-strong); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.potential-bundle-warning {
  padding: 10px 12px;
  border: 1px solid var(--sx-status-warning-border);
  border-radius: 7px;
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
  font-size: 12px;
  font-weight: 750;
}

.potential-bundle-toggle {
  min-height: 40px;
  border: 1px solid var(--sx-border-brand);
  border-radius: 8px;
  background: var(--sx-bg-brand-soft);
  color: var(--sx-fg-brand);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.potential-bundle-items {
  display: grid;
  max-height: 350px;
  overflow-y: auto;
  border-top: 1px solid var(--sx-border-default);
}
.potential-bundle-items > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 3px 9px; padding: 10px 0; border-bottom: 1px solid var(--sx-border-default); }
.potential-bundle-items .mono { grid-column: 2; color: var(--sx-fg-muted); font-size: 11px; }
.potential-bundle-items .potential-status { grid-column: 2; justify-self: start; }
.potential-item-rank { color: var(--sx-fg-muted); font-variant-numeric: tabular-nums; }

.potential-status {
  display: inline-flex;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.potential-status.lapsed { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.potential-status.never { background: var(--sx-bg-brand-soft); color: var(--sx-fg-brand); }

.potential-pool-filterbar {
  display: grid;
  grid-template-columns: 1fr 1fr .9fr .9fr 1.2fr auto;
  gap: 10px;
  align-items: end;
}
.potential-pool-controls .filter-chips { margin-top: 14px; }
.potential-pool-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  color: var(--sx-fg-muted);
  font-variant-numeric: tabular-nums;
}
.potential-pool-pagination > div { display: flex; gap: 8px; }

.potential-cell-card,
.potential-pool-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--sx-border-default);
  border-radius: 9px;
  background: var(--sx-bg-surface);
}
.potential-cell-card-head,
.potential-pool-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--sx-fg-muted); font-size: 11px; }
.potential-cell-card h3,
.potential-pool-card h3 { margin: 0; color: var(--sx-fg-strong); font-size: 15px; overflow-wrap: anywhere; }
.potential-cell-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--sx-border-default); border-radius: 8px; background: var(--sx-border-default); }
.potential-cell-card-grid > div { display: grid; gap: 4px; padding: 9px; background: var(--sx-bg-surface-soft); }
.potential-cell-card-grid span { color: var(--sx-fg-muted); font-size: 9px; text-transform: uppercase; }
.potential-cell-card-grid strong { color: var(--sx-fg-strong); font-size: 13px; font-variant-numeric: tabular-nums; }
.potential-pool-item { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: var(--sx-bg-surface-soft); }
.potential-pool-item .mono { color: var(--sx-fg-muted); font-size: 11px; overflow-wrap: anywhere; }

@media (max-width: 1600px) {
  .verified-mustsell-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .verified-mustsell-filterbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .verified-mustsell-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verified-mustsell-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verified-rep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verified-mustsell-reps .topbar { display: grid; gap: 8px; }
  .potential-context { grid-template-columns: minmax(0, 1fr); }
  .potential-context > div { border-bottom: 0; }
  .potential-bundle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .potential-pool-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-plan-selector { grid-template-columns: 1fr; }
  .target-plan-review-head { grid-template-columns: 1fr; }
  .target-plan-review-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .target-plan-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .target-plan-decision-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-plan-edit-form { grid-template-columns: 1fr 1fr; }
  .target-plan-edit-form .primary-btn { grid-column: 1 / -1; }
  .target-plan-value-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-plan-value-card.value-card-1 { grid-column: 1 / -1; }
  .target-plan-history-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .target-plan-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .verified-mustsell-kpis,
  .verified-mustsell-filterbar,
  .verified-rep-grid { grid-template-columns: 1fr; }
  .verified-mustsell-kpis .card { min-height: 118px; }
  .verified-mustsell-filter-panel { padding: 16px; }
  .verified-rep-card { min-height: 160px; }
  .verified-mustsell-items { padding: 16px; }
  .verified-mustsell-items .topbar { align-items: flex-start; }
  .verified-table-salesperson { font-size: 13px; text-align: right; }
  #verified-mustsell-table-host { display: none; }
  #verified-mustsell-mobile-sort-controls,
  #verified-mustsell-mobile-host { display: block; }
  #verified-mustsell-mobile-sort-controls,
  #verified-mustsell-mobile-host,
  .verified-mustsell-mobile-articles,
  .verified-mobile-article-card { min-width: 0; max-width: 100%; }
  .verified-mobile-sort { grid-template-columns: 1fr; gap: 8px; }
  .verified-mobile-sort-direction { width: 100%; }
  .verified-mustsell-mobile-articles { gap: 10px; }
  .verified-mobile-article-card { gap: 10px; padding: 14px; border-radius: 10px; }
  .verified-mobile-article-card h3 { font-size: 15px; line-height: 1.3; }
  .verified-mobile-status-row { align-items: flex-start; flex-wrap: wrap; }
  .verified-mobile-article-metrics > div { padding: 9px; }
  .verified-mobile-article-metrics strong { font-size: 13px; }
  .verified-mobile-opportunity-button { min-width: 0; gap: 8px; }
  .verified-mobile-opportunity-button span { min-width: 0; overflow-wrap: anywhere; }
  .verified-opportunity-drawer { padding: 20px 16px; }
  .verified-opportunity-search { grid-template-columns: 1fr; }
  .mustsell-section-switch,
  .potential-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .potential-tabs { grid-template-columns: 1fr; }
  .mustsell-section-switch button,
  .potential-tabs button { min-width: 0; white-space: normal; }
  .potential-staging-notice { align-items: flex-start; flex-direction: column; gap: 2px; }
  .potential-context,
  .potential-cell-filters,
  .potential-bundle-filterbar,
  .potential-bundle-grid,
  .potential-pool-filterbar { grid-template-columns: 1fr; }
  .potential-context > div { border-right: 0; }
  .potential-cell-filters form { grid-template-columns: 1fr; }
  .potential-cell-table-scroll,
  .potential-pool-table-scroll { display: none; }
  .potential-cell-cards,
  .potential-pool-cards { display: grid; gap: 11px; }
  .shadow-plan-head { align-items: stretch; flex-direction: column; }
  .shadow-plan-head label { min-width: 0; }
  .shadow-plan-kpis { grid-template-columns: 1fr 1fr; }
  .shadow-plan-table { min-width: 920px; }
  .shadow-customer-groups { grid-template-columns: 1fr; }
  .shadow-customer-row { grid-template-columns: 1fr; gap: 4px; }
  .target-plan-selector,
  .target-plan-salespeople,
  .target-plan-items,
  .target-plan-detail,
  .target-plan-value-summary,
  .target-plan-value-history,
  .target-plan-value-comparison { padding: 16px; }
  .target-plan-review-kpis { grid-template-columns: 1fr 1fr; }
  .target-plan-review-list { grid-template-columns: 1fr; }
  .target-plan-review-confirmation { grid-template-columns: 1fr; align-items: stretch; }
  .target-plan-review-confirmation-copy { align-items: flex-start; }
  .target-plan-review-confirmation-actions { justify-items: stretch; }
  .target-plan-review-confirm-btn { width: 100%; }
  .target-plan-qa-review-head { display: grid; }
  .target-plan-qa-review-badge { width: max-content; }
  .target-plan-qa-review ol { grid-template-columns: 1fr; }
  .target-plan-selector-fields,
  .target-plan-meta,
  .target-plan-decision-grid,
  .target-plan-edit-form { grid-template-columns: 1fr; }
  .target-plan-meta { gap: 0; }
  .target-plan-meta > div { border-bottom: 1px solid var(--sx-border-default); }
  .target-plan-table-scroll { display: none; }
  .target-plan-item-cards { display: grid; gap: 9px; margin-top: 14px; }
  .target-plan-stage .target-plan-item-cards { grid-auto-rows: max-content; max-height: min(65vh, 620px); overflow-y: auto; overscroll-behavior: contain; }
  .target-plan-item-card { display: grid; gap: 10px; width: 100%; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-bg-surface); color: var(--sx-fg-default); padding: 13px; text-align: left; }
  .target-plan-item-card.selected { border-color: var(--sx-brand-primary); box-shadow: inset 3px 0 0 var(--sx-brand-primary); background: var(--sx-bg-brand-soft); }
  .target-plan-item-card-head { display: flex; justify-content: space-between; gap: 10px; color: var(--sx-fg-muted); font-size: 10px; }
  .target-plan-item-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--sx-border-default); border-radius: 8px; background: var(--sx-border-default); }
  .target-plan-item-card-grid > div { display: grid; gap: 3px; padding: 8px; background: var(--sx-bg-surface-soft); }
  .target-plan-item-card-grid span { color: var(--sx-fg-muted); font-size: 9px; text-transform: uppercase; }
  .target-plan-item-card-grid strong { font-size: 12px; }
  .target-plan-detail-head { align-items: flex-start; }
  .target-plan-decision-grid > div { min-height: 0; }
  .target-plan-value-head,
  .target-plan-finance-detail-head { align-items: flex-start; flex-direction: column; }
  .target-plan-value-cards,
  .target-plan-history-grid,
  .target-plan-finance-grid { grid-template-columns: 1fr; }
  .target-plan-value-card.value-card-1 { grid-column: auto; }
  .target-plan-value-card { min-height: 118px; }
  .target-plan-history-month,
  .target-plan-finance-grid > div { min-height: 0; }
  .target-plan-edit-form .primary-btn { grid-column: auto; width: 100%; }
  .target-plan-candidates .topbar { align-items: stretch; flex-direction: column; }
  .target-plan-candidates .topbar input { width: 100%; }
  .target-plan-candidate-row { grid-template-columns: 1fr; gap: 6px; }
  .target-plan-candidate-row > span:last-child { text-align: left; }
  .target-plan-audit-list > div { grid-template-columns: 1fr; gap: 5px; }
  .target-plan-lock-summary { grid-template-columns: 1fr; }
  .target-plan-lock-actions { display: grid; grid-template-columns: 1fr; }
  .potential-cells-panel,
  .potential-pool-controls,
  .potential-pool-results,
  .potential-bundle-controls { padding: 16px; }
  .potential-bundle-metrics { grid-template-columns: 1fr 1fr; }
  .potential-bundle-metrics > div:first-child { grid-column: 1 / -1; }
  .potential-pool-pagination { align-items: stretch; flex-direction: column; }
  .potential-pool-pagination > div { display: grid; grid-template-columns: 1fr 1fr; }
}

/* === UI-1A: svetlija poslovna tema i jasnija hijerarhija modula === */
body {
  background:
    radial-gradient(900px 360px at 72% -120px, color-mix(in srgb, var(--sx-brand-primary) 9%, transparent), transparent 68%),
    linear-gradient(180deg, var(--sx-bg-app) 0, var(--sx-bg-app) 360px);
}

.sidebar {
  background: linear-gradient(180deg, var(--sx-bg-brand-strong) 0%, var(--sx-bg-brand-strong) 100%);
  border-right: 1px solid color-mix(in srgb, var(--sx-bg-surface) 8%, transparent);
  box-shadow: 8px 0 28px color-mix(in srgb, var(--sx-bg-brand-strong) 8%, transparent);
}
.nav-btn { position: relative; transition: background-color .12s ease, color .12s ease; }
.nav-btn.active {
  background: color-mix(in srgb, var(--sx-bg-surface) 14%, transparent);
  color: var(--sx-bg-surface);
  box-shadow: inset 3px 0 0 var(--sx-nav-item-active-marker);
}
.nav-btn.active .nav-icon {
  background: var(--sx-nav-item-active-marker);
  color: var(--sx-bg-brand-strong);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--sx-nav-item-active-marker) 22%, transparent);
}
.app-topbar { background: color-mix(in srgb, var(--sx-bg-app) 93%, transparent); box-shadow: 0 1px 0 color-mix(in srgb, var(--sx-fg-default) 3%, transparent); }
.main { background: transparent; }
.period-chip { background: color-mix(in srgb, var(--sx-bg-surface) 84%, transparent); border-color: var(--sx-border-strong); }

.card,
.panel {
  background: var(--sx-bg-surface);
  border-color: var(--sx-border-default);
  box-shadow: var(--sx-shadow-raise);
}
.panel { border-radius: var(--sx-radius-lg); }
.kpi,
.kpis .card,
.health-card {
  position: relative;
  overflow: hidden;
}
.kpi::after,
.kpis .card::after,
.health-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--sx-brand-primary);
  opacity: .70;
}
.kpi:nth-child(3n + 2)::after,
.kpis .card:nth-child(3n + 2)::after { background: var(--sx-status-info-fg); }
.kpi:nth-child(3n)::after,
.kpis .card:nth-child(3n)::after { background: var(--sx-status-warning-border); }

.table-scroll { border-color: var(--sx-border-default); background: var(--sx-bg-surface); box-shadow: 0 5px 18px color-mix(in srgb, var(--sx-bg-brand-strong) 4.5%, transparent); }
th {
  color: var(--sx-fg-strong);
  background: var(--sx-line-soft);
  border-bottom: 1px solid var(--sx-line-strong);
  letter-spacing: .035em;
}
td { border-bottom-color: var(--sx-border-default); }
tbody tr { transition: background-color .10s ease; }
tbody tr:hover td { background: var(--sx-bg-app); }
.debt-table-scroll .sortable-table thead th,
.target-plan-table thead th { background: var(--sx-line-soft); }

.primary-btn,
.save-user-button {
  background: var(--sx-brand-primary);
  color: var(--sx-bg-surface);
  border: 1px solid var(--sx-brand-primary);
  box-shadow: 0 5px 13px color-mix(in srgb, var(--sx-brand-primary) 16%, transparent);
}
.primary-btn:hover,
.save-user-button:hover { background: var(--sx-bg-brand-strong); border-color: var(--sx-bg-brand-strong); }
.soft-btn,
.ghost-button,
.export-pdf-button,
.small-button,
.utility-button,
.secondary-btn {
  color: var(--sx-bg-brand-strong);
  background: var(--sx-bg-surface);
  border-color: var(--sx-border-strong);
}
.soft-btn:hover,
.ghost-button:hover,
.export-pdf-button:hover,
.small-button:hover,
.utility-button:hover,
.secondary-btn:hover { color: var(--sx-bg-brand-strong); background: var(--sx-bg-brand-soft); border-color: var(--sx-brand-primary); }
.danger-btn { background: var(--sx-status-danger-fg); border-color: var(--sx-status-danger-fg); color: var(--sx-bg-surface); }
.danger-btn:hover { background: var(--sx-status-danger-fg); border-color: var(--sx-status-danger-fg); }
button:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled,
.danger-outline-btn:disabled {
  color: var(--sx-fg-subtle);
  background: var(--sx-border-soft);
  border-color: var(--sx-border-default);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.badge,
.status-badge,
.target-plan-status,
.target-plan-review-status,
.target-plan-candidate-status,
.potential-status { border: 1px solid transparent; }
.badge-success,
.status-badge.active,
.target-plan-review-status.reviewed,
.target-plan-candidate-status.bought_previous_month,
.status-badge.mustsell-status.sold { border-color: var(--sx-status-success-border); }
.badge-warm,
.target-plan-status.draft,
.target-plan-review-status.in_review,
.target-plan-candidate-status.historical_buyer,
.status-badge.mustsell-status.missing { border-color: var(--sx-status-warning-border); }
.badge-danger,
.status-badge.inactive { border-color: var(--sx-status-danger-border); }
.badge-neutral,
.target-plan-review-status.not_reviewed,
.target-plan-candidate-status.never_buyer,
.potential-status.never { color: var(--sx-status-info-fg); background: var(--sx-status-info-bg); border-color: var(--sx-status-info-border); }
.target-plan-status.locked { color: var(--sx-bg-brand-strong); background: var(--sx-bg-brand-soft); border-color: var(--sx-status-success-border); }

.empty-state,
.verified-mustsell-empty,
.target-plan-empty {
  background: linear-gradient(180deg, var(--sx-bg-surface), var(--sx-bg-surface-soft));
  border-color: var(--sx-border-strong);
}
.error-state,
.verified-mustsell-error,
.verified-opportunity-error,
.target-plan-form-error { border-left: 4px solid var(--sx-status-danger-fg); }
.target-plan-form-hint,
.potential-bundle-warning,
.target-plan-value-notice { border-left: 4px solid var(--sx-status-warning-border); }

.login-wrap {
  background:
    radial-gradient(760px 440px at 12% 0%, color-mix(in srgb, var(--sx-brand-primary) 18%, transparent), transparent 66%),
    radial-gradient(680px 420px at 100% 100%, color-mix(in srgb, var(--sx-status-warning-border) 13%, transparent), transparent 66%),
    linear-gradient(145deg, var(--sx-bg-app), var(--sx-border-soft));
}
.login-card {
  position: relative;
  overflow: hidden;
  border-color: var(--sx-border-strong);
  box-shadow: 0 24px 64px color-mix(in srgb, var(--sx-bg-brand-strong) 18%, transparent);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--sx-brand-primary), var(--sx-status-warning-border));
}
.login-card input { background: var(--sx-bg-app); border-color: var(--sx-border-strong); }
.login-card input:focus-visible { background: var(--sx-bg-surface); border-color: var(--sx-brand-primary); }
.login-card .error { border: 1px solid var(--sx-status-danger-border); border-left: 4px solid var(--sx-status-danger-fg); }

/* Plan Must Sell ciljeva: poslovne uloge i statusi imaju sopstvene tonove. */
.target-plan-qa-review {
  border-color: var(--sx-status-info-border);
  border-left: 5px solid var(--sx-status-info-fg);
  background: linear-gradient(135deg, var(--sx-status-info-bg), var(--sx-status-info-bg));
}
.target-plan-qa-review-badge { background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); border: 1px solid var(--sx-status-warning-border); }
.target-plan-qa-review-warning { color: var(--sx-bg-brand-strong); }
.target-plan-qa-history {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--sx-status-info-border);
}
.target-plan-qa-history summary {
  width: max-content;
  color: var(--sx-status-info-fg);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.target-plan-qa-history[open] summary { margin-bottom: 10px; }
.target-plan-qa-history ol { margin-top: 10px; }
.target-plan-readiness.pending { border-color: var(--sx-status-warning-border); background: var(--sx-status-warning-bg); color: var(--sx-status-warning-fg); }
.target-plan-review-list button { box-shadow: 0 3px 10px color-mix(in srgb, var(--sx-fg-default) 4%, transparent); }
.target-plan-review-list button:hover { border-color: var(--sx-brand-primary); }
.target-plan-review-list button.active { border-color: var(--sx-brand-primary); box-shadow: inset 3px 0 0 var(--sx-brand-primary); }
.target-plan-meta { border: 1px solid var(--sx-border-default); box-shadow: var(--sx-shadow-raise); }
.target-plan-meta > div:nth-child(even) { background: var(--sx-bg-app); }
.target-plan-decision-grid > div { background: var(--sx-bg-app); }
.target-plan-decision-grid > div.system { background: var(--sx-status-info-bg); box-shadow: inset 0 3px 0 var(--sx-status-info-fg); }
.target-plan-decision-grid > div.admin { background: var(--sx-status-warning-bg); box-shadow: inset 0 3px 0 var(--sx-status-warning-border); }
.target-plan-edit-form { border-color: var(--sx-border-strong); background: var(--sx-bg-app); }
.target-plan-table tbody tr.selected { background: var(--sx-bg-brand-soft); box-shadow: inset 4px 0 0 var(--sx-brand-primary); }

/* AVG26_LOCK_PREP_1A: read-only završna validacija, bez lock akcije. */
.target-plan-lock-readiness {
  display: grid;
  gap: 16px;
  padding: 22px 24px;
  border-left: 5px solid var(--sx-status-info-fg);
}
.target-plan-lock-readiness.pass {
  border-color: var(--sx-status-success-border);
  border-left-color: var(--sx-status-success-fg);
  background: linear-gradient(135deg, var(--sx-bg-surface), var(--sx-status-success-bg));
}
.target-plan-lock-readiness.fail {
  border-color: var(--sx-status-warning-border);
  border-left-color: var(--sx-status-warning-border);
  background: linear-gradient(135deg, var(--sx-bg-surface), var(--sx-status-warning-bg));
}
.target-plan-lock-readiness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.target-plan-lock-readiness-head h2 { margin: 4px 0 0; color: var(--sx-fg-strong); }
.target-plan-lock-readiness-badge {
  flex: 0 0 auto;
  min-width: 62px;
  padding: 7px 12px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-align: center;
}
.target-plan-lock-readiness-badge.pass { color: var(--sx-status-success-fg); background: var(--sx-status-success-bg); border-color: var(--sx-status-success-border); }
.target-plan-lock-readiness-badge.fail { color: var(--sx-status-warning-fg); background: var(--sx-status-warning-bg); border-color: var(--sx-status-warning-border); }
.target-plan-lock-readiness.pending { border-left-color: var(--sx-status-info-fg); background: var(--sx-bg-surface); }
.target-plan-lock-readiness-badge.pending { color: var(--sx-status-info-fg); background: var(--sx-status-info-bg); border-color: var(--sx-status-info-border); }
.target-plan-workspace-panel { display: grid; gap: 18px; min-width: 0; }
.target-plan-workspace-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.target-plan-workspace-nav button { min-height: 44px; flex: 1 1 140px; padding: 10px 16px; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-bg-surface); color: var(--sx-fg-default); font-weight: 800; cursor: pointer; }
.target-plan-workspace-nav button.active { border-color: var(--sx-border-brand); background: var(--sx-bg-brand-soft); color: var(--sx-brand-primary); }
.target-plan-workspace-nav button:focus-visible { outline: 2px solid var(--sx-brand-primary); outline-offset: 2px; }
.target-plan-stage .target-plan-rep-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 54px; }
.target-plan-rep-review-status { font-size: 11px; font-weight: 600; color: var(--sx-fg-muted); }
.target-plan-lock-readiness-result { display: grid; gap: 5px; }
.target-plan-lock-readiness-result strong { color: var(--sx-fg-strong); font-size: 18px; }
.target-plan-lock-readiness-result p { margin: 0; color: var(--sx-fg-muted); }
.target-plan-lock-readiness-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.target-plan-lock-readiness-checklist > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--sx-border-default);
  border-radius: 9px;
  background: var(--sx-bg-surface);
}
.target-plan-lock-readiness-checklist span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 900;
}
.target-plan-lock-readiness-checklist .pass span { color: var(--sx-status-success-fg); background: var(--sx-status-success-bg); }
.target-plan-lock-readiness-checklist .fail span { color: var(--sx-status-warning-fg); background: var(--sx-status-warning-bg); }
.target-plan-lock-readiness-checklist strong { color: var(--sx-fg-strong); font-size: 12px; line-height: 1.35; }
.target-plan-lock-readiness-problems {
  padding: 13px 15px;
  border: 1px solid var(--sx-status-warning-border);
  border-radius: 9px;
  background: var(--sx-status-warning-bg);
  color: var(--sx-status-warning-fg);
}
.target-plan-lock-readiness-problems h3 { margin: 0 0 8px; font-size: 13px; }
.target-plan-lock-readiness-problems ul { margin: 0; padding-left: 20px; }
.target-plan-lock-readiness-problems li + li { margin-top: 5px; }
.target-plan-lock-readiness-details summary { width: max-content; max-width: 100%; color: var(--sx-bg-brand-strong); font-size: 11px; font-weight: 850; cursor: pointer; }
.target-plan-lock-readiness-details ul { display: grid; gap: 5px; margin: 10px 0 0; padding-left: 20px; }
.target-plan-lock-readiness-details li { color: var(--sx-fg-muted); font-size: 11px; }
.target-plan-lock-readiness-details li.pass { color: var(--sx-status-success-fg); }
.target-plan-lock-readiness-details li.fail { color: var(--sx-status-warning-fg); }
.target-plan-lock-readiness-lock-note {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--sx-status-info-border);
  border-left: 4px solid var(--sx-status-info-fg);
  border-radius: 9px;
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
}
.target-plan-lock-readiness-lock-note span { font-size: 12px; line-height: 1.45; }

.target-plan-value-card {
  background: var(--sx-bg-app);
  border-color: var(--sx-border-strong);
  box-shadow: 0 5px 15px color-mix(in srgb, var(--sx-bg-brand-strong) 4.5%, transparent);
}
.target-plan-value-card.value-card-1 { background: var(--sx-status-success-bg); border-color: var(--sx-status-success-border); box-shadow: inset 0 3px 0 var(--sx-status-success-fg); }
.target-plan-value-card.value-card-2 { background: var(--sx-status-info-bg); border-color: var(--sx-status-info-border); box-shadow: inset 0 3px 0 var(--sx-status-info-fg); }
.target-plan-value-card.value-card-3 { background: var(--sx-status-warning-bg); border-color: var(--sx-status-warning-border); box-shadow: inset 0 3px 0 var(--sx-status-warning-border); }
.target-plan-history-month { background: var(--sx-bg-app); }
.target-plan-history-month.to_date { background: var(--sx-status-success-bg); border-color: var(--sx-status-success-border); }
.target-plan-history-month.unavailable { background: var(--sx-status-info-bg); border-color: var(--sx-status-info-border); }
.target-plan-history-month.unavailable strong { color: var(--sx-status-info-fg); }
.target-plan-finance-grid > div { background: var(--sx-bg-app); }
.target-plan-finance-grid > div:nth-child(4) { background: var(--sx-status-success-bg); box-shadow: inset 0 3px 0 var(--sx-status-success-fg); }

@media (max-width: 620px) {
  .card,
  .panel { box-shadow: 0 5px 18px color-mix(in srgb, var(--sx-fg-default) 6.5%, transparent); }
  .login-card { padding: 28px 22px 24px; }
  .target-plan-qa-review { border-left-width: 4px; }
  .target-plan-lock-readiness { padding: 16px; border-left-width: 4px; }
  .target-plan-lock-readiness-head { align-items: center; }
  .target-plan-lock-readiness-result strong { font-size: 16px; }
  .target-plan-lock-readiness-checklist { grid-template-columns: 1fr; }
}

/* === MS-3B5: praćenje Must Sell ostvarenja, stanje do datuma === */
.target-plan-achievement { min-width: 0; padding: 22px 24px; }
.target-plan-achievement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.target-plan-achievement-head h2 { margin: 4px 0 6px; color: var(--sx-fg-strong); }
.target-plan-achievement-head p { max-width: 780px; color: var(--sx-fg-muted); line-height: 1.5; }
.target-plan-achievement-state {
  flex: 0 0 auto;
  border: 1px solid var(--sx-status-info-border);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--sx-status-info-bg);
  color: var(--sx-status-info-fg);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.target-plan-achievement-state.available {
  border-color: var(--sx-status-success-border);
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
}
.target-plan-achievement-section-title {
  margin: 22px 0 10px;
  color: var(--sx-fg-strong);
  font-size: 13px;
}
.target-plan-achievement-company,
.target-plan-achievement-rep {
  display: grid;
  gap: 9px;
}
.target-plan-achievement-company { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.target-plan-achievement-rep { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.target-plan-achievement-company article,
.target-plan-achievement-rep article {
  display: grid;
  align-content: space-between;
  gap: 9px;
  min-width: 0;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--sx-border-strong);
  border-radius: 10px;
  background: var(--sx-bg-app);
}
.target-plan-achievement-company article:nth-child(1),
.target-plan-achievement-company article:nth-child(4) { box-shadow: inset 0 3px 0 var(--sx-brand-primary); }
.target-plan-achievement-company article:nth-child(2),
.target-plan-achievement-company article:nth-child(5) { background: var(--sx-status-info-bg); box-shadow: inset 0 3px 0 var(--sx-status-info-fg); }
.target-plan-achievement-company article:nth-child(3),
.target-plan-achievement-company article:nth-child(6) { background: var(--sx-status-warning-bg); box-shadow: inset 0 3px 0 var(--sx-status-warning-border); }
.target-plan-achievement-company span,
.target-plan-achievement-rep span {
  color: var(--sx-fg-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}
.target-plan-achievement-company strong,
.target-plan-achievement-rep strong {
  color: var(--sx-fg-strong);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.target-plan-achievement-rep article.review-not_reviewed { background: var(--sx-status-info-bg); border-color: var(--sx-status-info-border); }
.target-plan-achievement-rep article.review-in_review { background: var(--sx-status-warning-bg); border-color: var(--sx-status-warning-border); }
.target-plan-achievement-rep article.review-reviewed { background: var(--sx-status-success-bg); border-color: var(--sx-status-success-border); }
.target-plan-achievement-comparison-scroll { margin-top: 12px; }
.target-plan-achievement-comparison { min-width: 1120px; }
.target-plan-achievement-table { width: 100%; min-width: 1180px; table-layout: fixed; }
.target-plan-achievement-table th,
.target-plan-achievement-table td,
.target-plan-achievement-comparison th,
.target-plan-achievement-comparison td { padding: 10px 9px; vertical-align: middle; }
.target-plan-achievement-table th:nth-child(1) { width: 4%; }
.target-plan-achievement-table th:nth-child(2) { width: 11%; }
.target-plan-achievement-table th:nth-child(3) { width: 23%; }
.target-plan-achievement-table th:nth-child(4) { width: 8%; }
.target-plan-achievement-table th:nth-child(5) { width: 11%; }
.target-plan-achievement-table th:nth-child(6) { width: 12%; }
.target-plan-achievement-table th:nth-child(7) { width: 12%; }
.target-plan-achievement-table th:nth-child(8) { width: 11%; }
.target-plan-achievement-table th:nth-child(9) { width: 8%; }
.target-plan-achievement-table tbody tr { cursor: pointer; }
.target-plan-achievement-table tbody tr.selected { box-shadow: inset 4px 0 0 var(--sx-brand-primary); }
.target-plan-achievement-item-cards { display: none; }
.target-plan-achievement-selected {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--sx-border-default);
}
.target-plan-achievement-selected h3 { margin: 4px 0 5px; color: var(--sx-fg-strong); font-size: 16px; }
.target-plan-achievement-customers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.target-plan-achievement-customer-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-bg-app);
}
.target-plan-achievement-customer-group:first-child { border-top: 3px solid var(--sx-status-success-fg); }
.target-plan-achievement-customer-group:last-child { border-top: 3px solid var(--sx-status-warning-border); }
.target-plan-achievement-customer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.target-plan-achievement-customer-head h3 { margin: 0; font-size: 13px; }
.target-plan-achievement-customer-head span { min-width: 28px; padding: 4px 8px; border-radius: 999px; background: var(--sx-bg-surface); color: var(--sx-bg-brand-strong); font-weight: 850; text-align: center; }
.target-plan-achievement-customer-list { display: grid; gap: 7px; max-height: 330px; margin-top: 10px; overflow-y: auto; }
.target-plan-achievement-customer-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 9px 10px; border: 1px solid var(--sx-border-default); border-radius: 8px; background: var(--sx-bg-surface); }
.target-plan-achievement-customer-list strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.target-plan-achievement-customer-list small { grid-column: 1 / -1; color: var(--sx-fg-muted); }
.target-plan-achievement-unavailable { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--sx-status-info-border); border-left: 4px solid var(--sx-status-info-fg); border-radius: 9px; background: var(--sx-status-info-bg); color: var(--sx-status-info-fg); font-weight: 750; }
.target-plan-qa-section-title { margin: 18px 0 0; color: var(--sx-fg-strong); font-size: 12px; }

@media (max-width: 1200px) {
  .target-plan-achievement-company { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .target-plan-achievement-rep { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .target-plan-achievement { padding: 16px; }
  .target-plan-achievement-head { flex-direction: column; }
  .target-plan-achievement-company,
  .target-plan-achievement-rep { grid-template-columns: 1fr 1fr; }
  .target-plan-achievement-company article,
  .target-plan-achievement-rep article { min-height: 92px; }
  .target-plan-achievement-comparison-scroll,
  .target-plan-achievement-table-scroll { display: none; }
  .target-plan-achievement-item-cards { display: grid; gap: 9px; }
  .target-plan-achievement-item-card { display: grid; gap: 10px; width: 100%; padding: 13px; border: 1px solid var(--sx-border-default); border-radius: 10px; background: var(--sx-bg-surface); color: var(--sx-fg-default); text-align: left; }
  .target-plan-achievement-item-card.selected { border-color: var(--sx-brand-primary); box-shadow: inset 4px 0 0 var(--sx-brand-primary); background: var(--sx-bg-brand-soft); }
  .target-plan-achievement-item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--sx-border-default); border-radius: 8px; background: var(--sx-border-default); }
  .target-plan-achievement-item-grid > div { display: grid; gap: 3px; padding: 8px; background: var(--sx-bg-surface-soft); }
  .target-plan-achievement-item-grid span { color: var(--sx-fg-muted); font-size: 9px; text-transform: uppercase; }
  .target-plan-achievement-item-grid strong { font-size: 12px; overflow-wrap: anywhere; }
  .target-plan-achievement-customers { grid-template-columns: 1fr; }
}

/* PILOT-1A: jasan admin pregled uloga, efektivnog scope-a i read-only pilota. */
.access-admin-stage { gap: 18px; }
.access-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.access-section-head h2 { margin: 4px 0 0; color: var(--sx-fg-strong); }
.access-safety-badge,
.pilot-preview-scope {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid var(--sx-status-success-border);
  border-radius: 999px;
  background: var(--sx-status-success-bg);
  color: var(--sx-status-success-fg);
  font-size: 11px;
  font-weight: 850;
}
.access-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.access-role-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--sx-border-strong);
  border-top: 4px solid var(--sx-brand-primary);
  border-radius: 12px;
  background: var(--sx-bg-surface);
}
.access-role-card.role-commercialist { border-top-color: var(--sx-status-info-fg); }
.access-role-card.role-manager { border-top-color: var(--sx-status-success-fg); }
.access-role-card.role-pilot_commercialist { border-top-color: var(--sx-status-warning-border); }
.access-role-card h3 { margin: 0; color: var(--sx-fg-strong); font-size: 16px; }
.access-role-scope { min-height: 38px; margin: 7px 0 12px; color: var(--sx-fg-muted); font-size: 12px; }
.access-role-card ul,
.pilot-preview-surface ul { display: grid; gap: 7px; margin: 0; padding-left: 18px; }
.access-role-card li,
.pilot-preview-surface li { color: var(--sx-fg-default); font-size: 12px; line-height: 1.45; }
.access-users-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sx-border-default);
}
.access-users-toolbar h2 { margin-bottom: 4px; }
.access-users-table { margin-top: 14px; }
.access-users-table table { min-width: 1500px; }
.access-users-table th,
.access-users-table td { padding: 10px; vertical-align: top; }
.user-modal-backdrop {
  z-index: 80;
  background: color-mix(in srgb, var(--sx-fg-strong) 64%, transparent);
  backdrop-filter: blur(2px);
}
.user-modal-card {
  width: min(900px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  gap: 18px;
  padding: 24px;
  overscroll-behavior: contain;
}
.user-modal-head {
  display: grid;
  gap: 5px;
  padding-right: 68px;
}
.user-modal-head h2 { margin: 0; color: var(--sx-fg-strong); font-size: 24px; }
.user-modal-head p { margin: 0; line-height: 1.45; }
.user-modal-form { display: grid; gap: 18px; min-width: 0; }
.user-modal-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.user-modal-form .check-row input[type="checkbox"] {
  width: 1px;
  height: 1px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.user-modal-form input[readonly] {
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  cursor: not-allowed;
}
.field-help { color: var(--sx-fg-muted); font-size: 10px; font-weight: 600; line-height: 1.4; }
.user-modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin: 0 -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--sx-border-default);
  background: color-mix(in srgb, var(--sx-bg-surface) 96%, transparent);
  box-shadow: 0 -8px 18px color-mix(in srgb, var(--sx-fg-strong) 5%, transparent);
}
.access-permission-tags { display: flex; flex-wrap: wrap; gap: 5px; max-width: 330px; }
.access-permission-tags span {
  padding: 4px 7px;
  border: 1px solid var(--sx-border-default);
  border-radius: 999px;
  background: var(--sx-bg-surface-soft);
  color: var(--sx-fg-muted);
  font-size: 9px;
  font-weight: 750;
}
.manager-team-field { margin: 16px 0; padding: 16px; border: 1px solid var(--sx-status-info-border); border-radius: 12px; background: var(--sx-status-info-bg); }
.manager-team-field h3 { margin: 0 0 5px; color: var(--sx-fg-strong); }
.manager-team-field p { margin: 0; }
.manager-primary-copy { color: var(--sx-fg-default); font-size: 12px; }
.manager-primary-copy strong { color: var(--sx-bg-brand-strong); }
.manager-team-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.manager-team-options label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--sx-border-default); border-radius: 9px; background: var(--sx-bg-surface); color: var(--sx-fg-default); }
.user-form .manager-team-options input { width: auto; margin: 0; }
.manager-team-options input:disabled + span { color: var(--sx-fg-muted); }
.pilot-preview-panel > .muted { max-width: 850px; margin-top: -4px; }
.pilot-preview-select { display: grid; gap: 6px; max-width: 420px; margin: 18px 0; color: var(--sx-fg-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.pilot-preview-select select { width: 100%; }
.pilot-preview-loading { padding: 12px; border-radius: 9px; background: var(--sx-bg-surface-soft); color: var(--sx-fg-muted); }
.pilot-preview-surface {
  overflow: hidden;
  border: 1px solid var(--sx-border-strong);
  border-radius: 14px;
  background: var(--sx-bg-surface);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--sx-fg-default) 8%, transparent);
}
.pilot-preview-banner { padding: 13px 16px; background: var(--sx-bg-brand-strong); color: var(--sx-fg-on-brand); font-size: 13px; font-weight: 850; }
.pilot-preview-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border-bottom: 1px solid var(--sx-border-default); }
.pilot-preview-identity > div { display: grid; gap: 4px; }
.pilot-preview-identity > div span { color: var(--sx-fg-muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.pilot-preview-identity strong { color: var(--sx-fg-strong); font-size: 20px; }
.pilot-preview-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--sx-border-default); }
.pilot-preview-columns > section { min-width: 0; padding: 18px; background: var(--sx-bg-surface); }
.pilot-preview-columns h3 { margin: 0 0 12px; color: var(--sx-fg-strong); font-size: 14px; }
.pilot-preview-allowed li::marker { color: var(--sx-status-success-fg); }
.pilot-preview-hidden li::marker { color: var(--sx-status-danger-fg); }
.pilot-preview-access { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 14px 18px; border-top: 1px solid var(--sx-border-default); background: var(--sx-bg-brand-soft); }
.pilot-preview-access strong { margin-right: 4px; color: var(--sx-bg-brand-strong); font-size: 11px; text-transform: uppercase; }
.pilot-preview-access span { padding: 5px 8px; border: 1px solid var(--sx-border-strong); border-radius: 999px; background: var(--sx-bg-surface); color: var(--sx-bg-brand-strong); font-size: 10px; font-weight: 750; }
.pilot-qa-panel h2 { margin: 0 0 14px; }
.pilot-qa-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pilot-qa-list > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 9px; padding: 10px; border: 1px solid var(--sx-border-default); border-radius: 9px; background: var(--sx-bg-surface-soft); }
.pilot-qa-list span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sx-brand-primary); color: var(--sx-fg-on-brand); font-size: 11px; font-weight: 900; }
.pilot-qa-list p { margin: 3px 0 0; color: var(--sx-fg-default); font-size: 12px; line-height: 1.4; }

/* COMM-1A: bezbedan radni pregled komercijaliste i dodeljenog manager tima. */
.commercialist-home { gap: 18px; }
.commercialist-home-header {
  gap: 16px;
  border-left: 5px solid var(--sx-brand-primary);
  background: linear-gradient(135deg, var(--sx-bg-surface), var(--sx-bg-brand-soft));
}
.commercialist-home-title,
.manager-team-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.commercialist-home-title h2,
.manager-team-report-head h2 { margin: 2px 0 4px; color: var(--sx-fg-strong); }
.commercialist-home-title p,
.manager-team-report-head p { margin: 0; }
.commercialist-home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.mustsell-plan-pdf-button {
  border-color: var(--sx-status-warning-border);
  background: var(--sx-status-warning-border);
  color: var(--sx-fg-strong);
}
.mustsell-plan-pdf-button:hover {
  border-color: var(--sx-status-warning-border);
  background: var(--sx-status-warning-border);
}
.commercialist-home-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--sx-border-default);
  border-radius: 10px;
  background: var(--sx-border-default);
}
.commercialist-home-meta > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  background: var(--sx-bg-surface);
}
.commercialist-home-meta span {
  color: var(--sx-fg-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.commercialist-home-meta strong {
  color: var(--sx-fg-strong);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.manager-team-report { gap: 15px; border-left: 5px solid var(--sx-status-info-fg); }
.manager-team-kpis,
.commercialist-customer-kpis { grid-template-columns: repeat(6, minmax(145px, 1fr)); }
.manager-team-table { max-height: 340px; }
.manager-team-table table { min-width: 980px; }
.manager-team-table tr.selected td { background: var(--sx-bg-brand-soft); }
.manager-team-person {
  border: 0;
  background: transparent;
  color: var(--sx-bg-brand-strong);
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.commercialist-customer-summary,
.commercialist-priority-checks,
.commercialist-mustsell { gap: 14px; }
.commercialist-priority-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.commercialist-mustsell-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.commercialist-home-qa summary {
  color: var(--sx-fg-strong);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
}
.commercialist-home-qa-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.commercialist-home-qa-list > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--sx-border-default);
  border-radius: 9px;
  background: var(--sx-bg-surface-soft);
}
.commercialist-home-qa-list span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sx-brand-primary);
  color: var(--sx-fg-on-brand);
  font-size: 11px;
  font-weight: 900;
}
.commercialist-home-qa-list p { margin: 3px 0 0; color: var(--sx-fg-default); font-size: 12px; line-height: 1.4; }

@media (max-width: 980px) {
  .access-role-grid { grid-template-columns: 1fr; }
  .access-role-scope { min-height: 0; }
  .pilot-qa-list { grid-template-columns: 1fr; }
  .manager-team-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commercialist-home-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager-team-kpis,
  .commercialist-customer-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commercialist-priority-grid,
  .commercialist-mustsell-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feedback-question-form { grid-template-columns: 1fr 1.5fr; }
  .feedback-question-form button { grid-column: 1 / -1; justify-self: start; }
  .scoped-yoy-flow-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .manager-scope-switcher { align-items: stretch; flex-direction: column; gap: 12px; padding: 13px; }
  .manager-scope-switcher > label { flex-basis: auto; }
  .manager-team-options { grid-template-columns: 1fr; }
  .user-modal-backdrop { padding: 10px; }
  .user-modal-card { max-height: calc(100vh - 20px); padding: 20px 16px; border-radius: 11px; }
  .user-modal-form .form-grid { grid-template-columns: 1fr; }
  .user-modal-actions { bottom: -20px; margin: 0 -16px -20px; padding: 12px 16px; }
  .user-modal-actions button { flex: 1 1 100%; }
  .access-section-head,
  .access-users-toolbar,
  .pilot-preview-identity { align-items: flex-start; flex-direction: column; }
  .pilot-preview-columns { grid-template-columns: 1fr; }
  .pilot-preview-access { align-items: flex-start; flex-direction: column; }
  .commercialist-home-title,
  .manager-team-report-head { align-items: stretch; flex-direction: column; }
  .commercialist-home-actions,
  .commercialist-home-title .export-pdf-button { width: 100%; }
  .feedback-question-form,
  .scoped-yoy-flow-kpis { grid-template-columns: 1fr; }
  .feedback-question-form button { width: 100%; }
  .commercialist-home-actions { display: grid; grid-template-columns: 1fr; }
  .commercialist-home-meta,
  .manager-team-kpis,
  .commercialist-customer-kpis,
  .commercialist-priority-grid,
  .commercialist-mustsell-kpis,
  .commercialist-home-qa-list { grid-template-columns: 1fr; }
}

/* ============================================================================
   SMARTIX UI-2B1 — brand, login i aplikacioni okvir
   Master kombinacija: Operational Precision + Calm Executive karakter.
   Interni sadržaj poslovnih modula ostaje funkcionalno i strukturno netaknut.
   ============================================================================ */

html,
body { min-width: 0; overflow-x: clip; }

/* SmartiX mark i wordmark iz odobrene master specifikacije. */
.smartix-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.smartix-brand-tile {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--sx-green-900);
}
.smartix-brand-tile svg { width: 24px; height: 28px; overflow: visible; }
.smartix-brand-tile .sx-mark-path { stroke-width: 5.6; }
.smartix-brand-tile .sx-mark-accent { stroke: var(--sx-mark-accent); }
.smartix-brand-tile .sx-mark-base { stroke: var(--sx-mark-base); }
.smartix-brand-tile-asset { overflow: hidden; background: transparent; }
.smartix-brand-tile-asset img { display: block; width: 100%; height: 100%; object-fit: contain; }
.smartix-brand-copy { min-width: 0; line-height: 1.05; }
.smartix-wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--sx-ink-900);
  font-family: var(--sx-font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}
.sx-wordmark-x {
  height: .82em;
  width: auto;
  margin-left: .06em;
  align-self: center;
  overflow: visible;
}
.sx-wordmark-x path { fill: none; stroke-width: 3.8; stroke-linecap: butt; }
.sx-wordmark-x-accent { stroke: var(--sx-mark-accent); }
.sx-wordmark-x-base { stroke: var(--sx-green-700); }
.smartix-brand-desc {
  display: block;
  margin-top: 3px;
  color: var(--sx-ink-500);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .9px;
  line-height: 1.22;
  text-transform: uppercase;
  white-space: normal;
}

/* Svetao, sklopiv sidebar. */
.app { grid-template-columns: 232px minmax(0, 1fr); background: var(--sx-bg-app); }
.app.nav-collapsed { grid-template-columns: 70px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  padding: 0;
  overflow: visible;
  color: var(--sx-fg-default);
  background: var(--sx-bg-surface);
  border-right: 1px solid var(--sx-border-default);
  box-shadow: none;
}
.brand {
  min-height: 65px;
  padding: 14px 10px 14px 14px;
  gap: 7px;
  border-bottom: 1px solid var(--sx-border-soft);
}
.brand .sidebar-lockup { flex: 1 1 auto; overflow: hidden; }
.brand-collapse {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  color: var(--sx-fg-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
}
.brand-collapse:hover { color: var(--sx-fg-strong); background: var(--sx-bg-hover); border-color: var(--sx-border-default); }
.brand-collapse .nav-icon { color: inherit; }
.app.nav-collapsed .brand { flex-direction: column; gap: 7px; padding: 14px 8px 10px; }
.app.nav-collapsed .sidebar-lockup .smartix-brand-copy { display: none; }
.app.nav-collapsed .sidebar-lockup { flex: 0 0 auto; }
.app.nav-collapsed .brand-collapse { margin: 0; }
.nav {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  padding: 10px 8px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.nav-group { display: grid; gap: 3px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label {
  height: auto;
  padding: 0 10px 6px;
  color: var(--sx-fg-subtle);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
}
.nav-btn {
  position: relative;
  min-height: 44px;
  gap: 10px;
  padding: 8px 10px;
  color: var(--sx-fg-muted);
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
}
.nav-btn:hover { color: var(--sx-fg-strong); background: var(--sx-bg-hover); }
.nav-btn.active {
  color: var(--sx-green-900);
  background: var(--sx-green-100);
  box-shadow: none;
}
.nav-btn.active:focus-visible,
.more-sheet .sheet-item.active:focus-visible,
.bottom-nav button.active:focus-visible {
  outline: 3px solid var(--sx-green-900);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 2px var(--sx-bg-surface);
}
.nav-btn.active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sx-green-600);
}
.nav-icon { width: 27px; height: 27px; color: var(--sx-fg-muted); }
.nav-btn.active .nav-icon {
  color: var(--sx-green-700);
  background: transparent;
  box-shadow: none;
}
.app.nav-collapsed .nav-label { visibility: hidden; height: 8px; padding: 0; }
.app.nav-collapsed .nav-btn { padding: 8px 0; }

/* Kompaktna kontekstualna topbar traka. */
.shell { min-width: 0; }
.app-topbar {
  min-width: 0;
  min-height: 52px;
  padding: 8px 20px;
  gap: 14px;
  background: color-mix(in srgb, var(--sx-bg-surface) 96%, transparent);
  border-bottom: 1px solid var(--sx-border-default);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.topbar-context,
.topbar-actions { display: flex; align-items: center; min-width: 0; gap: 12px; }
.topbar-context { flex: 1 1 auto; }
.topbar-actions { flex: 0 1 auto; justify-content: flex-end; }
.crumb { font-size: 11.5px; }
.crumb > span { color: var(--sx-fg-subtle); }
.account { flex: 0 0 auto; }
.account-btn { min-height: 44px; padding: 4px 4px 4px 9px; border-radius: 10px; }
.account-text strong { font-size: 11.5px; }
.account-text span { font-size: 10px; }
.account-menu {
  right: 0;
  top: calc(100% + 8px);
  width: min(260px, calc(100vw - 28px));
  padding: 7px;
  transform: none;
  border-radius: 11px;
}
.account-menu .am-head {
  display: grid;
  gap: 2px;
  padding: 9px 10px 10px;
  border-bottom: 1px solid var(--sx-border-soft);
}
.account-menu button { min-height: 44px; margin-top: 4px; }
.manager-scope-switcher {
  display: flex;
  align-items: center;
  flex: 0 1 270px;
  min-width: 190px;
  margin: 0;
  padding: 0;
  gap: 8px;
  color: var(--sx-fg-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
}
.manager-scope-label { flex: 0 0 auto; white-space: nowrap; }
.manager-scope-switcher select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 30px 6px 9px;
  color: var(--sx-fg-strong);
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-strong);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
}
.manager-scope-mobile { display: none; }
.main { max-width: 1540px; padding: 24px 28px 44px; overflow-x: clip; }

/* Calm Executive login: svetla 50/50 kompozicija, bez tamnog panela. */
.login-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  padding: 0;
  background: var(--sx-bg-surface);
}
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 48px;
}
.login-card {
  width: 100%;
  max-width: 376px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.login-card::before { display: none; }
.login-brand { margin-bottom: 32px; }
.login-brand.smartix-login-lockup {
  align-items: center;
  gap: 14px;
}
.login-brand .smartix-brand-tile { flex-basis: 48px; width: 48px; height: 48px; border-radius: 12px; }
.login-brand .smartix-brand-tile-asset { border-radius: 13px; box-shadow: 0 10px 24px color-mix(in srgb, var(--sx-green-900) 18%, transparent); }
.login-brand .smartix-brand-tile svg { width: 32px; height: 36px; }
.login-brand .smartix-brand-tile .sx-mark-path { stroke-width: 5.2; }
.login-brand .smartix-brand-copy { display: grid; gap: 3px; line-height: 1; }
.login-brand .smartix-wordmark { font-size: 30px; letter-spacing: -.01em; }
.login-brand .smartix-brand-desc { margin-top: 0; color: var(--sx-green-700); font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.login-intro h1 { margin: 0 0 5px; color: var(--sx-fg-strong); font-size: 26px; letter-spacing: -.02em; }
.login-lede { margin: 0 0 24px; color: var(--sx-fg-muted); font-size: 13.5px; line-height: 1.5; }
.login-card form { gap: 16px; }
.login-card label { color: var(--sx-fg-default); font-size: 11px; letter-spacing: .02em; text-transform: none; }
.login-card input {
  min-height: 46px;
  padding: 11px 12px;
  color: var(--sx-fg-strong);
  background: var(--sx-bg-surface);
  border-color: var(--sx-border-control);
}
.login-card .primary-btn { min-height: 48px; margin-top: 8px; font-size: 14px; }
.login-card .error { margin: -2px 0 0; }
.login-help { margin-top: 18px; color: var(--sx-fg-muted); font-size: 11px; }
.login-context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 56px 64px;
  color: var(--sx-fg-default);
  background:
    radial-gradient(560px 340px at 100% 0%, color-mix(in srgb, var(--sx-green-300) 20%, transparent), transparent 70%),
    var(--sx-green-50);
  border-left: 1px solid var(--sx-border-default);
}
.login-context-kicker {
  color: var(--sx-green-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.login-context h2 {
  max-width: 480px;
  margin: 14px 0 12px;
  color: var(--sx-fg-strong);
  font-size: clamp(25px, 2.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.login-context > p { max-width: 510px; color: var(--sx-fg-muted); font-size: 14px; line-height: 1.6; }
.login-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 30px;
}
.login-context-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 15px;
  background: var(--sx-bg-surface);
  border: 1px solid var(--sx-border-default);
  border-top: 3px solid var(--sx-green-600);
  border-radius: 10px;
}
.login-context-grid article:nth-child(2) { border-top-color: var(--sx-status-warning-border); }
.login-context-grid article:nth-child(3) { border-top-color: var(--sx-status-info-fg); }
.login-context-grid strong { color: var(--sx-fg-strong); font-size: 11px; letter-spacing: .08em; }
.login-context-grid span { color: var(--sx-fg-muted); font-size: 11px; line-height: 1.4; }

/* Internal checks stay out of the planning flow until explicitly expanded. */
details.target-plan-qa-review:not([open]) { padding: 12px 18px; }
details.target-plan-qa-review > summary { cursor: pointer; font-weight: 600; min-height: 44px; align-content: center; }
@media (max-width: 1024px) {
  .ui2b5-target-plan-hero { padding: 16px; }
  .ui2b5-target-plan-hero h2 { font-size: 22px; line-height: 1.2; }
  .ui2b5-target-plan-hero .ui2b5-potential-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui2b5-target-plan-hero .smart-kpi-card { min-width: 0; }
}

@media (max-width: 1100px) {
  .app-topbar { padding-inline: 16px; }
  .manager-scope-label { display: none; }
  .manager-scope-switcher { min-width: 175px; flex-basis: 215px; }
  .account-text { display: none; }
  .login-context { padding-inline: 42px; }
  .login-context-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app,
  .app.nav-collapsed { display: block; }
  .sidebar { display: none; }
  .app-topbar { min-height: 58px; padding: 8px 12px; }
  .mobile-menu {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid var(--sx-border-default);
    border-radius: 10px;
    color: var(--sx-fg-default);
    background: var(--sx-bg-surface);
  }
  .mobile-brand { display: flex; gap: 8px; }
  .mobile-brand .smartix-brand-tile { flex-basis: 32px; width: 32px; height: 32px; border-radius: 8px; }
  .mobile-brand .smartix-brand-tile svg { width: 21px; height: 24px; }
  .mobile-brand .smartix-brand-tile .sx-mark-path { stroke-width: 5.6; }
  .mobile-brand .smartix-wordmark { font-size: 15px; }
  .mobile-brand .smartix-brand-desc { margin-top: 2px; font-size: 6.5px; }
  .manager-scope-topbar { display: none; }
  .manager-scope-mobile {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 4px 0 12px;
    padding: 12px;
    background: var(--sx-green-50);
    border: 1px solid var(--sx-border-default);
    border-radius: 10px;
  }
  .manager-scope-mobile .manager-scope-label { display: block; }
  .manager-scope-mobile select { min-height: 44px; }
  .main { padding: 18px 14px 96px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-form-panel { min-height: 100vh; padding: 36px 24px; }
  .login-context { display: none; }
}

@media (max-width: 520px) {
  .topbar-context { gap: 8px; }
  .mobile-brand .smartix-brand-desc { display: none; }
  .account-btn { padding-left: 4px; }
  .account-menu { position: fixed; top: 66px; right: 10px; }
  .login-form-panel { align-items: center; padding: 28px 20px; }
  .login-brand { margin-bottom: 26px; }
  .login-card { padding: 0; }
  .bottom-nav button { min-height: 44px; }
}

/* === UI-2B5: Must Sell complete redesign shell === */
.ui2b5-mustsell-page,
.ui2b5-potential-stage,
.ui2b5-shadow-plan-stage,
.ui2b5-target-plan-stage {
  min-width: 0;
  max-width: 100%;
}

.ui2b5-mustsell-hero,
.ui2b5-potential-hero,
.ui2b5-shadow-plan-hero,
.ui2b5-target-plan-hero {
  display: grid;
  gap: 18px;
  overflow: hidden;
  border-left-width: 5px;
  background:
    radial-gradient(860px 300px at 100% 0, color-mix(in srgb, var(--sx-brand-primary) 9%, transparent), transparent 62%),
    linear-gradient(135deg, var(--sx-bg-surface), var(--sx-bg-surface-soft));
}

.ui2b5-tone-good,
.ui2b5-target-plan-hero {
  border-left-color: var(--sx-status-success-fg);
}

.ui2b5-tone-warn,
.ui2b5-shadow-plan-hero {
  border-left-color: var(--sx-status-warning-border);
}

.ui2b5-tone-bad {
  border-left-color: var(--sx-status-danger-fg);
}

.ui2b5-mustsell-hero-main,
.ui2b5-potential-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ui2b5-mustsell-hero h2,
.ui2b5-potential-hero h2,
.ui2b5-shadow-plan-hero h2,
.ui2b5-target-plan-hero h2 {
  margin: 5px 0 6px;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.ui2b5-mustsell-hero p,
.ui2b5-potential-hero p,
.ui2b5-shadow-plan-hero p,
.ui2b5-target-plan-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--sx-fg-muted);
  line-height: 1.45;
}

.ui2b5-mustsell-period-pill {
  flex: 0 0 auto;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--sx-border-strong);
  border-radius: 999px;
  background: var(--sx-bg-surface);
  color: var(--sx-fg-default);
  font-size: 13px;
  font-weight: 750;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ui2b5-mustsell-answer {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--sx-border-brand);
  border-radius: 14px;
  background: var(--sx-bg-brand-soft);
}

.ui2b5-mustsell-answer p {
  max-width: none;
  color: var(--sx-fg-default);
  font-size: clamp(15px, 1.25vw, 18px);
}

.ui2b5-mustsell-answer strong {
  color: var(--sx-fg-strong);
  font-weight: 880;
}

.ui2b5-mustsell-summary-grid,
.ui2b5-potential-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ui2b5-mustsell-summary-grid .smart-kpi,
.ui2b5-potential-hero-grid .smart-kpi {
  min-height: 118px;
}

.ui2b5-mustsell-filter-panel {
  padding: 18px;
}

.ui2b5-mustsell-filter-panel .verified-mustsell-filterbar {
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr minmax(220px, 1.35fr) auto;
  gap: 10px;
}

.ui2b5-filter-reset {
  align-self: end;
  min-height: 48px;
  white-space: nowrap;
}

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

.ui2b5-mustsell-kpi-grid .card {
  min-height: 112px;
}

.ui2b5-mustsell-table-panel {
  padding: 22px;
}

.ui2b5-mustsell-table-panel .topbar {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sx-border-default);
}

.ui2b5-mustsell-table-panel h2,
.ui2b5-mustsell-reps h2 {
  margin-bottom: 4px;
}

.ui2b5-mustsell-table-panel .verified-mustsell-table-scroll {
  max-width: 100%;
  max-height: min(680px, calc(100vh - 280px));
  overflow: auto;
  border-radius: 14px;
}

.ui2b5-mustsell-table-panel .verified-mustsell-table {
  min-width: 1080px;
}

.ui2b5-mustsell-reps {
  padding: 22px;
}

.ui2b5-mustsell-reps .verified-rep-card {
  min-height: 156px;
  background: linear-gradient(180deg, var(--sx-bg-surface), var(--sx-bg-surface-soft));
}

.ui2b5-potential-stage .potential-tabs,
.mustsell-with-potential > .mustsell-section-switch {
  width: min(100%, max-content);
}

.ui2b5-potential-hero .smart-badge {
  flex: 0 0 auto;
}

.ui2b5-potential-stage .potential-context {
  border-left: 4px solid var(--sx-brand-primary);
}

.ui2b5-potential-stage .potential-cells-panel,
.ui2b5-potential-stage .potential-bundle-controls,
.ui2b5-potential-stage .potential-pool-controls,
.ui2b5-potential-stage .potential-pool-results {
  border-radius: var(--sx-radius-lg);
}

.ui2b5-shadow-plan-stage .shadow-plan-head,
.ui2b5-target-plan-stage .target-plan-selector,
.ui2b5-target-plan-stage .target-plan-review,
.ui2b5-target-plan-stage .target-plan-items,
.ui2b5-target-plan-stage .target-plan-detail {
  border-radius: var(--sx-radius-lg);
}

@media (max-width: 1366px) {
  .ui2b5-mustsell-summary-grid,
  .ui2b5-potential-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui2b5-mustsell-filter-panel .verified-mustsell-filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ui2b5-filter-reset {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .ui2b5-mustsell-hero-main,
  .ui2b5-potential-hero-main {
    display: grid;
  }

  .ui2b5-mustsell-period-pill {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .ui2b5-mustsell-summary-grid,
  .ui2b5-potential-hero-grid,
  .ui2b5-mustsell-kpi-grid {
    grid-template-columns: 1fr;
  }

  .ui2b5-mustsell-filter-panel .verified-mustsell-filterbar {
    grid-template-columns: 1fr;
  }

  .ui2b5-mustsell-table-panel,
  .ui2b5-mustsell-reps,
  .ui2b5-mustsell-hero,
  .ui2b5-potential-hero,
  .ui2b5-shadow-plan-hero,
  .ui2b5-target-plan-hero {
    padding: 16px;
  }
}

@media (max-width: 390px) {
  .ui2b5-mustsell-answer {
    padding: 13px;
  }

  .ui2b5-mustsell-hero h2,
  .ui2b5-potential-hero h2,
  .ui2b5-shadow-plan-hero h2,
  .ui2b5-target-plan-hero h2 {
    font-size: 24px;
  }

  .ui2b5-potential-stage .potential-tabs,
  .mustsell-with-potential > .mustsell-section-switch {
    width: 100%;
  }
}

/* UI-2B7: izveštaj, radni pregled i feedback — presentation-only hijerarhija. */
.ui2b7-report-page,
.ui2b7-report-page > *,
.ui2b7-report-content,
.ui2b7-feedback-page,
.ui2b7-feedback-page > * {
  min-width: 0;
}

.ui2b7-page-intro {
  border-left: 5px solid var(--sx-brand-primary);
  background: linear-gradient(135deg, var(--sx-bg-surface), var(--sx-bg-brand-soft));
}

.ui2b7-primary-result {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sx-border-default);
}

.ui2b7-report-content .report-section-title {
  margin-top: 4px;
  padding-top: 4px;
}

.ui2b7-report-content .report-actions {
  padding-top: 4px;
}

.ui2b7-feedback-inbox {
  min-width: 0;
}

.ui2b7-feedback-page .feedback-entry,
.ui2b7-feedback-page .feedback-entry-head > *,
.ui2b7-feedback-page .feedback-question-form > * {
  min-width: 0;
}

.ui2b7-feedback-page .feedback-entry h3,
.ui2b7-feedback-page .feedback-admin-comment,
.ui2b7-feedback-page textarea {
  overflow-wrap: anywhere;
}

.ui2b7-feedback-page .feedback-history .table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .ui2b7-report-page .report-kpis,
  .ui2b7-report-page .manager-team-kpis,
  .ui2b7-report-page .commercialist-customer-kpis,
  .ui2b7-report-page .commercialist-priority-grid,
  .ui2b7-report-page .commercialist-mustsell-kpis,
  .ui2b7-feedback-page .feedback-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    margin-right: 0;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .ui2b7-report-page .report-kpis > *,
  .ui2b7-report-page .manager-team-kpis > *,
  .ui2b7-report-page .commercialist-customer-kpis > *,
  .ui2b7-report-page .commercialist-priority-grid > *,
  .ui2b7-report-page .commercialist-mustsell-kpis > *,
  .ui2b7-feedback-page .feedback-kpis > * {
    flex: initial;
    flex-basis: auto;
    min-width: 0;
    width: auto;
    scroll-snap-align: none;
  }

  .ui2b7-feedback-page .feedback-question-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .ui2b7-feedback-page .feedback-question-form button {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .ui2b7-report-page .report-kpis,
  .ui2b7-report-page .manager-team-kpis,
  .ui2b7-report-page .commercialist-customer-kpis,
  .ui2b7-report-page .commercialist-priority-grid,
  .ui2b7-report-page .commercialist-mustsell-kpis,
  .ui2b7-feedback-page .feedback-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .ui2b7-feedback-page .feedback-entry-head,
  .ui2b7-feedback-page .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ui2b7-feedback-page .ghost-button,
  .ui2b7-feedback-page .feedback-workflow button {
    width: 100%;
  }
}

/* Compact plan: native disclosures preserve keyboard access and keep blockers visible. */
.target-plan-meta-details { padding: 0; overflow: hidden; }
.target-plan-meta-details > summary,
.target-plan-lock-readiness-details > summary {
  min-height: 44px; padding: 14px 16px; cursor: pointer;
  font-weight: 700; overflow-wrap: anywhere;
}
.target-plan-meta-details > summary:focus-visible,
.target-plan-lock-readiness-details > summary:focus-visible {
  outline: 2px solid var(--sx-bg-brand-strong); outline-offset: -3px;
}
.target-plan-meta-details > .target-plan-meta { margin: 0; border: 0; border-radius: 0; box-shadow: none; }

/* UX foundation: one page title, subordinate section titles and natural wrapping. */
.app .shell .main h1 { font-size: 30px; line-height: 1.25; text-align: left; overflow-wrap: anywhere; }
.app .shell .main h2 { font-size: 22px; line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
.app .shell .main h3 { font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.page-head { align-items: flex-start; }
.page-head > div, .topbar > div { min-width: 0; }
.page-head p, .ui2b4-intro-copy p, .ui2b6-finance-copy p,
.topbar p, .ui2b7-page-intro p { text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
.ui2b4-intro-copy, .ui2b6-finance-copy { text-align: left; }
.app .main td.num, .app .main th.num { text-align: right; font-variant-numeric: tabular-nums; }
.modal-card, .verified-opportunity-drawer { overscroll-behavior: contain; }
.modal-backdrop { z-index: 90; }
.modal-card:focus, .verified-opportunity-drawer:focus { outline: 2px solid var(--sx-border-default); outline-offset: -2px; }
.modal-close, .modal-close-corner { min-width: 44px; min-height: 44px; }
[inert] { pointer-events: none; }
#page-title { scroll-margin-top: 84px; }
@media (max-width: 900px) {
  .app .shell .main h1 { font-size: 26px; }
  .app .shell .main h2 { font-size: 20px; }
  .app .shell .main h3 { font-size: 17px; }
  .app-topbar { height: auto; flex-wrap: wrap; }
  .topbar:not(.app-topbar) { gap: 12px; }
}
