:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #ffd53d;
  --brand-dark: #1f2937;
  --accent: #0ea5e9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: #e5e7eb;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  border-right: 1px solid var(--border);
  background: #fffef8;
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand img {
  width: 200px;
  max-width: 100%;
  display: block;
}

.brand p {
  margin: 0.4rem 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

nav {
  display: grid;
  gap: 0.4rem;
}

nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
}

nav a:hover { border-color: var(--border); background: #ffffff; }
nav a.active { background: var(--brand); border-color: #f9c800; }

.content {
  padding: 1rem;
  width: 100%;
}

.map-top-sticky {
  position: sticky;
  top: 0;
  z-index: 750;
  background: #e5e7eb;
  padding-bottom: 0.6rem;
}

.hero {
  border: 1px solid var(--ps-line);
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  /*background: linear-gradient(145deg, #ecfeff 0%, #ffffff 56%, #f0fdf4 100%);*/
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);

}

.hero h1 {
  margin: 0;
  font-size: 1.7rem;
}

.hero p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.filters {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

body[data-page="map"] .filters.compact { 
    margin-top: 0.9rem;
    align-items: end;
    padding: 0.75rem;
    border: 1px solid var(--ps-line);
    border-radius: 12px;
    background: #f8fafc;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
 }

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

label {
  color: var(--muted);
  font-size: 0.82rem;
}

input, select, button {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font-size: 0.9rem;
}

button {
  cursor: pointer;
  border: none;
  color: white;
  background: linear-gradient(135deg, #0f172a, #374151);
}

button.secondary { background: #6b7280; }

.actions {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.kpis, .insights-grid, .insights-panels {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  height:6rem;
}

.insights-panels { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.kpis article, .insights-grid article, .dist-panel, .results {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.9rem;
}

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

.kpis h2, .insights-grid h2 {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.kpis p, .insights-grid p {
  margin: 0.42rem 0 0;
  font-size: 1.55rem;
  font-weight: 700;
}

body[data-page="map"],
body[data-page="market_insights"],
body[data-page="overview"],
body[data-page="opportunities"],
body[data-page="pos360"] {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body[data-page="map"] {
  --ps-line: #d8e1ef;
}

body[data-page="map"] .hero h1 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="map"] .hero {
  border: 1px solid #d8e1ef;
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  /*background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);*/
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-page="map"] .hero h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

body[data-page="map"] .hero p {
  font-size: 1rem;
  color: #475569;
}

body[data-page="map"] .filters {
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body[data-page="map"] .filters .filter-group > label {
  font-size: 0.78rem;
  color: #6b7f99;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body[data-page="map"] .filters input,
body[data-page="map"] .filters select {
  background: #ffffff;
  border-color: #d5deea;
  height: 38px;
  font-size: 0.95rem;
}

body[data-page="map"] .filters .op-potential-buttons,
body[data-page="map"] .filters .op-lifecycle-toggle {
  display: grid;
  gap: 0.32rem;
}

body[data-page="map"] .filters .op-potential-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="map"] .filters .op-lifecycle-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="map"] .mu-kpis {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

body[data-page="map"] .mu-kpi-card {
  border: 1px solid #d6dbe4;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  padding: 0.66rem 0.7rem 0.58rem;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.16rem;
  text-align: center;
}

body[data-page="map"] .mu-kpi-card h2 {
  color: #344256;
  font-size: 0.94rem;
  margin: 0;
  font-weight: 700;
}

body[data-page="map"] .mu-kpi-card p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

body[data-page="map"] .mu-kpi-card.class-card p {
  font-size: 0.95rem;
  color: #63748d;
  font-weight: 550;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.16rem;
  width: 100%;
}

body[data-page="map"] .mu-kpi-card.class-card .mu-kpi-line {
  display: block;
  line-height: 1.15;
  text-align: center;
}

body[data-page="map"] .mu-kpi-card.class-card .mu-kpi-meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f2f2f2;
  overflow: hidden;
  border: 1px solid #e4e4e4;
}

body[data-page="map"] .mu-kpi-card.class-card .mu-kpi-meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff799 0%, #ffff99 100%);
  transition: width 0.24s ease;
}

body[data-page="map"] .mu-kpi-card small {
  display: block;
  margin-top: 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

body[data-page="map"] .mu-kpi-card .muted-label {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
}

body[data-page="insights"] .insights-grid {
  height: auto;
}

body[data-page="insights"] .insights-grid article {
  border: 1px solid #d6dbe4;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  text-align: center;
  padding: 0.66rem 0.7rem 0.58rem;
  min-height: 86px;
}

body[data-page="insights"] .insights-grid h2 {
  color: #344256;
  font-size: 0.94rem;
}

body[data-page="insights"] .insights-grid p {
  margin-top: 0.2rem;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #0f172a;
}

body[data-page="map"] .mu-exp-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f2f2f2;
  margin-top: 0.08rem;
  overflow: hidden;
  border: 1px solid #e4e4e4;
}

body[data-page="map"] .mu-exp-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff799 0%, #ffff99 100%);
}

.dist-panel h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
}

.bars {
  display: grid;
  gap: 0.42rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.bar-label { font-size: 0.8rem; color: var(--muted); }

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

.bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.bar-value {
  min-width: 28px;
  text-align: right;
  font-size: 0.82rem;
}

.price-kpi-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.price-kpi {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  background: #fafafa;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.price-kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.price-kpi strong {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.94rem;
}

.kpi-doc-host {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.kpi-doc-trigger {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.72rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.kpi-doc-trigger:hover {
  background: #eef2ff;
  color: #1d4ed8;
}

.kpi-doc-tooltip {
  position: absolute;
  z-index: 1200;
  max-width: 290px;
  background: #111827;
  color: #f9fafb;
  border-radius: 8px;
  padding: 0.5rem 0.58rem;
  font-size: 0.78rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.kpi-doc-panel {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(17, 24, 39, 0.35);
  display: grid;
  place-items: center;
}

.kpi-doc-panel-content {
  width: min(620px, 94vw);
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1rem;
}

.kpi-doc-panel-content h3 {
  margin: 0 0 0.65rem;
}

.kpi-doc-panel-content p {
  margin: 0.4rem 0;
  color: #374151;
}

.kpi-doc-panel-content pre {
  margin: 0.6rem 0 0;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.55rem;
  white-space: pre-wrap;
  font-size: 0.82rem;
}

.kpi-doc-close {
  float: right;
  margin-bottom: 0.3rem;
}

.manual-list p {
  margin: 0.45rem 0;
  color: #374151;
}

.manual-toc {
  margin-top: 1rem;
}

.manual-toc h2 {
  margin: 0 0 0.75rem;
}

.manual-toc-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.manual-toc a {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}

.manual-toc a.active,
.manual-toc a:hover {
  opacity: 1;
  text-decoration: underline;
}

.manual-back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.manual-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1500;
  background: transparent;
  pointer-events: none;
}

.global-loader .global-loader-bar {
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #1d4ed8);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.55);
  transform: translateX(-100%);
  opacity: 0;
}

.global-loader.active .global-loader-bar {
  opacity: 1;
  animation: globalLoaderSlide 1.2s ease-in-out infinite;
}

@keyframes globalLoaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

.loading-mask {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.loading-mask > * {
  visibility: hidden !important;
}

.loading-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e5e7eb 20%, #f8fafc 45%, #e5e7eb 70%);
  background-size: 220% 100%;
  animation: loadingMaskShimmer 1.15s ease-in-out infinite;
}

body.page-loading .filters button,
body.page-loading .table-tools button,
body.page-loading .table-tools input,
body.page-loading .table-tools summary,
body.page-loading #geo-query,
body.page-loading #geo-search,
body.page-loading #geo-results,
body.page-loading #geo-go {
  pointer-events: none;
}

@keyframes loadingMaskShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -20% 0; }
}

@keyframes mapLoadingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.map-wrap {
  margin-top: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
  background: #fff;
  align-items: stretch;
}

.map-canvas {
  position: relative;
  min-width: 0;
  height: 640px;
}

body[data-page="map"] .layout {
  transition: filter 0.18s ease, opacity 0.18s ease;
}

body[data-page="map"].map-updating {
  cursor: progress;
}

body[data-page="map"].map-updating .layout {
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.6);
}

.map-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(148, 163, 184, 0.28);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

body[data-page="map"].map-updating .map-loading-overlay {
  opacity: 1;
  pointer-events: auto;
}

.map-loading-overlay-card {
  min-width: 220px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.map-loading-overlay-card p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.map-loading-spinner {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 4px solid rgba(148, 163, 184, 0.35);
  border-top-color: #0f172a;
  animation: mapLoadingSpin 0.85s linear infinite;
  flex: 0 0 auto;
}

#map {
  width: 100%;
  height: 100%;
}

.pos-list-panel {
  border-left: 1px solid var(--border);
  background: #f8fafc;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 640px;
  min-height: 0;
}

.pos-list-head {
  padding: 0.85rem 0.9rem 0.7rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: grid;
  gap: 0.45rem;
}

.pos-list-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.pos-list-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.pos-list-head p {
  margin: 0;
  font-size: 0.77rem;
  color: var(--muted);
}

#pos-list-filter {
  width: 100%;
  border: 1px solid #d6dbe4;
  border-radius: 9px;
  padding: 0.5rem 0.58rem;
  font-size: 0.84rem;
  background: #f8fafc;
}

#pos-list-filter:focus {
  outline: none;
  border-color: #f3d76a;
  box-shadow: 0 0 0 2px rgba(243, 215, 106, 0.22);
}

.pos-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  background: #ffffff;
  color: #111827;
  border: 1px solid #d6dbe4;
  border-radius: 10px;
  padding: 0.43rem 0.62rem;
  min-width: 114px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.pos-view-toggle:hover {
  border-color: #c5ccd8;
  background: #f8fafc;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}

.pos-view-toggle:focus-visible {
  outline: none;
  border-color: #b11116;
  box-shadow: 0 0 0 3px rgba(177, 17, 22, 0.2);
}

.pos-view-toggle[data-target-view="list"] {
  color: #9f1239;
  border-color: #f3d1dc;
  background: #fff6f8;
}

.pos-view-toggle[data-target-view="list"]:hover {
  background: #ffeef2;
}

.pos-view-toggle-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-view-toggle-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.pos-view-toggle-text {
  line-height: 1;
}

.pos-list-scroll {
  overflow: auto;
  min-height: 0;
  padding: 0.7rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.pos-list-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.8rem;
  font-size: 0.84rem;
  color: var(--muted);
  background: #fff;
}

.pos-list-scroll.mode-list {
  gap: 0.4rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.pos-list-row {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem 0.52rem;
  display: grid;
  gap: 0.3rem;
  color: #111827;
}

.pos-list-row:hover {
  border-color: #f3d76a;
  box-shadow: 0 6px 14px rgba(31, 41, 55, 0.08);
}

.pos-list-row-left {
  display: flex;
  align-items: center;
  gap: 0.26rem;
  flex-wrap: wrap;
}

.pos-list-row-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #111827;
}

.pos-list-row-right {
  display: grid;
  gap: 0.06rem;
}

.pos-list-row-category {
  font-size: 0.72rem;
  color: #374151;
  font-weight: 600;
}

.pos-list-row-sub {
  font-size: 0.75rem;
  color: #6b7280;
}

.pos-card {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem 0.62rem 0.45rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  color: #111827;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.pos-card:hover {
  border-color: #fbcfe8;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.1);
}

.pos-card.active {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25);
}

.pos-card-top {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 0.6rem;
  align-items: center;
}

.pos-card-title {
  display: block;
  font-size: 0.99rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.06rem;
}

.pos-card-title-row {
  margin-top: 0.06rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.pos-card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.pos-perfect-store-link {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid #f3d76a;
  background: #fffdf2;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.pos-perfect-store-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.pos-perfect-store-link:hover {
  background: #fff7de;
  border-color: #efc854;
}

.pos-card-subtitle {
  display: block;
  margin-top: 0.12rem;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.2;
}

.pos-card-thumb {
  width: 70px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f3f4f6, #dbeafe);
  overflow: hidden;
}

.pos-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pos-card-headline {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.franchise-chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.franchise-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.franchise-chip.no-logo {
  font-size: 0.62rem;
  font-weight: 800;
  color: #374151;
}


.pos-kpi-badge {
  min-width: 18px;
  height: 16px;
  border-radius: 2px;
  color: #0f172a;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0 0.2rem;
  letter-spacing: 0.02em;
}

.pos-kpi-badge.grade-a {
  background: var(--storelab-potential-a-fill);
  border-color: var(--storelab-potential-a-border);
  color: var(--storelab-potential-a-contrast );
}

.pos-kpi-badge.grade-b {
  background: var(--storelab-potential-b-fill);
  border-color: var(--storelab-potential-b-border);
 color: var(--storelab-potential-b-contrast );
}

.pos-kpi-badge.grade-c {
  background: var(--storelab-potential-c-fill);
  border-color: var(--storelab-potential-c-border);
  color: var(--storelab-potential-c-contrast );
}

.pos-kpi-badge.grade-d {
  background: var(--storelab-potential-d-fill);
  border-color: var(--storelab-potential-d-border);
  color: var(--storelab-potential-d-contrast );
}

.pos-kpi-badge.grade-unknown {
  background: #e5e7eb;
  color: #36383a;
  border-color: #d1d5db;
}

.pos-prospect-badge {
  border-radius: 3px;
  color: #334155;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.08rem 0.32rem;
  letter-spacing: 0.02em;
}

/* .pos-prospect-badge.is-customer {
  background: linear-gradient(140deg, rgba(241, 245, 249, 1) 0%, rgba(226, 232, 240, 0.96) 100%);
  color: #334155;
  border-color: #4c504e;
}

.pos-prospect-badge.is-prospect {
  background: #fff1c2;
  color: #6a5400;
  border-color: #f3d76a;
} */

.pos-category {
  color: #374151;
  font-size: 0.7rem;
  font-weight: 600;
}

.pos-cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e5e7eb;
  margin-top: 0.08rem;
  padding-top: 0.3rem;
  align-items: start;
}

.pos-cta {
  background: #fff;
  color: #1f2937;
  border: 1px solid #f3d76a;
  border-radius: 0;
  border-left: none;
  font-size: 0.68rem;
  line-height: 1.1;
  font-weight: 700;
  padding: 0.36rem 0.2rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-cta:first-child {
  border-left: 1px solid #f3d76a;
  border-radius: 7px 0 0 7px;
}

.pos-cta:last-child {
  border-radius: 0 7px 7px 0;
}

.pos-cta:hover {
  background: #fff7de;
}

.feature-toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  max-width: 420px;
  background: #111827;
  color: #f9fafb;
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 0.62rem 0.74rem;
  font-size: 0.82rem;
  line-height: 1.3;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 1300;
}

.feature-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.map-pos-legend {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 700;
  min-width: 210px;
  max-width: 260px;
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  padding: 0.6rem 0.7rem;
}

.map-pos-legend-head {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: #4b5563;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.map-pos-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #1d4ed8);
  box-shadow: 0 0 0 2px #dbeafe;
}

.map-pos-legend-value {
  margin-top: 0.16rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.map-pos-legend-foot {
  margin-top: 0.14rem;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.3;
}

.map-pos-legend.loading {
  border-color: #c7d2fe;
  box-shadow: 0 10px 24px rgba(30, 64, 175, 0.18);
}

.map-pos-legend-skeleton {
  margin-top: 0.22rem;
  display: grid;
  gap: 0.48rem;
}

.map-pos-legend-skeleton .line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f8fafc 45%, #e5e7eb 65%);
  background-size: 220% 100%;
  animation: posLegendShimmer 1.2s ease-in-out infinite;
}

.map-pos-legend-skeleton .line.w-60 { width: 60%; height: 24px; }
.map-pos-legend-skeleton .line.w-90 { width: 90%; }

@keyframes posLegendShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -30% 0; }
}

.pos-marker-wrap {
  background: transparent;
  border: none;
}

.pos-marker-wrap span {
  display: block;
  transform-origin: center bottom;
}

.pos-marker-wrap svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.22));
}

.pos-marker-prospect,
.pos-marker-customer {
  transition: transform 0.16s ease, filter 0.16s ease;
}

.pos-marker-prospect.selected,
.pos-marker-customer.selected {
  transform: scale(1.08);
}

.pos-marker-prospect.selected svg,
.pos-marker-customer.selected svg {
  filter: drop-shadow(0 0 0 3px rgba(255, 245, 153, 0.92)) drop-shadow(0 6px 10px rgba(15, 23, 42, 0.2));
}

.results {
  margin-top: 0.8rem;
}

.results h2 { margin: 0; }
.helper-text, #result-count { color: var(--muted); margin: 0.35rem 0 0.8rem; }

.app-footer {
  margin-top: 1.1rem;
  padding: 0.9rem 0 0.4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  border-top: 1px solid var(--border);
  padding: 0.52rem;
  font-size: 0.88rem;
}
thead th { border-top: none; color: var(--muted); font-size: 0.79rem; }

.geo-jump {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.35rem;
}

.geo-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) auto minmax(240px, 1fr) auto;
  gap: 0.5rem;
}

.geo-status {
  margin: 0;
  min-height: 1.05rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border: 1px solid transparent;
}

