/* Stok overview and image workspace. */
:root[data-theme="light"] body.stok-admin-dashboard {
  --stok-background: #f5f7fb;
  --stok-surface: #fff;
  --stok-glass-strong: #fff;
  --stok-surface-soft: #f4f7fc;
  --stok-info-soft: #e9f2ff;
  --stok-blue: #0759d5;
  --stok-border: #dce5f1;
  --stok-shadow-card: none;
  --stok-shadow-soft: none;
  --stok-gradient-primary: #0759d5;
  background: var(--stok-background);
}
.stok-admin-dashboard .admin-nav-link.active { color: #fff; background: #0953c0; box-shadow: none; }
.stok-admin-dashboard .admin-nav-link.active .admin-nav-icon { background: transparent; border-color: transparent; }
.stok-admin-dashboard .neo-card, .stok-admin-dashboard .market-metric, .stok-admin-dashboard .market-filter-bar { border-radius: 10px; }
.stok-admin-dashboard .market-metric { min-height: 106px; padding: 12px; }
.stok-admin-dashboard .market-metric::after { display: none; }
.stok-admin-dashboard .market-metric span, .stok-admin-dashboard .market-metric small { font-size: 0.875rem; }
.stok-admin-dashboard .market-metric strong { font-size: clamp(21px, 2.25vw, 30px); }
.stok-admin-dashboard .market-heading h2 { letter-spacing: -0.045em; }
.stok-admin-dashboard .home-header { background: var(--stok-background); border-bottom: 1px solid var(--stok-border); }
.network-overview-grid { grid-template-columns: minmax(0, 1.7fr) minmax(265px, 1fr); }
.registration-bars { height: 160px; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; gap: 4px; padding: 0 4px; border-bottom: 1px solid var(--stok-border); background: repeating-linear-gradient(to top, transparent 0 39px, var(--stok-border) 39px 40px); }
.registration-bars span { height: 100%; display: flex; align-items: end; }
.registration-bars i { height: var(--bar); width: 100%; background: var(--stok-blue); border-radius: 3px 3px 0 0; }
.registration-axis { display: flex; justify-content: space-between; color: var(--stok-muted); font-size: 0.875rem; margin: 7px 0 0; }
.recent-shop-syncs article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--stok-border); }
.recent-shop-syncs small { display: block; color: var(--stok-muted); }
.recent-shop-syncs time { color: var(--stok-muted); font-size: 0.875rem; text-align: end; }
.network-icon { display: grid; place-items: center; width: 30px; height: 30px; background: var(--stok-info-soft); color: var(--stok-blue); border-radius: 50%; font-weight: 800; }
.product-image-panel { margin-top: 20px; padding: 16px; border-top: 1px solid var(--stok-border); }
.product-image-panel h3, .product-image-upload h4 { margin: 0 0 6px; }
.product-image-thumb { width: 48px; height: 48px; object-fit: contain; margin: 0 8px 0 0; vertical-align: middle; border-radius: 6px; background: var(--stok-surface-soft); }
.product-image-upload { max-width: 580px; border: 1px solid var(--stok-border); border-radius: 10px; padding: 16px; margin-top: 16px; }
.product-image-upload label { margin-bottom: 10px; }
.product-image-upload .product-image-thumb { display: block; width: 72px; height: 72px; margin: 0 0 12px; }
.product-image-upload .product-image-thumb[hidden] { display: none; }
@media (min-width: 761px) {
  .stok-admin-dashboard .dashboard-view { grid-template-columns: clamp(168px, 13vw, 216px) minmax(0, 1fr); }
  .stok-admin-dashboard .dashboard-view[data-sidebar-collapsed] { grid-template-columns: 64px minmax(0, 1fr); }
  .stok-admin-dashboard .admin-sidebar { background: #08275b; color: #fff; }
  .stok-admin-dashboard .admin-sidebar .admin-nav-link { color: #eaf3ff; }
  .stok-admin-dashboard .admin-sidebar .admin-nav-icon { color: #dceaff; }
  .stok-admin-dashboard .admin-sidebar-head { background: #08275b; color: #fff; margin: -18px -14px 0; padding: 13px 14px; }
  .stok-admin-dashboard .admin-sidebar-head .brand-lockup strong, .stok-admin-dashboard .admin-sidebar-head .brand-lockup span { color: #fff; }
  .stok-admin-dashboard .admin-sidebar-head .brand-mark { background: #0b53c2; box-shadow: none; border: 1px solid #a3caff; border-radius: 8px; }
  .stok-admin-dashboard .admin-navigation { gap: 8px; }
  .stok-admin-dashboard .admin-nav-link { border-radius: 7px; min-height: 38px; }
}
.admin-sidebar-head .brand-lockup { gap: 8px; }
.admin-sidebar-head .brand-lockup > div > span { white-space: normal; line-height: 1.2; }
.admin-sidebar .admin-nav-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  min-height: 36px;
  padding: 0;
}
.admin-nav-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
[data-sidebar-collapsed] .admin-sidebar-head { justify-content: center; }
[data-sidebar-collapsed] .admin-sidebar :is(.brand-lockup, .admin-nav-link > span:last-child, [data-theme-label], .admin-security-note) { display: none; }
[data-sidebar-collapsed] .admin-nav-link { justify-content: center; padding-inline: 0; }

@media (max-width: 760px) {
  .admin-sidebar .admin-sidebar-head { display: flex; align-items: center; padding: 0; border: 0; }
  .admin-sidebar .admin-sidebar-head .brand-lockup { display: none; }
  [data-sidebar-collapsed] .admin-nav-link { min-width: 36px; }
}

@media (min-width: 1250px) { #overview .market-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .network-overview-grid { grid-template-columns: 1fr; } }
.stok-admin-dashboard .header-title .eyebrow { color: var(--stok-text); font-size: 16px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.stok-admin-dashboard .header-title .eyebrow, .stok-admin-dashboard .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.overview-shops { margin-top: 16px; }
.overview-shop-table td { white-space: nowrap; }
.overview-shop-table td button { padding: 0; border: 0; background: transparent; color: var(--stok-blue); text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.overview-shop-table tr.is-selected { background: var(--stok-info-soft); }
.overview-shop-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.overview-shop-facts div, .read-only-label { border-radius: 6px; background: var(--stok-info-soft); padding: 7px 8px; }
.overview-shop-facts dt, .read-only-label { font-size: 0.875rem; color: var(--stok-muted); }
.overview-shop-facts dd { margin: 3px 0 0; font-size: 0.875rem; font-weight: 750; }
.overview-shops h4 { margin: 0 0 3px; }
.dashboard-shop-search { min-width: 0; }
@media (min-width: 1100px) {
  .stok-admin-dashboard .home-header { grid-template-columns: auto minmax(135px, 1fr) auto; gap: 14px; }
  .stok-admin-dashboard .home-header .topbar-actions { grid-column: 3; }
  .dashboard-shop-search { grid-column: 2; }
}
@media (max-width: 1099px) {
  .dashboard-shop-search { grid-column: 1 / -1; grid-row: 4; }
}
.kenya-map-panel { margin-top: 16px; }
.kenya-map-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.kenya-map-grid svg { width: 100%; height: 290px; display: block; }
.kenya-map-grid path { stroke: #82a7d6; stroke-width: .55px; cursor: pointer; }
.kenya-map-grid path:hover, .kenya-map-grid path.selected { stroke: #0646a6; stroke-width: 2px; }
.kenya-map-grid label + label { margin-top: 10px; }
#countyMapDetails { margin-top: 12px; padding: 12px; border: 1px solid var(--stok-border); border-radius: 8px; }
#countyMapDetails h4 { margin: 0 0 6px; }
#countyMapDetails p { margin: 4px 0; }
@media (max-width: 760px) { .kenya-map-grid { grid-template-columns: 1fr; } }
.stok-admin-dashboard .overview-shop-table { min-width: 0; }
.stok-admin-dashboard .overview-shop-table th, .stok-admin-dashboard .overview-shop-table td { padding: 8px 9px; }
.stok-admin-dashboard .overview-shop-table td:first-child { white-space: normal; min-width: 85px; }
.stok-admin-dashboard .panel-heading a, .kenya-map-panel a { color: var(--stok-blue); font-weight: 650; }
.stok-admin-dashboard .panel.neo-card { border: 1px solid var(--stok-border); }
.stok-admin-dashboard .market-filter-bar { padding: 10px 12px; gap: 12px; }
.stok-admin-dashboard .status-row { margin: 10px 0 2px; }
.stok-admin-dashboard .status-row > :not(#connectionStatus) { display: none; }
.kenya-map-grid select { min-height: 36px; padding: 4px 9px; border: 1px solid var(--stok-border); border-radius: 6px; background: var(--stok-surface); color: var(--stok-text); font: inherit; }
#copySharedImagePrompt { margin-bottom: 10px; }
.trend-plot { position: relative; }
.trend-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trend-plot polyline { fill: none; stroke: #0b58d4; stroke-width: 2; }
.trend-legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--stok-muted); font-size: .875rem; margin-bottom: 8px; }
.trend-legend span::before { display: inline-block; content: ''; margin-right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #91bbf5; }
.trend-legend span + span::before { background: #0b58d4; }
.trend-plot .registration-bars i { background: #91bbf5; }

.stok-admin-dashboard .header-title #currentSectionTitle { font-weight: 850; margin: 0 0 5px; font-size: clamp(1.32rem, 1.8vw, 1.85rem); }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(2) { background: #e5efff; }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(3) { background: #edf2ff; }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(4) { background: #fff6e6; }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(5) { background: #e6f1ff; }

.shop-directory-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin-bottom: 16px; }
.shop-pagination, #shopPages { display: flex; align-items: center; gap: 8px; }
.shop-pagination { justify-content: space-between; flex-wrap: wrap; }
:root[data-theme="light"] .shop-directory-summary .market-metric:nth-child(2) { background: #e5efff; }
:root[data-theme="light"] .shop-directory-summary .market-metric:nth-child(3) { background: #edf2ff; }
:root[data-theme="light"] .shop-directory-summary .market-metric:nth-child(4) { background: #fff6e6; }

.platform-trend-grid, .platform-overview-grid { display: grid; gap: 14px; margin-top: 14px; }
.platform-trend-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, .9fr) minmax(0, 1fr); }
.platform-overview-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.platform-overview-grid .kenya-map-panel { margin-top: 0; }
.shop-status-chart { display: grid; align-items: center; gap: 12px; }
@media (max-width: 1100px) { .platform-trend-grid { grid-template-columns: 1fr 1fr; } .platform-trend-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 670px) { .platform-trend-grid, .platform-overview-grid { grid-template-columns: 1fr; } }

.catalog-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.catalog-tabs button { padding: 8px 14px; border: 1px solid var(--stok-border); color: var(--stok-text); background: var(--stok-surface-soft); border-radius: 8px; font: inherit; font-weight: 750; }
.catalog-tabs button[aria-pressed="true"] { background: var(--stok-blue); border-color: var(--stok-blue); color: #fff; }
.product-image-panel[hidden] { display: none; }
.stok-admin-dashboard .admin-nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stok-admin-dashboard .admin-nav-icon { background: transparent; border: 0; }
.stok-admin-dashboard .admin-sidebar .admin-security-note strong,
.stok-admin-dashboard .admin-sidebar .admin-security-note small { color: #d8e5ff; }
.stok-admin-dashboard .market-filter-bar { align-items: end; }
.stok-admin-dashboard #overview .market-metrics { margin-top: 10px; gap: 10px; }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(1),
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(6) { background: #e9f2ff; }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(3) { background: #fff4e0; }
:root[data-theme="light"] .stok-admin-dashboard #overview .market-metric:nth-child(4) { background: #fcebf0; }

.growth-bars { min-height: 190px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; }
.growth-bars div { display: grid; grid-template-rows: auto minmax(0, 135px) auto; align-items: end; gap: 5px; text-align: center; }
.growth-bars i { height: var(--bar); max-width: 46px; width: 75%; margin-inline: auto; border-radius: 5px 5px 0 0; background: var(--stok-blue); }
.growth-bars span { font-size: .875rem; color: var(--stok-muted); }

.catalog-sellers { margin-block: 6px; }
.catalog-sellers summary { color: var(--stok-blue); cursor: pointer; }
.catalog-sellers ul { list-style: none; padding: 0; margin: 6px 0 0; }
.catalog-sellers li { border-top: 1px solid var(--stok-border); padding: 3px 0; }
.catalog-sellers li button { padding: 4px 0; }
.stok-admin-dashboard #overview .market-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.overview-metric-link { display: block; min-width: 0; background: transparent; padding: 0; text-align: left; color: inherit; border-radius: 12px; }
.overview-metric-link .market-metric { height: 100%; min-height: 123px; border: 1px solid var(--stok-border); }
.overview-metric-link:hover .market-metric { border-color: var(--stok-blue); }
.overview-metric-link .market-metric strong { overflow-wrap: anywhere; }
.overview-primary-grid, .overview-secondary-grid { display: grid; gap: 14px; margin-top: 14px; }
.overview-primary-grid { grid-template-columns: minmax(0, 1.6fr) minmax(275px, 1fr); }
.overview-secondary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-primary-grid .panel, .overview-secondary-grid .panel { min-width: 0; }
.overview-activity-chart { width: 100%; display: block; min-height: 185px; }
.overview-activity-chart text { font-size: 12px; fill: var(--stok-muted); }
.overview-activity-chart circle { stroke: var(--stok-surface); stroke-width: 1px; fill: var(--stok-blue); }
.overview-activity-chart [tabindex]:focus circle { stroke: var(--stok-text); stroke-width: 2px; }
.overview-registration-bar { fill: var(--stok-blue); opacity: .58; }
.overview-sales-line { fill: none; stroke: var(--stok-success); stroke-width: 2.2; }
.overview-point-hit { fill: transparent; }
.overview-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--stok-muted); font-size: .875rem; }
.overview-chart-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--stok-blue); display: inline-block; margin-right: 7px; }
.overview-chart-legend span + span::before { background: var(--stok-success); }
.overview-attention { display: grid; }
.attention-row {
  text-align: left; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  background: transparent; color: var(--stok-text); border-bottom: 1px solid var(--stok-border); padding: 10px 0;
}
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: var(--stok-info-soft); }
.attention-row small { color: var(--stok-muted); display: block; margin-top: 3px; }
.attention-row > span:first-child { color: var(--stok-blue); font-weight: 800; text-align: center; }
.attention-row.warning > span:first-child { color: var(--stok-warning); }
.overview-sync-bar { display: flex; overflow: hidden; min-height: 29px; border-radius: 7px; background: var(--stok-border); gap: 2px; margin-block: 10px 14px; }
.overview-sync-bar span { text-align: center; color: #fff; font-weight: 750; padding-block: 3px; flex-basis: 0; min-width: 0; overflow: hidden; }
[data-sync-status="recent"] { background: #2563eb; }
[data-sync-status="aging"] { background: #486cac; }
[data-sync-status="old"] { background: #535e70; }
[data-sync-status="unknown"] { background: #575c64; }
#shopStatusList i { display: inline-block; margin-inline-end: 7px; width: 9px; height: 9px; border-radius: 50%; }
.overview-county-table { width: 100%; font-size: .875rem; white-space: nowrap; }
.overview-county-table th, .overview-county-table td { padding: 7px 8px; }
.overview-coverage, .overview-more { margin-top: 14px; }
.overview-coverage-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.overview-coverage-metrics > div { display: grid; gap: 5px; align-content: start; }
.overview-coverage-metrics h4 { margin: 0; font-size: .92rem; }
.overview-coverage-metrics strong { font-size: 1.4rem; }
.overview-coverage-metrics small { color: var(--stok-muted); }
.overview-coverage-metrics progress { width: 100%; height: 9px; accent-color: var(--stok-blue); }
.overview-more summary { cursor: pointer; font-weight: 750; }
:root[data-theme="dark"] body::before, :root[data-theme="dark"] body::after { display: none; }
:root[data-theme="dark"] .stok-admin-dashboard .admin-sidebar,
:root[data-theme="dark"] .stok-admin-dashboard .admin-sidebar-head,
:root[data-theme="dark"] .stok-admin-dashboard .home-header { background: var(--stok-background); }
:root[data-theme="dark"] .stok-admin-dashboard .admin-sidebar-head .brand-mark { background: var(--stok-blue-hover); border-color: var(--stok-blue); }
:root[data-theme="dark"] .stok-admin-dashboard .admin-nav-link { color: var(--stok-text); }
:root[data-theme="dark"] .stok-admin-dashboard .admin-nav-icon { color: var(--stok-muted); }
:root[data-theme="dark"] .stok-admin-dashboard .admin-nav-link.active,
:root[data-theme="dark"] .stok-admin-dashboard .admin-nav-link:hover { background: var(--stok-blue-hover); color: white; }
:root[data-theme="dark"] .stok-admin-dashboard .admin-nav-link.active .admin-nav-icon { color: white; }
:root[data-theme="dark"] .stok-admin-dashboard .market-metric,
:root[data-theme="dark"] .stok-admin-dashboard .market-metric.featured { background: var(--stok-surface); }
:root[data-theme="dark"] .stok-admin-dashboard .market-table th { background: var(--stok-surface-soft); }
:root[data-theme="dark"] .stok-admin-dashboard .shop-product-link,
:root[data-theme="dark"] .stok-admin-dashboard .panel-heading a { color: #91beff; }
@media (max-width: 1130px) {
  .stok-admin-dashboard #overview .market-metrics { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
  .overview-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-secondary-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .overview-primary-grid { grid-template-columns: 1fr; }
  .overview-coverage-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  .overview-secondary-grid { grid-template-columns: 1fr; }
}

.overview-county-table { min-width: 0; }
.overview-county-table th { font-size: .875rem; letter-spacing: 0; text-transform: none; }
.overview-activity-chart [tabindex]:focus { outline: none; }
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar,
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar-head { background: #f8faff; }
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar .admin-nav-link,
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar .admin-nav-icon,
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar-head .brand-lockup strong,
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar-head .brand-lockup span:not(.brand-mark),
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar .admin-security-note strong,
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar .admin-security-note small { color: var(--stok-text); }
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar .admin-nav-link.active,
:root[data-theme="light"] .stok-admin-dashboard .admin-sidebar .admin-nav-link.active .admin-nav-icon { color: #fff; }
