:root {
  --bg: #f2f3f5;
  --bg-soft: #f7f8fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-muted: #f7f8fa;
  --ink: #1d2129;
  --muted: #86909c;
  --line: #e5e6eb;
  --line-strong: #c9cdd4;
  --brand: #165dff;
  --brand-strong: #0e42d2;
  --brand-soft: #e8f3ff;
  --accent: #ff7d00;
  --accent-soft: #fff7e8;
  --danger: #f53f3f;
  --danger-soft: #ffece8;
  --success: #00b42a;
  --success-soft: #e8ffea;
  --warning: #ff7d00;
  --warning-soft: #fff7e8;
  --shadow-sm: 0 4px 12px rgba(29, 33, 41, 0.04);
  --shadow-md: 0 8px 24px rgba(29, 33, 41, 0.06);
  --shadow-lg: 0 18px 48px rgba(29, 33, 41, 0.14);
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --font-display: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.mapping-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}

.mapping-create-details {
  display: grid;
  gap: 16px;
}

.mapping-create-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.mapping-create-summary::-webkit-details-marker {
  display: none;
}

.mapping-create-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.4fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.product-mapping-actions {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.product-mapping-table-wrap {
  max-height: calc(100vh - 300px);
  min-height: 520px;
  overflow: auto;
}

.product-mapping-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-muted);
}

.product-mapping-table th:first-child,
.product-mapping-table td:first-child {
  width: 30%;
}

.product-mapping-table th:nth-child(2),
.product-mapping-table td:nth-child(2) {
  width: 30%;
}

.product-mapping-table th:nth-child(3),
.product-mapping-table td:nth-child(3) {
  width: 40%;
  min-width: 420px;
}

.product-mapping-suggestion-list,
.product-mapping-multiselect {
  display: grid;
  gap: 8px;
}

.product-mapping-multiselect {
  max-height: 220px;
  overflow: auto;
  padding-right: 6px;
}

.product-mapping-suggestion {
  display: grid;
  gap: 4px;
}

.product-mapping-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-muted);
}

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

.product-mapping-check strong,
.product-mapping-check small {
  display: block;
}

.product-mapping-check small {
  color: var(--muted);
  font-size: 0.76rem;
}

.product-mapping-check em {
  align-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}

.product-mapping-unmatched-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-map-multi {
  position: relative;
  display: grid;
  gap: 10px;
}

.product-map-target {
  display: grid;
  gap: 10px;
  min-width: 280px;
}

.product-map-target-current {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-muted);
}

.product-map-target-current strong,
.product-map-target-current span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-map-target-current span {
  color: var(--muted);
  font-size: 0.78rem;
}

.danger-link-button {
  display: inline-flex;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--danger);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.danger-link-button:hover {
  text-decoration: underline;
}

.hidden-form {
  display: none;
}

.product-map-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-muted);
}

.product-map-placeholder {
  color: var(--muted);
  font-size: 0.82rem;
}

.product-map-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.product-map-tag strong {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-map-tag button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 999px;
  background: rgba(22, 93, 255, 0.16);
  color: var(--brand);
  cursor: pointer;
  font-weight: 950;
  line-height: 1;
}

.product-map-search-wrap {
  position: relative;
}

.product-map-search-wrap .product-map-suggestions {
  left: 0;
  right: auto;
  width: min(860px, 78vw);
  max-height: 360px;
  overflow: auto;
}