.tag.opportunity {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.tag.promising {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.tag.avoid {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.tag.watch {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.map-focus-card {
  border-left: 4px solid var(--accent);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.focus-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem;
  background: #fafafa;
}

.focus-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.focus-item strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.92rem;
}

.table-tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.table-tools input {
  min-width: 220px;
  background: #fff;
}

.col-picker {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 0.2rem 0.4rem;
  position: relative;
}

.col-picker summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}

.col-picker div {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.4rem;
}

.col-picker label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.col-picker .col-picker-option {
  min-height: 34px;
  padding: 0.4rem 0.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  transition: background-color 0.16s ease;
}

.col-picker .col-picker-option:hover {
  background: #f3f4f6;
}

.col-picker .col-picker-option span {
  flex: 1 1 auto;
  line-height: 1.25;
  font-size: 0.84rem;
}

.col-picker input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0 !important;
  border: 1.5px solid #9ca3af;
  border-radius: 5px;
  background: #f8fafc;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 18px;
  box-shadow: none !important;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.col-picker input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #ffffff;
  transform: scale(0);
  transition: transform 0.14s ease;
}

.col-picker input[type="checkbox"]:checked {
  border-color: #6b7280;
  background: #6b7280;
}

.col-picker input[type="checkbox"]:checked::after {
  transform: scale(1);
}

.data-grid {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.tabulator {
  border: none !important;
  font-size: 0.86rem;
}

.tabulator .tabulator-header {
  border-bottom: 1px solid var(--border);
  background: #374151;
}

.tabulator .tabulator-header .tabulator-col {
  background: #374151;
  border-right: 1px solid #4b5563;
}

.tabulator .tabulator-header .tabulator-col:last-child {
  border-right: none;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  text-align: left;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  color: #f9fafb;
}

.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,
.tabulator .tabulator-header .tabulator-col .tabulator-header-filter select {
  text-align: left;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row,
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-row-even,
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-row-odd {
  background: #ffffff;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover {
  background: #ffffff;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell {
  text-align: left;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell:last-child {
  border-right: none;
}

.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell .table-bar-wrap,
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell .rating-stars {
  margin-inline: 0;
}

.storelab-popup .leaflet-popup-content-wrapper {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

.storelab-popup .leaflet-popup-content {
  margin: 0.65rem 0.7rem;
  min-width: 260px;
}

.pos-popup-card,
.area-popup-card,
.map-selection-popup {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #111827;
}

.pos-popup-head h4,
.area-popup-head h4,
.map-selection-popup h4 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.pos-popup-head p,
.area-popup-head p,
.map-selection-popup p {
  margin: 0.2rem 0 0.55rem;
  color: #6b7280;
  font-size: 0.79rem;
}

.pos-popup-franchise {
  margin-top: -0.2rem;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-size: 0.73rem;
  color: #4b5563;
  font-weight: 600;
}

.franchise-chip.is-popup {
  width: 20px;
  height: 20px;
}

.pos-popup-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  margin-bottom: 0.52rem;
}

.popup-kpi {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.4rem 0.45rem;
  background: #fafafa;
}

.popup-kpi-wide {
  grid-column: 1 / -1;
}

.popup-kpi span {
  display: block;
  color: #6b7280;
  font-size: 0.69rem;
}

.popup-kpi strong {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.popup-kpi-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.14rem;
}

.popup-kpi-dual strong {
  margin-top: 0;
  display: grid;
  gap: 0.08rem;
}

.popup-kpi-dual strong small {
  font-size: 0.64rem;
  font-weight: 600;
  color: #7b8591;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.consumption-list {
  margin-top: 0.16rem;
  display: grid;
  gap: 0.2rem;
}

.consumption-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.consumption-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #111827;
  border: none;
  background: transparent;
  flex: 0 0 auto;
}

.consumption-chip.is-main {
  color: #166534;
}

.consumption-chip.is-secondary {
  color: #1d4ed8;
}

.consumption-chip.is-week-part {
  color: #92400e;
}

.consumption-value {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  color: #111827;
  overflow-wrap: anywhere;
}

.consumption-empty {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.area-popup-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  margin-bottom: 0.52rem;
}

.pos-popup-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.area-popup-foot {
  font-size: 0.76rem;
  color: #4b5563;
  padding-top: 0.35rem;
  border-top: 1px dashed #e5e7eb;
}

.area-popup-foot strong {
  color: #111827;
}

.popup-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.popup-badge.tier-high {
  background: var(--storelab-potential-a-fill);
  border-color: var(--storelab-potential-a-border);
  color: var(--storelab-potential-a-contrast );
}

.popup-badge.tier-medium {
  background: var(--storelab-potential-b-fill);
  border-color: var(--storelab-potential-b-border);
 color: var(--storelab-potential-b-contrast );
}

.popup-badge.tier-low {
  background: var(--storelab-potential-c-fill);
  border-color: var(--storelab-potential-c-border);
  color: var(--storelab-potential-c-contrast );
}

.popup-badge.tier-watch {
  background: var(--storelab-potential-d-fill);
  border-color: var(--storelab-potential-d-border);
  color: var(--storelab-potential-d-contrast );
}

.popup-badge.is-customer {
  background: var(--storelab-lifecycle-customer-bg);
  color: var(--storelab-lifecycle-customer-color);
  border-color: var(--storelab-lifecycle-customer-border);
}

.popup-badge.is-prospect {
  background:var(--storelab-lifecycle-customer-bg);
  color:var(--storelab-lifecycle-customer-color);
  border-color:var(--storelab-lifecycle-customer-border);
}

.popup-table-link {
  width: 100%;
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.map-selection-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.26rem 0.45rem;
  font-size: 0.81rem;
}

.map-selection-grid span {
  color: #6b7280;
}

.map-selection-grid strong {
  text-align: right;
}

.area-visuals {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.8rem;
}

.area-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.legend-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  background: #fafafa;
}

.legend-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: #374151;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  color: #4b5563;
}

.legend-swatch {
  width: 26px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  display: inline-block;
}

.legend-swatch.border-opportunity { background: #e2fbe9; border-color: #16a34a; }
.legend-swatch.border-promising { background: #e8f0ff; border-color: #2563eb; }
.legend-swatch.border-avoid { background: #fee8e8; border-color: #dc2626; }
.legend-swatch.border-watch { background: #f3f4f6; border-color: #6b7280; }

.area-rank-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.area-rank-wrap h3 {
  margin: 0 0 0.4rem;
  font-size: 0.84rem;
  color: #374151;
}

.area-rank-list {
  display: grid;
  gap: 0.45rem;
}

.area-rank-item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: center;
  color: #111827;
}

.area-rank-item:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}

.rank-badge {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.74rem;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.rank-main strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.2;
}

.rank-main small {
  color: #6b7280;
  font-size: 0.73rem;
}

.area-hex {
  transition: transform 120ms ease, filter 120ms ease;
}

.area-hex:hover {
  filter: brightness(1.03);
}




.f-tabs {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.f-tab {
  background: #F1E6AD;
  color: #513927;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.f-tab.active {
  background: #A05B32;
  border-color: #513927;
  color: #FFFFFF;
}

.f-panel {
  display: none;
}

.f-panel.active {
  display: block;
}

.f-chart-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.8rem;
}

.f-chart-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.f-chart-grid .results {
  min-height: 0;
  display: block;
}

.f-chart-grid .results h2 {
  margin: 0 0 1rem;
}

.chart-subtitle {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.table-bar-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.45rem;
}

.table-bar {
  height: 10px;
  background: #ececec;
  border-radius: 999px;
  overflow: hidden;
}

.table-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #a05b32, #cfb257);
}

.table-bar-label {
  font-size: 0.78rem;
  color: #4b5563;
  min-width: 42px;
  text-align: right;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rating-stars-filled {
  color: #d97706;
  letter-spacing: 0.02em;
}

.rating-stars-empty {
  color: #d1d5db;
  letter-spacing: 0.02em;
}

.rating-stars-value {
  font-size: 0.78rem;
  color: #4b5563;
}

.f-chart-grid canvas {
  display: block;
  width: 100% !important;
  height: 280px !important;
  max-height: 280px;
}

#panel-general-overview .results canvas,
#panel-kpi-overview .results canvas,
#panel-kpi-details .results canvas,
#panel-chain-overview .results canvas {
  width: 100% !important;
  height: 280px !important;
  max-height: 280px;
}

#panel-general-overview .f-chart-grid .results {
  border: 1px solid #e8debb;
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 100%);
  box-shadow: 0 8px 22px rgba(80, 44, 43, 0.08);
}

#panel-general-overview .f-chart-grid .results h2 {
  margin-bottom: 0.5rem;
  color: #513927;
}

#panel-general-overview .f-chart-grid canvas {
  height: 310px !important;
  max-height: 310px;
}

#panel-kpi-overview .f-chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#panel-kpi-overview .ko-grid-layout .ko-span-two {
  grid-column: 1 / -1;
}

#panel-kpi-overview .f-chart-grid .results {
  border: 1px solid #eadfc0;
  background: linear-gradient(180deg, #fffcf2 0%, #ffffff 100%);
  box-shadow: 0 8px 20px rgba(80, 44, 43, 0.06);
}

#panel-kpi-overview .f-chart-grid .results h2 {
  margin-bottom: 0.55rem;
  color: #513927;
}

#panel-kpi-overview .ko-grid-layout .ko-span-two canvas {
  height: 340px !important;
  max-height: 340px;
}

#panel-kpi-overview .ko-grid-layout canvas {
  height: 320px !important;
  max-height: 320px;
}

#panel-kpi-details .f-chart-grid.two-col {
  align-items: stretch;
}

#panel-kpi-details .f-chart-grid.two-col .results:first-child {
  display: flex;
  flex-direction: column;
}

#panel-kpi-details .f-chart-grid.two-col > .results {
  min-height: 760px;
}

#panel-kpi-details .kd-secondary-grid {
  margin-top: 1rem;
}

#panel-kpi-details .kd-secondary-grid canvas {
  height: 300px !important;
  max-height: 300px;
}

#panel-kpi-details #kd-category-chart {
  flex: 0 0 auto;
  height: 640px !important;
  max-height: 640px;
  min-height: 640px;
}

@media (max-width: 1400px) {
  #panel-kpi-details #kd-category-chart {
    height: 560px !important;
    max-height: 560px;
    min-height: 560px;
  }
}

#kd-map {
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  nav { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .area-visuals { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; }
  .pos-list-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    height: auto;
    min-height: 300px;
  }
  .pos-list-scroll {
    max-height: 380px;
  }
}

@media (max-width: 768px) {
  .content { padding: 0.75rem; }
  .geo-controls { grid-template-columns: 1fr; }
  .map-canvas { height: 430px; }
  #map { height: 430px; }
  .map-top-sticky {
    position: static;
    background: transparent;
    padding-bottom: 0;
  }
  .actions { grid-column: 1 / -1; }
  .area-rank-wrap { grid-template-columns: 1fr; }
  .map-pos-legend {
    top: auto;
    bottom: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    min-width: 0;
  }
  .f-chart-grid.two-col {
    grid-template-columns: 1fr;
  }
  #panel-kpi-overview .f-chart-grid {
    grid-template-columns: 1fr;
  }
  body[data-page="map"] .mu-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="map"] .filters .op-potential-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Perfect Store page redesign (scoped) */
body[data-page="overview"] {
  --ps-bg: #f4f7fb;
  --ps-surface: #ffffff;
  --ps-ink: #0f172a;
  --ps-muted: #475569;
  --ps-line: #d6dbe4;
  --ps-accent: #64748b;
  --ps-accent-strong: #334155;
}

body[data-page="overview"] .ps-content {
  color: var(--ps-ink);
  padding: 1rem 1.2rem 1.5rem;
}

body[data-page="overview"] .ps-content,
body[data-page="overview"] .ps-content input,
body[data-page="overview"] .ps-content button {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body[data-page="overview"] .ps-hero {
  border: 1px solid var(--ps-line);
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  /*background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);*/
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-page="overview"] .ps-eyebrow {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ps-accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

body[data-page="overview"] .ps-hero h1 {
  margin: 0.4rem 0 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

body[data-page="overview"] .ps-subtitle {
  margin: 0.5rem 0 0;
  max-width: 74ch;
  color: var(--ps-muted);
}

body[data-page="overview"] .ps-surface {
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body[data-page="overview"] .ps-filters {
  margin-top: 0.95rem;
  padding: 0.9rem;
}

body[data-page="overview"] .ps-nav-subtree {
  display: grid;
  gap: 0.38rem;
  margin: 0.25rem 0 0.55rem 1rem;
  padding-left: 0;
  border-left: 0;
}

body[data-page="overview"] .ps-subnav-link {
  text-decoration: none;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0.18rem 0;
}

body[data-page="overview"] .ps-subnav-link:hover {
  color: #111827;
}

body[data-page="overview"] .ps-subnav-link.active {
  color: #0f172a;
}

body[data-page="overview"] .ps-tabs-wrap {
  margin-top: 0.9rem;
}

body[data-page="overview"] .ps-tabs {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  width: 100%;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid #d7dde6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}

body[data-page="overview"] .ps-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334155;
  padding: 0.3rem 0.05rem 0.68rem;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

body[data-page="overview"] .ps-tab:hover {
  color: #111827;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

body[data-page="overview"] .ps-tab.active {
  color: #0f172a;
  background: transparent;
  border-bottom-color: #111827;
  box-shadow: none;
}

body[data-page="overview"] .ps-panel {
  margin-top: 0.9rem;
}

body[data-page="overview"] .ps-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.8rem;
  align-items: end;
}

body[data-page="overview"] .ps-actions {
  display: flex;
  gap: 0.55rem;
  align-items: end;
}

body[data-page="overview"] .ps-actions button,
body[data-page="overview"] #city-opportunities-tools button {
  border-radius: 12px;
  border: 1px solid transparent;
}

body[data-page="overview"] .ps-actions button,
body[data-page="overview"] #city-opportunities-export {
  background: linear-gradient(135deg, #0f172a, #374151);
}

body[data-page="overview"] .ps-actions button:hover,
body[data-page="overview"] #city-opportunities-export:hover {
  background: linear-gradient(135deg, #111827, #4b5563);
}

body[data-page="overview"] .ps-zone {
  margin-top: 1rem;
}

body[data-page="overview"] #ps-panel-optimal-assortment .ps-zone.ps-surface {
  padding: 1.05rem 1rem 1.2rem;
}

body[data-page="overview"] #ps-panel-visibility .ps-zone.ps-surface {
  padding: 1.05rem 1rem 1.2rem;
}

body[data-page="overview"] #ps-panel-equipment .ps-zone.ps-surface {
  padding: 1.05rem 1rem 1.2rem;
}

body[data-page="overview"] .ps-optimal-filters {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  background: #f8fafc;
}

body[data-page="overview"] .ps-optimal-filters .filter-group label {
  font-size: 0.74rem;
  color: #6b7f99;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body[data-page="overview"] .ps-optimal-filters input,
body[data-page="overview"] .ps-optimal-filters select {
  background: #ffffff;
  border-color: #d5deea;
  height: 36px;
}

body[data-page="overview"] .ps-optimal-filters .op-potential-buttons,
body[data-page="overview"] .ps-optimal-filters .op-lifecycle-toggle {
  display: grid;
  gap: 0.32rem;
}

body[data-page="overview"] .ps-optimal-filters .op-potential-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="overview"] .ps-optimal-filters .op-lifecycle-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="overview"] .ps-optimal-filter-actions {
  display: flex;
  gap: 0.45rem;
}

body[data-page="overview"] .ps-optimal-filter-actions button {
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  min-width: 78px;
}

body[data-page="overview"] .ps-equipment-summary {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
}

body[data-page="overview"] .ps-equipment-grid {
  margin-top: 1.05rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

body[data-page="overview"] .ps-equip-table {
  min-width: 1080px;
  display: grid;
  gap: 0;
  border: 1px solid #d6dfec;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body[data-page="overview"] .ps-equip-row {
  display: grid;
  grid-template-columns: 220px 84px repeat(4, minmax(175px, 1fr));
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid #e2e8f0;
}

body[data-page="overview"] .ps-equip-row:last-child {
  border-bottom: none;
}

body[data-page="overview"] .ps-equip-header {
  position: sticky;
  top: 0;
  z-index: 2;
}

body[data-page="overview"] .ps-equip-head {
  background: linear-gradient(180deg, #596372 0%, #495362 100%);
  color: #24364d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.74rem 0.68rem;
  min-height: 76px;
  display: grid;
  align-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body[data-page="overview"] .ps-equip-head-main {
  display: block;
  line-height: 1.2;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.84rem;
}

body[data-page="overview"] .ps-equip-head-sub {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.01em;
}

body[data-page="overview"] .ps-equip-channel,
body[data-page="overview"] .ps-equip-total {
  border-right: 1px solid #e2e8f0;
}

body[data-page="overview"] .ps-equip-channel {
  background: #f8fafc;
  padding: 0.8rem 0.82rem;
  display: grid;
  align-content: start;
  gap: 0.28rem;
}

body[data-page="overview"] .ps-equip-channel-kicker {
  color: #7b8ea7;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="overview"] .ps-equip-channel-title {
  color: #0f172a;
  font-size: 0.88rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

body[data-page="overview"] .ps-equip-channel-meta {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.3;
}

body[data-page="overview"] .ps-equip-total {
  background: #fbfdff;
  padding: 0.7rem 0.35rem;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.08rem;
}

body[data-page="overview"] .ps-equip-total strong {
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.18rem;
  line-height: 1;
}

body[data-page="overview"] .ps-equip-total span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="overview"] .ps-equip-cell {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  padding: 0.62rem;
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

body[data-page="overview"] .ps-equip-row > :last-child {
  border-right: none;
}

body[data-page="overview"] .ps-equip-pos-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  padding: 0.22rem 0.42rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: #35506e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

body[data-page="overview"] .ps-equip-list {
  display: grid;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

body[data-page="overview"] .ps-equip-card {
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 0.36rem 0.42rem;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.38rem;
  align-items: center;
  background: #ffffff;
  min-height: 40px;
}

body[data-page="overview"] .ps-equip-card:last-child {
  border-bottom: none;
}

body[data-page="overview"] .ps-equip-card:nth-child(even) {
  background: #f8fafc;
}

body[data-page="overview"] .ps-equip-thumb {
  width: 36px;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  background: #ffffff;
}

body[data-page="overview"] .ps-equip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="overview"] .ps-equip-name {
  font-size: 0.73rem;
  color: #2f435d;
  line-height: 1.24;
  font-weight: 700;
}

body[data-page="overview"] .ps-equip-content {
  display: grid;
  gap: 0.12rem;
}

body[data-page="overview"] .ps-equip-investment {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  width: fit-content;
  padding: 0.12rem 0.36rem;
  border-radius: 999px;
  background: #edf7ef;
  color: #166534;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body[data-page="overview"] .ps-equip-investment strong {
  color: inherit;
  font-weight: 800;
}

body[data-page="overview"] .ps-equip-none {
  color: #7f93ab;
  font-size: 0.75rem;
  padding: 0.3rem 0.2rem;
}

body[data-page="overview"] .ps-empty-panel {
  padding: 1rem;
}

body[data-page="overview"] .ps-optimal-summary {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

body[data-page="overview"] .ps-optimal-stat {
  border: 1px solid var(--ps-line);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
  padding: 0.78rem 0.9rem;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

body[data-page="overview"] .ps-optimal-stat--accent {
  border-color: #e7d28f;
  background: linear-gradient(160deg, #fffdf5 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(180, 83, 9, 0.08);
}

body[data-page="overview"] .ps-optimal-stat--emphasis {
  border-color: #d7c08a;
  background: linear-gradient(160deg, #fff9ef 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(161, 98, 7, 0.1);
}

body[data-page="overview"] .ps-optimal-stat--achievement strong {
  font-size: 1.12rem;
}

body[data-page="overview"] .ps-optimal-stat span {
  display: block;
  color: #6b7f99;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

body[data-page="overview"] .ps-optimal-stat strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

body[data-page="overview"] .ps-optimal-stat--accent strong,
body[data-page="overview"] .ps-optimal-stat--emphasis strong {
  color: #92400e;
}

body[data-page="overview"] .ps-optimal-stat--achievement .ps-achievement.positive {
  color: #047857;
}

body[data-page="overview"] .ps-optimal-stat--achievement .ps-achievement.negative {
  color: #b91c1c;
}

body[data-page="overview"] .ps-achievement {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

body[data-page="overview"] .ps-achievement.positive {
  color: #166534;
}

body[data-page="overview"] .ps-achievement.neutral {
  color: #9a3412;
}

body[data-page="overview"] .ps-achievement.negative {
  color: #b91c1c;
}

body[data-page="overview"] .ps-optimal-groups {
  margin-top: 1rem;
  display: grid;
  gap: 1.15rem;
}

body[data-page="overview"] .ps-assortment-layout {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

body[data-page="overview"] .ps-assortment-main {
  min-width: 0;
}

body[data-page="overview"] .ps-assortment-map-panel {
  position: sticky;
  top: 1rem;
  border: 1px solid #d6dfec;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f7fb 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  padding: 0.9rem;
}

body[data-page="overview"] .ps-assortment-map-head h3 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

body[data-page="overview"] .ps-assortment-map-head p {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

body[data-page="overview"] .ps-assortment-map-legend {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

body[data-page="overview"] .ps-assortment-legend-block {
  display: grid;
  gap: 0.32rem;
}

body[data-page="overview"] .ps-assortment-legend-title {
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="overview"] .ps-assortment-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

body[data-page="overview"] .ps-assortment-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: #334155;
  font-size: 0.77rem;
  font-weight: 700;
}

body[data-page="overview"] .ps-assortment-marker-chip,
body[data-page="overview"] .ps-assortment-potential-chip {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

body[data-page="overview"] .ps-assortment-marker-chip.is-customer {
  background: #cbd5e1;
  border: 1px solid #64748b;
}

body[data-page="overview"] .ps-assortment-marker-chip.is-prospect {
  background: #fde68a;
  border: 1px solid #ca8a04;
}

body[data-page="overview"] .ps-assortment-potential-chip {
  background: var(--potential-color, #64748b);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body[data-page="overview"] #optimal-assortment-map {
  width: 100%;
  min-height: 640px;
  margin-top: 0.85rem;
  border: 1px solid #d6dfec;
  border-radius: 16px;
  overflow: hidden;
  background: #eef2f7;
}

body[data-page="overview"] .ps-map-canvas {
  position: relative;
  margin-top: 0.85rem;
}

body[data-page="overview"] .ps-map-canvas #optimal-assortment-map {
  margin-top: 0;
}

body[data-page="overview"] .ps-map-marker {
  background: transparent;
  border: 0;
}

body[data-page="overview"] .ps-map-marker svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.16));
}

body[data-page="overview"] .ps-map-popup h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
}

body[data-page="overview"] .ps-map-popup p {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

body[data-page="overview"] .ps-map-popup-tags {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

body[data-page="overview"] .ps-optimal-group-head {
  display: block;
}

body[data-page="overview"] .ps-optimal-group h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="overview"] .ps-optimal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

body[data-page="overview"] .ps-optimal-dot.must {
  background: #b91c1c;
}

body[data-page="overview"] .ps-optimal-dot.nice {
  background: #fb923c;
}

body[data-page="overview"] .ps-optimal-list {
  list-style: none;
  margin: 0.72rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-height: 760px;
  overflow: auto;
  scrollbar-width: thin;
}

body[data-page="overview"] .ps-optimal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 0.85rem;
  align-items: start;
  padding: 0.78rem 0.1rem 0.78rem 0;
  border-bottom: 1px solid #edf2f7;
}

body[data-page="overview"] .ps-optimal-item:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

body[data-page="overview"] .ps-optimal-product-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

body[data-page="overview"] .ps-optimal-thumb {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

body[data-page="overview"] .ps-optimal-thumb-wrap {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 12px;
  outline: none;
}

body[data-page="overview"] .ps-optimal-thumb-wrap .ps-optimal-thumb {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  will-change: transform;
}

body[data-page="overview"] .ps-optimal-thumb-wrap:hover .ps-optimal-thumb,
body[data-page="overview"] .ps-optimal-thumb-wrap:focus-visible .ps-optimal-thumb {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  filter: saturate(1.05);
}

body[data-page="overview"] .ps-optimal-thumb-wrap:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

body[data-page="overview"] .ps-optimal-thumb-wrap[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  max-width: 320px;
  padding: 0.42rem 0.54rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.25);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 130ms ease, transform 130ms ease;
  z-index: 8;
}

body[data-page="overview"] .ps-optimal-thumb-wrap:hover::after,
body[data-page="overview"] .ps-optimal-thumb-wrap:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

body[data-page="overview"] .ps-optimal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="overview"] .ps-optimal-thumb-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.64rem;
  text-align: center;
  padding: 0.2rem;
}

body[data-page="overview"] .ps-optimal-name {
  margin: 0;
  color: #34495e;
  font-size: 1.08rem;
  line-height: 1.2;
}

body[data-page="overview"] .ps-optimal-name strong {
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="overview"] .ps-optimal-name span {
  color: #6b7f99;
  font-size: 0.95rem;
}

body[data-page="overview"] .ps-optimal-bar {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #d8e0eb;
  background: #f1f5f9;
  overflow: hidden;
}

body[data-page="overview"] .ps-optimal-item.must .ps-optimal-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e24343, #b91c1c);
  box-shadow: inset 0 0 0 1px rgba(127, 29, 29, 0.18);
}

body[data-page="overview"] .ps-optimal-item.nice .ps-optimal-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6b267, #f97316);
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.18);
}

body[data-page="overview"] .ps-optimal-meta {
  margin: 0;
  color: #6b7f99;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

body[data-page="overview"] .ps-optimal-capture-cell {
  border: 1px solid #dde5f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff, #f4f7fb);
  padding: 0.58rem 0.62rem;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.12rem;
  min-height: 74px;
}

body[data-page="overview"] .ps-optimal-cell-label {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="overview"] .ps-optimal-metric-grid {
  margin-top: 0.3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 122px;
  gap: 0.5rem;
  align-items: stretch;
}

body[data-page="overview"] .ps-optimal-metric-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

body[data-page="overview"] .ps-optimal-bar-row {
  display: inline-grid;
  grid-template-columns: minmax(240px, 360px) max-content;
  gap: 0.45rem;
  align-items: center;
  max-width: 100%;
}

body[data-page="overview"] .ps-capture-meter {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 100%;
}

body[data-page="overview"] .ps-capture-pie {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--capture-color) 0 var(--capture-pct), #e2e8f0 var(--capture-pct) 100%);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

body[data-page="overview"] .ps-capture-pie::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.92);
}

body[data-page="overview"] .ps-capture-pie span {
  position: relative;
  z-index: 1;
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body[data-page="overview"] .ps-optimal-item.must .ps-capture-pie {
  --capture-color: #b91c1c;
}

body[data-page="overview"] .ps-optimal-item.nice .ps-capture-pie {
  --capture-color: #ea580c;
}

body[data-page="overview"] .ps-capture-meta {
  display: grid;
  gap: 0.08rem;
}

body[data-page="overview"] .ps-capture-meta span {
  color: #6b7f99;
  font-size: 0.62rem;
  font-weight: 700;
}

body[data-page="overview"] .ps-capture-meta strong {
  color: #0f172a;
  font-size: 0.7rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

body[data-page="overview"] .ps-capture-meta small {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
}

body[data-page="overview"] .ps-optimal-desc {
  margin: 0;
  color: #4b6078;
  font-size: 0.86rem;
  line-height: 1.3;
}

body[data-page="overview"] .ps-empty-state {
  margin-top: 0.85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.9rem;
  color: #64748b;
  background: #f8fafc;
}

body[data-page="overview"] .ps-zone-head h2 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

body[data-page="overview"] .ps-zone-head p {
  margin: 0.24rem 0 0;
  color: var(--ps-muted);
  font-size: 0.9rem;
}

body[data-page="overview"] .ps-kpi-grid {
  margin-top: 0.7rem;
  gap: 0.7rem;
}

body[data-page="overview"] .ps-kpi-card,
body[data-page="overview"] .ps-insight-card {
  border: 1px solid var(--ps-line);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body[data-page="overview"] .ps-kpi-card h3,
body[data-page="overview"] .ps-insight-card h3 {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
}

body[data-page="overview"] .ps-kpi-card p,
body[data-page="overview"] .ps-insight-card p {
  margin: 0.5rem 0 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-weight: 700;
  color: #0f172a;
}

body[data-page="overview"] .ps-split {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

body[data-page="overview"] .ps-split .ps-zone {
  margin-top: 0;
  padding: 0.9rem;
}

body[data-page="overview"] .ps-insights-grid {
  margin-top: 0.7rem;
  gap: 0.6rem;
}

body[data-page="overview"] #city-opportunities-tools {
  margin-top: 0.8rem;
  align-items: center;
  gap: 0.55rem;
}

body[data-page="overview"] #city-opportunities-tools input {
  border-radius: 10px;
}

body[data-page="overview"] #city-opportunities-grid {
  margin-top: 0.65rem;
}

body[data-page="overview"] .tabulator {
  border: 1px solid var(--ps-line);
  border-radius: 14px;
  overflow: hidden;
}

@media (max-width: 1280px) {
  body[data-page="overview"] .ps-optimal-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-page="overview"] .ps-optimal-filter-actions {
    grid-column: 1 / -1;
  }

  body[data-page="overview"] .ps-optimal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="overview"] .ps-assortment-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="overview"] .ps-assortment-map-panel {
    position: static;
  }

  body[data-page="overview"] #optimal-assortment-map {
    min-height: 460px;
  }

  body[data-page="overview"] .ps-optimal-metric-grid {
    grid-template-columns: minmax(0, 1fr) 118px;
  }

  body[data-page="overview"] .ps-optimal-bar-row {
    grid-template-columns: minmax(220px, 320px) max-content;
  }

  body[data-page="overview"] .ps-equip-row {
    grid-template-columns: 190px 80px repeat(4, minmax(165px, 1fr));
  }
}

@media (max-width: 768px) {
  body[data-page="overview"] .ps-content {
    padding: 0.75rem;
  }

  body[data-page="overview"] .ps-tabs {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
  }

  body[data-page="overview"] .ps-hero {
    padding: 1rem;
  }

  body[data-page="overview"] .ps-hero h1 {
    font-size: 1.6rem;
  }

  body[data-page="overview"] .ps-optimal-summary {
    grid-template-columns: 1fr;
  }

  body[data-page="overview"] .ps-equipment-summary {
    grid-template-columns: 1fr;
  }

  body[data-page="overview"] .ps-optimal-filters {
    grid-template-columns: 1fr;
    padding: 0.65rem;
  }

  body[data-page="overview"] .ps-optimal-filter-actions {
    grid-column: auto;
    width: 100%;
  }

  body[data-page="overview"] .ps-optimal-filter-actions button {
    flex: 1 1 auto;
  }

  body[data-page="overview"] .ps-optimal-group-columns {
    display: none;
  }

  body[data-page="overview"] .ps-optimal-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding-right: 0;
  }

  body[data-page="overview"] .ps-optimal-product-cell {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.6rem;
  }

  body[data-page="overview"] .ps-optimal-thumb {
    width: 56px;
    height: 56px;
  }

  body[data-page="overview"] .ps-optimal-name {
    font-size: 0.95rem;
  }

  body[data-page="overview"] .ps-optimal-bar {
    height: 14px;
  }

  body[data-page="overview"] .ps-optimal-metric-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  body[data-page="overview"] .ps-optimal-bar-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    justify-items: start;
  }

  body[data-page="overview"] .ps-capture-meter {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  body[data-page="overview"] .ps-capture-pie {
    width: 48px;
    height: 48px;
  }

  body[data-page="overview"] .ps-optimal-capture-cell {
    justify-items: start;
    text-align: left;
  }

  body[data-page="overview"] #optimal-assortment-map {
    min-height: 360px;
  }

  body[data-page="overview"] .ps-equip-row {
    grid-template-columns: 170px 72px repeat(4, minmax(150px, 1fr));
  }
}

/* Opportunities page */
body[data-page="opportunities"] .op-filters[hidden],
body[data-page="opportunities"] .op-panel[hidden],
body[data-page="opportunities"] .op-sku-suggest[hidden] {
  display: none !important;
}

body[data-page="opportunities"] .op-content {
  color: #0f172a;
  padding: 1rem 1.2rem 1.5rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body[data-page="opportunities"] .op-hero {
  border: 1px solid #d8e1ef;
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  /*background: linear-gradient(145deg, #ecfeff 0%, #ffffff 56%, #f0fdf4 100%);*/
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-page="opportunities"] .op-hero h1 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

body[data-page="opportunities"] .op-hero p {
  margin: 0.5rem 0 0;
  color: #475569;
}

body[data-page="opportunities"] .ps-nav-subtree {
  display: grid;
  gap: 0.38rem;
  margin: 0.25rem 0 0.55rem 1rem;
  padding-left: 0;
  border-left: 0;
}

body[data-page="opportunities"] .ps-subnav-link {
  text-decoration: none;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0.18rem 0;
}

body[data-page="opportunities"] .ps-subnav-link:hover { color: #111827; }
body[data-page="opportunities"] .ps-subnav-link.active { color: #0f172a; }

body[data-page="opportunities"] .ps-tabs-wrap { margin-top: 0.9rem; }

body[data-page="opportunities"] .op-sku-searchbar-wrap {
  margin-top: 0.9rem;
}

body[data-page="opportunities"] .op-sku-searchbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d7dde6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body[data-page="opportunities"] .op-sku-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #64748b;
  flex: 0 0 auto;
}

body[data-page="opportunities"] .op-sku-search-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body[data-page="opportunities"] .op-sku-searchbar input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  height: 28px;
  padding: 0;
  font-size: 0.95rem;
}

body[data-page="opportunities"] .op-sku-searchbar input:focus {
  outline: none;
  box-shadow: none;
}

body[data-page="opportunities"] .op-sku-searchbar .op-sku-suggest {
  top: calc(100% + 0.25rem);
}

body[data-page="opportunities"] .ps-tabs {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  width: 100%;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid #d7dde6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}

body[data-page="opportunities"] .ps-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334155;
  padding: 0.3rem 0.05rem 0.68rem;
  font-size: 0.96rem;
  font-weight: 500;
  white-space: nowrap;
}

body[data-page="opportunities"] .ps-tab:hover {
  color: #111827;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

body[data-page="opportunities"] .ps-tab.active {
  color: #0f172a;
  background: transparent;
  border-bottom-color: #111827;
}

body[data-page="opportunities"] .op-filters {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: #f8fafc;
}

body[data-page="opportunities"] .op-filters .filter-group label {
  font-size: 0.74rem;
  color: #6b7f99;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body[data-page="opportunities"] .op-filters input,
body[data-page="opportunities"] .op-filters select {
  background: #ffffff;
  border-color: #d5deea;
  height: 36px;
}

body[data-page="opportunities"] .op-potential-buttons,
body[data-page="opportunities"] .op-lifecycle-toggle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.32rem;
}

body[data-page="opportunities"] .op-sku-filter-group {
  grid-column: 1 / span 3;
}

body[data-page="opportunities"] #op-filters-sku.op-filters {
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
}

body[data-page="opportunities"] #op-filters-sku .op-sku-selected {
  grid-column: 1 / -1;
  margin-top: 0.1rem;
}

body[data-page="opportunities"] .op-sku-picker {
  position: relative;
}

body[data-page="opportunities"] .op-sku-suggest {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  right: 0;
  z-index: 12;
  border: 1px solid #d5deea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  max-height: 220px;
  overflow: auto;
  padding: 0.28rem;
  display: grid;
  gap: 0.2rem;
}

body[data-page="opportunities"] .op-sku-suggest-item {
  text-align: left;
  border: 1px solid transparent;
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font-size: 0.83rem;
  font-weight: 600;
}

body[data-page="opportunities"] .op-sku-suggest-item:hover {
  background: #f8fafc;
  border-color: #dbe4ef;
}

body[data-page="opportunities"] .op-sku-selected {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

body[data-page="opportunities"] .op-sku-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 1px solid #cad6e6;
  border-radius: 999px;
  background: #eef4ff;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem 0.18rem 0.62rem;
}

body[data-page="opportunities"] .op-sku-chip-remove {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #c2d2ec;
  background: #ffffff;
  color: #1e3a8a;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
}

body[data-page="opportunities"] .op-sku-chip-remove:hover {
  background: #dbeafe;
}

body[data-page="opportunities"] .op-lifecycle-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="opportunities"] .op-filter-actions {
  display: flex;
  gap: 0.45rem;
}

body[data-page="opportunities"] .op-filter-actions button {
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  min-width: 78px;
}

body[data-page="opportunities"] .op-panel {
  margin-top: 0.95rem;
}

body[data-page="opportunities"] .op-surface {
  border: 1px solid #d8e1ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  padding: 1.05rem 1rem 1.2rem;
}

body[data-page="opportunities"] .op-surface-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body[data-page="opportunities"] .op-surface h2 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.02rem;
}

body[data-page="opportunities"] .op-surface p {
  margin: 0.24rem 0 0;
  color: #475569;
}

body[data-page="opportunities"] .op-download-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #d6dbe4;
  border-radius: 12px;
  padding: 0.62rem 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

body[data-page="opportunities"] .op-download-btn::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 20h14v-2H5m14-9h-4V3H9v6H5l7 7z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 20h14v-2H5m14-9h-4V3H9v6H5l7 7z'/%3E%3C/svg%3E");
}

body[data-page="opportunities"] .op-download-btn:hover {
  border-color: #9ca3af;
  background: #eef2f7;
  color: #111827;
}

body[data-page="opportunities"] .op-download-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

body[data-page="opportunities"] .op-hunting-summary {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

body[data-page="opportunities"] .op-summary-card {
  border: 1px solid #d6dbe4;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  padding: 0.66rem 0.7rem 0.58rem;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.16rem;
  text-align: center;
}

body[data-page="opportunities"] .op-summary-card-progress {
  min-height: 104px;
}

body[data-page="opportunities"] .op-summary-label {
  display: block;
  color: #344256;
  font-size: 0.94rem;
  font-weight: 700;
}

body[data-page="opportunities"] .op-summary-value {
  display: block;
  margin-top: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

body[data-page="opportunities"] .op-summary-meta {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

body[data-page="opportunities"] .op-summary-progress {
  margin-top: 0.08rem;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f2f2f2;
  overflow: hidden;
  border: 1px solid #e4e4e4;
}

body[data-page="opportunities"] .op-summary-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff799 0%, #ffff99 100%);
}

body[data-page="opportunities"] .op-hunting-layout {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: minmax(320px, 42%) minmax(0, 58%);
  gap: 0.75rem;
  align-items: stretch;
}

body[data-page="opportunities"] .op-map-wrap {
  position: relative;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  overflow: hidden;
  min-height: 520px;
  background: #f8fafc;
}

body[data-page="opportunities"] #op-hunting-map {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

body[data-page="opportunities"] #op-sku-map {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

body[data-page="opportunities"] .op-hunting-list {
  display: grid;
  gap: 0.75rem;
  max-height: 520px;
  overflow: auto;
  padding-right: 0.2rem;
}

body[data-page="opportunities"] .op-hunting-list .pos-card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body[data-page="opportunities"] .op-card-metrics {
  margin-top: 0.2rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.36rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

body[data-page="opportunities"] .op-card-metrics div {
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 0.34rem 0.38rem;
  background: #f8fafc;
}

body[data-page="opportunities"] .op-card-metrics span {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}

body[data-page="opportunities"] .op-card-metrics strong {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.82rem;
  color: #0f172a;
}

@media (max-width: 1100px) {
  body[data-page="opportunities"] .op-surface-head {
    flex-direction: column;
    align-items: stretch;
  }
  body[data-page="opportunities"] .op-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="opportunities"] .op-sku-filter-group {
    grid-column: 1 / -1;
  }
  body[data-page="opportunities"] .op-filter-actions {
    grid-column: 1 / -1;
  }
  body[data-page="opportunities"] .op-hunting-summary {
    grid-template-columns: 1fr;
  }
  body[data-page="opportunities"] .op-hunting-layout {
    grid-template-columns: 1fr;
  }
  body[data-page="opportunities"] .op-map-wrap,
  body[data-page="opportunities"] #op-hunting-map {
    min-height: 360px;
  }
  body[data-page="opportunities"] .op-hunting-list {
    max-height: 640px;
  }
}

@media (max-width: 768px) {
  body[data-page="opportunities"] .op-content { padding: 0.75rem; }
  body[data-page="opportunities"] .op-hero { padding: 1rem; }
  body[data-page="opportunities"] .op-hero h1 { font-size: 1.6rem; }
  body[data-page="opportunities"] .op-surface-head {
    flex-direction: column;
    align-items: stretch;
  }
  body[data-page="opportunities"] .ps-tabs {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
  }
  body[data-page="opportunities"] .op-filters {
    grid-template-columns: 1fr;
    padding: 0.65rem;
  }
  body[data-page="opportunities"] .op-filter-actions {
    grid-column: auto;
    width: 100%;
  }
  body[data-page="opportunities"] .op-filter-actions button {
    flex: 1 1 auto;
  }
  body[data-page="opportunities"] .op-potential-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="opportunities"] .op-sku-filter-group {
    grid-column: auto;
  }
}

/* Insights aligned with Perfect Store visual system */
body[data-page="market_insights"] {
  --ps-bg: #f4f7fb;
  --ps-surface: #ffffff;
  --ps-ink: #0f172a;
  --ps-muted: #475569;
  --ps-line: #d8e1ef;
  --ps-accent: #0e7490;
  --ps-accent-strong: #155e75;
}

body[data-page="market_insights"] .content {
  color: var(--ps-ink);
  padding: 1rem 1.2rem 1.5rem;
}