.product-map-option {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.product-map-option:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.product-map-option-title {
  min-width: 0;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.product-map-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.product-map-option-meta b {
  color: var(--accent);
  font-weight: 850;
}

.product-map-option-meta small {
  color: var(--muted);
}

@media (max-width: 900px) {
  .mapping-filter-form {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  background: var(--bg);
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

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

img {
  max-width: 100%;
}

.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  transition: grid-template-columns 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-sidebar-collapsed .shell {
  grid-template-columns: 88px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--ink);
  background: #ffffff;
  border-right: 1px solid var(--line);
  transition: padding 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-copy {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, max-width 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #4080ff, #165dff);
  box-shadow: 0 8px 18px rgba(22, 93, 255, 0.24);
}

.brand h1,
.page-head h2,
.panel h3,
.chart-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand h1 {
  color: var(--ink);
  font-size: 1.05rem;
}

.brand-label,
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.brand-label {
  color: var(--muted);
}

.sidebar-toggle {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.sidebar-toggle:hover {
  color: var(--brand);
  border-color: rgba(22, 93, 255, 0.28);
  background: var(--brand-soft);
}

.sidebar-toggle-icon {
  font-size: 1.35rem;
  line-height: 1;
  transform: translateY(-1px);
}

.eyebrow {
  color: var(--brand);
  font-weight: 700;
}

.sidebar .eyebrow {
  color: var(--muted);
}

.language-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 220px;
  max-height: 42px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, max-width 260ms cubic-bezier(0.22, 1, 0.36, 1), max-height 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.language-switcher-login {
  margin-bottom: 8px;
}

.language-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.86rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.content .language-pill,
.login-card .language-pill {
  border-color: var(--line);
  background: var(--panel-muted);
  color: var(--muted);
}

.language-pill:hover {
  transform: translateY(-1px);
  color: var(--brand);
  border-color: rgba(22, 93, 255, 0.32);
}

.language-pill-active {
  color: #ffffff;
  background: var(--brand);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(22, 93, 255, 0.2);
}

.content .language-pill-active,
.login-card .language-pill-active {
  color: #ffffff;
}

.login-card .language-pill-active {
  background: #60a5fa;
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 10px 22px rgba(96, 165, 250, 0.26);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link,
.link-button,
.ghost-button,
.primary-button,
.text-link {
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  color: #4e5969;
  font-family: var(--font-display);
  font-size: 0.96rem;
}

.nav-link-label {
  display: inline-block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, max-width 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-link-active {
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(22, 93, 255, 0.12);
  box-shadow: none;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-radius: 10px;
  background: var(--panel-muted);
  border: 1px solid var(--line);
}

.sidebar-user {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 180ms ease, max-width 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar .link-button {
  color: var(--brand);
}

.portal-sidebar-collapsed .sidebar {
  align-items: center;
  padding: 20px 12px;
}

.portal-sidebar-collapsed .brand {
  flex-direction: column;
  gap: 10px;
}

.portal-sidebar-collapsed .brand-copy,
.portal-sidebar-collapsed .language-switcher,
.portal-sidebar-collapsed .nav-link-label,
.portal-sidebar-collapsed .sidebar-user,
.portal-sidebar-collapsed .sidebar-footer form {
  max-width: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-8px);
}

.portal-sidebar-collapsed .sidebar-toggle {
  margin-left: 0;
  transform: rotate(180deg);
}

.portal-sidebar-collapsed .nav {
  width: 100%;
  align-items: center;
}

.portal-sidebar-collapsed .nav-link {
  width: 44px;
  justify-content: center;
  padding: 0;
}

.portal-sidebar-collapsed .nav-link::before {
  content: attr(data-short);
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.portal-sidebar-collapsed .sidebar-footer {
  width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
}

.portal-sidebar-collapsed .sidebar-footer::before {
  content: "U";
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 800;
}

.content {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: 22px 24px 32px;
}

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

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 16px 20px;
  margin: -22px -24px 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.app-topbar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.2rem + 0.65vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-topbar-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-topbar-copy {
  max-width: 860px;
  margin: 10px 0 0;
}

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

.app-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
}

.page-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.page-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, #165dff, #00b2ff);
}

.page-head-compact {
  padding: 16px 20px;
  margin-top: 4px;
}

.page-head-compact h3 {
  margin: 0;
  font-size: 1.22rem;
}

.page-head h2 {
  font-size: clamp(1.55rem, 1.9vw, 2rem);
}

.muted {
  color: var(--muted);
}

.tiny-text {
  font-size: 0.8rem;
}

.messages {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.message {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.message-success {
  border-color: rgba(21, 128, 61, 0.24);
  background: var(--success-soft);
}

.message-warning {
  border-color: rgba(180, 83, 9, 0.24);
  background: var(--warning-soft);
}

.message-error {
  border-color: rgba(194, 65, 12, 0.24);
  background: var(--danger-soft);
}

.kpi-grid,
.card-grid,
.split-layout,
.stack,
.source-card {
  display: grid;
  gap: 18px;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 16px;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  margin-bottom: 22px;
}

.split-layout {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.kpi-card,
.panel,
.chart-panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.kpi-card::before,
.panel::before,
.chart-panel::before {
  display: none;
}

.kpi-card {
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.84rem;
}

.kpi-card strong {
  display: block;
  font-size: 1.72rem;
  line-height: 1.1;
  font-family: var(--font-display);
  color: var(--ink);
}

.kpi-card::after {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand);
  opacity: 0.72;
}

.accent-card {
  background: linear-gradient(180deg, #ffffff, #fffaf2);
  border-color: #ffe4ba;
}

.panel,
.chart-panel {
  padding: 20px;
  margin-bottom: 16px;
}

.chart-canvas {
  width: 100%;
  min-height: 320px;
}

.chart-canvas-tall {
  min-height: 380px;
}

.chart-canvas-xl {
  min-height: 560px;
}

.panel-tight {
  padding: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

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

.panel-footer-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}

.control-deck {
  display: grid;
  gap: 18px;
}

.control-deck-head h3 {
  margin-bottom: 8px;
}

.control-deck-head .muted {
  max-width: 920px;
}

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

.filter-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.filter-field label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.arco-filter-mount {
  grid-column: 1 / -1;
  width: 100%;
}

.arco-filter-shell {
  display: grid;
  gap: 16px;
  width: 100%;
}

.arco-filter-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

.arco-filter-item {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.arco-filter-control {
  width: 100%;
  min-width: 0;
}

.arco-filter-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.arco-filter-checkbox {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 4px;
}

.arco-filter-inline-action {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 80px;
}

.arco-filter-submit {
  justify-content: flex-end;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.arco-filter-mount .arco-filter-control.arco-input,
.arco-filter-mount .arco-filter-control.arco-input-inner-wrapper,
.arco-filter-mount .arco-filter-control.arco-select,
.arco-filter-mount .arco-filter-control.arco-picker,
.arco-filter-mount .arco-filter-control .arco-select-view {
  width: 100%;
  min-width: 0;
}

.arco-filter-mount .arco-filter-control.arco-input,
.arco-filter-mount .arco-filter-control.arco-input-inner-wrapper,
.arco-filter-mount .arco-filter-control.arco-picker,
.arco-filter-mount .arco-filter-control .arco-select-view {
  height: 52px;
  min-height: 52px;
  border-radius: 14px;
  border-color: #d6e0ef;
  background: #fff;
  box-sizing: border-box;
}

.arco-filter-mount .arco-filter-control .arco-select-view-single {
  line-height: 50px;
}

.arco-filter-mount .arco-filter-control .arco-select-view-multiple {
  height: auto;
  min-height: 52px;
  padding-top: 7px;
  padding-bottom: 7px;
  align-items: center;
}

.arco-filter-mount .arco-filter-control .arco-select-view-multiple .arco-select-view-value {
  min-height: 34px;
  align-items: center;
}

.arco-filter-mount .arco-filter-control .arco-select-view-multiple .arco-select-view-tag {
  max-width: 180px;
}

.arco-filter-mount .arco-filter-control .arco-select-view-value,
.arco-filter-mount .arco-filter-control .arco-select-view-input,
.arco-filter-mount .arco-filter-control .arco-picker-input input,
.arco-filter-mount .arco-filter-control.arco-input,
.arco-filter-mount .arco-filter-control.arco-input-inner-wrapper input {
  font-size: 0.98rem;
  color: var(--ink);
}

.arco-filter-mount .arco-filter-control .arco-select-view:hover,
.arco-filter-mount .arco-filter-control.arco-picker:hover,
.arco-filter-mount .arco-filter-control.arco-input:hover,
.arco-filter-mount .arco-filter-control.arco-input-inner-wrapper:hover {
  border-color: var(--brand);
}

.arco-filter-mount .arco-filter-action-button.arco-btn-primary {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--brand), #0e7490);
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.18);
}

form[data-arco-enhanced="true"] .arco-original-field,
form[data-arco-enhanced="true"] .arco-original-submit,
form[data-arco-enhanced="true"] .filter-actions {
  display: none !important;
}

form[data-arco-enhanced="true"].filter-grid-dashboard,
form[data-arco-enhanced="true"].filter-grid,
form[data-arco-enhanced="true"].stack {
  display: grid;
  grid-template-columns: 1fr;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-strip-secondary {
  margin-top: -6px;
}

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

.tab-grid-secondary {
  margin-top: -2px;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.92rem;
  box-shadow: none;
}

.tab-link:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.tab-link-active {
  color: #ffffff;
  border-color: transparent;
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(22, 93, 255, 0.18);
}

.inline-note {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid #bedaff;
  background: var(--brand-soft);
  margin-bottom: 18px;
}

.workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.decision-context-intro {
  display: grid;
  gap: 8px;
}

.decision-context-title {
  margin: 0;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.4rem);
}

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

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

.chip-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.summary-pills {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-pills form {
  margin: 0;
}

.chip-soft,
.chip-outline,
.chip-accent {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
}

.chip-soft {
  color: var(--brand);
  background: var(--brand-soft);
}

.chip-outline {
  color: var(--muted);
  border: 1px solid rgba(196, 210, 227, 0.92);
  background: rgba(255, 255, 255, 0.7);
}

.chip-accent {
  color: #9a3412;
  background: rgba(249, 115, 22, 0.14);
}

.decision-context-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.8fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.decision-context-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.decision-context-card-primary {
  background: linear-gradient(135deg, var(--brand-soft), #ffffff);
  border-color: rgba(22, 93, 255, 0.18);
}

.decision-context-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-context-card strong {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.tab-link-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  white-space: normal;
}

.tab-link-label {
  min-width: 0;
  line-height: 1.35;
}

.tab-link-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.tab-link-metric.tab-link-active .tab-link-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tab-link-distributor {
  display: grid;
  gap: 4px;
  align-items: flex-start;
  min-height: 66px;
  padding: 13px 15px;
  border-radius: var(--radius-lg);
  white-space: normal;
}

.tab-link-distributor .tab-link-label {
  font-size: 1rem;
  font-weight: 700;
}

.operations-context-panel .tab-link-distributor {
  background: #ffffff;
}

.operations-context-panel .tab-link-distributor:hover {
  border-color: rgba(22, 93, 255, 0.28);
  background: #ffffff;
}

.operations-context-panel .tab-link-distributor.tab-link-active {
  background: var(--brand);
}

.operations-context-panel .tab-link-metric {
  box-shadow: var(--shadow-sm);
}

.tab-link-meta {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
}

.tab-link-distributor.tab-link-active .tab-link-meta {
  color: rgba(255, 255, 255, 0.82);
}

.section-stack {
  display: grid;
  gap: 22px;
}

.surface-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.summary-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.summary-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.summary-card p {
  margin: 0;
}

.priority-card {
  display: grid;
  gap: 12px;
  border-left: 3px solid var(--brand);
}

.priority-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.priority-card-high {
  border-color: #ffd0cc;
  border-left-color: var(--danger);
  background: linear-gradient(180deg, #ffffff, #fff7f5);
}

.priority-card-medium {
  border-color: #ffe4ba;
  border-left-color: var(--warning);
  background: linear-gradient(180deg, #ffffff, #fffaf2);
}

.priority-card-low {
  border-color: #bedaff;
  border-left-color: var(--brand);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.insight-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
}

.dashboard-hero-grid,
.priority-grid {
  display: grid;
  gap: 18px;
}

.dashboard-hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.priority-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.attention-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.attention-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.attention-card-list {
  display: grid;
  gap: 12px;
}

.action-list {
  display: grid;
  gap: 12px;
}

.action-list a {
  display: block;
}

.metric-list {
  display: grid;
  gap: 12px;
}

.metric-row {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--panel-muted);
  border: 1px solid var(--line);
}

.metric-row-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--font-display);
}

.metric-row-value {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel .panel-header {
  padding: 22px 22px 0;
}

.table-panel-body {
  padding: 0 22px 22px;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.table-toolbar p {
  margin: 0;
}

.table-toolbar-copy {
  max-width: 760px;
  display: grid;
  gap: 6px;
}

.table-toolbar-copy strong {
  font-family: var(--font-display);
  font-size: 0.96rem;
}

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

.inline-note strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.checkbox-inline,
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-inline {
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.checkbox-inline input {
  width: auto;
}

.compact-input {
  width: 96px;
  min-width: 0;
  padding: 9px 10px;
}

.compact-button {
  padding: 10px 14px;
  white-space: nowrap;
}

.quote-picker {
  margin-top: 10px;
  padding-top: 8px;
}

.quote-picker summary {
  cursor: pointer;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
}

.quote-picker-form {
  margin-top: 10px;
}

.operations-hero h2 {
  max-width: 920px;
}

.operations-filter-panel {
  padding: 18px 20px;
}

.operations-filter-panel .control-deck-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.operations-filter-panel .filter-grid-dashboard {
  align-items: end;
  padding-top: 4px;
}

.operations-filter-panel .filter-actions {
  min-height: 54px;
}

.operations-workspace {
  display: grid;
  gap: 16px;
}

.operations-context-panel {
  padding: 18px;
}

.operations-context-panel .decision-context-grid {
  margin: 14px 0 16px;
}

.operations-context-panel .tab-strip {
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.operations-context-panel .tab-grid {
  margin-bottom: 0;
}

.operations-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.operations-kpi-grid .kpi-card {
  min-height: 116px;
}

.operations-kpi-grid .accent-card {
  border-color: rgba(255, 125, 0, 0.28);
}

.operations-insight-grid .chart-panel,
.operations-insight-grid .panel {
  margin-bottom: 0;
}

.operations-table-panel {
  overflow: hidden;
}

.operations-table-panel .panel-header {
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  border-bottom: 1px solid var(--line);
}

.operations-table-panel .table-toolbar {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.operations-table-panel .table-wrap {
  max-height: min(72vh, 780px);
}

.operations-table-panel table {
  min-width: 1520px;
}

.operations-table-panel .operations-detail-table {
  table-layout: fixed;
}

.operations-col-sku {
  width: 210px;
}

.operations-col-product {
  width: 260px;
}

.operations-col-series {
  width: 92px;
}

.operations-col-metric {
  width: 72px;
}

.operations-col-coefficient {
  width: 58px;
}

.operations-col-price {
  width: 168px;
}

.operations-col-target-dos {
  width: 112px;
}

.operations-col-backorder {
  width: 86px;
}

.operations-col-suggested {
  width: 82px;
}

.operations-col-amount {
  width: 110px;
}

.operations-table-panel tbody td:first-child,
.operations-table-panel thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.operations-table-panel thead th:first-child {
  z-index: 3;
  background: #f7f8fa;
}

.operations-table-panel tbody td:first-child {
  max-width: 210px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.operations-table-panel td:nth-child(2),
.operations-table-panel th:nth-child(2) {
  min-width: 260px;
}

.operations-table-panel td:nth-child(4),
.operations-table-panel td:nth-child(5),
.operations-table-panel td:nth-child(9),
.operations-table-panel td:nth-child(10),
.operations-table-panel td:nth-child(11),
.operations-table-panel td:nth-child(12),
.operations-table-panel th:nth-child(4),
.operations-table-panel th:nth-child(5),
.operations-table-panel th:nth-child(9),
.operations-table-panel th:nth-child(10),
.operations-table-panel th:nth-child(11),
.operations-table-panel th:nth-child(12) {
  text-align: right;
}

.operations-table-panel .compact-input {
  height: 32px;
}

.operations-table-panel td:nth-child(9) .compact-input {
  width: 76px;
  min-width: 76px;
}

.inventory-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88));
}

.inventory-context-panel .tab-strip {
  margin-top: 18px;
}

.inventory-mode-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(22, 93, 255, 0.14);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(22, 93, 255, 0.08), rgba(255, 255, 255, 0.88)),
    #fff;
}

.inventory-mode-card h3 {
  margin: 0 0 4px;
}

.inventory-mode-card p {
  margin-bottom: 0;
}

.inventory-mode-form {
  display: grid;
  grid-template-columns: minmax(240px, 340px) auto;
  align-items: end;
  gap: 10px;
  min-width: min(100%, 470px);
}

.inventory-mode-form .field-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-mode-select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

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

.inventory-table-panel td:nth-child(2),
.inventory-table-panel th:nth-child(2) {
  min-width: 260px;
}

.inventory-table-panel td:nth-child(6),
.inventory-table-panel th:nth-child(6) {
  min-width: 120px;
}

.inventory-table-panel td:nth-child(7),
.inventory-table-panel th:nth-child(7) {
  min-width: 120px;
}

.inventory-table-panel td:nth-child(8),
.inventory-table-panel th:nth-child(8) {
  min-width: 240px;
}

.inventory-table-panel td:nth-child(9),
.inventory-table-panel th:nth-child(9) {
  min-width: 320px;
}

.inventory-table-panel td:last-child,
.inventory-table-panel th:last-child {
  min-width: 130px;
  text-align: right;
}

.inventory-inline-edit {
  display: inline-flex;
  margin-left: 8px;
  font-size: 12px;
}

.inventory-modal {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.16s ease;
  z-index: 80;
}

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

.inventory-modal-open {
  opacity: 1;
  pointer-events: auto;
}

.inventory-modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
  border: 0;
  cursor: pointer;
  inset: 0;
  position: absolute;
}

.inventory-modal-panel {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  left: 50%;
  max-height: min(82vh, 760px);
  max-width: 980px;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -46%);
  transition: transform 0.18s ease;
  width: min(92vw, 980px);
}

.inventory-modal-panel-wide {
  height: min(88vh, 840px);
  max-width: 1320px;
  width: min(96vw, 1320px);
}

.inventory-modal-panel > form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  min-height: 0;
}

.inventory-modal-panel-wide > form {
  height: 100%;
}

.inventory-modal-open .inventory-modal-panel {
  transform: translate(-50%, -50%);
}

.inventory-modal-head,
.inventory-modal-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
}

.inventory-modal-head {
  border-bottom: 1px solid var(--line);
}

.inventory-modal-head h3 {
  margin: 4px 0 8px;
}

.inventory-modal-body {
  display: grid;
  gap: 16px;
  max-height: 56vh;
  overflow: auto;
  padding: 20px 24px;
}

.inventory-bulk-modal-body {
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

.inventory-modal-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
  justify-content: flex-end;
  position: relative;
  z-index: 12;
}

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

.manual-quote-grid p {
  margin: 0;
}

.manual-quote-grid label,
.inventory-product-combobox .field-label {
  display: block;
  margin-bottom: 6px;
}

.inventory-bulk-table-wrap {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 14px;
}

.inventory-adjust-table-wrap {
  overflow: visible;
}

.inventory-adjust-table {
  border-collapse: separate;
  border-spacing: 0 10px;
  width: 100%;
}

.inventory-adjust-table th {
  color: var(--muted);
  font-size: 12px;
  padding: 0 10px;
  text-align: left;
}

.inventory-adjust-table td {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}

.inventory-adjust-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 14px 0 0 14px;
  min-width: 440px;
}

.inventory-adjust-table td:last-child {
  border-radius: 0 14px 14px 0;
  border-right: 1px solid var(--line);
  text-align: right;
}

.inventory-bulk-replace-table {
  min-width: 1180px;
}

.inventory-detail-search {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.inventory-detail-search .compact-input {
  min-height: 38px;
}

.inventory-bulk-replace-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.inventory-bulk-replace-table th:first-child,
.inventory-bulk-replace-table td:first-child {
  min-width: 72px;
  text-align: center;
}

.inventory-bulk-replace-table th:nth-child(2),
.inventory-bulk-replace-table td:nth-child(2) {
  min-width: 280px;
}

.inventory-bulk-replace-table th:nth-child(5),
.inventory-bulk-replace-table td:nth-child(5) {
  min-width: 520px;
}

.inventory-bulk-replace-table th:nth-child(6),
.inventory-bulk-replace-table td:nth-child(6) {
  min-width: 160px;
}

.inventory-product-combobox {
  position: relative;
}

.inventory-product-search {
  width: 100%;
}

.inventory-product-suggestions {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  display: none;
  left: 0;
  max-height: 320px;
  min-width: min(760px, calc(92vw - 96px));
  overflow: auto;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 95;
}

.inventory-bulk-combobox .inventory-product-suggestions {
  max-width: min(1080px, calc(96vw - 160px));
  min-width: min(900px, calc(96vw - 160px));
  margin-top: 8px;
  position: static;
  resize: horizontal;
}

.inventory-product-suggestions-open {
  display: grid;
  gap: 6px;
}

.inventory-product-option {
  align-items: start;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(320px, 1fr) 80px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.inventory-product-option:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.inventory-product-option-sku {
  color: var(--accent);
  font-weight: 800;
}

.inventory-product-option-name {
  line-height: 1.35;
  min-width: 0;
  white-space: normal;
}

.inventory-product-option-price {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.inventory-product-empty {
  color: var(--muted);
  padding: 12px;
}

.activation-hero h2 {
  max-width: 920px;
}

.activation-filter-panel {
  padding: 18px 20px;
}

.activation-filter-panel .filter-grid {
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.activation-filter-panel form p {
  margin: 0;
}

.activation-filter-panel button[type="submit"] {
  align-self: end;
}

.activation-workspace {
  display: grid;
  gap: 16px;
}

.activation-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.activation-kpi-grid .kpi-card {
  min-height: 118px;
}

.activation-kpi-grid .kpi-card:nth-child(2) {
  border-color: rgba(22, 93, 255, 0.28);
  background: linear-gradient(135deg, #ffffff, var(--brand-soft));
}

.activation-kpi-grid .kpi-card:nth-child(3) {
  border-color: rgba(0, 180, 42, 0.2);
  background: linear-gradient(135deg, #ffffff, var(--success-soft));
}

.activation-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.activation-filter-toolbar h3 {
  margin: 4px 0 8px;
}

.activation-filter-toolbar .chip-row {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.activation-kpi-card {
  display: grid;
  gap: 14px;
  min-height: 178px;
}

.activation-kpi-main {
  display: grid;
  gap: 4px;
}

.activation-kpi-main small {
  font-size: 0.82rem;
}

.activation-kpi-compare-list {
  display: grid;
  gap: 8px;
}

.activation-kpi-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(229, 235, 245, 0.9);
}

.activation-kpi-compare span {
  color: var(--muted);
  font-size: 0.78rem;
  min-width: 0;
}

.activation-kpi-compare strong {
  font-size: 0.86rem;
  color: var(--ink);
  white-space: nowrap;
}

.activation-kpi-compare em {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.activation-kpi-compare-up em {
  color: #b42318;
  background: #fff0ef;
}

.activation-kpi-compare-down em {
  color: #067647;
  background: #e7f8ef;
}

.activation-kpi-compare-flat em {
  color: #4e5969;
  background: #f2f3f5;
}

.activation-health-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.activation-health-grid > .panel {
  margin-bottom: 0;
}

.activation-health-grid .summary-card {
  margin-bottom: 14px;
  border-left: 3px solid var(--brand);
}

.activation-health-grid .metric-row {
  background: #ffffff;
}

.activation-matrix-panel {
  overflow: hidden;
}

.activation-matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.activation-matrix-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

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

.activation-monthly-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.activation-monthly-tab {
  min-height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.activation-monthly-tab-active {
  background: #165dff;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(22, 93, 255, 0.22);
}

.activation-month-product-wrap,
.activation-week-product-wrap {
  max-height: 620px;
}

.activation-matrix-card.activation-monthly-fullscreen {
  position: fixed;
  inset: 18px;
  z-index: 120;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
}

.activation-matrix-card.activation-monthly-fullscreen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 23, 42, 0.34);
}

.activation-matrix-card.activation-monthly-fullscreen .activation-month-product-wrap {
  width: 100%;
  max-height: calc(100vh - 150px);
}

.activation-matrix-card.activation-monthly-fullscreen .activation-matrix-table {
  min-width: 1120px;
}

.activation-matrix-table {
  min-width: 860px;
}

.activation-matrix-table th:first-child,
.activation-matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 150px;
  background: #ffffff;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.45);
}

.activation-matrix-table th:nth-child(2),
.activation-matrix-table td:nth-child(2) {
  min-width: 150px;
}

.activation-matrix-table thead th:first-child {
  z-index: 6;
  background: #f7f8fa;
}

.activation-matrix-table td:nth-child(n + 3),
.activation-matrix-table th:nth-child(n + 3) {
  text-align: right;
}

.activation-matrix-total-row {
  background: linear-gradient(90deg, rgba(22, 93, 255, 0.08), rgba(20, 184, 166, 0.05)) !important;
  font-weight: 800;
}

.activation-matrix-total-row td:first-child {
  background: #eef6ff;
}

.activation-line-cell:empty::after {
  content: "";
  display: block;
  min-height: 1em;
}

.activation-series-child {
  color: #475569;
  padding-left: 24px !important;
}

.activation-series-child::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: rgba(100, 116, 139, 0.42);
}

.activation-month-select {
  min-height: 0;
  padding: 0;
  font-size: inherit;
  color: var(--ink);
}

.activation-month-select-active {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.activation-heat-cell {
  min-width: 96px;
  font-variant-numeric: tabular-nums;
}

.activation-heat-0 {
  background: #ffffff;
}

.activation-heat-1 {
  background: #edf6ff;
}

.activation-heat-2 {
  background: #d8ecff;
}

.activation-heat-3 {
  background: #a9d5ff;
}

.activation-heat-4 {
  background: #5facf3;
  color: #ffffff;
}

.activation-heat-5 {
  background: #1683d8;
  color: #ffffff;
}

.activation-heat-4 .period-change,
.activation-heat-5 .period-change,
.activation-heat-4 .period-value,
.activation-heat-5 .period-value {
  color: #ffffff;
}

.activation-chart-panel {
  margin-bottom: 0;
}

.activation-chart-panel .panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.activation-table-panel {
  overflow: hidden;
}

.activation-table-panel .panel-header {
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  border-bottom: 1px solid var(--line);
}

.activation-table-panel .table-toolbar {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.activation-current-period-controls {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: min(360px, 100%);
}

.current-period-month-form {
  display: grid;
  gap: 8px;
  min-width: 330px;
  padding: 12px;
  border: 1px solid rgba(22, 93, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.current-period-month-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-period-month-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.current-period-month-row input[type="month"] {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.activation-table-panel .table-wrap {
  max-height: min(70vh, 760px);
}

.activation-monthly-split {
  display: grid !important;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  gap: 18px;
  align-items: stretch;
}

.activation-monthly-split > * {
  min-width: 0;
}

.activation-monthly-detail-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
}

.activation-monthly-detail-wrap table {
  min-width: 560px;
}

.activation-month-distributor-wrap {
  --activation-distributor-header-row-height: 44px;
  max-height: min(70vh, 760px);
  overflow: auto;
}

.activation-distributor-monthly-table {
  min-width: 0;
  max-width: none;
  table-layout: fixed !important;
}

.activation-distributor-col-line,
.activation-distributor-col-series {
  width: auto;
}

.activation-distributor-col-total {
  width: 110px;
}

.activation-distributor-col-month {
  width: 120px;
}

.activation-distributor-monthly-table .activation-distributor-leading-cell,
.activation-distributor-monthly-table .activation-line-cell {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  text-align: left !important;
  box-sizing: border-box;
}

.activation-distributor-monthly-table th:nth-child(2),
.activation-distributor-monthly-table td:nth-child(2) {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  text-align: left !important;
  box-sizing: border-box;
}

.activation-distributor-monthly-table .activation-distributor-total-cell {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  text-align: right !important;
  box-sizing: border-box;
}

.activation-distributor-monthly-table .activation-distributor-month-heading {
  width: 360px !important;
  min-width: 360px !important;
  max-width: 360px !important;
  text-align: center !important;
  box-sizing: border-box;
}

.activation-distributor-monthly-table .activation-distributor-value-cell {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  text-align: right !important;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.activation-distributor-monthly-table thead .activation-distributor-value-cell {
  text-align: center !important;
}

.activation-distributor-monthly-table thead th {
  position: sticky;
  z-index: 8;
  height: var(--activation-distributor-header-row-height);
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
  background: #f7f8fa;
  box-shadow: 0 1px 0 var(--line);
}

.activation-distributor-monthly-table thead tr:first-child th {
  top: 0;
  box-sizing: border-box;
}

.activation-distributor-monthly-table thead tr:nth-child(2) th {
  top: var(--activation-distributor-header-row-height);
}

.activation-distributor-monthly-table thead th[rowspan="2"] {
  z-index: 10;
}

.activation-distributor-monthly-table thead th:first-child,
.activation-distributor-monthly-table thead th:nth-child(2),
.activation-distributor-monthly-table thead th:nth-child(3) {
  background: #f7f8fa;
}

.activation-monthly-chart-wrap {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  padding: 12px 14px 6px;
}

.activation-structure-chart {
  width: 100%;
  height: 620px;
  min-height: 620px;
}

.activation-product-line-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.activation-product-line-chart-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 12px;
}

.activation-product-line-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.activation-product-line-chart-header h4 {
  margin: 2px 0 0;
  font-size: 14px;
}

.activation-product-line-chart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.activation-product-line-chart {
  width: 100%;
  height: 260px;
  min-height: 260px;
}

.chart-empty {
  display: grid;
  min-height: inherit;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 13px;
  background: #f8fafc;
  text-align: center;
  padding: 16px;
}

.activation-line-modal[hidden] {
  display: none;
}

.activation-line-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.activation-line-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.46);
  cursor: pointer;
}

.activation-line-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1680px, 96vw);
  height: min(920px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.26);
}

.activation-line-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.activation-line-modal-header h3 {
  margin: 2px 0 4px;
}

.activation-line-modal-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 52%) minmax(520px, 48%);
  gap: 0;
}

.activation-line-modal-chart-pane {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.activation-line-modal-chart {
  width: 100%;
  height: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.activation-line-modal-detail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #ffffff;
}

.activation-line-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.activation-line-detail-header h4 {
  margin: 2px 0 0;
}

.activation-line-month-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 440px;
}

.activation-line-month-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.activation-line-month-pill.is-active {
  border-color: #0f62fe;
  background: #0f62fe;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 98, 254, 0.24);
}

.activation-line-detail-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.activation-line-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.activation-line-detail-table td:not(:first-child),
.activation-line-detail-table th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.activation-current-split {
  display: grid;
  grid-template-columns: minmax(0, 62%) minmax(360px, 38%);
  gap: 18px;
  align-items: start;
}

.activation-current-split > * {
  min-width: 0;
}

.activation-line-summary-block {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.activation-line-summary-wrap table {
  min-width: 860px;
}

.activation-current-detail-wrap table {
  min-width: 800px;
}

.activation-line-summary-wrap td:nth-child(n + 2),
.activation-line-summary-wrap th:nth-child(n + 2),
.activation-current-period-table .activation-line-summary-wrap td:nth-child(n + 2),
.activation-current-period-table .activation-line-summary-wrap th:nth-child(n + 2),
.activation-current-period-table td:nth-child(2),
.activation-current-period-table td:nth-child(3),
.activation-current-period-table td:nth-child(4),
.activation-current-period-table td:nth-child(5),
.activation-current-period-table td:nth-child(6),
.activation-current-period-table th:nth-child(2),
.activation-current-period-table th:nth-child(3),
.activation-current-period-table th:nth-child(4),
.activation-current-period-table th:nth-child(5),
.activation-current-period-table th:nth-child(6) {
  text-align: right;
}

.activation-current-total-row {
  background: linear-gradient(90deg, rgba(22, 93, 255, 0.08), rgba(20, 184, 166, 0.05));
}

.activation-current-total-row td {
  font-weight: 700;
}

.period-value,
.period-compare {
  display: block;
}

.period-share {
  display: block;
}

.period-value {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}

.period-compare {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

.period-share {
  margin-top: 4px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
}

.period-change {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 5px;
  font-size: 0.76rem;
  font-weight: 800;
}

.period-change-up,
.status-up,
.activation-delta-up {
  color: var(--danger);
}

.period-change-down,
.status-down,
.activation-delta-down {
  color: var(--success);
}

.period-change-flat,
.status-flat,
.activation-delta-flat {
  color: var(--muted);
}

.activation-current-analysis {
  display: grid;
  gap: 14px;
}

.activation-analysis-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  padding: 14px;
}

.mini-section-header {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.mini-section-header h4 {
  margin: 0;
  font-size: 1rem;
}

.activation-distributor-delta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.activation-delta-card {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-muted);
}

.activation-delta-card strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.activation-series-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.activation-series-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(96px, 0.6fr) minmax(160px, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.activation-series-item strong,
.activation-series-item .tiny-text {
  display: block;
}

.activation-series-metric {
  text-align: right;
}

.activation-series-impact {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.activation-monthly-table td:nth-child(2),
.activation-monthly-table td:nth-child(3),
.activation-monthly-table td:nth-child(4),
.activation-monthly-table td:nth-child(5),
.activation-monthly-table td:nth-child(6),
.activation-monthly-table th:nth-child(2),
.activation-monthly-table th:nth-child(3),
.activation-monthly-table th:nth-child(4),
.activation-monthly-table th:nth-child(5),
.activation-monthly-table th:nth-child(6),
.activation-distributor-table td:nth-child(4),
.activation-distributor-table td:nth-child(5),
.activation-distributor-table th:nth-child(4),
.activation-distributor-table th:nth-child(5) {
  text-align: right;
}

.store-sales-filter-grid {
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(160px, 0.9fr)) auto;
}

.store-location-map-panel {
  overflow: hidden;
}

.store-location-map-panel .panel-header {
  align-items: flex-start;
  gap: 18px;
}

.store-location-map-kpi {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 150px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(22, 93, 255, 0.16);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.store-location-map-kpi span,
.store-location-map-kpi small {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--font-display);
}

.store-location-map-kpi strong {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.store-location-map-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  padding: 0 22px 22px;
}

.store-location-map {
  position: relative;
  height: clamp(620px, 66vh, 760px);
  min-height: 620px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(147, 197, 253, 0.42);
  --store-map-scale: 1;
  --store-map-pan-x: 0px;
  --store-map-pan-y: 0px;
  background:
    radial-gradient(circle at 48% 28%, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at 74% 76%, rgba(20, 184, 166, 0.14), transparent 24%),
    linear-gradient(145deg, #dff3ff 0%, #eefaff 44%, #dcf7f2 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.store-location-map::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 24px;
  background-image:
    linear-gradient(rgba(14, 116, 144, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 116, 144, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 92%);
  pointer-events: none;
}

.store-leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: inherit;
  background: #dff3ff;
}

.store-leaflet-map.leaflet-container {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.92), transparent 26%),
    radial-gradient(circle at 75% 72%, rgba(20, 184, 166, 0.16), transparent 24%),
    linear-gradient(145deg, #dff3ff 0%, #eefaff 44%, #dcf7f2 100%);
}

.store-leaflet-map .leaflet-overlay-pane svg {
  filter: drop-shadow(0 12px 18px rgba(15, 118, 110, 0.18));
}

.store-leaflet-map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.store-leaflet-map .leaflet-control-zoom a {
  width: 38px;
  height: 38px;
  border: none;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 38px;
}

.store-leaflet-map .leaflet-control-zoom a:hover {
  color: #ffffff;
  background: var(--brand);
}

.store-leaflet-marker-wrapper {
  background: transparent;
  border: none;
}

.store-leaflet-marker {
  display: grid;
  place-items: center;
  width: var(--marker-size);
  height: var(--marker-size);
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #f97316 42%, #dc2626 100%);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.store-leaflet-marker-rank {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #0e7490);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
}

.store-leaflet-map .leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.store-leaflet-map .leaflet-popup-content {
  margin: 12px 14px;
}

.store-map-popup {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.store-map-popup strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.store-map-popup span {
  color: var(--brand);
  font-weight: 800;
}

.store-map-popup small {
  color: var(--muted);
  line-height: 1.35;
}

.store-map-viewport {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.store-location-map.is-dragging .store-map-viewport {
  cursor: grabbing;
}

.store-location-map-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  height: min(calc(100% - 84px), 680px);
  aspect-ratio: 11.5 / 17.25;
  overflow: visible;
  transform:
    translate(
      calc(-50% + var(--store-map-pan-x)),
      calc(-50% + var(--store-map-pan-y))
    )
    scale(var(--store-map-scale));
  transform-origin: center center;
  transition: transform 180ms ease;
  will-change: transform;
}

.store-location-map.is-dragging .store-location-map-canvas {
  transition: none;
}

.store-map-controls {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.store-map-control {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(22, 93, 255, 0.15);
  border-radius: 999px;
  color: var(--brand);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.store-map-control:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #0e7490);
  box-shadow: 0 10px 24px rgba(22, 93, 255, 0.18);
}

.store-map-control-reset {
  min-width: 72px;
  font-size: 0.74rem;
}

.store-map-instruction {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 20;
  max-width: min(460px, calc(100% - 40px));
  padding: 9px 12px;
  border: 1px solid rgba(14, 116, 144, 0.15);
  border-radius: 999px;
  color: rgba(15, 82, 75, 0.78);
  background: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.ph-map-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.ph-map-land {
  fill: url("#ph-map-land-gradient");
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 0.42;
  vector-effect: non-scaling-stroke;
  filter: url("#ph-map-land-shadow");
}

.ph-map-land:nth-child(odd) {
  opacity: 0.94;
}

.ph-map-land:nth-child(even) {
  opacity: 0.84;
}

.ph-map-label {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  padding: 5px 9px;
  border-radius: 999px;
  color: rgba(15, 82, 75, 0.76);
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.08);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.store-map-callout-lines {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.store-map-callout-line {
  fill: none;
  stroke: rgba(14, 116, 144, 0.28);
  stroke-width: 0.34;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.store-map-callout-line-left {
  stroke: rgba(22, 93, 255, 0.28);
}

.store-map-callout-line-right {
  stroke: rgba(245, 101, 101, 0.26);
}

.store-map-callout-node {
  fill: #ffffff;
  stroke: #f97316;
  stroke-width: 0.34;
  vector-effect: non-scaling-stroke;
}

.store-map-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 6;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  min-width: 12px;
  min-height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.store-map-callout {
  position: absolute;
  left: var(--label-x);
  top: var(--label-y);
  z-index: 8;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: min(176px, 44%);
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.store-map-callout-left {
  transform: translateY(-50%);
}

.store-map-callout-right {
  transform: translate(-100%, -50%);
}

.store-map-callout-rank {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #0e7490);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
}

.store-map-callout strong,
.store-map-callout small {
  display: block;
  min-width: 0;
}

.store-map-callout strong {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-map-callout small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.25;
  white-space: nowrap;
}

.store-map-marker-dot {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: inherit;
  background: radial-gradient(circle at 35% 30%, #ffffff, #f97316 42%, #dc2626 100%);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.store-map-marker-label {
  position: absolute;
  left: calc(100% + 7px);
  top: 50%;
  display: none;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  text-align: left;
}

.store-map-marker-label strong,
.store-map-marker-label small {
  display: block;
  white-space: nowrap;
}

.store-map-marker-label strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.store-map-marker-label small {
  color: var(--muted);
  font-size: 0.72rem;
}

.store-map-marker:hover,
.store-map-marker:focus-visible {
  z-index: 10;
  outline: none;
}

.store-map-marker:hover .store-map-marker-label,
.store-map-marker:focus-visible .store-map-marker-label {
  display: block;
}

.store-location-empty {
  position: absolute;
  inset: 24px;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.store-location-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

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

.store-location-summary-grid article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.store-location-summary-grid span {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
}

.store-location-summary-grid strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.store-location-missing-list {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.store-location-rank-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.store-location-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.store-location-rank-head strong {
  font-family: var(--font-display);
}

.store-location-rank-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.store-location-rank-list article {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.store-location-rank-list article:first-of-type {
  border-top: 0;
}

.store-location-rank-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
}

.store-location-rank-list article strong,
.store-location-rank-list article small {
  display: block;
  min-width: 0;
}

.store-location-rank-list article strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 0.83rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-location-rank-list article small {
  color: var(--muted);
  font-size: 0.76rem;
}

.store-location-missing-list > strong {
  font-family: var(--font-display);
}

.store-location-missing-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.store-location-missing-list article:first-of-type {
  border-top: 0;
}

.store-location-missing-list span,
.store-location-missing-list small {
  display: block;
}

.store-location-missing-list span {
  font-weight: 700;
}

.store-location-missing-list small {
  color: var(--muted);
}

.store-location-missing-list article > strong {
  color: var(--brand);
  white-space: nowrap;
}

.store-sales-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.store-sales-chart-panel {
  min-height: 460px;
}

.weekly-sales-panel {
  overflow: hidden;
}

.weekly-sales-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.weekly-sales-detail,
.weekly-sales-visuals {
  min-width: 0;
}

.weekly-sales-detail {
  display: grid;
  gap: 12px;
  align-content: start;
  position: relative;
}

.weekly-sales-table-wrap {
  max-height: clamp(640px, 68vh, 780px);
  width: min(100%, 920px);
  overflow: auto;
}

.weekly-sales-table {
  min-width: max(860px, calc(220px + 6 * 148px));
}

.weekly-sales-table th:first-child,
.weekly-sales-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 220px;
  background: #ffffff;
  box-shadow: 12px 0 18px -18px rgba(15, 23, 42, 0.45);
  isolation: isolate;
}

.weekly-sales-table tbody tr:nth-child(even) td:first-child {
  background: #fbfcfd;
}

.weekly-sales-table tbody tr:hover td:first-child {
  background: var(--brand-soft);
}

.weekly-sales-table th:first-child::after,
.weekly-sales-table td:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 16px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.weekly-sales-table thead th:first-child {
  z-index: 7;
  background: #f7f8fa;
}

.weekly-sales-table thead th:first-child::after {
  background: linear-gradient(90deg, #f7f8fa, rgba(247, 248, 250, 0));
}

.weekly-sales-table td:nth-child(n + 2),
.weekly-sales-table th:nth-child(n + 2) {
  text-align: right;
}

.weekly-sales-cell {
  display: grid;
  gap: 6px;
  justify-items: end;
  min-width: 132px;
}

.weekly-sales-cell strong {
  font-family: var(--font-display);
  white-space: nowrap;
}

.weekly-sales-visuals {
  display: grid;
  grid-template-rows: minmax(360px, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.weekly-sales-chart-card {
  margin-bottom: 0;
  min-height: 0;
}

.weekly-sales-trend-canvas {
  min-height: 360px;
}

.weekly-sales-share-canvas {
  min-height: 300px;
}

.weekly-sales-empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #f8fbff;
}

.weekly-fullscreen-button {
  min-height: 34px;
  padding: 0 12px;
}

.weekly-sales-detail.weekly-detail-fullscreen {
  position: fixed;
  inset: 18px;
  z-index: 120;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
}

.weekly-sales-detail.weekly-detail-fullscreen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 23, 42, 0.34);
}

.weekly-sales-detail.weekly-detail-fullscreen .weekly-sales-table-wrap {
  width: 100%;
  max-height: calc(100vh - 130px);
}

.store-sales-top-panel {
  min-height: auto;
}

.store-sales-top-section {
  display: grid;
  gap: 16px;
}

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

.top-product-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(180px, auto);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.top-product-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
}

.top-product-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.top-product-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-product-metrics {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.top-product-metrics strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.top-product-metrics small {
  color: var(--brand);
  font-weight: 700;
}

.store-sales-top-matrix-wrap {
  max-height: min(70vh, 720px);
}

.store-sales-top-matrix-table {
  min-width: 1180px;
}

.store-sales-distributor-product-section {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.store-sales-distributor-product-panel {
  min-height: auto;
}

.store-product-tabs {
  padding: 0 18px 18px;
}

.store-product-tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.store-product-tab-labels {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.store-product-tab-labels label {
  min-width: 76px;
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: 0.16s ease;
}

#store-product-tab-all:checked ~ .store-product-tab-labels label[for="store-product-tab-all"],
#store-product-tab-agl:checked ~ .store-product-tab-labels label[for="store-product-tab-agl"],
#store-product-tab-uni:checked ~ .store-product-tab-labels label[for="store-product-tab-uni"],
#store-product-tab-cbt:checked ~ .store-product-tab-labels label[for="store-product-tab-cbt"],
#store-product-line-tab-all:checked ~ .store-product-tab-labels label[for="store-product-line-tab-all"],
#store-product-line-tab-agl:checked ~ .store-product-tab-labels label[for="store-product-line-tab-agl"],
#store-product-line-tab-uni:checked ~ .store-product-tab-labels label[for="store-product-line-tab-uni"],
#store-product-line-tab-cbt:checked ~ .store-product-tab-labels label[for="store-product-line-tab-cbt"] {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.store-product-tab-panel {
  display: none;
}

#store-product-tab-all:checked ~ .store-product-tab-panels .store-product-tab-panel-all,
#store-product-tab-agl:checked ~ .store-product-tab-panels .store-product-tab-panel-agl,
#store-product-tab-uni:checked ~ .store-product-tab-panels .store-product-tab-panel-uni,
#store-product-tab-cbt:checked ~ .store-product-tab-panels .store-product-tab-panel-cbt,
#store-product-line-tab-all:checked ~ .store-product-tab-panels .store-product-line-tab-panel-all,
#store-product-line-tab-agl:checked ~ .store-product-tab-panels .store-product-line-tab-panel-agl,
#store-product-line-tab-uni:checked ~ .store-product-tab-panels .store-product-line-tab-panel-uni,
#store-product-line-tab-cbt:checked ~ .store-product-tab-panels .store-product-line-tab-panel-cbt {
  display: block;
}

.store-sales-distributor-product-wrap {
  max-height: min(76vh, 760px);
}

.store-sales-distributor-product-table {
  min-width: 1260px;
}

.store-sales-distributor-product-table th:first-child,
.store-sales-distributor-product-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 340px;
  background: inherit;
}

.store-sales-distributor-product-table th:nth-child(2),
.store-sales-distributor-product-table td:nth-child(2) {
  position: sticky;
  left: 340px;
  z-index: 3;
  min-width: 260px;
  background: inherit;
  box-shadow: 12px 0 18px rgba(15, 23, 42, 0.06);
}

.store-sales-distributor-product-table thead th:first-child,
.store-sales-distributor-product-table thead th:nth-child(2) {
  z-index: 4;
  background: #f7f8fa;
}

.store-product-row-product {
  background: #eef6ff;
}

.store-product-row-product td {
  font-weight: 800;
}

.store-product-row-store td:first-child {
  background: #ffffff;
}

.store-product-store-name {
  display: inline-block;
  padding-left: 12px;
  color: var(--ink);
  font-weight: 700;
}

.store-product-trend-cell {
  min-width: 122px;
  justify-items: end;
}

.store-sales-top-matrix-table th:first-child,
.store-sales-top-matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 360px;
  background: inherit;
}

.store-sales-top-matrix-table thead th:first-child {
  z-index: 4;
  background: #f7f8fa;
}

.top-matrix-product {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.top-matrix-product strong {
  line-height: 1.35;
}

.top-matrix-cell {
  min-width: 124px;
  justify-items: end;
}

.top-matrix-cell > span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.top-matrix-summary {
  min-width: 140px;
}

.store-sales-matrix-wrap {
  max-height: min(72vh, 760px);
}

.store-sales-matrix-table {
  min-width: 1180px;
}

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

.store-sales-matrix-table th:nth-child(2),
.store-sales-matrix-table td:nth-child(2) {
  position: sticky;
  left: 120px;
  z-index: 3;
  background: inherit;
  min-width: 300px;
}

.store-sales-matrix-table thead th:first-child,
.store-sales-matrix-table thead th:nth-child(2) {
  z-index: 4;
  background: #f7f8fa;
}

.matrix-cell {
  display: grid;
  gap: 5px;
  justify-items: end;
  min-width: 88px;
}

.matrix-cell strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.change-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.change-up {
  color: #b91c1c;
  background: #fee2e2;
}

.change-down {
  color: #047857;
  background: #d1fae5;
}

.change-flat {
  color: #64748b;
  background: #f1f5f9;
}

.store-share-table td:nth-child(5),
.store-share-table td:nth-child(6),
.store-share-table td:nth-child(7),
.store-share-table th:nth-child(5),
.store-share-table th:nth-child(6),
.store-share-table th:nth-child(7),
.monthly-top-table td:nth-child(6),
.monthly-top-table td:nth-child(9),
.monthly-top-table td:nth-child(10),
.monthly-top-table td:nth-child(11),
.monthly-top-table th:nth-child(6),
.monthly-top-table th:nth-child(9),
.monthly-top-table th:nth-child(10),
.monthly-top-table th:nth-child(11),
.store-sales-matrix-table td:nth-child(n + 4),
.store-sales-matrix-table th:nth-child(n + 4) {
  text-align: right;
}

.store-monthly-analysis-wrap {
  max-height: 680px;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}

.store-monthly-analysis-table {
  min-width: 1320px;
}

.store-monthly-analysis-table th,
.store-monthly-analysis-table td {
  vertical-align: middle;
}

.store-monthly-analysis-table thead th {
  text-align: center;
}

.store-monthly-analysis-table thead th:first-child,
.store-monthly-analysis-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  background: #fff;
  box-shadow: 12px 0 20px rgba(148, 163, 184, 0.12);
}

.store-monthly-analysis-table thead th:first-child {
  z-index: 4;
  background: #f7f8fa;
  text-align: left;
}

.store-monthly-analysis-table tbody tr:nth-child(odd) td:first-child {
  background: #fbfdff;
}

.store-monthly-analysis-table td:not(:first-child) {
  text-align: right;
  min-width: 150px;
}

.store-monthly-store-cell {
  display: grid;
  gap: 7px;
}

.store-monthly-store-cell strong {
  font-family: var(--font-display);
  line-height: 1.35;
}

.store-month-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-month-tags span,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid #cfe3ff;
  border-radius: 8px;
  background: #f3f8ff;
  color: #165dff;
  font-size: 0.72rem;
  font-weight: 800;
}

.store-monthly-cell-button {
  display: grid;
  justify-items: end;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 6px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: right;
  cursor: pointer;
}

.store-monthly-cell-button:hover {
  background: transparent;
}

.store-monthly-cell-button strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.store-monthly-cell-button:hover strong {
  color: var(--brand);
}

.store-monthly-cell-button > span {
  color: var(--muted);
  font-size: 0.76rem;
}

.store-monthly-quantity-button {
  align-content: center;
  min-height: 44px;
}

.store-month-product-detail-table td:nth-child(n + 3),
.store-month-product-detail-table th:nth-child(n + 3) {
  text-align: right;
}

.store-product-detail-shell {
  padding-bottom: 10px;
}

.store-product-detail-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: end;
}

.store-product-detail-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.store-product-detail-filters input,
.store-product-detail-filters select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.store-product-detail-filters input:focus,
.store-product-detail-filters select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}

.store-product-detail-summary {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -14px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}

.store-product-detail-summary div {
  display: grid;
  gap: 4px;
}

.store-product-detail-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.store-product-detail-summary strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1rem;
}

@media (max-width: 760px) {
  .store-product-detail-filters,
  .store-product-detail-summary {
    grid-template-columns: 1fr;
  }
}

.activation-market-table table {
  min-width: 1120px;
}

.activation-market-table tbody td:first-child,
.activation-market-table thead th:first-child,
.activation-distributor-table tbody td:first-child,
.activation-distributor-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.activation-market-table thead th:first-child,
.activation-distributor-table thead th:first-child {
  z-index: 3;
  background: #f7f8fa;
}

.source-card-image {
  margin-bottom: 22px;
}

.upload-section-stack {
  display: grid;
  gap: 16px;
}

.upload-source-grid {
  align-items: stretch;
}

.source-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 3px solid transparent;
  align-content: start;
  overflow: hidden;
}

.source-card:hover:not(.source-card-loading) {
  border-color: rgba(22, 93, 255, 0.24);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.source-card-loading {
  pointer-events: none;
}

.source-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(20, 184, 166, 0.16), transparent 32%),
    rgba(248, 251, 255, 0.82);
  backdrop-filter: blur(8px);
}

.source-loading-card {
  width: min(100%, 360px);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  text-align: center;
}

.source-loading-card strong {
  font-family: var(--font-display);
  color: var(--ink);
}

.source-loading-card span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.source-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(20, 184, 166, 0.18);
  border-top-color: var(--brand);
  animation: portal-spin 0.75s linear infinite;
}

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

.source-card .panel-header {
  margin-bottom: 0;
}

.source-card .panel-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.08rem;
}

.source-card .panel-header h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.source-card > .muted {
  margin: 0;
}

.source-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0;
}

.source-card > .source-card-actions {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.source-card > .source-card-actions .inline-form {
  flex: 0 0 auto;
}

.source-card > .source-card-actions .compact-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.source-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.source-meta-grid div {
  min-height: 76px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #fbfcfd;
  border: 1px solid var(--line);
}

.source-meta-grid span,
.source-mini-card .tiny-text {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.source-meta-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.source-card .drawer-note {
  background: #fbfcfd;
}

.source-card .drawer-note strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.source-card .drawer-note strong::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: var(--brand);
}

.source-mini-card {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.source-mini-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.quote-search {
  max-width: 360px;
}

.quote-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-results {
  display: grid;
  gap: 10px;
}

.quote-result-card,
.quote-empty-state {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.quote-result-card {
  display: grid;
  gap: 4px;
  text-align: left;
}

.quote-result-card:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 93, 255, 0.3);
}

.quote-result-card-active {
  border-color: rgba(22, 93, 255, 0.45);
  background: var(--brand-soft);
}

.quote-result-price {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--brand);
}

.quote-result-sku {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.quote-result-name,
.quote-empty-state {
  font-size: 0.9rem;
}

.quote-select {
  width: min(100%, 52rem);
  max-width: 100%;
  min-width: min(36rem, 100%);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.quote-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.quote-option-preview {
  width: min(100%, 52rem);
  max-width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-muted);
}

.quote-option-preview strong {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.quote-option-preview-line {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
}

.quote-option-preview-line + .quote-option-preview-line {
  margin-top: 6px;
}

.quote-option-preview-line span {
  color: var(--muted);
}

.quote-option-preview-line b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.portal-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.portal-drawer-open {
  pointer-events: auto;
  opacity: 1;
}

.portal-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(29, 33, 41, 0.36);
  backdrop-filter: blur(4px);
}

.portal-drawer-panel {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  height: 100%;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: #ffffff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 44px rgba(29, 33, 41, 0.16);
  transform: translateX(28px);
  transition: transform 220ms ease;
  overflow: hidden;
}

.portal-drawer-loading .portal-drawer-body {
  pointer-events: none;
}

.portal-drawer-open .portal-drawer-panel {
  transform: translateX(0);
}

.portal-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.portal-drawer-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.portal-drawer-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.drawer-stack {
  display: grid;
  gap: 18px;
}

.drawer-meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.drawer-meta-grid article,
.drawer-note {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--panel-muted);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.drawer-meta-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.drawer-meta-grid strong {
  display: block;
  font-family: var(--font-display);
  overflow-wrap: anywhere;
}

.drawer-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drawer-note strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.drawer-note p {
  margin: 0;
}

.drawer-error-list {
  display: grid;
  gap: 12px;
}

.drawer-error-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(196, 210, 227, 0.74);
  background: rgba(255, 255, 255, 0.78);
}

.drawer-error-item strong {
  display: block;
  margin: 2px 0 4px;
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.drawer-error-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.source-config-helper {
  display: grid;
  gap: 10px;
}

.source-config-status {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
}

.source-config-status ul {
  margin: 0;
  padding-left: 18px;
}

.source-config-status li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  overflow-wrap: anywhere;
}

.source-config-inline-action {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.upload-drawer-form,
.upload-source-config-form {
  gap: 16px;
}

.upload-drawer-form p,
.upload-source-config-form p {
  display: grid;
  gap: 8px;
  margin: 0;
}

.upload-drawer-form label,
.upload-source-config-form label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.upload-drawer-form input:not([type="checkbox"]):not([type="file"]),
.upload-drawer-form select,
.upload-drawer-form textarea,
.upload-source-config-form input:not([type="checkbox"]):not([type="file"]),
.upload-source-config-form select,
.upload-source-config-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d6e0ef;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.upload-drawer-form textarea,
.upload-source-config-form textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.upload-drawer-form input:not([type="checkbox"]):not([type="file"]):focus,
.upload-drawer-form select:focus,
.upload-drawer-form textarea:focus,
.upload-source-config-form input:not([type="checkbox"]):not([type="file"]):focus,
.upload-source-config-form select:focus,
.upload-source-config-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.upload-file-field {
  padding: 16px;
  border: 1px dashed rgba(20, 184, 166, 0.45);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(14, 116, 144, 0.05));
}

.upload-file-field input[type="file"] {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: #fff;
}

.upload-file-name {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.upload-source-config-form .source-config-sheets[hidden],
.upload-source-config-form .source-config-bitable[hidden] {
  display: none !important;
}

.inline-form {
  margin: 0;
  display: inline-flex;
}

form p {
  margin: 0;
  display: grid;
  gap: 6px;
}

form ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

form ul li + li {
  margin-top: 10px;
}

form .helptext {
  color: var(--muted);
  font-size: 0.84rem;
}

form .errorlist {
  color: var(--danger);
  font-size: 0.84rem;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  margin-right: 8px;
  border-radius: 4px;
  box-shadow: none;
  vertical-align: middle;
  accent-color: var(--brand);
}

form p:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

form p:has(input[type="checkbox"]) label {
  margin: 0;
}

form p:has(input[type="checkbox"]) .helptext {
  flex: 0 0 100%;
  margin-top: 2px;
}

label {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
}

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

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #8a96a7;
}

input:not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow:
    0 0 0 3px rgba(22, 93, 255, 0.12);
}

.arco-filter-mount .arco-select-view input,
.arco-filter-mount .arco-picker input,
.arco-filter-mount .arco-input-inner-wrapper input {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  transition: none;
}

.arco-filter-mount .arco-select-view input:focus,
.arco-filter-mount .arco-picker input:focus,
.arco-filter-mount .arco-input-inner-wrapper input:focus {
  border: 0;
  box-shadow: none;
}

.arco-filter-mount .arco-picker input,
.arco-filter-mount .arco-input-inner-wrapper input {
  width: 100%;
}

.arco-filter-mount .arco-select-view-multiple .arco-select-view-input,
.arco-filter-mount .arco-select-view-multiple .arco-select-view-input input {
  min-width: 86px;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
}

button:disabled,
input[type="submit"]:disabled {
  cursor: wait;
}

.primary-button,
.ghost-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
}

.primary-button.is-loading,
.ghost-button.is-loading,
.link-button.is-loading {
  gap: 8px;
  opacity: 0.78;
  transform: none;
}

.primary-button.is-loading::before,
.ghost-button.is-loading::before,
.link-button.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: portal-spin 0.75s linear infinite;
}

.primary-button {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(22, 93, 255, 0.18);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: #4080ff;
  box-shadow: 0 8px 20px rgba(22, 93, 255, 0.22);
}

.ghost-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.ghost-button:hover {
  transform: translateY(-1px);
  color: var(--brand);
  border-color: rgba(22, 93, 255, 0.38);
  background: var(--brand-soft);
}

.link-button {
  min-height: auto;
  padding: 0;
  color: var(--brand);
  background: none;
}

.text-link {
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 600;
}

.text-link:hover {
  color: var(--brand-strong);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.table-wrap.store-monthly-analysis-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 680px;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}

.store-monthly-analysis-panel.table-panel {
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.store-monthly-analysis-panel .table-panel-body {
  padding: 0 22px 22px;
}

.store-monthly-analysis-panel .store-monthly-cell-button {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.store-monthly-analysis-panel .store-monthly-cell-button:hover {
  background: transparent;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f8fa;
}

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

tbody tr:nth-child(even) {
  background: #fbfcfd;
}

tbody tr:hover {
  background: var(--brand-soft);
}

th {
  color: #4e5969;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.table-sort-link-active {
  color: var(--brand);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 0;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-completed,
.status-completed_with_errors {
  color: var(--success);
  border-color: rgba(21, 128, 61, 0.16);
  background: var(--success-soft);
}

.status-failed {
  color: var(--danger);
  border-color: rgba(194, 65, 12, 0.16);
  background: var(--danger-soft);
}

.status-processing,
.status-queued {
  color: var(--warning);
  border-color: rgba(180, 83, 9, 0.16);
  background: var(--warning-soft);
}

.chart {
  min-height: 360px;
}

.preview-image {
  width: 100%;
  max-height: 820px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(196, 210, 227, 0.78);
  background: rgba(255, 255, 255, 0.92);
}

.login-body {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 54px);
  background:
    radial-gradient(circle at 18% 14%, rgba(37, 99, 235, 0.24), transparent 26%),
    radial-gradient(circle at 86% 20%, rgba(20, 184, 166, 0.24), transparent 24%),
    radial-gradient(circle at 72% 88%, rgba(249, 115, 22, 0.16), transparent 24%),
    linear-gradient(135deg, #eff7ff 0%, #f7fbff 44%, #e8f3f1 100%);
  color: var(--text);
  overflow-x: hidden;
}

.login-body::before,
.login-body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.login-body::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
}

.login-body::after {
  width: 520px;
  height: 520px;
  right: -180px;
  bottom: -220px;
  border-radius: 999px;
  background: conic-gradient(from 130deg, rgba(37, 99, 235, 0.26), rgba(20, 184, 166, 0.2), rgba(249, 115, 22, 0.18), rgba(37, 99, 235, 0.26));
  filter: blur(8px);
  opacity: 0.78;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 1.02fr) minmax(380px, 0.78fr);
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 108px));
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 34px 90px rgba(23, 37, 84, 0.18);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.login-hero {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(34px, 5vw, 58px);
  color: #f8fafc;
  background:
    radial-gradient(circle at 24% 18%, rgba(45, 212, 191, 0.26), transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(96, 165, 250, 0.22), transparent 32%),
    linear-gradient(145deg, #0b2545 0%, #0f3c5c 48%, #0f766e 100%);
  isolation: isolate;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  z-index: -1;
}

.login-hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -92px;
  top: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.34), rgba(59, 130, 246, 0.08));
  z-index: -1;
}

.login-illustration-panel {
  overflow: hidden;
}

.login-illustration {
  position: relative;
  width: min(440px, 82%);
  aspect-ratio: 1;
}

.login-illustration-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0.2px);
}