body[data-page="market_insights"] .content,
body[data-page="market_insights"] .content input,
body[data-page="market_insights"] .content select,
body[data-page="market_insights"] .content button {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body[data-page="market_insights"] .hero {
  border: 1px solid var(--ps-line);
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  /*background: linear-gradient(145deg, #ecfeff 0%, #ffffff 56%, #f0fdf4 100%);*/
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-page="market_insights"] .hero h1 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

body[data-page="market_insights"] .hero p {
  margin: 0.5rem 0 0;
  max-width: 74ch;
  color: var(--ps-muted);
}

body[data-page="market_insights"] .f-tabs {
  margin-top: 0.9rem;
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  width: 100%;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid #d7dde6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}

body[data-page="market_insights"] .f-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334155;
  padding: 0.3rem 0.05rem 0.68rem;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

body[data-page="market_insights"] .f-tab:hover {
  color: #111827;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

body[data-page="market_insights"] .f-tab.active {
  color: #0f172a;
  background: transparent;
  border-bottom-color: #111827;
  box-shadow: none;
}

body[data-page="market_insights"] .f-tab:disabled {
  color: #d6dbe3;
  border-bottom-color: transparent;
  cursor: not-allowed;
  opacity: 1;
}

body[data-page="market_insights"] .f-tab:disabled:hover {
  color: #d6dbe3;
  border-bottom-color: transparent;
}

body[data-page="market_insights"] .filters.compact {
  margin-top: 0.9rem;
  grid-template-columns: repeat(6, minmax(140px, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--ps-line);
  border-radius: 12px;
  background: #f8fafc;
}

body[data-page="market_insights"] .mi-inline-filters[hidden] {
  display: none !important;
}

body[data-page="market_insights"] .filters .filter-group label {
  font-size: 0.74rem;
  color: #6b7f99;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body[data-page="market_insights"] .filters input,
body[data-page="market_insights"] .filters select {
  background: #ffffff;
  border-color: #d5deea;
  height: 36px;
}

body[data-page="market_insights"] .mi-inline-filters .op-potential-buttons,
body[data-page="market_insights"] .mi-inline-filters .op-lifecycle-toggle,
body[data-page="pos360"] .p360-inline-filters .op-potential-buttons,
body[data-page="pos360"] .p360-inline-filters .op-lifecycle-toggle {
  display: grid;
  gap: 0.32rem;
}

body[data-page="market_insights"] .mi-inline-filters .op-potential-buttons,
body[data-page="pos360"] .p360-inline-filters .op-potential-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="market_insights"] .mi-inline-filters .op-lifecycle-toggle,
body[data-page="pos360"] .p360-inline-filters .op-lifecycle-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="market_insights"] .mi-inline-filter-actions,
body[data-page="pos360"] .mi-inline-filter-actions {
  justify-content: flex-end;
}

body[data-page="market_insights"] .shell-page-filters-popover .filters.compact,
body[data-page="market_insights"] .shell-filter-drawer-body .filters.compact,
body[data-page="pos360"] .shell-page-filters-popover .p360-inline-filters,
body[data-page="pos360"] .shell-filter-drawer-body .p360-inline-filters {
  margin-top: 0;
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="market_insights"] .shell-page-filters-popover .mi-inline-filter-actions,
body[data-page="market_insights"] .shell-filter-drawer-body .mi-inline-filter-actions,
body[data-page="pos360"] .shell-page-filters-popover .mi-inline-filter-actions,
body[data-page="pos360"] .shell-filter-drawer-body .mi-inline-filter-actions {
  width: 100%;
  justify-content: stretch;
}

body[data-page="market_insights"] .shell-page-filters-popover .mi-inline-filter-actions button,
body[data-page="market_insights"] .shell-filter-drawer-body .mi-inline-filter-actions button,
body[data-page="pos360"] .shell-page-filters-popover .mi-inline-filter-actions button,
body[data-page="pos360"] .shell-filter-drawer-body .mi-inline-filter-actions button {
  width: 100%;
}

body[data-page="opportunities"] .shell-page-filters-popover .op-filters,
body[data-page="opportunities"] .shell-filter-drawer-body .op-filters {
  margin-top: 0;
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="overview"] .shell-page-filters-popover .ps-optimal-filters,
body[data-page="overview"] .shell-filter-drawer-body .ps-optimal-filters {
  margin-top: 0;
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="pos360"] .shell-page-filters-popover .p360-surface,
body[data-page="pos360"] .shell-filter-drawer-body .p360-surface {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="market_insights"] .actions {
  display: flex;
  align-items: end;
  gap: 0.45rem;
}

body .actions button,
body .table-tools button {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.55rem 0.75rem;
}

body #f-apply,
body[data-page="market_insights"] .table-tools button:not(.secondary) {
  background: linear-gradient(135deg, #0e7490, #0f766e);
}

body #f-apply:hover,
body[data-page="market_insights"] .table-tools button:not(.secondary):hover {
  background: linear-gradient(135deg, #155e75, #0f766e);
}

body[data-page="market_insights"] #f-reset,
body[data-page="market_insights"] .table-tools .secondary {
  background: #64748b;
}

body[data-page="market_insights"] #f-reset:hover,
body[data-page="market_insights"] .table-tools .secondary:hover {
  background: #475569;
}

body[data-page="market_insights"] .kpis article,
body[data-page="market_insights"] .dist-panel,
body[data-page="market_insights"] .results {
  border: 1px solid var(--ps-line);
  border-radius: 16px;
  background: var(--ps-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body[data-page="market_insights"] .kpis h2,
body[data-page="market_insights"] .results h2,
body[data-page="market_insights"] .dist-panel h3 {
  color: #24364d;
}

body[data-page="market_insights"] .kpis p {
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="market_insights"] .kpis article {
  justify-content: center;
  gap: 0.2rem;
}

body[data-page="market_insights"] .kpis article h2,
body[data-page="market_insights"] .go-summary-card span {
  display: block;
  margin: 0;
  max-width: 100%;
  color: #4b5563;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(0.98rem, 0.92rem + 0.12vw, 0.9rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

body[data-page="market_insights"] .kpis article p,
body[data-page="market_insights"] .go-summary-card strong {
  margin: 0;
  color: #090909;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(1.18rem, 1.02rem + 0.32vw, 1.48rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

body[data-page="market_insights"] .go-summary-card small {
  color: #64748b;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
}

body[data-page="market_insights"] .chart-subtitle,
body[data-page="market_insights"] .helper-text {
  color: var(--ps-muted);
}

body[data-page="market_insights"] .table-tools {
  margin-top: 0.8rem;
  align-items: center;
  gap: 0.55rem;
}

body[data-page="market_insights"] .table-tools input {
  border-radius: 10px;
  border-color: #d5deea;
}

body[data-page="market_insights"] .results > .data-grid {
  margin-top: 0.35rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

body[data-page="market_insights"] .tabulator {
  background: transparent;
  font-size: 0.84rem;
  color: #545454;
}

body[data-page="market_insights"] .tabulator .tabulator-header {
  background: #eeeeee;
  border-top: 1px solid #dddddd;
  border-bottom: 1px solid #dedede;
  border-radius: 8px 8px 0 0;
}

body[data-page="market_insights"] .tabulator .tabulator-header .tabulator-col {
  background: #eeeeee;
  border-right: 1px solid #eeeeee;
}

body[data-page="market_insights"] .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  min-height: 40px;
  padding: 10px 8px;
  text-align: left;
}

body[data-page="market_insights"] .tabulator .tabulator-header .tabulator-col .tabulator-col-title {
  color: #5f5f5f;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

body[data-page="market_insights"] .tabulator .tabulator-header .tabulator-col .tabulator-col-sorter {
  color: #9d9d9d;
}

body[data-page="market_insights"] .tabulator .tabulator-header .tabulator-col .tabulator-header-filter {
  display: none;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder {
  border-top: 1px solid #ececec;
  background: #ffffff;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row,
body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row.tabulator-row-even,
body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row.tabulator-row-odd {
  min-height: 38px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row.tabulator-row-even {
  background: #fcfcfc;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row:hover {
  background: #fffef0;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row .tabulator-cell {
  padding: 10px 8px;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: #5b5b5b;
  text-align: left;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected,
body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected:hover {
  background: #fff9c4;
}

body[data-page="market_insights"] #pd-table .tabulator .tabulator-tableholder .tabulator-row,
body[data-page="market_insights"] #pd-table .tabulator .tabulator-tableholder .tabulator-row:hover,
body[data-page="market_insights"] #pd-table .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected,
body[data-page="market_insights"] #pd-table .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected:hover {
  background: transparent;
}

body[data-page="market_insights"] #pd-table .tabulator .tabulator-tableholder .tabulator-row .tabulator-cell {
  background: transparent;
}

body[data-page="market_insights"] .tabulator .tabulator-footer {
  border-top: 1px solid #e8e8e8;
  background: transparent;
  color: #5f5f5f;
  padding: 0.85rem 0.4rem 0;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-paginator label,
body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-paginator span,
body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page-size {
  color: #6b7280;
  font-size: 0.82rem;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page-size {
  min-height: 34px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  background: #ffffff;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page {
  min-width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page.active {
  background: #fff799;
  color: #1f2937;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page:disabled {
  opacity: 0.45;
}

body[data-page="market_insights"] .table-bar {
  background: #e2e8f0;
}

body[data-page="market_insights"] .table-bar-fill {
  background: linear-gradient(90deg, #0e7490, #0f766e);
}

body[data-page="market_insights"] .rating-stars-filled {
  color: #0f766e;
}

body[data-page="market_insights"] .mi-level-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

body[data-page="market_insights"] .mi-level-tag.is-low {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

body[data-page="market_insights"] .mi-level-tag.is-mid {
  color: #b45309;
  background: #fef3c7;
  border-color: #fde68a;
}

body[data-page="market_insights"] .mi-level-tag.is-high {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

body[data-page="market_insights"] .mi-level-tag.is-neutral {
  color: #475569;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

body[data-page="market_insights"] #panel-general-overview .f-chart-grid .results,
body[data-page="market_insights"] #panel-kpi-overview .f-chart-grid .results {
  border: 1px solid var(--ps-line);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body[data-page="market_insights"] #panel-general-overview .f-chart-grid .results h2,
body[data-page="market_insights"] #panel-kpi-overview .f-chart-grid .results h2 {
  color: #0f172a;
}

body[data-page="market_insights"] #kd-map {
  width: 100%;
  height: 100%;
  min-height: 640px;
  max-height: 640px;
  overflow: hidden;
  border: 1px solid var(--ps-line);
  border-radius: 14px;
}

body[data-page="market_insights"] .kd-map-canvas {
  position: relative;
  height: 640px;
  min-height: 640px;
}

body[data-page="market_insights"] .kd-map-card .kd-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.3rem;
}

body[data-page="market_insights"] .kd-map-card .kd-map-head h2 {
  margin: 0;
}

body[data-page="market_insights"] .kd-map-card .chart-subtitle {
  margin: 0 0 0.45rem;
}

body[data-page="market_insights"] .kd-matrix-card .kd-matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.3rem;
}

body[data-page="market_insights"] .kd-matrix-card .kd-matrix-head h2 {
  margin: 0;
}

body[data-page="market_insights"] .kd-matrix-card .chart-subtitle {
  margin: 0 0 0.45rem;
}

body[data-page="market_insights"] .kd-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  margin: 0;
  flex-wrap: wrap;
}

body[data-page="market_insights"] .kd-category-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  margin: 0;
  flex-wrap: wrap;
}

body[data-page="market_insights"] .kd-map-toolbar label {
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 700;
}

body[data-page="market_insights"] .kd-category-toolbar label {
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 700;
}

body[data-page="market_insights"] .kd-map-toolbar select {
  min-width: 180px;
  max-width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font-weight: 700;
  padding: 0.58rem 0.8rem;
  box-shadow: none;
}

body[data-page="market_insights"] .kd-category-toolbar select {
  min-width: 180px;
  max-width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font-weight: 700;
  padding: 0.58rem 0.8rem;
  box-shadow: none;
}

body[data-page="market_insights"] .kd-map-legend {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
}

@media (max-width: 1320px) {
  #panel-kpi-details .f-chart-grid.two-col > .results {
    min-height: 520px;
  }
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.mi-customer-row {
  background: #fff7d6;
}

body[data-page="market_insights"] .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.mi-customer-row:hover {
  background: #fef0b5;
}

body[data-page="market_insights"] .kd-map-legend-title {
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body[data-page="market_insights"] .kd-map-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
}

body[data-page="market_insights"] .kd-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 600;
}

body[data-page="market_insights"] .kd-map-legend-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid #d6d3d1;
  border-radius: 4px;
  flex: 0 0 auto;
}

body[data-page="market_insights"] .chart-note {
  margin: 0.55rem 0 0;
  color: #6b7280;
  font-size: 0.74rem;
  line-height: 1.35;
}

body[data-page="market_insights"] .chart-note-compact {
  text-align: left;
}

body[data-page="market_insights"] #kd-map.leaflet-container {
  position: relative !important;
  inset: auto !important;
  z-index: 1;
}

body[data-page="market_insights"] #panel-kpi-details .results:last-child {
  position: relative;
  overflow: hidden;
}

body[data-page="market_insights"] .tabulator {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

body[data-page="market_insights"] .tabulator .tabulator-footer {
  background: transparent;
  border-top: 1px solid #e8e8e8;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page {
  color: #6b7280 !important;
  background: transparent;
  border: 0;
  opacity: 1;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page.active {
  color: #1f2937 !important;
  background: #fff799;
  border-color: transparent;
}

body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page:disabled,
body[data-page="market_insights"] .tabulator .tabulator-footer .tabulator-page.disabled {
  color: #9ca3af !important;
  background: transparent;
  border-color: transparent;
  opacity: 0.45;
}

body[data-page="market_insights"] .go-summary-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.65rem;
}

body[data-page="market_insights"] .go-summary-card {
  min-height: 98px;
  border-radius: 12px;
  border: 1px solid #d6dbe4;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  padding: 0.78rem 0.72rem 0.66rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.22rem;
  text-align: center;
}

body[data-page="market_insights"] .go-summary-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #f2f2f2;
  overflow: hidden;
  border: 1px solid #e4e4e4;
}

body[data-page="market_insights"] .go-summary-progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff799 0%, #ffff99 100%);
  transition: width 0.24s ease;
}

body[data-page="market_insights"] .go-summary-icon-scale,
body[data-page="market_insights"] .go-summary-stars {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-height: 18px;
}

body[data-page="market_insights"] .go-scale-pill {
  width: 20px;
  height: 10px;
  border-radius: 999px;
  background: #ececec;
  border: 1px solid #e1e1e1;
}

body[data-page="market_insights"] .go-scale-pill.is-filled {
  background: #ffff99;
  border-color: #e8d847;
}

body[data-page="market_insights"] .go-star {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
  background: #e5e7eb;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
  overflow: hidden;
}

body[data-page="market_insights"] .go-star-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #ffff99;
}

body[data-page="market_insights"] .go-summary-card-primary {
  border-color: #d6dbe4;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
}

body[data-page="market_insights"] .go-matrix-surface {
  margin-top: 0.9rem;
  padding: 0.8rem;
}

body[data-page="market_insights"] .go-matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(248px, 21vw, 292px);
  gap: 1rem;
  align-items: start;
}

body[data-page="market_insights"] .go-matrix-main {
  min-width: 0;
}

body[data-page="market_insights"] .go-matrix-head h2 {
  margin: 0;
}

body[data-page="market_insights"] .go-matrix-head .chart-subtitle {
  margin: 0.3rem 0 0.7rem;
}

body[data-page="market_insights"] .go-matrix-scroll {
  overflow: auto;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  background: #fbfbfb;
  max-height: clamp(460px, 68vh, 780px);
  padding: 0.62rem 0.34rem 0.45rem;
  scrollbar-gutter: stable;
}

body[data-page="market_insights"] .go-matrix {
  min-width: 688px;
}

body[data-page="market_insights"] .go-matrix-table {
  display: grid;
  gap: 0;
  align-items: stretch;
}

body[data-page="market_insights"] .go-matrix-corner,
body[data-page="market_insights"] .go-matrix-colhead,
body[data-page="market_insights"] .go-matrix-rowhead,
body[data-page="market_insights"] .go-matrix-cell {
  border-bottom: 1px solid #8f8f8f;
}

body[data-page="market_insights"] .go-matrix-corner,
body[data-page="market_insights"] .go-matrix-colhead {
  min-height: 38px;
  background: #dcdcdc;
}

body[data-page="market_insights"] .go-matrix-corner,
body[data-page="market_insights"] .go-matrix-colhead,
body[data-page="market_insights"] .go-matrix-rowhead {
  position: sticky;
}

body[data-page="market_insights"] .go-matrix-corner {
  top: 0;
  left: 0;
  z-index: 6;
}

body[data-page="market_insights"] .go-matrix-colhead {
  top: 0;
  display: grid;
  place-items: center;
  color: #2f2f2f;
  font-size: 0.94rem;
  font-weight: 800;
  z-index: 5;
}

body[data-page="market_insights"] .go-matrix-colhead.is-total-column {
  background: #d7d7d7;
}

body[data-page="market_insights"] .go-matrix-colhead.is-potential-a {
  background: #5ec52a;
  color: #ffffff;
}

body[data-page="market_insights"] .go-matrix-colhead.is-potential-b {
  background: #d8efc7;
  color: #4b5563;
}

body[data-page="market_insights"] .go-matrix-colhead.is-potential-c {
  background: #f8eb8a;
  color: #4b5563;
}

body[data-page="market_insights"] .go-matrix-colhead.is-potential-d {
  background: #efc3c3;
  color: #4b5563;
}

body[data-page="market_insights"] .go-matrix-rowhead {
  left: 0;
  z-index: 4;
  padding: 0.82rem 0.56rem;
  background: #fbfbfb;
  color: #5b5b5b;
  font-size: 0.98rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
}

body[data-page="market_insights"] .go-matrix-rowhead.is-total-row {
  background: #f3f4f6;
  color: #1f2937;
  font-weight: 800;
}

body[data-page="market_insights"] .go-matrix-cell {
  min-height: 214px;
  padding: 0.82rem 0.08rem 0.34rem;
  background: #ffffff;
  display: grid;
  align-content: center;
  justify-items: center;
}

body[data-page="market_insights"] .go-matrix-cell.is-total-row {
  background: #f6f7f7;
}

body[data-page="market_insights"] .go-matrix-cell.is-total-column {
  background: #f6f7f7;
}

body[data-page="market_insights"] .go-stacked-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.1rem;
  min-height: 192px;
  height: 192px;
}

body[data-page="market_insights"] .go-stacked-column {
  width: 52px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

body[data-page="market_insights"] .go-stacked-plot {
  --go-bar-width: 50px;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-direction: column;
  overflow: visible;
}

body[data-page="market_insights"] .go-stacked-plot.is-empty {
  min-height: 0;
  align-items: center;
  justify-content: center;
}

body[data-page="market_insights"] .go-empty-line {
  display: block;
  width: min(56px, 68%);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0.68), rgba(148, 163, 184, 0.18));
}

body[data-page="market_insights"] .go-stacked-percent-value {
  width: 100%;
  margin-bottom: 0.18rem;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  color: #1f2937;
  text-align: center;
}

body[data-page="market_insights"] .go-stacked-bar {
  width: var(--go-bar-width);
  min-height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 0;
  overflow: visible;
  border: 1px solid rgba(32, 32, 32, 0.08);
  cursor: help;
}

body[data-page="market_insights"] .go-stacked-segment {
  display: grid;
  place-items: center;
  width: 100%;
  position: relative;
  min-height: 20px;
}

body[data-page="market_insights"] .go-stacked-inside-label {
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  padding: 0 0.12rem;
}

body[data-page="market_insights"] .go-stacked-inside-label.is-total {
  color: #3f3f46;
}

body[data-page="market_insights"] .go-stacked-inside-label.is-client {
  color: #1f2937;
}

body[data-page="market_insights"] .go-stacked-segment.is-pos-rest,
body[data-page="market_insights"] .go-legend-bar.is-pos-total {
  background: #b9b9bf;
}

body[data-page="market_insights"] .go-stacked-segment.is-pos-client,
body[data-page="market_insights"] .go-legend-bar.is-pos-client {
  background: #fff200;
}

body[data-page="market_insights"] .go-stacked-segment.is-potential-rest,
body[data-page="market_insights"] .go-legend-bar.is-potential-total {
  background: #b9b9bf;
}

body[data-page="market_insights"] .go-stacked-segment.is-potential-client,
body[data-page="market_insights"] .go-legend-bar.is-potential-client {
  background: #ffff99;
}

body[data-page="market_insights"] .go-matrix-cell.is-total-column .go-stacked-segment.is-pos-client,
body[data-page="market_insights"] .go-matrix-cell.is-total-column .go-stacked-segment.is-potential-client {
  background: #cfe8ff;
}

body[data-page="market_insights"] .go-matrix-cell.is-total-column .go-stacked-inside-label.is-client {
  color: #1e3a5f;
}

body[data-page="market_insights"] .go-stacked-axis-label {
  font-size: 0.68rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #475569;
  text-align: center;
  width: 100%;
}

body[data-page="market_insights"] .go-matrix-side {
  display: grid;
  gap: 1rem;
  align-content: start;
  margin-top: 1.4rem;
}

body[data-page="market_insights"] .go-matrix-control {
  display: grid;
  gap: 0.5rem;
}

body[data-page="market_insights"] .go-matrix-control > span,
body[data-page="market_insights"] .go-matrix-legend h3 {
  color: #334155;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

body[data-page="market_insights"] .go-matrix-toggle {
  display: grid;
  gap: 0.48rem;
}

body[data-page="market_insights"] .go-matrix-toggle-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="market_insights"] .go-matrix-toggle-btn {
  min-height: 40px;
  border: 1px solid #cfd8e4;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #1f2937;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

body[data-page="market_insights"] .go-matrix-toggle-btn.active {
  border-color: #d8ca56;
  background: linear-gradient(180deg, #fff9b2 0%, #f5ee91 100%);
  color: #111827;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 8px 16px rgba(229, 193, 18, 0.18);
}

body[data-page="market_insights"] .go-matrix-toggle-btn:hover {
  border-color: #b8c3d1;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

body[data-page="market_insights"] .go-matrix-toggle-btn.active:hover {
  border-color: #c6b341;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 10px 18px rgba(229, 193, 18, 0.22);
}

body[data-page="market_insights"] .go-matrix-toggle-btn:focus-visible {
  outline: 2px solid rgba(148, 163, 184, 0.5);
  outline-offset: 2px;
}

body[data-page="market_insights"] .go-matrix-legend {
  display: grid;
  gap: 0.5rem;
}

body[data-page="market_insights"] .go-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #57534e;
  font-size: 0.74rem;
}

body[data-page="market_insights"] .go-legend-bar {
  width: 34px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

body[data-page="market_insights"] .go-legend-bar.is-potential-a {
  background: #5ec52a;
}

body[data-page="market_insights"] .go-legend-bar.is-potential-b {
  background: #d8efc7;
}

body[data-page="market_insights"] .go-legend-bar.is-potential-c {
  background: #f8eb8a;
}

body[data-page="market_insights"] .go-legend-bar.is-potential-d {
  background: #efc3c3;
}

@media (max-width: 1280px) {
  body[data-page="market_insights"] .go-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-page="market_insights"] .go-matrix-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="market_insights"] .filters.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-page="market_insights"] .filters.compact .actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  body[data-page="market_insights"] .go-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="market_insights"] .go-matrix-table {
    grid-template-columns: 128px repeat(5, minmax(92px, 1fr));
  }

  body[data-page="market_insights"] .content {
    padding: 0.75rem;
  }

  body[data-page="market_insights"] .hero {
    padding: 1rem;
  }

  body[data-page="market_insights"] .hero h1 {
    font-size: 1.6rem;
  }

  body[data-page="market_insights"] .f-tabs {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
  }

  body[data-page="market_insights"] .filters.compact {
    grid-template-columns: 1fr;
    padding: 0.65rem;
  }

  body[data-page="market_insights"] .filters.compact .actions {
    grid-column: auto;
    width: 100%;
  }

  body[data-page="market_insights"] .filters.compact .actions button {
    flex: 1 1 auto;
  }
}

/* POS 360 page */
body[data-page="pos360"] .p360-content {
  color: #0f172a;
  padding: 1rem 1.2rem 1.5rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body[data-page="pos360"] .p360-hero {
  border: 1px solid var(--ps-line);
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  /*background: linear-gradient(145deg, #ecfeff 0%, #ffffff 56%, #f0fdf4 100%);*/
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-page="pos360"] .p360-hero h1 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

body[data-page="pos360"] .p360-hero p {
  margin: 0.45rem 0 0;
  color: #475569;
}

body[data-page="pos360"] .ps-nav-subtree {
  display: grid;
  gap: 0.38rem;
  margin: 0.25rem 0 0.55rem 1rem;
  padding-left: 0;
  border-left: 0;
}

body[data-page="pos360"] .ps-subnav-link {
  text-decoration: none;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0.18rem 0;
}

body[data-page="pos360"] .ps-subnav-link:hover { color: #111827; }
body[data-page="pos360"] .ps-subnav-link.active { color: #0f172a; }

body[data-page="pos360"] .ps-tabs-wrap { margin-top: 0.9rem; }

body[data-page="pos360"] .ps-tabs {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  width: 100%;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid #d7dde6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}

body[data-page="pos360"] .ps-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334155;
  padding: 0.3rem 0.05rem 0.68rem;
  font-size: 0.96rem;
  font-weight: 500;
  white-space: nowrap;
}

body[data-page="pos360"] .ps-tab:hover {
  color: #111827;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

body[data-page="pos360"] .ps-tab.active {
  color: #0f172a;
  background: transparent;
  border-bottom-color: #111827;
}

body[data-page="pos360"] .p360-panel {
  margin-top: 0.9rem;
}

body[data-page="pos360"] .p360-pos-search-surface {
  margin-top: 0.45rem;
  position: relative;
  z-index: 30;
}

body[data-page="pos360"] .p360-surface {
  border: 1px solid #d8e1ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

body[data-page="pos360"] .p360-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  align-items: stretch;
}

body[data-page="pos360"] .p360-pos-picker {
  position: relative;
  width: 100%;
}

body[data-page="pos360"] .p360-pos-combobox-wrap {
  position: relative;
  width: 100%;
}

body[data-page="pos360"] .p360-pos-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d5deea;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 0.55rem 0.75rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  appearance: none;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

body[data-page="pos360"] .p360-pos-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d5deea;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 0.55rem 0.75rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

body[data-page="pos360"] .p360-pos-search:focus {
  outline: none;
  border-color: #a8bdd7;
  box-shadow: 0 0 0 3px rgba(167, 189, 215, 0.18);
}

body[data-page="pos360"] .p360-pos-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1200;
  display: grid;
  gap: 0.3rem;
  padding: 0.35rem;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
  max-height: 320px;
  overflow: auto;
}

body[data-page="pos360"] .p360-pos-dropdown[hidden] {
  display: none !important;
}

body[data-page="pos360"] .p360-pos-option {
  width: 100%;
  display: grid;
  gap: 0.1rem;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem 0.72rem;
  cursor: pointer;
  color: #0f172a;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

body[data-page="pos360"] .p360-pos-option:hover,
body[data-page="pos360"] .p360-pos-option.selected {
  background: #eef4ff;
}

body[data-page="pos360"] .p360-pos-option-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

body[data-page="pos360"] .p360-pos-option-city {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.2;
}

body[data-page="pos360"] .p360-pos-empty {
  padding: 0.75rem 0.72rem;
  border-radius: 10px;
  color: #64748b;
  font-size: 0.86rem;
}

body[data-page="pos360"] .p360-pos-select:focus {
  outline: none;
  border-color: #a8bdd7;
  box-shadow: 0 0 0 3px rgba(167, 189, 215, 0.18);
}

body[data-page="pos360"] .p360-selected-pos-card {
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #f8fafc;
  padding: 0.72rem;
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: 0.78rem;
  align-items: stretch;
  min-height: 168px;
}

body[data-page="pos360"] .p360-selected-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.2rem;
}

body[data-page="pos360"] .p360-selected-headline {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

body[data-page="pos360"] .p360-selected-pos-card h3 {
  margin: 0.1rem 0 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.95rem;
  line-height: 1.25;
}

body[data-page="pos360"] .p360-selected-pos-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.25;
}

body[data-page="pos360"] .p360-selected-kpis {
  margin-top: 0.38rem;
  gap: 0.34rem;
}

body[data-page="pos360"] .p360-selected-kpis article {
  padding: 0.28rem 0.38rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body[data-page="pos360"] .p360-selected-kpis span {
  font-size: 0.66rem;
}

body[data-page="pos360"] .p360-selected-kpis strong {
  font-size: 0.78rem;
}

body[data-page="pos360"] .p360-selected-franchise {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  color: #334155;
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

body[data-page="pos360"] .p360-selected-franchise img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-page="pos360"] .p360-selected-image {
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

body[data-page="pos360"] .p360-selected-image img {
  width: 100%;
  height: 100%;
  min-height: 144px;
  object-fit: cover;
  display: block;
}

body[data-page="pos360"] .p360-selected-image-empty {
  height: 100%;
  min-height: 144px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.74rem;
}

body[data-page="pos360"] .p360-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 1rem;
}

body[data-page="pos360"] .p360-profile-left {
  display: grid;
  gap: 0.9rem;
}

body[data-page="pos360"] .p360-profile-card {
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  padding: 0.82rem 0.86rem 0.82rem;
  background: #f8fafc;
}

body[data-page="pos360"] .p360-headline {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

body[data-page="pos360"] .p360-franchise {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.32rem;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

body[data-page="pos360"] .p360-profile-card h3 {
  margin: 0.42rem 0 0.16rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.05rem;
}

body[data-page="pos360"] .p360-profile-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
}

body[data-page="pos360"] .p360-kpi-strip {
  margin-top: 0.58rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

body[data-page="pos360"] .p360-kpi-strip.p360-kpi-strip-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="pos360"] .p360-kpi-strip article {
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body[data-page="pos360"] .p360-kpi-strip span {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
}

body[data-page="pos360"] .p360-kpi-strip strong {
  display: block;
  margin-top: 0.08rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.88rem;
  color: #0f172a;
}

body[data-page="pos360"] .p360-image {
  margin-top: 0.62rem;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  overflow: hidden;
  background: #ffffff;
  min-height: 170px;
}

body[data-page="pos360"] .p360-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

body[data-page="pos360"] .p360-image-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.82rem;
}

body[data-page="pos360"] .p360-map-wrap {
  position: relative;
  z-index: 1;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  overflow: hidden;
  min-height: 440px;
}

body[data-page="pos360"] #p360-map {
  width: 100%;
  min-height: 440px;
  height: 100%;
}

.map-filter-overlay[hidden] {
  display: none !important;
}

body[data-page="market_insights"] .map-filter-overlay,
body[data-page="overview"] .map-filter-overlay,
body[data-page="opportunities"] .map-filter-overlay,
body[data-page="pos360"] .map-filter-overlay {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 450;
  width: min(300px, calc(100% - 2rem));
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(238, 238, 238, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px);
}

body[data-page="market_insights"] .map-filter-overlay .filter-group,
body[data-page="overview"] .map-filter-overlay .filter-group,
body[data-page="opportunities"] .map-filter-overlay .filter-group,
body[data-page="pos360"] .map-filter-overlay .filter-group {
  display: grid;
  gap: 0.4rem;
}

body[data-page="market_insights"] .map-filter-overlay .filter-group > label,
body[data-page="overview"] .map-filter-overlay .filter-group > label,
body[data-page="opportunities"] .map-filter-overlay .filter-group > label,
body[data-page="pos360"] .map-filter-overlay .filter-group > label {
  font-size: 0.78rem;
  color: #6b7f99;
  font-weight: 700;
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-buttons, .op-lifecycle-toggle),
body[data-page="overview"] .map-filter-overlay :is(.op-potential-buttons, .op-lifecycle-toggle),
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-buttons, .op-lifecycle-toggle),
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-buttons, .op-lifecycle-toggle) {
  display: grid;
  gap: 0.32rem;
}

body[data-page="market_insights"] .map-filter-overlay .op-potential-buttons,
body[data-page="overview"] .map-filter-overlay .op-potential-buttons,
body[data-page="opportunities"] .map-filter-overlay .op-potential-buttons,
body[data-page="pos360"] .map-filter-overlay .op-potential-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="market_insights"] .map-filter-overlay .op-lifecycle-toggle,
body[data-page="overview"] .map-filter-overlay .op-lifecycle-toggle,
body[data-page="opportunities"] .map-filter-overlay .op-lifecycle-toggle,
body[data-page="pos360"] .map-filter-overlay .op-lifecycle-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn),
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn),
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn),
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn) {
  min-height: 36px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px solid #d5deea;
  background: #ffffff;
  color: #334155;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn):hover,
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn):hover,
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn):hover,
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn):hover {
  border-color: #bac8dc;
  background: #f8fafc;
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="customer"].active,
body[data-page="overview"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="customer"].active,
body[data-page="opportunities"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="customer"].active,
body[data-page="pos360"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="customer"].active {
  background: var(--storelab-lifecycle-customer-active-bg);
  border-color: var(--storelab-lifecycle-customer-active-border);
  color: var(--storelab-lifecycle-customer-active-color);
  box-shadow: 0 10px 18px var(--storelab-lifecycle-customer-active-shadow);
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="prospect"].active,
body[data-page="overview"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="prospect"].active,
body[data-page="opportunities"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="prospect"].active,
body[data-page="pos360"] .map-filter-overlay :is(.op-life-btn, .op-sku-life-btn)[data-lifecycle="prospect"].active {
  background: var(--storelab-lifecycle-prospect-active-bg);
  border-color: var(--storelab-lifecycle-prospect-active-border);
  color: var(--storelab-lifecycle-prospect-active-color);
  box-shadow: 0 10px 18px var(--storelab-lifecycle-prospect-active-shadow);
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="A"].active,
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="A"].active,
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="A"].active,
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="A"].active {
  background: var(--storelab-potential-a-fill);
  border-color: var(--storelab-potential-a-fill);
  color: var(--storelab-potential-a-contrast);
  box-shadow: 0 10px 18px var(--storelab-potential-a-shadow);
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="B"].active,
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="B"].active,
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="B"].active,
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="B"].active {
  background: var(--storelab-potential-b-fill);
  border-color: var(--storelab-potential-b-fill);
  color: var(--storelab-potential-b-contrast);
  box-shadow: 0 10px 18px var(--storelab-potential-b-shadow);
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="C"].active,
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="C"].active,
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="C"].active,
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="C"].active {
  background: var(--storelab-potential-c-fill);
  border-color: var(--storelab-potential-c-fill);
  color: var(--storelab-potential-c-contrast);
  box-shadow: 0 10px 18px var(--storelab-potential-c-shadow);
}