.login-illustration-orb-a {
  inset: 5% 12% 18% 8%;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.26), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(147, 197, 253, 0.22);
}

.login-illustration-orb-b {
  width: 42%;
  height: 42%;
  right: 4%;
  bottom: 8%;
  background: rgba(20, 184, 166, 0.26);
}

.login-illustration-card {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.login-illustration-card-main {
  left: 6%;
  top: 10%;
  width: 64%;
  height: 42%;
  padding: 26px;
}

.login-illustration-card-main span:not(.login-illustration-dot) {
  display: block;
  height: 12px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.72);
}

.login-illustration-card-main span:nth-child(3) {
  width: 68%;
}

.login-illustration-card-main span:nth-child(4) {
  width: 46%;
}

.login-illustration-dot {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #38bdf8, #14b8a6);
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.28);
}

.login-illustration-chart {
  right: 4%;
  top: 31%;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 42%;
  height: 34%;
  padding: 24px;
}

.login-illustration-chart i {
  display: block;
  flex: 1;
  min-width: 14px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #bfdbfe, #22d3ee);
}

.login-illustration-map {
  left: 14%;
  bottom: 12%;
  width: 46%;
  height: 28%;
}

.login-illustration-map::before {
  content: "";
  position: absolute;
  inset: 22%;
  border: 1px dashed rgba(226, 232, 240, 0.46);
  border-radius: 999px;
}

.login-illustration-map b {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.15);
}

.login-illustration-map b:nth-child(1) {
  left: 22%;
  top: 28%;
}

.login-illustration-map b:nth-child(2) {
  right: 24%;
  top: 40%;
}

.login-illustration-map b:nth-child(3) {
  left: 46%;
  bottom: 22%;
}

.login-illustration-ribbon {
  position: absolute;
  right: 1%;
  bottom: 1%;
  display: grid;
  gap: 8px;
}

.login-illustration-ribbon span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: clamp(34px, 5vw, 58px);
  background: rgba(255, 255, 255, 0.92);
}

.login-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.login-card h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.6vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field label {
  font-size: 0.9rem;
  font-weight: 900;
  color: #0f172a;
}

.login-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-field input:focus {
  border-color: rgba(37, 99, 235, 0.84);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-submit {
  min-height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
  color: white;
  font-size: 1rem;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(20, 184, 166, 0.28);
  filter: saturate(1.08);
}

.login-error {
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 14px;
  background: rgba(254, 242, 242, 0.92);
  color: #b91c1c;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-hero {
    min-height: 460px;
  }

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

  .portal-sidebar-collapsed .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .portal-sidebar-collapsed .sidebar {
    align-items: stretch;
    padding: 20px 16px;
  }

  .portal-sidebar-collapsed .brand {
    flex-direction: row;
  }

  .portal-sidebar-collapsed .brand-copy,
  .portal-sidebar-collapsed .language-switcher,
  .portal-sidebar-collapsed .nav-link-label,
  .portal-sidebar-collapsed .sidebar-user,
  .portal-sidebar-collapsed .sidebar-footer form {
    max-width: none;
    max-height: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: none;
    display: block;
  }

  .portal-sidebar-collapsed .language-switcher {
    display: inline-flex;
  }

  .portal-sidebar-collapsed .sidebar-toggle {
    margin-left: auto;
    transform: none;
  }

  .portal-sidebar-collapsed .nav {
    width: auto;
    align-items: stretch;
  }

  .portal-sidebar-collapsed .nav-link {
    width: auto;
    justify-content: flex-start;
    padding: 0 14px;
  }

  .portal-sidebar-collapsed .nav-link::before,
  .portal-sidebar-collapsed .sidebar-footer::before {
    content: none;
  }

  .portal-sidebar-collapsed .sidebar-footer {
    width: auto;
    min-height: 0;
    padding: 14px;
    display: block;
  }

  .decision-context-grid,
  .tab-grid,
  .store-location-map-layout,
  .weekly-sales-layout,
  .activation-matrix-layout,
  .activation-current-split,
  .activation-monthly-split,
  .activation-product-line-chart-grid,
  .filter-grid-dashboard {
    grid-template-columns: 1fr !important;
  }

  .activation-line-modal {
    padding: 12px;
  }

  .activation-line-modal-panel {
    width: 96vw;
    height: 94vh;
  }

  .activation-line-modal-layout {
    grid-template-columns: 1fr;
  }

  .activation-line-modal-chart-pane {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .activation-line-modal-chart {
    min-height: 420px;
  }

  .store-location-map {
    height: clamp(560px, 68vh, 700px);
    min-height: 560px;
  }

  .store-location-map-canvas {
    height: min(calc(100% - 78px), 610px);
  }
}

@media (max-width: 780px) {
  .login-body {
    padding: 14px;
  }

  .login-shell {
    border-radius: 28px;
  }

  .login-hero,
  .login-card {
    padding: 28px;
  }

  .login-hero {
    min-height: 420px;
  }

  .login-card-head {
    flex-direction: column;
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 18px;
  }

  .app-topbar,
  .page-head,
  .inventory-mode-card,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-topbar-actions,
  .panel-actions,
  .panel-footer-actions {
    justify-content: flex-start;
  }

  .kpi-grid,
  .card-grid,
  .split-layout,
  .insight-grid,
  .surface-grid,
  .dashboard-hero-grid,
  .priority-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border-radius: 16px;
  }

  .quote-select,
  .quote-option-preview {
    width: 100%;
    min-width: 0;
  }

  .workspace-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-actions .primary-button {
    width: 100%;
  }

  .inventory-mode-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .store-location-map-layout {
    padding: 0 16px 18px;
  }

  .store-location-map {
    height: clamp(500px, 72vh, 620px);
    min-height: 500px;
  }

  .store-location-map-canvas {
    height: min(calc(100% - 92px), 520px);
  }

  .store-map-controls {
    right: 12px;
    top: 12px;
  }

  .store-map-instruction {
    left: 14px;
    right: 14px;
    max-width: none;
    border-radius: 16px;
  }

  .store-location-map-kpi {
    justify-items: start;
    width: 100%;
  }

  .decision-context-card,
  .tab-link-metric {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tab-link-distributor {
    min-height: 64px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .portal-drawer-panel {
    width: 100%;
    padding: 20px;
  }
}