body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="D"].active,
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="D"].active,
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="D"].active,
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-sku-potential-btn)[data-potential="D"].active {
  background: var(--storelab-potential-d-fill);
  border-color: var(--storelab-potential-d-fill);
  color: var(--storelab-potential-d-contrast);
  box-shadow: 0 10px 18px var(--storelab-potential-d-shadow);
}

body[data-page="pos360"] .p360-profile-facts {
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.9rem;
}

body[data-page="pos360"] .p360-profile-facts h3 {
  margin: 0 0 0.55rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1rem;
}

body[data-page="pos360"] .p360-fact-groups {
  margin-top: 0.2rem;
  display: grid;
  gap: 0.62rem;
}

body[data-page="pos360"] .p360-fact-panel {
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  padding: 0.6rem 0.65rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

body[data-page="pos360"] .p360-fact-panel h4 {
  margin: 0;
  font-size: 0.8rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  color: #334155;
}

body[data-page="pos360"] .p360-fact-lines {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.4rem;
}

body[data-page="pos360"] .p360-fact-line {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.42rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

body[data-page="pos360"] .p360-fact-line span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-page="pos360"] .p360-fact-line strong {
  display: block;
  color: #0f172a;
  font-size: 0.82rem;
  line-height: 1.24;
  text-align: right;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="pos360"] .p360-potential-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

body[data-page="pos360"] .p360-potential-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.42rem 0.5rem;
}

body[data-page="pos360"] .p360-potential-card span {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

body[data-page="pos360"] .p360-potential-card strong {
  display: block;
  margin-top: 0.12rem;
  color: #0f172a;
  font-size: 0.84rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="pos360"] .p360-sales-wrap {
  padding: 1rem 1.1rem;
}

body[data-page="pos360"] .p360-sales-content {
  display: grid;
  gap: 0.85rem;
}

body[data-page="pos360"] .p360-sales-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

body[data-page="pos360"] .p360-sales-kpi {
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.58rem 0.68rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body[data-page="pos360"] .p360-sales-kpi span {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

body[data-page="pos360"] .p360-sales-kpi strong {
  display: block;
  margin-top: 0.16rem;
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.95rem;
}

body[data-page="pos360"] .p360-sales-kpi strong.is-positive {
  color: #047857;
}

body[data-page="pos360"] .p360-sales-kpi strong.is-negative {
  color: #b42318;
}

body[data-page="pos360"] .p360-sales-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.72rem;
}

body[data-page="pos360"] .p360-sales-card {
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.7rem;
}

body[data-page="pos360"] .p360-sales-card > header,
body[data-page="pos360"] .p360-sales-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

body[data-page="pos360"] .p360-sales-card h3 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.98rem;
}

body[data-page="pos360"] .p360-sales-subhead {
  margin-top: 0.38rem;
}

body[data-page="pos360"] .p360-sales-toggle {
  display: inline-flex;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

body[data-page="pos360"] .p360-sales-toggle button {
  border: 0;
  background: #ffffff;
  color: #475569;
  min-width: 52px;
  padding: 0.3rem 0.52rem;
  font-size: 0.76rem;
  font-weight: 800;
}

body[data-page="pos360"] .p360-sales-toggle button + button {
  border-left: 1px solid #d8e1ef;
}

body[data-page="pos360"] .p360-sales-toggle button.active {
  background: #b91c1c;
  color: #ffffff;
}

body[data-page="pos360"] .p360-sales-legend {
  display: inline-flex;
  gap: 0.7rem;
  color: #64748b;
  font-size: 0.74rem;
  margin-top: 0.35rem;
}

body[data-page="pos360"] .p360-sales-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
}

body[data-page="pos360"] .p360-sales-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

body[data-page="pos360"] .p360-sales-legend .dot.current {
  background: #b91c1c;
}

body[data-page="pos360"] .p360-sales-legend .dot.previous {
  background: #fca5a5;
}

body[data-page="pos360"] .p360-monthly-chart {
  margin-top: 0.45rem;
  height: 170px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.34rem;
  padding: 0.45rem 0.52rem;
}

body[data-page="pos360"] .p360-monthly-col {
  flex: 1 1 0;
  display: grid;
  gap: 0.22rem;
  justify-items: center;
}

body[data-page="pos360"] .p360-monthly-col small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

body[data-page="pos360"] .p360-monthly-bars {
  display: inline-flex;
  align-items: end;
  gap: 0.2rem;
  min-height: 126px;
}

body[data-page="pos360"] .p360-monthly-bars .bar {
  width: 12px;
  border-radius: 4px 4px 2px 2px;
  display: inline-block;
}

body[data-page="pos360"] .p360-monthly-bars .bar.current {
  background: #b91c1c;
}

body[data-page="pos360"] .p360-monthly-bars .bar.previous {
  background: #fca5a5;
}

body[data-page="pos360"] .p360-top-chart {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.45rem;
}

body[data-page="pos360"] .p360-top-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr);
  gap: 0.55rem;
  align-items: center;
}

body[data-page="pos360"] .p360-top-label {
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

body[data-page="pos360"] .p360-top-bars {
  position: relative;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

body[data-page="pos360"] .p360-top-bars .bar {
  display: block;
  height: 10px;
  border-radius: 6px;
  margin-left: 5px;
}

body[data-page="pos360"] .p360-top-bars .bar.current {
  margin-top: 4px;
  background: #b91c1c;
}

body[data-page="pos360"] .p360-top-bars .bar.previous {
  margin-top: 2px;
  background: #fca5a5;
}

body[data-page="pos360"] .p360-optimal-wrap {
  padding: 0.95rem 1.05rem;
}

body[data-page="pos360"] .p360-optimal-content {
  display: grid;
  gap: 0.75rem;
}

body[data-page="pos360"] .p360-optimal-head h3 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.02rem;
}

body[data-page="pos360"] .p360-optimal-head p {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

body[data-page="pos360"] .p360-optimal-summary {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.58rem;
  overflow-x: auto;
  padding-bottom: 0.08rem;
}

body[data-page="pos360"] .p360-optimal-summary article {
  flex: 0 0 calc((100% - 2.32rem) / 5);
  min-width: 168px;
  border: 1px solid #d8e1ef;
  border-radius: 11px;
  background: #f8fafc;
  padding: 0.52rem 0.62rem;
}

body[data-page="pos360"] .p360-optimal-summary span {
  display: block;
  font-size: 0.73rem;
  color: #64748b;
  font-weight: 700;
}

body[data-page="pos360"] .p360-optimal-summary strong {
  display: block;
  margin-top: 0.14rem;
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.93rem;
}

body[data-page="pos360"] .p360-optimal-summary strong.is-positive {
  color: #047857;
}

body[data-page="pos360"] .p360-optimal-summary strong.is-negative {
  color: #b42318;
}

body[data-page="pos360"] .p360-optimal-groups {
  border: 1px solid #d8e1ef;
  border-radius: 13px;
  padding: 0.62rem;
  background: #ffffff;
  max-height: 610px;
  overflow: auto;
}

body[data-page="pos360"] .p360-optimal-group + .p360-optimal-group {
  margin-top: 0.72rem;
}

body[data-page="pos360"] .p360-optimal-group h4 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 0.97rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

body[data-page="pos360"] .p360-optimal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

body[data-page="pos360"] .p360-optimal-dot.must {
  background: #b91c1c;
}

body[data-page="pos360"] .p360-optimal-dot.nice {
  background: #f97316;
}

body[data-page="pos360"] .p360-optimal-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

body[data-page="pos360"] .p360-optimal-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
  padding: 0.52rem 0;
  border-bottom: 1px solid #e2e8f0;
}

body[data-page="pos360"] .p360-optimal-item:last-child {
  border-bottom: none;
}

body[data-page="pos360"] .p360-optimal-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  overflow: hidden;
  display: grid;
  place-items: center;
}

body[data-page="pos360"] .p360-optimal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-page="pos360"] .p360-optimal-thumb-empty {
  color: #94a3b8;
  font-size: 0.65rem;
  text-align: center;
  padding: 0.2rem;
}

body[data-page="pos360"] .p360-optimal-name {
  margin: 0;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.3;
}

body[data-page="pos360"] .p360-optimal-name strong {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  color: #0f172a;
}

body[data-page="pos360"] .p360-optimal-name span {
  color: #64748b;
}

body[data-page="pos360"] .p360-optimal-bar {
  margin-top: 0.26rem;
  height: 11px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  overflow: hidden;
}

body[data-page="pos360"] .p360-optimal-fill {
  height: 100%;
  border-radius: 999px;
}

body[data-page="pos360"] .p360-optimal-item.must .p360-optimal-fill {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

body[data-page="pos360"] .p360-optimal-item.nice .p360-optimal-fill {
  background: linear-gradient(90deg, #fdba74, #f97316);
}

body[data-page="pos360"] .p360-optimal-desc {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.79rem;
  line-height: 1.3;
}

body[data-page="pos360"] .p360-ev-wrap {
  padding: 0.95rem 1.05rem;
}

body[data-page="pos360"] .p360-ev-content {
  display: grid;
  gap: 0.85rem;
}

body[data-page="pos360"] .p360-ev-head h3 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.02rem;
}

body[data-page="pos360"] .p360-ev-head p {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.79rem;
  font-weight: 700;
}

body[data-page="pos360"] .p360-ev-block {
  display: none;
}

body[data-page="pos360"] .p360-ev-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 1.6rem;
  align-items: stretch;
}

body[data-page="pos360"] .p360-ev-column {
  min-width: 0;
  padding: 0.15rem 0.2rem 0.05rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

body[data-page="pos360"] .p360-ev-column-head {
  padding: 0 0.1rem;
}

body[data-page="pos360"] .p360-ev-column-head h4 {
  margin: 0;
  color: #0f172a;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1rem;
}

body[data-page="pos360"] .p360-ev-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, #d8e1ef 12%, #d8e1ef 88%, transparent);
  align-self: stretch;
  justify-self: center;
}

body[data-page="pos360"] .p360-ev-items {
  display: grid;
  gap: 0.7rem;
}

body[data-page="pos360"] .p360-ev-item {
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.55rem 0.6rem;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

body[data-page="pos360"] .p360-ev-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  display: grid;
  place-items: center;
}

body[data-page="pos360"] .p360-ev-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-page="pos360"] .p360-ev-thumb-empty {
  color: #94a3b8;
  font-size: 0.6rem;
}

body[data-page="pos360"] .p360-ev-name {
  color: #0f172a;
  font-size: 0.92rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  line-height: 1.2;
}

body[data-page="pos360"] .p360-placeholder h2 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

body[data-page="pos360"] .p360-placeholder p {
  margin: 0.3rem 0 0;
  color: #64748b;
}

body[data-page="pos360"] .p360-panel[hidden],
body[data-page="pos360"] #p360-profile-grid[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  body[data-page="pos360"] .p360-profile-grid {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-sales-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="pos360"] .p360-sales-grid {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-optimal-summary {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  body[data-page="pos360"] .p360-filter-row {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-selected-pos-card {
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  }
  body[data-page="pos360"] .p360-ev-block {
    display: none;
  }
}

@media (max-width: 768px) {
  body[data-page="pos360"] .p360-content {
    padding: 0.75rem;
  }

  body[data-page="pos360"] .ps-tabs {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
  }

  body[data-page="pos360"] .p360-filter-row {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-sales-kpis {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-fact-line {
    flex-direction: column;
    align-items: flex-start;
  }
  body[data-page="pos360"] .p360-fact-line strong {
    text-align: left;
  }
  body[data-page="pos360"] .p360-potential-grid {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-top-row {
    grid-template-columns: 1fr;
  }
  body[data-page="pos360"] .p360-optimal-summary {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  body[data-page="pos360"] .p360-optimal-item {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 0.5rem;
  }
  body[data-page="pos360"] .p360-optimal-thumb {
    width: 50px;
    height: 50px;
  }
  body[data-page="pos360"] .p360-ev-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  body[data-page="pos360"] .p360-ev-thumb {
    width: 56px;
    height: 56px;
  }
  body[data-page="pos360"] .p360-ev-columns {
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }
  body[data-page="pos360"] .p360-ev-divider {
    display: none;
  }
}

/* Global shell refresh */
:root {
  --shell-bg-base: #f5f5f5;
  --shell-bg-glow: #ffffeb;
  --shell-surface: rgba(255, 255, 255, 0.78);
  --shell-panel: #fcfcfc;
  --shell-card: #ffffff;
  --shell-line: #eeeeee;
  --shell-line-strong: #dadada;
  --shell-accent-soft: #ffffeb;
  --shell-accent: #ffff99;
  --shell-accent-strong: #ffff52;
  --shell-ink: #36383a;
  --shell-muted: #616161;
  --shell-sidebar: #ffffff;
  --shell-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  --storelab-potential-a-fill: #55b832;
  --storelab-potential-a-border: #2f7d1c;
  --storelab-potential-a-contrast: #ffffff;
  --storelab-potential-a-shadow: rgba(21, 94, 54, 0.22);
  --storelab-potential-b-fill: #d9f2d0;
  --storelab-potential-b-border: #8dbc7e;
  --storelab-potential-b-contrast: #000000;
  --storelab-potential-b-shadow: rgba(21, 128, 61, 0.22);
  --storelab-potential-c-fill: #faf198;
  --storelab-potential-c-border: #cdbf48;
  --storelab-potential-c-contrast: #000000;
  --storelab-potential-c-shadow: rgba(161, 98, 7, 0.22);
  --storelab-potential-d-fill: #eec0c0;
  --storelab-potential-d-border: #cf8f8f;
  --storelab-potential-d-contrast: #000000;
  --storelab-potential-d-shadow: rgba(185, 28, 28, 0.22);
  --storelab-potential-unknown-fill: #64748b;
  --storelab-potential-unknown-border: #475569;
  --storelab-potential-unknown-contrast: #f8fafc;

  --storelab-lifecycle-customer-border: rgba(148, 163, 184, 0.42);
  --storelab-lifecycle-customer-bg: linear-gradient(140deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.94) 100%);
  --storelab-lifecycle-customer-color: #1f2937;
  --storelab-lifecycle-customer-hover-border: rgba(100, 116, 139, 0.48);
  --storelab-lifecycle-customer-hover-bg: linear-gradient(140deg, rgba(241, 245, 249, 1) 0%, rgba(226, 232, 240, 0.96) 100%);
  --storelab-lifecycle-customer-hover-color: #334155;
  --storelab-lifecycle-customer-active-border: #dceaf7;
  --storelab-lifecycle-customer-active-bg: #dceaf7;
  --storelab-lifecycle-customer-active-color: #1f2937;
  --storelab-lifecycle-customer-active-shadow: rgba(100, 116, 139, 0.18);

  --storelab-lifecycle-prospect-border: rgba(148, 163, 184, 0.42);
  --storelab-lifecycle-prospect-bg: linear-gradient(140deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.94) 100%);
  --storelab-lifecycle-prospect-color: #1f2937;
  --storelab-lifecycle-prospect-hover-border:rgba(100, 116, 139, 0.48);
  --storelab-lifecycle-prospect-hover-bg: linear-gradient(140deg, rgba(241, 245, 249, 1) 0%, rgba(226, 232, 240, 0.96) 100%);
  --storelab-lifecycle-prospect-hover-color: #334155;
  --storelab-lifecycle-prospect-active-border:#dceaf7;
  --storelab-lifecycle-prospect-active-bg: #dceaf7;
  --storelab-lifecycle-prospect-active-color:  #1f2937;
  --storelab-lifecycle-prospect-active-shadow: rgba(100, 116, 139, 0.18);
}

body {
  background-color: var(--shell-bg-base);
  background-image: radial-gradient(58.26% 38.28% at 18.05% 7.14%, var(--shell-bg-glow) 0%, var(--shell-bg-base) 100%);
  color: var(--shell-ink);
}

.layout {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
}

body.sidebar-collapsed .layout {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar {
  background: var(--shell-sidebar);
  border-right: 1px solid var(--shell-line);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.sidebar-head {
  display: flex;
  /*justify-content: space-between;*/
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  margin-bottom: 28px;
  margin-top:1.55rem;
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--shell-ink);
  box-shadow: none;
  padding: 0;
}

.sidebar-toggle:hover {
  background: var(--shell-accent-soft);
  border-color: var(--shell-line-strong);
}

.sidebar-toggle span {
  width: 16px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  margin: 2px 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--shell-ink);
  min-width: 0;
  margin-left: 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-wordmark {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.shell-nav {
  display: grid;
  gap: 0.34rem;
  margin-top: 0.35rem;
  /*flex: 1 1 auto;*/
}

.shell-nav a {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--shell-ink);
  border: 1px solid transparent;
  background: transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  font-size: 1.04rem;
  font-weight: 500;
}

.shell-nav a::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background-color: currentColor;
  opacity: 0.72;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.nav-link-map::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 3 9v12h6v-7h6v7h6V9zm0 2.3 6 4.2V19h-2v-7H8v7H6V9.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 3 9v12h6v-7h6v7h6V9zm0 2.3 6 4.2V19h-2v-7H8v7H6V9.5z'/%3E%3C/svg%3E");
}

.nav-link-insights::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v2H4zm2 4h4v12H6zm5 3h4v9h-4zm5-5h4v14h-4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16v2H4zm2 4h4v12H6zm5 3h4v9h-4zm5-5h4v14h-4z'/%3E%3C/svg%3E");
}

.nav-link-perfect-store::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18l-1 5H4zm2 7h14v7H5zm2 2v3h4v-3zm6 0v3h4v-3z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18l-1 5H4zm2 7h14v7H5zm2 2v3h4v-3zm6 0v3h4v-3z'/%3E%3C/svg%3E");
}

.nav-link-opportunities::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19V5h2v14zm5 0V9h2v10zm5 0V12h2v7zm5 0V7h2v12z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19V5h2v14zm5 0V9h2v10zm5 0V12h2v7zm5 0V7h2v12z'/%3E%3C/svg%3E");
}

.nav-link-pos360::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7m0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7m0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5'/%3E%3C/svg%3E");
}

.shell-nav a:hover {
  background: var(--shell-accent-soft);
  border-color: transparent;
  color: var(--shell-muted);
}

.shell-nav a.active {
  background: var(--shell-accent);
  border-color: transparent;
  box-shadow: none;
  font-weight: 800;
}

.nav-link-label {
  min-width: 0;
}

.content {
  padding: 1.1rem 1.35rem 1.5rem;
}

.shell-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.65rem;
  margin-top: 1.65rem;
  min-height: 1.55rem;
}

.shell-title-block {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}

.shell-breadcrumb {
  margin: 0;
  color: #999999;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.shell-page-title {
  margin: 0;
  color: var(--shell-ink);
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2.2rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.shell-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.8rem;
}

.shell-selected-filters {
  margin: -0.35rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell-selected-filters-label {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shell-selected-filters-list {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shell-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 34px;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: #ffffff;
  color: #4b5563;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.shell-filter-chip-actionable {
  cursor: pointer;
  appearance: none;
  font: inherit;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.shell-filter-chip-actionable:hover {
  border-color: rgba(148, 163, 184, 0.9);
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.shell-filter-chip-actionable:focus-visible {
  outline: 2px solid rgba(148, 163, 184, 0.45);
  outline-offset: 2px;
}

/* Shared subtle lift for chips and KPI cards across pages */
:root {
  --storelab-hover-lift: translateY(-2px);
  --storelab-hover-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.shell-filter-chip-actionable,
.kpis article,
body[data-page="map"] .mu-kpi-card,
body[data-page="market_insights"] .go-summary-card,
body[data-page="overview"] .ps-kpi-card,
body[data-page="overview"] .ps-insight-card,
body[data-page="opportunities"] .op-summary-card,
body[data-page="pos360"] .p360-kpi-strip article,
body[data-page="pos360"] .p360-sales-kpi,
body[data-page="pos360"] .p360-selected-kpis article {
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .shell-filter-chip-actionable:hover,
  .kpis article:hover,
  body[data-page="map"] .mu-kpi-card:hover,
  body[data-page="market_insights"] .go-summary-card:hover,
  body[data-page="overview"] .ps-kpi-card:hover,
  body[data-page="overview"] .ps-insight-card:hover,
  body[data-page="opportunities"] .op-summary-card:hover,
  body[data-page="pos360"] .p360-kpi-strip article:hover,
  body[data-page="pos360"] .p360-sales-kpi:hover,
  body[data-page="pos360"] .p360-selected-kpis article:hover {
    transform: var(--storelab-hover-lift);
    box-shadow: var(--storelab-hover-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell-filter-chip-actionable,
  .kpis article,
  body[data-page="map"] .mu-kpi-card,
  body[data-page="market_insights"] .go-summary-card,
  body[data-page="overview"] .ps-kpi-card,
  body[data-page="overview"] .ps-insight-card,
  body[data-page="opportunities"] .op-summary-card,
  body[data-page="pos360"] .p360-kpi-strip article,
  body[data-page="pos360"] .p360-sales-kpi,
  body[data-page="pos360"] .p360-selected-kpis article {
    transition: box-shadow 0.2s ease;
    transform: none !important;
  }
}

.shell-filter-chip-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #6b7280;
}

.shell-filter-chip-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: #111827;
}

.shell-filter-chip-remove {
  width: 18px;
  height: 18px;
  margin-left: 0.08rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  position: relative;
  flex: 0 0 auto;
}

.shell-filter-chip-remove::before,
.shell-filter-chip-remove::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 1.5px;
  background: #4b5563;
  border-radius: 999px;
  transform-origin: center;
}

.shell-filter-chip-remove::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.shell-filter-chip-remove::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.shell-select-card {
  min-width: 190px;
  display: grid;
  gap: 0.18rem;
  padding: 0.7rem 0.95rem 0.7rem 2.75rem;
  border: 1px solid var(--shell-line);
  border-radius: 13px;
  background: var(--shell-card);
  box-shadow: 0 12px 18px rgba(15, 23, 42, 0.04);
  position: relative;
}

.shell-select-card:hover {
  border-color: var(--shell-line-strong);
}

.shell-select-card::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 50%;
  width: 18px;
  height: 18px;
  background: var(--shell-ink);
  transform: translateY(-50%);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.shell-select-card[for="shell-country"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m6.9 9h-3a15.7 15.7 0 0 0-1.3-5A8.05 8.05 0 0 1 18.9 11M12 4.05A13.7 13.7 0 0 1 13.93 11h-3.86A13.7 13.7 0 0 1 12 4.05M5.1 13h3a15.7 15.7 0 0 0 1.3 5A8.05 8.05 0 0 1 5.1 13M5.1 11A8.05 8.05 0 0 1 9.4 6a15.7 15.7 0 0 0-1.3 5zm6.9 8a13.7 13.7 0 0 1-1.93-6h3.86A13.7 13.7 0 0 1 12 19.95M14.6 18a15.7 15.7 0 0 0 1.3-5h3a8.05 8.05 0 0 1-4.3 5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m6.9 9h-3a15.7 15.7 0 0 0-1.3-5A8.05 8.05 0 0 1 18.9 11M12 4.05A13.7 13.7 0 0 1 13.93 11h-3.86A13.7 13.7 0 0 1 12 4.05M5.1 13h3a15.7 15.7 0 0 0 1.3 5A8.05 8.05 0 0 1 5.1 13M5.1 11A8.05 8.05 0 0 1 9.4 6a15.7 15.7 0 0 0-1.3 5zm6.9 8a13.7 13.7 0 0 1-1.93-6h3.86A13.7 13.7 0 0 1 12 19.95M14.6 18a15.7 15.7 0 0 0 1.3-5h3a8.05 8.05 0 0 1-4.3 5'/%3E%3C/svg%3E");
}

.shell-select-card[for="shell-channel"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16l-1.5 9h-13zM7 3h2v3H7zm8 0h2v3h-2zM8 15a3 3 0 0 0-3 3v1h2v-1a1 1 0 0 1 2 0v1h2v-1a3 3 0 0 0-3-3m8 0a3 3 0 0 0-3 3v1h2v-1a1 1 0 0 1 2 0v1h2v-1a3 3 0 0 0-3-3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16l-1.5 9h-13zM7 3h2v3H7zm8 0h2v3h-2zM8 15a3 3 0 0 0-3 3v1h2v-1a1 1 0 0 1 2 0v1h2v-1a3 3 0 0 0-3-3m8 0a3 3 0 0 0-3 3v1h2v-1a1 1 0 0 1 2 0v1h2v-1a3 3 0 0 0-3-3'/%3E%3C/svg%3E");
}

.shell-select-card[for="shell-segment"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z'/%3E%3C/svg%3E");
}

.shell-select-label {
  color: var(--shell-muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.shell-select-card select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2336383a' d='M1.41.59 6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 12px 8px;
  box-shadow: none;
  color: var(--shell-ink);
  font-size: 0.95rem;
  font-weight: 400;
  padding: 0 1.4rem 0 0;
}

.shell-select-card select::-ms-expand {
  display: none;
}

.shell-select-card select:focus {
  outline: none;
}

.hero,
body[data-page="overview"] .ps-hero,
body[data-page="opportunities"] .op-hero,
body[data-page="pos360"] .p360-hero {
  border: 1px solid var(--shell-line);
  border-radius: 22px;
  background: var(--shell-surface);
  box-shadow: none;
  padding: 1rem 1.2rem;
}

.shell-hero-card h1 {
  display: none;
}

.shell-hero-card p,
.shell-hero-card .ps-subtitle {
  margin: 0;
  color: var(--shell-muted);
  font-size: 0.98rem;
  line-height: 1.45;
  max-width: 78ch;
}

.map-top-sticky {
  background: transparent;
  padding-bottom: 0.8rem;
}

.filters,
body[data-page="overview"] .ps-optimal-filters,
body[data-page="opportunities"] .op-filters,
.results,
.dist-panel,
.kpis article,
.insights-grid article,
.insights-panels article,
.f-tabs,
body[data-page="overview"] .ps-tabs,
body[data-page="opportunities"] .ps-tabs,
body[data-page="pos360"] .ps-tabs,
.map-wrap,
.pos-list-panel,
.op-surface,
body[data-page="overview"] .ps-surface {
  background: var(--shell-panel);
  border-color: var(--shell-line);
  box-shadow: var(--shell-shadow);
}

.filters,
body[data-page="overview"] .ps-optimal-filters,
body[data-page="opportunities"] .op-filters,
body[data-page="pos360"] .p360-surface {
  background: var(--shell-card);
}

.map-wrap {
  padding: 1rem;
  border-radius: 24px;
}

.results,
.dist-panel,
.op-surface,
body[data-page="overview"] .ps-surface,
body[data-page="pos360"] .p360-surface {
  border-radius: 20px;
}

.filters,
body[data-page="overview"] .ps-optimal-filters,
body[data-page="opportunities"] .op-filters {
  border-radius: 18px;
}

.f-tabs,
body[data-page="overview"] .ps-tabs,
body[data-page="opportunities"] .ps-tabs,
body[data-page="pos360"] .ps-tabs {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
  width: 100%;
  padding: 0 0 0.12rem;
  border: 0;
  border-bottom: 1px solid #d7dde6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
  overflow-y: hidden;
}

label {
  color: var(--shell-ink);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

input,
select,
button {
  border-radius: 12px;
}

input,
select {
  min-height: 44px;
  border: 1px solid var(--shell-line);
  background: var(--shell-card);
  color: var(--shell-ink);
  box-shadow: none;
}

button {
  background: var(--shell-ink);
}

button.secondary {
  background: var(--shell-card);
  border: 1px solid var(--shell-line);
  color: var(--shell-ink);
}

.f-tab,
.ps-tab {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334155;
  padding: 0.3rem 0.05rem 0.68rem;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.f-tab:hover,
.ps-tab:hover {
  color: #111827;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

.f-tab.active,
.ps-tab.active {
  font-weight: 500;
  background: transparent;
  border-bottom-color: #111827;
  color: #0f172a;
  box-shadow: none;
}

.kpis article p,
.insights-grid p,
body[data-page="overview"] .ps-zone-head h2,
body[data-page="opportunities"] .op-surface h2,
body[data-page="pos360"] .p360-hero h1 {
  color: var(--shell-ink);
}

.ps-nav-subtree {
  margin-left: 1.1rem;
  padding-left: 0;
  border-left: 0;
  display: grid;
  gap: 6px;
}

.ps-subnav-link {
  display: block;
  min-height: 32px;
  padding: 6px 14px 6px 18px !important;
  margin-left: 10px;
  color: var(--shell-muted);
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  position: relative;
}

.shell-nav .ps-subnav-link::before {
  content: "-";
  width: auto;
  height: auto;
  flex: 0 0 auto;
  background: none;
  opacity: 0.55;
  margin-right: 0.35rem;
  mask: none;
  -webkit-mask: none;
}

.ps-subnav-link.active {
  color: var(--shell-ink);
  font-weight: 600;
  background: var(--shell-accent);
}

.shell-nav .shell-nav-subtree {
  margin-left: 0.95rem;
  padding-left: 0;
  border-left: 0;
  display: grid;
  gap: 0.12rem;
}

.shell-nav .shell-nav-subtab {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: auto;
  margin-left: 0;
  padding: 0.34rem 0 0.45rem !important;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.25;
}

.shell-nav .shell-nav-subtab::before {
  content: none;
  display: none;
}

.shell-nav .shell-nav-subtab:hover {
  color: #111827;
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

.shell-nav .shell-nav-subtab.active {
  color: #0f172a;
  font-weight: 600;
  background: transparent;
  border-bottom-color: #111827;
}

.shell-nav .shell-nav-subtab.is-disabled {
  color: #d6dbe3;
  cursor: not-allowed;
  pointer-events: none;
  border-bottom-color: transparent;
  font-weight: 500;
}

.shell-nav .shell-nav-subtab.is-disabled:hover {
  color: #d6dbe3;
  border-bottom-color: transparent;
}

body[data-page="market_insights"] .nav-link-insights.active,
body[data-page="insights"] .nav-link-insights.active,
body[data-page="overview"] .nav-link-perfect-store.active,
body[data-page="opportunities"] .nav-link-opportunities.active,
body[data-page="pos360"] .nav-link-pos360.active {
  background: var(--shell-accent);
  border-color: transparent;
  color: var(--shell-ink);
  box-shadow: none;
  font-weight: 800;
}

.shell-nav-subtree[hidden] {
  display: none !important;
}

.app-footer {
  margin-top: 1rem;
  color: #4d483f;
}

.shell-sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--shell-line-strong);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 0;
}

.shell-sidebar-footer a,
.shell-sidebar-footer button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: #6f695f;
  box-shadow: none;
  padding: 0;
}

.shell-sidebar-footer a:hover,
.shell-sidebar-footer button:hover {
  background: var(--shell-accent-soft);
  border-color: transparent;
  color: var(--shell-muted);
}

.shell-sidebar-footer a::before,
.shell-sidebar-footer button::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.shell-util-account::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4m0 2c-4.33 0-8 2.17-8 5v1h16v-1c0-2.83-3.67-5-8-5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4m0 2c-4.33 0-8 2.17-8 5v1h16v-1c0-2.83-3.67-5-8-5'/%3E%3C/svg%3E");
}

.shell-util-info::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 10h2v7h-2zm0-4h2v2h-2zm1-4a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 10h2v7h-2zm0-4h2v2h-2zm1-4a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8'/%3E%3C/svg%3E");
}

.shell-util-logout::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 17v-2h6V9h-6V7h8v10zm-1-1-4-4 4-4 1.4 1.4L8.8 11H20v2H8.8l1.6 1.6zM4 5h7v2H6v10h5v2H4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 17v-2h6V9h-6V7h8v10zm-1-1-4-4 4-4 1.4 1.4L8.8 11H20v2H8.8l1.6 1.6zM4 5h7v2H6v10h5v2H4z'/%3E%3C/svg%3E");
}

body.sidebar-collapsed .brand-wordmark,
body.sidebar-collapsed .nav-link-label,
body.sidebar-collapsed .ps-nav-subtree {
  display: none;
}

body.sidebar-collapsed .sidebar {
  padding-inline: 13px;
}

body.sidebar-collapsed .brand-link,
body.sidebar-collapsed .shell-nav a {
  justify-content: center;
}

body.sidebar-collapsed .shell-nav a {
  padding-inline: 8px;
}

body.sidebar-collapsed .shell-nav a::before {
  margin-right: 0;
}

body.sidebar-collapsed .shell-sidebar-footer {
  justify-content: space-evenly;
  flex-direction: column;
}

@media (max-width: 1280px) {
  .shell-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .shell-toolbar {
    flex-wrap: wrap;
  }

  .shell-selected-filters {
    flex-direction: column;
    gap: 0.5rem;
  }

  .shell-select-card {
    flex: 1 1 220px;
    min-width: 0;
  }
}

@media (max-width: 1080px) {
  .layout,
  body.sidebar-collapsed .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  body.sidebar-collapsed .brand-wordmark,
  body.sidebar-collapsed .nav-link-label {
    display: inline;
  }

  body.sidebar-collapsed .ps-nav-subtree {
    display: grid;
  }

  .shell-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .content {
    padding: 0.85rem;
  }

  .shell-page-title {
    font-size: 1.72rem;
  }

  .shell-toolbar {
    flex-direction: column;
  }

  .shell-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-head {
    justify-content: space-between;
  }
}

/* Shell nav + table tools refinement */
.shell-nav-grouped {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.shell-nav-grouped .shell-nav-link,
.shell-nav-grouped .shell-nav-parent,
.shell-nav-grouped .shell-nav-child {
  width: 100%;
  min-height: 34px;
  padding: 0.52rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  background: transparent;
  color: var(--shell-ink);
  text-decoration: none;
  font: inherit;
  box-shadow: none;
}

.shell-nav-grouped .shell-nav-parent,
.shell-nav-grouped .shell-nav-link {
  justify-content: flex-start;
}

.shell-nav-grouped .shell-nav-parent {
  cursor: pointer;
}

.shell-nav-grouped .shell-nav-child {
  margin-left: 1.05rem;
  width: calc(100% - 1.05rem);
  color: #a5a9ac;
}

.shell-nav-grouped .shell-nav-link:hover,
.shell-nav-grouped .shell-nav-parent:hover,
.shell-nav-grouped .shell-nav-child:hover {
  background: var(--shell-accent-soft);
  border-color: var(--shell-line);
}

.shell-nav-grouped .shell-nav-link.active,
.shell-nav-grouped .shell-nav-parent.active {
  background: #f4f5f5;
  font-weight: 600;
}

.shell-nav-grouped .shell-nav-child.active {
  background: var(--shell-accent);
  border-color: transparent;
  color: var(--shell-ink);
  font-weight: 700;
}

.shell-nav-grouped .shell-nav-link::before,
.shell-nav-grouped .shell-nav-parent::before,
.shell-nav-grouped .shell-nav-child::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: currentColor;
  opacity: 0.82;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.shell-nav-grouped .shell-nav-link-home::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 3 9v12h6v-7h6v7h6V9zm0 2.3 6 4.2V19h-2v-7H8v7H6V9.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 3 9v12h6v-7h6v7h6V9zm0 2.3 6 4.2V19h-2v-7H8v7H6V9.5z'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-parent-price::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 8 8-8 8-8-8zm0 2.8L6.8 11 12 16.2 17.2 11zm-.9 2.2a1.9 1.9 0 1 0 1.9 1.9 1.9 1.9 0 0 0-1.9-1.9'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3 8 8-8 8-8-8zm0 2.8L6.8 11 12 16.2 17.2 11zm-.9 2.2a1.9 1.9 0 1 0 1.9 1.9 1.9 1.9 0 0 0-1.9-1.9'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-parent-promotions::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10h3l10-4v12l-10-4H3zm15-1 3-1v8l-3-1z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10h3l10-4v12l-10-4H3zm15-1 3-1v8l-3-1z'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-link-data::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h11l3 3v15H5zm2 2v14h10V7.5L15.5 5zm2 4h6v2H9zm0 4h6v2H9z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h11l3 3v15H5zm2 2v14h10V7.5L15.5 5zm2 4h6v2H9zm0 4h6v2H9z'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-child-insights::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 17h2.5l3.2-4 3.4 2.6L18 9l2 1.2-5.5 8-3.5-2.7-3.1 3.8H4zm1-8 2-3 3 2 4-5 2 1.5-5 6.5-3-2-1.5 2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 17h2.5l3.2-4 3.4 2.6L18 9l2 1.2-5.5 8-3.5-2.7-3.1 3.8H4zm1-8 2-3 3 2 4-5 2 1.5-5 6.5-3-2-1.5 2z'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-child-simulation::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v3H4zm1 5h6v9H5zm8 0h6v9h-6z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v3H4zm1 5h6v9H5zm8 0h6v9h-6z'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-child-optimization::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 18h2V6H5zm6 0h2V10h-2zm6 0h2V3h-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 18h2V6H5zm6 0h2V10h-2zm6 0h2V3h-2z'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-child-pos360::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7m0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7m0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5'/%3E%3C/svg%3E");
}

.shell-nav-grouped .shell-nav-chevron {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.shell-nav-grouped .shell-nav-group.is-open .shell-nav-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.shell-nav-grouped .shell-nav-children {
  display: none;
  gap: 0.32rem;
}

.shell-nav-grouped .shell-nav-group.is-open .shell-nav-children {
  display: grid;
}

.shell-nav-grouped .shell-nav-separator {
  height: 1px;
  margin: 1rem 0.9rem 0.7rem;
  background: var(--shell-line-strong);
}

body.sidebar-collapsed .shell-nav-grouped .shell-nav-label,
body.sidebar-collapsed .shell-nav-grouped .shell-nav-chevron,
body.sidebar-collapsed .shell-nav-grouped .shell-nav-children {
  display: none;
}

body.sidebar-collapsed .shell-nav-grouped .shell-nav-link,
body.sidebar-collapsed .shell-nav-grouped .shell-nav-parent {
  justify-content: center;
  padding-inline: 0.55rem;
}

body .table-tools.table-tools-icons {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  width: auto;
  max-width: 100%;
  margin: 0.85rem 0 1rem;
  padding: 0.38rem 0.52rem;
  border: 1px solid var(--shell-line);
  border-radius: 18px;
  background: #f4f5f5;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
}

body .table-tools.table-tools-icons .table-tool-btn,
body .table-tools.table-tools-icons .col-picker.table-tool-columns > summary {
  width: 32px;
  height: 32px;
  border: 0 !important;
  border-radius: 10px;
  padding: 0 !important;
  background: transparent !important;
  color: var(--shell-muted) !important;
  display: inline-grid;
  place-items: center;
  box-shadow: none !important;
  cursor: pointer;
}

body .table-tools.table-tools-icons .table-tool-btn:hover,
body .table-tools.table-tools-icons .col-picker.table-tool-columns > summary:hover {
  background: var(--shell-card) !important;
  color: var(--shell-ink) !important;
}

body .table-tools.table-tools-icons .table-tool-btn::before,
body .table-tools.table-tools-icons .col-picker.table-tool-columns > summary::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

body .table-tools.table-tools-icons .table-tool-search-toggle::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4a6 6 0 1 0 3.9 10.6l4.8 4.8 1.4-1.4-4.8-4.8A6 6 0 0 0 10 4m0 2a4 4 0 1 1-4 4 4 4 0 0 1 4-4'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4a6 6 0 1 0 3.9 10.6l4.8 4.8 1.4-1.4-4.8-4.8A6 6 0 0 0 10 4m0 2a4 4 0 1 1-4 4 4 4 0 0 1 4-4'/%3E%3C/svg%3E");
}

body .table-tools.table-tools-icons .table-tool-export::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v9.17l2.59-2.58L17 11l-5 5-5-5 1.41-1.41L11 12.17zM5 19h14v2H5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v9.17l2.59-2.58L17 11l-5 5-5-5 1.41-1.41L11 12.17zM5 19h14v2H5z'/%3E%3C/svg%3E");
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns > summary::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v14H4zm2 2v3h4V7zm6 0v3h6V7zM6 12v5h4v-5zm6 0v5h6v-5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v14H4zm2 2v3h4V7zm6 0v3h6V7zM6 12v5h4v-5zm6 0v5h6v-5z'/%3E%3C/svg%3E");
}

body .table-tools.table-tools-icons .table-tool-copy {
  display: none !important;
}

body .table-tools.table-tools-icons .table-tool-search-input {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: min(280px, calc(100vw - 3rem));
  min-width: 220px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 6;
}

body .table-tools.table-tools-icons.is-search-open .table-tool-search-input {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns > summary {
  list-style: none;
  font-size: 0;
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns > summary::-webkit-details-marker {
  display: none;
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns > div {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  width: min(260px, calc(100vw - 2rem));
  max-height: min(360px, calc(100vh - 10rem));
  overflow: auto;
  padding: 0.7rem;
  border: 1px solid var(--shell-line);
  border-radius: 14px;
  background: var(--shell-card);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
  z-index: 6;
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns label {
  font-size: 0.84rem;
  color: var(--shell-ink);
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns > div::-webkit-scrollbar {
  width: 8px;
}

body .table-tools.table-tools-icons .col-picker.table-tool-columns > div::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.shell-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 890;
  border: 0;
  padding: 0;
  background: rgba(26, 29, 35, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

body.shell-filter-open {
  overflow: hidden;
}

body.shell-filter-open .shell-filter-overlay {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1080px) {
  body.sidebar-collapsed .shell-nav-grouped .shell-nav-label,
  body.sidebar-collapsed .shell-nav-grouped .shell-nav-chevron {
    display: inline;
  }

  body.sidebar-collapsed .shell-nav-grouped .shell-nav-children {
    display: none;
  }
}

/* Market universe layout refinement */
.layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

body.sidebar-collapsed .layout {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar {
  height: 100vh;
  max-height: 100vh;
}

.shell-toolbar {
  position: relative;
  flex-wrap: nowrap;
}

.shell-filter-dropdown {
  position: relative;
}

.shell-filter-button {
  min-width: 156px;
  min-height: 100%;
  padding: 0.7rem 1rem 0.7rem 2.8rem;
  border: 1px solid var(--shell-line);
  border-radius: 13px;
  background: var(--shell-card);
  color: var(--shell-ink);
  display: inline-flex;
  align-items: center;
  box-shadow: 0 12px 18px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  position: relative;
  list-style: none;
}

.shell-filter-button::-webkit-details-marker {
  display: none;
}

.shell-filter-button::before,
.shell-filter-button::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.shell-filter-button::before {
  left: 1rem;
  width: 18px;
  height: 18px;
  background: var(--shell-ink);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v2H4zm3 5h10v2H7zm3 5h4v2h-4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v2H4zm3 5h10v2H7zm3 5h4v2h-4z'/%3E%3C/svg%3E");
}

.shell-filter-button::after {
  right: 1rem;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-60%) rotate(45deg);
}

.shell-filter-dropdown[open] .shell-filter-button {
  border-color: var(--shell-line-strong);
}

.shell-filter-dropdown[open] .shell-filter-button::after {
  transform: translateY(-25%) rotate(-135deg);
}

.shell-filter-button-label {
  font-size: 0.95rem;
  font-weight: 400;
}

.shell-page-filter-dropdown {
  position: relative;
}

.shell-page-filters-popover {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  width: min(344px, calc(100vw - 1rem));
  max-width: 344px;
  margin-top: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 0;
  border-left: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 0;
  background: #ffffff;
  box-shadow: -18px 0 38px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.shell-filter-drawer-header {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.15rem 0.95rem;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  width: 100%;
  min-width: 0;
}

.shell-filter-drawer-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.shell-filter-drawer-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f2937;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.shell-filter-drawer-actions {
  display: flex;
  justify-content: flex-end;
}

.shell-filter-drawer-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
}

.shell-filter-drawer-close::before,
.shell-filter-drawer-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.75px;
  border-radius: 999px;
  background: currentColor;
}

.shell-filter-drawer-close {
  position: relative;
}

.shell-filter-drawer-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.shell-filter-drawer-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.shell-filter-drawer-clear {
  min-height: 38px;
  border: 1px solid rgba(17, 24, 39, 0.16) !important;
  border-radius: 999px !important;
  padding: 0.55rem 1rem 0.55rem 2rem !important;
  background: #ffffff !important;
  color: #24364d !important;
  box-shadow: none !important;
  position: relative;
}

.shell-filter-drawer-clear::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7h10v2H7zm0 4h7v2H7zm0 4h5v2H7zM5 5h14v14H5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7h10v2H7zm0 4h7v2H7zm0 4h5v2H7zM5 5h14v14H5z'/%3E%3C/svg%3E");
}

.shell-filter-drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.15rem 1.4rem;
  display: grid;
  align-content: start;
  gap: 0.9rem;
  width: 100%;
  min-width: 0;
}

.shell-page-filters-popover .shell-filter-section-stack,
.shell-page-filters-popover .shell-filters-relocated,
.shell-page-filters-popover .p360-filter-row,
.shell-filter-drawer-body .shell-filter-section-stack,
.shell-filter-drawer-body .shell-filters-relocated,
.shell-filter-drawer-body .p360-filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  width: 100%;
}

.shell-page-filters-popover .shell-filters-relocated,
.shell-filter-drawer-body .shell-filters-relocated {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.shell-page-filters-popover .filter-group,
.shell-page-filters-popover .p360-pos-filter,
.shell-filter-drawer-body .filter-group,
.shell-filter-drawer-body .p360-pos-filter {
  width: 100%;
  min-width: 0;
}

.shell-page-filters-popover .filter-group input,
.shell-page-filters-popover .filter-group select,
.shell-page-filters-popover .p360-pos-picker input,
.shell-filter-drawer-body .filter-group input,
.shell-filter-drawer-body .filter-group select,
.shell-filter-drawer-body .p360-pos-picker input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.shell-page-filters-popover .actions,
.shell-page-filters-popover .op-filter-actions,
.shell-filter-drawer-body .actions,
.shell-filter-drawer-body .op-filter-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.shell-filter-drawer-body .actions,
.shell-filter-drawer-body .op-filter-actions {
  display: none !important;
}

.shell-page-filters-popover .actions button,
.shell-page-filters-popover .op-filter-actions button,
.shell-filter-drawer-body .actions button,
.shell-filter-drawer-body .op-filter-actions button {
  width: 100%;
}

.shell-page-filters-popover .p360-selected-pos-card,
.shell-filter-drawer-body .p360-selected-pos-card {
  display: none !important;
}

.shell-page-filters-popover .p360-pos-picker,
.shell-page-filters-popover .op-sku-picker,
.shell-filter-drawer-body .p360-pos-picker,
.shell-filter-drawer-body .op-sku-picker {
  width: 100%;
  min-width: 0;
}

.shell-page-filters-popover .op-potential-buttons,
.shell-page-filters-popover .op-lifecycle-toggle,
.shell-page-filters-popover .op-sku-selected,
.shell-filter-drawer-body .op-potential-buttons,
.shell-filter-drawer-body .op-lifecycle-toggle,
.shell-filter-drawer-body .op-sku-selected {
  width: 100%;
}

.shell-filter-drawer-body > *,
.shell-filter-drawer-body .filter-group > *,
.shell-filter-drawer-body .p360-pos-picker > *,
.shell-filter-drawer-body .shell-filter-section-stack > * {
  min-width: 0;
}

body[data-page="map"] .map-filters-popover.filters.compact {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  width: min(344px, calc(100vw - 1rem));
  max-width: 344px;
  margin-top: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 0;
  border-left: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 0;
  background: #ffffff;
  box-shadow: -18px 0 38px rgba(15, 23, 42, 0.16);
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-page="map"] .map-filters-popover .filter-group,
body[data-page="map"] .map-filters-popover .shell-filter-drawer-body .filter-group {
  width: 100%;
}

body[data-page="map"] .map-filters-popover .actions,
body[data-page="map"] .map-filters-popover .shell-filter-drawer-body .actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

body[data-page="map"] .map-filters-popover button,
body[data-page="map"] .map-filters-popover .shell-filter-drawer-body button {
  width: 100%;
}

body[data-page="map"] .map-top-sticky {
  padding-bottom: 0.45rem;
}

body[data-page="map"] .map-canvas {
  overflow: hidden;
}

body[data-page="map"] .map-overlay-controls {
  position: absolute;
  top: auto;
  bottom: 1rem;
  left: 1rem;
  z-index: 450;
  width: min(300px, calc(100% - 2rem));
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(238, 238, 238, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px);
}

body[data-page="map"] .map-overlay-controls .filter-group {
  display: grid;
  gap: 0.4rem;
}

body[data-page="map"] .map-overlay-controls .filter-group > label {
  font-size: 0.78rem;
  color: #6b7f99;
  font-weight: 700;
}

body[data-page="map"] .map-overlay-controls .op-potential-buttons,
body[data-page="map"] .map-overlay-controls .op-lifecycle-toggle {
  display: grid;
  gap: 0.32rem;
}

body[data-page="map"] .map-overlay-controls .op-potential-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="map"] .map-overlay-controls .op-lifecycle-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="map"] .map-wrap {
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) clamp(288px, 22vw, 380px);
  gap: 1rem;
  align-items: stretch;
  max-height: clamp(620px, calc(100dvh - 250px), 1400px);
}

body.sidebar-collapsed[data-page="map"] .map-wrap {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 360px);
}

body[data-page="map"] .content {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body[data-page="map"] .map-main-pane {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.9rem;
  min-height: 0;
}

body[data-page="map"] .mu-main-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.9rem;
  flex-wrap: wrap;
}

body[data-page="map"] .mu-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem;
  border: 1px solid #ecd6da;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body[data-page="map"] .mu-map-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

body[data-page="map"] .mu-view-btn {
  min-height: 34px;
  padding: 0.46rem 0.96rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #7f5a66;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

body[data-page="map"] .mu-view-btn:hover {
  background: #faf5f6;
  color: #6f4b58;
}

body[data-page="map"] .mu-view-btn.active {
  border-color: #ecc9d1;
  background: #fcecef;
  color: #7d2640;
}

body[data-page="map"] .mu-map-reset-btn {
  min-height: 34px;
  padding: 0.46rem 0.96rem;
  border: 1px solid #d6dde8;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body[data-page="map"] .mu-map-reset-btn:hover {
  border-color: #b9c6d8;
  background: #f8fafc;
  color: #334155;
}

body[data-page="map"] .map-canvas,
body[data-page="map"] .mu-results-panel,
body[data-page="map"] .pos-list-panel {
  min-width: 0;
  height: auto;
  min-height: 0;
  border: 1px solid var(--shell-line);
  border-radius: 20px;
  background: var(--shell-card);
  overflow: hidden;
}

body[data-page="map"] .mu-results-panel {
  padding: 0.75rem 0.75rem 0;
}

body[data-page="map"] .mu-results-panel > .table-tools {
  margin: 0.05rem 0 0.35rem;
  align-items: center;
}

body[data-page="map"] .mu-results-panel[hidden] {
  display: none !important;
}

body[data-page="map"] .mu-results-panel .data-grid {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  margin-top: 0.35rem;
}

body[data-page="map"] #results-grid {
  height: 100%;
  min-height: 0;
}

body[data-page="map"] .mu-native-table-wrap {
  height: 100%;
  overflow: auto;
  border-top: 1px solid #ececec;
  background: #ffffff;
}

body[data-page="map"] .mu-native-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #545454;
  font-size: 0.84rem;
}

body[data-page="map"] .mu-native-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0;
  background: #eeeeee;
  border-top: 1px solid #dddddd;
  border-bottom: 1px solid #dedede;
  text-align: left;
}

body[data-page="map"] .mu-native-table thead th:first-child {
  border-top-left-radius: 8px;
}

body[data-page="map"] .mu-native-table thead th:last-child {
  border-top-right-radius: 8px;
}

body[data-page="map"] .mu-native-sort {
  min-height: 40px;
  width: 100%;
  border: 0;
  padding: 10px 26px 10px 8px;
  background: transparent;
  color: #5f5f5f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
  position: relative;
}

body[data-page="map"] .mu-native-sort::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  opacity: 0.55;
  border-right: 1.5px solid #9d9d9d;
  border-bottom: 1.5px solid #9d9d9d;
  transform: rotate(45deg);
}

body[data-page="map"] .mu-native-sort.is-desc::after {
  transform: rotate(-135deg);
  margin-top: -1px;
}

body[data-page="map"] .mu-native-table tbody tr {
  background: #ffffff;
}

body[data-page="map"] .mu-native-table tbody tr:nth-child(even) {
  background: #fcfcfc;
}

body[data-page="map"] .mu-native-table tbody tr:hover {
  background: #fffef0;
}

body[data-page="map"] .mu-native-table tbody tr.is-active,
body[data-page="map"] .mu-native-table tbody tr.table-row-focus,
body[data-page="map"] .mu-native-table tbody tr.is-active:hover,
body[data-page="map"] .mu-native-table tbody tr.table-row-focus:hover {
  background: #fff9c4;
}

body[data-page="map"] .mu-native-table td {
  min-width: 110px;
  max-width: 220px;
  padding: 10px 8px;
  border-bottom: 1px solid #f0f0f0;
  color: #5b5b5b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="map"] .mu-native-table .mu-native-empty {
  min-width: 0;
  text-align: center;
  color: #6b7280;
}

body[data-page="map"] #results-grid .tabulator,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab {
  height: 100% !important;
  background: transparent !important;
  font-size: 0.84rem;
  text-align: left;
  color: #545454;
  border: 0 !important;
  border-radius: 0;
}

body[data-page="map"] #results-grid .tabulator .tabulator-header,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-header {
  background: #eeeeee !important;
  border-top: 1px solid #dddddd !important;
  border-bottom: 1px solid #dedede !important;
  border-radius: 8px 8px 0 0;
}

body[data-page="map"] #results-grid .tabulator .tabulator-header .tabulator-col,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-header .tabulator-col {
  background: #eeeeee !important;
  border-right: 1px solid #eeeeee !important;
  text-align: left;
}

body[data-page="map"] #results-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-content,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-header .tabulator-col .tabulator-col-content {
  min-height: 40px;
  padding: 10px 8px !important;
  text-align: left;
}

body[data-page="map"] #results-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-title,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-header .tabulator-col .tabulator-col-title {
  color: #5f5f5f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-page="map"] #results-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-sorter,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-header .tabulator-col .tabulator-col-sorter {
  color: #9d9d9d;
}

body[data-page="map"] #results-grid .tabulator .tabulator-header .tabulator-col .tabulator-header-filter,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-header .tabulator-col .tabulator-header-filter {
  display: none;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder {
  border-top: 1px solid #ececec;
  background: #ffffff;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row,
body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.tabulator-row-even,
body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.tabulator-row-odd,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.tabulator-row-even,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.tabulator-row-odd {
  min-height: 38px;
  background: #ffffff !important;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.tabulator-row-even,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.tabulator-row-even {
  background: #fcfcfc !important;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row:hover,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row:hover {
  background: #fffef0 !important;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row .tabulator-cell,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row .tabulator-cell {
  background: transparent !important;
  min-height: 38px;
  padding: 10px 8px !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  justify-content: flex-start !important;
  text-align: left !important;
  color: #5b5b5b;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected,
body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.table-row-focus,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.tabulator-selected,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.table-row-focus {
  background: #fff9c4 !important;
  box-shadow: none;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected:hover,
body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.table-row-focus:hover,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.tabulator-selected:hover,
body[data-page="map"] #results-grid .tabulator.table-skin-pricelab .tabulator-tableholder .tabulator-row.table-row-focus:hover {
  background: #fff9c4 !important;
}

body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.tabulator-selected .tabulator-cell,
body[data-page="map"] #results-grid .tabulator .tabulator-tableholder .tabulator-row.table-row-focus .tabulator-cell {
  background: transparent !important;
}

body[data-page="map"] .pos-list-panel {
  border-left: 1px solid var(--shell-line);
  background: #f3f4f4;
}

body[data-page="map"] .pos-list-head {
  padding: 0.85rem 0.9rem 0.72rem;
  background: #ffffff;
}

body[data-page="map"] .pos-list-head h2 {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body[data-page="map"] .pos-list-scroll {
  padding: 0.7rem;
  background: #f3f4f4;
}

body[data-page="map"] #pos-list-filter {
  min-height: 38px;
  border: 1px solid #d7dbde;
  background: #ffffff;
  font-size: 0.8rem;
}

body[data-page="map"] .pos-card,
body[data-page="map"] .pos-list-row {
  border: 1px solid #d7dbde;
  border-radius: 14px;
  background: #ffffff;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

body[data-page="map"] .pos-card:hover,
body[data-page="map"] .pos-list-row:hover {
  border-color: #d3c76a;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

body[data-page="map"] .pos-card.active,
body[data-page="map"] .pos-list-row.active {
  border-color: #ecdc61;
  background: #fffef3;
  box-shadow: 0 0 0 2px rgba(255, 245, 153, 0.95), 0 14px 26px rgba(15, 23, 42, 0.12);
  transform: translateX(-3px) scale(1.01);
}

body[data-page="map"] .pos-card.active .pos-card-title,
body[data-page="map"] .pos-list-row.active .pos-list-row-title {
  color: #17212b;
}

body[data-page="map"] .pos-list-row {
  padding: 0.55rem 0.6rem;
}

body[data-page="map"] .pos-card {
  padding: 0.6rem 0.65rem 0.5rem;
}

body[data-page="map"] .filters .op-life-btn[data-lifecycle="customer"],
body[data-page="map"] .map-overlay-controls .op-life-btn[data-lifecycle="customer"],
body[data-page="market_insights"] .mi-inline-filters .op-life-btn[data-lifecycle="customer"],
body[data-page="overview"] .ps-optimal-filters .op-life-btn[data-lifecycle="customer"],
body[data-page="opportunities"] .op-life-btn[data-lifecycle="customer"],
body[data-page="opportunities"] .op-sku-life-btn[data-lifecycle="customer"] {
  border-color: var(--storelab-lifecycle-customer-border);
  background: var(--storelab-lifecycle-customer-bg);
  color: var(--storelab-lifecycle-customer-color);
}

body[data-page="map"] .filters .op-life-btn[data-lifecycle="customer"]:hover,
body[data-page="map"] .map-overlay-controls .op-life-btn[data-lifecycle="customer"]:hover,
body[data-page="market_insights"] .mi-inline-filters .op-life-btn[data-lifecycle="customer"]:hover,
body[data-page="overview"] .ps-optimal-filters .op-life-btn[data-lifecycle="customer"]:hover,
body[data-page="opportunities"] .op-life-btn[data-lifecycle="customer"]:hover,
body[data-page="opportunities"] .op-sku-life-btn[data-lifecycle="customer"]:hover {
  border-color: var(--storelab-lifecycle-customer-hover-border);
  background: var(--storelab-lifecycle-customer-hover-bg);
  color: var(--storelab-lifecycle-customer-hover-color);
}

body[data-page="map"] .filters .op-life-btn[data-lifecycle="customer"].active,
body[data-page="map"] .map-overlay-controls .op-life-btn[data-lifecycle="customer"].active,
body[data-page="market_insights"] .mi-inline-filters .op-life-btn[data-lifecycle="customer"].active,
body[data-page="overview"] .ps-optimal-filters .op-life-btn[data-lifecycle="customer"].active,
body[data-page="opportunities"] .op-life-btn[data-lifecycle="customer"].active,
body[data-page="opportunities"] .op-sku-life-btn[data-lifecycle="customer"].active {
  border-color: var(--storelab-lifecycle-customer-active-border);
  background: var(--storelab-lifecycle-customer-active-bg);
  color: var(--storelab-lifecycle-customer-active-color);
  box-shadow: inset 0 0 0 1px var(--storelab-lifecycle-customer-active-shadow);
}

body[data-page="map"] .filters .op-life-btn[data-lifecycle="prospect"],
body[data-page="map"] .map-overlay-controls .op-life-btn[data-lifecycle="prospect"],
body[data-page="market_insights"] .mi-inline-filters .op-life-btn[data-lifecycle="prospect"],
body[data-page="overview"] .ps-optimal-filters .op-life-btn[data-lifecycle="prospect"],
body[data-page="opportunities"] .op-life-btn[data-lifecycle="prospect"],
body[data-page="opportunities"] .op-sku-life-btn[data-lifecycle="prospect"] {
  border-color: var(--storelab-lifecycle-prospect-border);
  background: var(--storelab-lifecycle-prospect-bg);
  color: var(--storelab-lifecycle-prospect-color);
}

body[data-page="map"] .filters .op-life-btn[data-lifecycle="prospect"]:hover,
body[data-page="map"] .map-overlay-controls .op-life-btn[data-lifecycle="prospect"]:hover,
body[data-page="market_insights"] .mi-inline-filters .op-life-btn[data-lifecycle="prospect"]:hover,
body[data-page="overview"] .ps-optimal-filters .op-life-btn[data-lifecycle="prospect"]:hover,
body[data-page="opportunities"] .op-life-btn[data-lifecycle="prospect"]:hover,
body[data-page="opportunities"] .op-sku-life-btn[data-lifecycle="prospect"]:hover {
  border-color: var(--storelab-lifecycle-prospect-hover-border);
  background: var(--storelab-lifecycle-prospect-hover-bg);
  color: var(--storelab-lifecycle-prospect-hover-color);
}

body[data-page="map"] .filters .op-life-btn[data-lifecycle="prospect"].active,
body[data-page="map"] .map-overlay-controls .op-life-btn[data-lifecycle="prospect"].active,
body[data-page="market_insights"] .mi-inline-filters .op-life-btn[data-lifecycle="prospect"].active,
body[data-page="overview"] .ps-optimal-filters .op-life-btn[data-lifecycle="prospect"].active,
body[data-page="opportunities"] .op-life-btn[data-lifecycle="prospect"].active,
body[data-page="opportunities"] .op-sku-life-btn[data-lifecycle="prospect"].active {
  border-color: var(--storelab-lifecycle-prospect-active-border);
  background: var(--storelab-lifecycle-prospect-active-bg);
  color: var(--storelab-lifecycle-prospect-active-color);
  box-shadow: inset 0 0 0 1px var(--storelab-lifecycle-prospect-active-shadow);
}

body[data-page="map"] .filters .op-potential-btn.active,
body[data-page="map"] .map-overlay-controls .op-potential-btn.active,
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn.active,
body[data-page="overview"] .ps-optimal-filters .op-potential-btn.active,
body[data-page="opportunities"] .op-potential-btn.active,
body[data-page="opportunities"] .op-sku-potential-btn.active,
body[data-page="map"] .filters .op-life-btn.active,
body[data-page="map"] .map-overlay-controls .op-life-btn.active,
body[data-page="market_insights"] .mi-inline-filters .op-life-btn.active,
body[data-page="overview"] .ps-optimal-filters .op-life-btn.active,
body[data-page="opportunities"] .op-life-btn.active,
body[data-page="opportunities"] .op-sku-life-btn.active {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.08),
    0 10px 22px rgba(15, 23, 42, 0.12);
  /*font-weight: 800;*/
}

body[data-page="map"] .filters :is(.op-life-btn, .op-potential-btn),
body[data-page="map"] .map-overlay-controls :is(.op-life-btn, .op-potential-btn),
body[data-page="overview"] .ps-optimal-filters :is(.op-life-btn, .op-potential-btn),
body[data-page="market_insights"] .mi-inline-filters :is(.op-life-btn, .op-potential-btn),
body[data-page="opportunities"] .op-filters :is(.op-life-btn, .op-sku-life-btn, .op-potential-btn, .op-sku-potential-btn),
body[data-page="pos360"] .p360-inline-filters :is(.op-life-btn, .op-potential-btn),
body[data-page="market_insights"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn),
body[data-page="overview"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn),
body[data-page="opportunities"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn),
body[data-page="pos360"] .map-filter-overlay :is(.op-potential-btn, .op-life-btn, .op-sku-potential-btn, .op-sku-life-btn) {
  border: 1px solid #d5deea;
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 0.7rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-life-btn, .op-potential-btn),
body[data-page="market_insights"] .mi-inline-filters :is(.op-life-btn, .op-potential-btn),
body[data-page="overview"] .ps-optimal-filters :is(.op-life-btn, .op-potential-btn),
body[data-page="opportunities"] .op-filters :is(.op-life-btn, .op-sku-life-btn, .op-potential-btn, .op-sku-potential-btn),
body[data-page="pos360"] .p360-inline-filters :is(.op-life-btn, .op-potential-btn) {
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.shell-customer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.shell-customer-btn-icon {
  display: inline-flex;
  width: 1.1em;
  height: 1.45em;
  flex: 0 0 auto;
}

.shell-customer-btn-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.shell-customer-btn-label {
  display: inline-block;
  line-height: 1;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="A"]),
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="A"],
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="A"],
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="A"], .op-sku-potential-btn[data-potential="A"]),
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="A"] {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="B"]),
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="B"],
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="B"],
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="B"], .op-sku-potential-btn[data-potential="B"]),
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="B"] {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="C"]),
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="C"],
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="C"],
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="C"], .op-sku-potential-btn[data-potential="C"]),
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="C"] {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="D"]),
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="D"],
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="D"],
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="D"], .op-sku-potential-btn[data-potential="D"]),
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="D"] {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential]):hover,
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential]:hover,
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential]:hover,
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential], .op-sku-potential-btn[data-potential]):hover,
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential]:hover {
  border-color: #9ca3af;
  background: #e5e7eb;
  color: #374151;
  filter: none;
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="A"]).active,
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="A"].active,
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="A"].active,
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="A"], .op-sku-potential-btn[data-potential="A"]).active,
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="A"].active {
  background: var(--storelab-potential-a-fill);
  border-color: var(--storelab-potential-a-fill);
  color: var(--storelab-potential-a-contrast);
  box-shadow:
    inset 0 0 0 1px rgba(240, 253, 244, 0.14),
    0 10px 22px var(--storelab-potential-a-shadow);
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="B"]).active,
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="B"].active,
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="B"].active,
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="B"], .op-sku-potential-btn[data-potential="B"]).active,
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="B"].active {
  background: var(--storelab-potential-b-fill);
  border-color: var(--storelab-potential-b-fill);
  color: var(--storelab-potential-b-contrast);
  box-shadow:
    inset 0 0 0 1px rgba(240, 253, 244, 0.14),
    0 10px 22px var(--storelab-potential-b-shadow);
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="C"]).active,
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="C"].active,
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="C"].active,
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="C"], .op-sku-potential-btn[data-potential="C"]).active,
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="C"].active {
  background: var(--storelab-potential-c-fill);
  border-color: var(--storelab-potential-c-fill);
  color: var(--storelab-potential-c-contrast);
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 235, 0.14),
    0 10px 22px var(--storelab-potential-c-shadow);
}

body[data-page="map"] :is(.filters, .map-overlay-controls) :is(.op-potential-btn[data-potential="D"]).active,
body[data-page="market_insights"] .mi-inline-filters .op-potential-btn[data-potential="D"].active,
body[data-page="overview"] .ps-optimal-filters .op-potential-btn[data-potential="D"].active,
body[data-page="opportunities"] .op-filters :is(.op-potential-btn[data-potential="D"], .op-sku-potential-btn[data-potential="D"]).active,
body[data-page="pos360"] .p360-inline-filters .op-potential-btn[data-potential="D"].active {
  background: var(--storelab-potential-d-fill);
  border-color: var(--storelab-potential-d-fill);
  color: var(--storelab-potential-d-contrast);
  box-shadow:
    inset 0 0 0 1px rgba(254, 242, 242, 0.14),
    0 10px 22px var(--storelab-potential-d-shadow);
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .shell-toolbar {
    flex-wrap: wrap;
  }

  body[data-page="map"] .map-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-page="map"] .pos-list-panel {
    height: 360px;
  }
}

@media (max-width: 768px) {
  .shell-page-filters-popover {
    width: min(340px, calc(100vw - 0.75rem));
    max-width: min(340px, calc(100vw - 0.75rem));
  }

  body[data-page="map"] .map-filters-popover.filters.compact {
    width: min(340px, calc(100vw - 0.75rem));
    max-width: min(340px, calc(100vw - 0.75rem));
  }

  body[data-page="map"] .map-overlay-controls {
    position: static;
    width: 100%;
    margin-bottom: 0.9rem;
  }

  body[data-page="map"] .mu-main-toolbar {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  body[data-page="map"] .mu-map-actions {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  body[data-page="map"] .mu-view-switch {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  body[data-page="map"] .mu-view-btn {
    flex: 1 1 0;
  }

  body[data-page="map"] .mu-map-reset-btn {
    flex: 1 1 0;
  }

  body[data-page="map"] .map-canvas,
  body[data-page="map"] .mu-results-panel,
  body[data-page="map"] .pos-list-panel {
    height: auto;
  }
}
