/* ==========================================================
   Poyacity shared design system — web, PWA and native shells
   This layer centralizes visual tokens and accessibility rules
   without changing page data contracts or application logic.
========================================================== */

:root {
  color-scheme: light;
  --poya-brand-950: #082f49;
  --poya-brand-900: #0b426f;
  --poya-brand-800: #0f5a91;
  --poya-brand-700: #1769aa;
  --poya-brand-600: #1c7ac4;
  --poya-brand-500: #298bd2;
  --poya-brand-100: #e8f3fb;
  --poya-brand-50: #f4f9fd;
  --poya-accent: #00a86b;
  --poya-accent-strong: #087f5b;
  --poya-ink: #142033;
  --poya-muted: #607083;
  --poya-canvas: #f3f7fb;
  --poya-surface: #ffffff;
  --poya-surface-soft: #f8fbfd;
  --poya-border: #dce6ef;
  --poya-border-strong: #c7d5e2;
  --poya-success: #137a50;
  --poya-warning: #9a6700;
  --poya-danger: #b42318;
  --poya-info: #1769aa;
  --poya-radius-sm: 10px;
  --poya-radius-md: 16px;
  --poya-radius-lg: 24px;
  --poya-radius-xl: 32px;
  --poya-shadow-sm: 0 4px 16px rgba(20, 46, 72, .06);
  --poya-shadow-md: 0 12px 36px rgba(20, 46, 72, .09);
  --poya-shadow-lg: 0 24px 70px rgba(20, 46, 72, .14);
  --poya-focus: 0 0 0 3px rgba(23, 105, 170, .24);
  --poya-content: 1200px;
  --poya-motion-fast: 150ms;
  --poya-motion: 240ms;
  --poya-ease: cubic-bezier(.2, .8, .2, 1);

  /* Compatibility aliases for existing stylesheets. */
  --primary: var(--poya-brand-700);
  --secondary: var(--poya-brand-900);
  --text: var(--poya-ink);
  --bg: var(--poya-canvas);
  --border: var(--poya-border);
  --shadow: var(--poya-shadow-md);
  --shadow-hover: var(--poya-shadow-lg);
  --radius: var(--poya-radius-lg);
  --app-bg: var(--poya-canvas);
  --app-surface: var(--poya-surface);
  --app-primary: var(--poya-brand-700);
  --app-primary-2: var(--poya-brand-900);
  --app-text: var(--poya-ink);
  --app-muted: var(--poya-muted);
  --app-border: var(--poya-border);
}

html {
  background: var(--poya-canvas);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  accent-color: var(--poya-brand-700);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--poya-brand-950);
  background: rgba(41, 139, 210, .24);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--poya-brand-700);
  outline-offset: 3px;
  box-shadow: var(--poya-focus);
}

:where(button, input, select, textarea) {
  font: inherit;
}

:where(button, [type="button"], [type="submit"], [role="button"]) {
  min-block-size: 44px;
  cursor: pointer;
  touch-action: manipulation;
}

:where(button, input, select, textarea):disabled,
:where([aria-disabled="true"]) {
  cursor: not-allowed;
  opacity: .58;
}

:where(input, select, textarea) {
  max-inline-size: 100%;
  border: 1px solid var(--poya-border-strong);
  border-radius: var(--poya-radius-sm);
  background: var(--poya-surface);
  color: var(--poya-ink);
  transition: border-color var(--poya-motion-fast), box-shadow var(--poya-motion-fast), background var(--poya-motion-fast);
}

:where(input, select, textarea):hover:not(:disabled) {
  border-color: #9bb3c7;
}

:where(input, select, textarea):focus {
  border-color: var(--poya-brand-700);
}

:where(input, textarea)::placeholder {
  color: #8392a3;
  opacity: 1;
}

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

:where(a) {
  text-underline-offset: .18em;
}

:where(main, section, article, aside, nav, header, footer) {
  min-inline-size: 0;
}

/* Shared chrome */
.form-header,
.top-header,
.dashboard-menu,
.dashboard-nav,
.public-dashboard-nav {
  border: 1px solid rgba(220, 230, 239, .9);
  box-shadow: var(--poya-shadow-sm);
  backdrop-filter: saturate(135%) blur(12px);
}

.form-header {
  background: rgba(255, 255, 255, .94);
}

.form-header-logo,
.logo-box {
  color: var(--poya-ink);
}

.logo-small,
.logo-box img,
.app-avatar {
  box-shadow: 0 8px 22px rgba(23, 105, 170, .14);
}

.header-nav-group,
.dashboard-menu {
  align-items: center;
}

.back-link,
.dashboard-menu a,
.dashboard-nav a,
.public-dashboard-nav a {
  border-radius: var(--poya-radius-sm);
  transition: color var(--poya-motion-fast), background var(--poya-motion-fast), transform var(--poya-motion-fast);
}

.back-link:hover,
.dashboard-menu a:hover,
.dashboard-nav a:hover,
.public-dashboard-nav a:hover {
  transform: translateY(-1px);
}

/* Landing and informational pages */
.hero {
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, .20), transparent 28%),
    radial-gradient(circle at 84% 32%, rgba(0, 200, 83, .20), transparent 30%),
    linear-gradient(135deg, var(--poya-brand-950), var(--poya-brand-700) 52%, #6a1b9a);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(4px);
}

.hero::before {
  inline-size: 280px;
  block-size: 280px;
  inset-inline-start: -110px;
  inset-block-end: -150px;
  background: rgba(255, 214, 0, .13);
}

.hero::after {
  inline-size: 220px;
  block-size: 220px;
  inset-inline-end: -80px;
  inset-block-start: -90px;
  background: rgba(255, 112, 67, .16);
}

.hero .logo {
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 18px 52px rgba(3, 24, 44, .28);
}

.hero-text {
  text-wrap: balance;
}

.hero-btn,
.dash-switch-btn,
.filter-reset-btn,
.app-primary-cta,
.native-primary-button,
.native-secondary-button,
button[type="submit"] {
  border: 1px solid transparent;
  transition: transform var(--poya-motion), box-shadow var(--poya-motion), background var(--poya-motion), border-color var(--poya-motion);
}

.hero-btn:hover,
.dash-switch-btn:hover,
.filter-reset-btn:hover,
.app-primary-cta:hover,
.native-primary-button:hover,
.native-secondary-button:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
}

.section-card,
.card,
.cta-box,
.table-card,
.chart-card,
.map-card,
.filter-card,
.stat-card,
.mini-card,
.dashboard-card,
.auth-card {
  border: 1px solid rgba(220, 230, 239, .88);
  box-shadow: var(--poya-shadow-md);
}

.section-card,
.card,
.cta-box,
.table-card,
.chart-card,
.map-card,
.filter-card,
.dashboard-card,
.auth-card {
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.card,
.mini-card,
.stat-card,
.table-card,
.chart-card,
.map-card,
.filter-card,
.dashboard-card {
  transition: transform var(--poya-motion), box-shadow var(--poya-motion), border-color var(--poya-motion);
}

.card:hover,
.mini-card:hover,
.stat-card:hover,
.table-card:hover,
.chart-card:hover,
.map-card:hover,
.dashboard-card:hover {
  border-color: #c3d6e6;
  box-shadow: var(--poya-shadow-lg);
}

.card-icon {
  display: grid;
  place-items: center;
  inline-size: 64px;
  block-size: 64px;
  margin-inline: auto;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--poya-brand-50), #fff);
  box-shadow: inset 0 0 0 1px var(--poya-border);
}

.benefits li {
  border: 1px solid transparent;
}

.benefits li:hover {
  border-color: var(--poya-border);
  box-shadow: var(--poya-shadow-md);
}

/* Forms */
:where(form) label {
  color: #334155;
  font-weight: 650;
}

:where(form) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
:where(form) select,
:where(form) textarea {
  min-block-size: 46px;
  padding: 10px 12px;
}

:where(form) textarea {
  min-block-size: 120px;
  resize: vertical;
}

:where(form) button[type="submit"] {
  padding-inline: 22px;
  border-radius: var(--poya-radius-sm);
  background: linear-gradient(135deg, var(--poya-brand-700), var(--poya-brand-900));
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 105, 170, .20);
}

:where([role="status"], [role="alert"]) {
  border-radius: var(--poya-radius-sm);
}

/* Dashboards and data density */
.dashboard-layout,
.dashboard-container {
  max-inline-size: 1800px;
}

.top-header {
  background: rgba(255, 255, 255, .94);
}

.header-stats,
.stats-grid,
.kpi-grid {
  gap: 12px;
}

.mini-card,
.stat-card {
  background: linear-gradient(180deg, #fff, var(--poya-brand-50));
}

.mini-card strong,
.stat-card strong,
.kpi-value {
  font-variant-numeric: tabular-nums;
}

.dashboard-menu {
  position: sticky;
  inset-block-start: 8px;
  z-index: 40;
  overflow-x: auto;
  background: rgba(255, 255, 255, .92);
  scrollbar-width: thin;
}

.dashboard-menu a {
  white-space: nowrap;
}

:where(table) {
  border-collapse: separate;
  border-spacing: 0;
  inline-size: 100%;
}

:where(th) {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: #eef5fb;
  color: #24384c;
  font-weight: 750;
}

:where(th, td) {
  border-block-end: 1px solid var(--poya-border);
}

:where(tbody tr) {
  transition: background var(--poya-motion-fast);
}

:where(tbody tr:hover) {
  background: #f3f8fc;
}

:where(canvas, .leaflet-container) {
  border-radius: var(--poya-radius-md);
}

/* Native app shell */
.app-shell {
  background:
    radial-gradient(circle at 20% 0, rgba(41, 139, 210, .07), transparent 28%),
    var(--app-bg);
}

.app-topbar {
  border-block-end: 1px solid rgba(255, 255, 255, .16);
  background:
    radial-gradient(circle at 15% -30%, rgba(255, 255, 255, .24), transparent 44%),
    linear-gradient(135deg, var(--poya-brand-700), var(--poya-brand-950));
  box-shadow: 0 12px 34px rgba(8, 47, 73, .22);
}

.app-icon-btn {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(8px);
  transition: background var(--poya-motion-fast), transform var(--poya-motion-fast);
}

.app-icon-btn:hover {
  background: rgba(255, 255, 255, .18);
  transform: translateY(-1px);
}

:where(.app-screen, .native-panel, .native-card, .native-settings-card, .native-analysis-card, .management-message-form, .management-message-card, .native-activity-item, .native-personal-grid button) {
  border-color: var(--poya-border);
  box-shadow: var(--poya-shadow-sm);
}

:where(.app-status-card, .native-kpi-card, .native-recent-item, .native-insight-item) {
  transition: transform var(--poya-motion-fast), border-color var(--poya-motion-fast), box-shadow var(--poya-motion-fast);
}

:where(.app-status-card, .native-kpi-card, .native-recent-item, .native-insight-item):hover {
  transform: translateY(-1px);
  border-color: #bfd2e2;
  box-shadow: var(--poya-shadow-sm);
}

.app-primary-cta,
.native-primary-button {
  background: linear-gradient(135deg, var(--poya-brand-700), var(--poya-brand-900));
  box-shadow: 0 12px 26px rgba(23, 105, 170, .20);
}

.app-bottom-nav {
  border-block-start: 1px solid rgba(199, 213, 226, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(140%) blur(18px);
  box-shadow: 0 -10px 34px rgba(20, 46, 72, .08);
}

.app-bottom-nav button,
.drawer-menu button,
.native-civic-tabs button {
  transition: color var(--poya-motion-fast), background var(--poya-motion-fast), transform var(--poya-motion-fast);
}

.app-bottom-nav button:active,
.drawer-menu button:active,
.native-civic-tabs button:active {
  transform: scale(.98);
}

.offline-pill,
.app-badge,
.forum-bank-badge,
.management-status {
  font-variant-numeric: tabular-nums;
}

.native-search-backdrop {
  background: rgba(4, 20, 34, .62);
  backdrop-filter: blur(10px) saturate(120%);
}

.native-search-panel {
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 30px 90px rgba(3, 19, 32, .30);
}

/* Dark theme parity for the native shell. */
.theme-dark {
  color-scheme: dark;
  --poya-canvas: #0d1626;
  --poya-surface: #162235;
  --poya-surface-soft: #111d2e;
  --poya-ink: #eff6ff;
  --poya-muted: #a5b4c6;
  --poya-border: #2b3b52;
  --poya-border-strong: #3b4e67;
  --app-bg: var(--poya-canvas);
  --app-surface: var(--poya-surface);
  --app-text: var(--poya-ink);
  --app-muted: var(--poya-muted);
  --app-border: var(--poya-border);
}

.theme-dark :where(.app-screen, .native-panel, .native-card, .native-settings-card, .native-analysis-card, .management-message-form, .management-message-card, .native-activity-item, .native-personal-grid button, .native-search-panel) {
  background: linear-gradient(180deg, #17263a, #132033);
}

.theme-dark .app-bottom-nav {
  background: rgba(17, 29, 46, .94);
  border-color: #2b3b52;
}

.theme-dark :where(input, select, textarea) {
  background: #101b2b;
  color: var(--poya-ink);
  border-color: var(--poya-border-strong);
}

/* Responsive and accessibility refinements */
@media (max-width: 900px) {
  .top-header {
    align-items: flex-start;
  }

  .dashboard-menu {
    margin-inline: -2%;
    padding-inline: 4%;
    border-inline: 0;
    border-radius: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --poya-radius-lg: 19px;
    --poya-radius-xl: 24px;
  }

  .hero {
    padding-inline: 16px;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.7rem);
  }

  .hero-stats {
    gap: 14px;
  }

  .hero-stat-number {
    font-size: 24px;
  }

  .hero-btn {
    inline-size: 100%;
    max-inline-size: 330px;
  }

  .section-card,
  .card,
  .cta-box {
    padding-inline: 20px;
  }

  .form-header-inner {
    align-items: stretch;
  }

  .header-nav-group {
    inline-size: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-block-end: 4px;
  }

  .header-nav-group > * {
    flex: 0 0 auto;
  }

  :where(th, td) {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid CanvasText;
  }

  .hero-btn,
  .dash-switch-btn,
  .app-primary-cta,
  .native-primary-button,
  button[type="submit"] {
    border: 1px solid ButtonText;
  }
}

@media print {
  .form-header,
  .dashboard-menu,
  .app-topbar,
  .app-bottom-nav,
  .hero-buttons,
  button {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  :where(.section-card, .card, .table-card, .chart-card, .map-card) {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* Municipal location intelligence */
.location-intelligence-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-block: 12px 24px;
  padding: 14px 16px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-md);
  background: linear-gradient(145deg, var(--poya-brand-50), #fff);
  color: var(--poya-ink);
}
.location-intelligence-card[hidden] { display: none; }
.location-intelligence-card[data-source="ai_suggested"] {
  border-color: #e7c56a;
  background: linear-gradient(145deg, #fff9e8, #fff);
}
.location-intelligence-card[data-source^="official"] {
  border-color: #a7d8c5;
  background: linear-gradient(145deg, #edf9f3, #fff);
}
.location-intelligence-icon {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 14px;
  background: var(--poya-surface);
  color: var(--poya-brand-700);
  box-shadow: var(--poya-shadow-sm);
  font-size: 24px;
}
.location-intelligence-card p { margin: 4px 0; line-height: 1.8; }
.location-intelligence-card small { color: var(--poya-muted); }

/* District-threshold urban data store */
.urban-data-store {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-lg);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
.data-store-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-kicker {
  display: block;
  margin-block-end: 4px;
  color: var(--poya-brand-700);
  font-size: .82rem;
  font-weight: 800;
}
.data-store-threshold-badge,
.data-store-status-pill {
  display: inline-flex;
  align-items: center;
  min-block-size: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--poya-brand-50);
  color: var(--poya-brand-900);
  font-size: .82rem;
  font-weight: 750;
}
.data-store-status-pill[data-ready="false"] { background: #fff5df; color: #805d00; }
.data-store-status-pill[data-ready="true"] { background: #eaf8f1; color: var(--poya-success); }
.data-store-notice {
  padding: 15px 17px;
  border-inline-start: 5px solid var(--poya-warning);
  border-radius: var(--poya-radius-sm);
  background: #fff9e8;
}
.data-store-notice p { margin: 6px 0 0; color: var(--poya-muted); }
.data-store-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.data-store-progress-card {
  padding: 15px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-md);
  background: var(--poya-surface);
}
.data-store-progress-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.data-store-progress-head strong,
.data-store-progress-head small { display: block; }
.data-store-progress-head small { margin-block-start: 3px; color: var(--poya-muted); }
.data-store-count { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--poya-brand-900); font-weight: 800; }
.data-store-meter {
  overflow: hidden;
  block-size: 9px;
  margin-block: 14px 9px;
  border-radius: 999px;
  background: #e7eef5;
}
.data-store-meter span {
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--poya-brand-600), var(--poya-accent));
}
.data-store-progress-card p { margin: 0; color: var(--poya-muted); font-size: .86rem; }
.data-store-preview,
.data-store-order,
.data-store-empty {
  padding: 18px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-md);
  background: var(--poya-surface);
}
.data-store-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-block: 12px;
}
.data-store-preview-list span { display: flex; gap: 8px; align-items: center; }
.data-store-preview-list b { color: var(--poya-success); }
.data-store-preview p,
.data-store-order-note { color: var(--poya-muted); line-height: 1.8; }
.data-store-order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}
.data-store-order-head h3,
.data-store-order-head p { margin: 0; }
.data-store-order-head p { margin-block-start: 5px; color: var(--poya-muted); }
.data-store-field { display: grid; gap: 7px; margin-block: 18px 12px; }
.data-store-product-dropdown {
  border: 1px solid var(--poya-border-strong);
  border-radius: var(--poya-radius-sm);
  background: var(--poya-surface);
}
.data-store-product-dropdown summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 750;
}
.data-store-product-dropdown summary::marker { color: var(--poya-brand-700); }
.data-store-product-options {
  display: grid;
  gap: 8px;
  padding: 0 10px 12px;
}
.data-store-product-options label {
  display: grid;
  grid-template-columns: auto 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-sm);
  cursor: pointer;
}
.data-store-product-options label:has(input:checked) {
  border-color: var(--poya-brand-600);
  background: var(--poya-brand-50);
}
.data-store-product-options strong,
.data-store-product-options small { display: block; }
.data-store-product-options small { margin-block-start: 3px; color: var(--poya-muted); }
.data-store-product-icon { display: grid; place-items: center; inline-size: 38px; block-size: 38px; border-radius: 12px; background: var(--poya-surface-soft); }
.data-store-checkout-button {
  inline-size: 100%;
  margin-block-start: 14px;
  border: 0;
  border-radius: var(--poya-radius-sm);
  background: linear-gradient(135deg, var(--poya-brand-700), var(--poya-brand-900));
  color: #fff;
  font-weight: 800;
}
.data-store-empty { text-align: center; color: var(--poya-muted); }
.data-store-empty > span { display: block; font-size: 2rem; color: var(--poya-brand-600); }

@media (max-width: 640px) {
  .data-store-title,
  .data-store-order-head { align-items: stretch; }
  .data-store-threshold-badge,
  .data-store-status-pill { inline-size: 100%; justify-content: center; }
}

/* === Stage 2: urban data checkout and purchase history === */
.data-store-checkout-page { background: var(--poya-surface-soft, #f4f7fb); min-height: 100vh; }
.data-store-checkout-shell { width: min(1120px, calc(100% - 32px)); margin: 28px auto 72px; }
.data-store-checkout-hero { padding: clamp(24px, 4vw, 44px); border-radius: 24px; background: linear-gradient(135deg, #0f4c81, #1769aa 58%, #5c6bc0); color: #fff; box-shadow: 0 20px 50px rgba(15,76,129,.18); }
.data-store-checkout-hero h1 { margin: 8px 0 12px; font-size: clamp(1.65rem, 4vw, 2.65rem); }
.data-store-checkout-hero p { max-width: 760px; margin: 0; line-height: 1.9; opacity: .92; }
.data-store-checkout-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; margin-top: 22px; }
.data-store-checkout-card { background: var(--poya-surface, #fff); border: 1px solid var(--poya-border, #dce4ee); border-radius: 20px; padding: clamp(20px, 3vw, 30px); box-shadow: 0 12px 36px rgba(25,44,72,.08); }
.data-store-checkout-card h2 { margin: 0 0 20px; }
.data-store-checkout-alert { margin-top: 18px; border-radius: 16px; padding: 16px 20px; border: 1px solid #b9d6f2; background: #eef7ff; }
.data-store-checkout-alert strong { display: block; margin-bottom: 5px; }
.data-store-checkout-alert p { margin: 0; line-height: 1.8; }
.data-store-checkout-alert[data-type="success"] { background: #edf9f1; border-color: #9bd3aa; color: #145c2c; }
.data-store-checkout-alert[data-type="error"] { background: #fff2f1; border-color: #efb2ad; color: #8b1e18; }
.data-store-checkout-alert[data-type="warning"] { background: #fff8e5; border-color: #f1d080; color: #775300; }
.data-store-order-summary { display: grid; gap: 10px; margin: 0 0 24px; }
.data-store-order-summary > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px dashed var(--poya-border, #dce4ee); }
.data-store-order-summary dt { color: var(--poya-text-muted, #667085); }
.data-store-order-summary dd { margin: 0; font-weight: 700; text-align: left; }
.data-store-checkout-products { display: grid; gap: 10px; padding: 0; margin: 12px 0 18px; list-style: none; }
.data-store-checkout-products li { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 14px; background: var(--poya-surface-soft, #f4f7fb); }
.data-store-checkout-products li > span { font-size: 1.35rem; }
.data-store-checkout-products strong, .data-store-checkout-products small { display: block; }
.data-store-checkout-products small { margin-top: 3px; color: var(--poya-text-muted, #667085); line-height: 1.6; }
.data-store-server-price, .data-store-payment-note { font-size: .88rem; color: var(--poya-text-muted, #667085); line-height: 1.8; }
.data-store-payment-state { min-height: 94px; padding: 16px; margin-bottom: 16px; border-radius: 14px; background: var(--poya-surface-soft, #f4f7fb); }
.data-store-payment-state strong { display: block; margin-bottom: 6px; }
.data-store-payment-state p { margin: 0; line-height: 1.8; }
.data-store-primary-action { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 11px 18px; border: 0; border-radius: 13px; background: var(--poya-primary, #1769aa); color: #fff; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.data-store-primary-action:disabled { cursor: not-allowed; opacity: .48; }
.data-store-purchase-history-section { margin-top: 22px; }
.purchase-history-list { display: grid; gap: 14px; }
.purchase-history-card { border: 1px solid var(--poya-border, #dce4ee); border-radius: 16px; padding: 16px; background: var(--poya-surface, #fff); }
.purchase-history-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.purchase-history-head strong, .purchase-history-head small { display: block; }
.purchase-history-head small { margin-top: 4px; color: var(--poya-text-muted, #667085); }
.purchase-history-head > span { padding: 5px 10px; border-radius: 999px; background: #eef4fb; color: #174f7e; font-size: .8rem; white-space: nowrap; }
.purchase-history-head > span[data-status="paid"] { background: #e8f7ed; color: #176331; }
.purchase-history-head > span[data-status="failed"], .purchase-history-head > span[data-status="cancelled"] { background: #fff0ef; color: #92241e; }
.purchase-history-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; color: var(--poya-text-muted, #667085); font-size: .86rem; }
.purchase-job-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.purchase-job-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--poya-surface-soft, #f4f7fb); }
.purchase-job-list strong, .purchase-job-list small { display: block; }
.purchase-job-list small { color: var(--poya-text-muted, #667085); }
.purchase-job-state, .purchase-history-empty, .purchase-history-loading { color: var(--poya-text-muted, #667085); font-size: .88rem; }
.native-purchase-history { margin: 20px 0 28px; }
@media (max-width: 760px) {
  .data-store-checkout-shell { width: min(100% - 20px, 1120px); margin-top: 14px; }
  .data-store-checkout-grid { grid-template-columns: 1fr; }
  .data-store-order-summary > div, .purchase-history-head, .purchase-job-list li { align-items: flex-start; flex-direction: column; }
  .data-store-order-summary dd { text-align: right; }
}
@media (prefers-color-scheme: dark) {
  .data-store-checkout-page { background: #10151d; }
  .data-store-checkout-card, .purchase-history-card { background: #171f2a; border-color: #2c3948; }
  .data-store-payment-state, .data-store-checkout-products li, .purchase-job-list li { background: #202a37; }
}

/* === Stage 2 visual and interaction foundation === */
:root {
  --poya-space-1: 4px;
  --poya-space-2: 8px;
  --poya-space-3: 12px;
  --poya-space-4: 16px;
  --poya-space-5: 20px;
  --poya-space-6: 24px;
  --poya-space-8: 32px;
  --poya-space-10: 40px;
  --poya-space-12: 48px;
  --poya-header-height: 72px;
}

body {
  min-block-size: 100vh;
  background:
    radial-gradient(circle at 12% 2%, rgba(41, 139, 210, .055), transparent 28rem),
    var(--poya-canvas);
  color: var(--poya-ink);
}

.poya-sr-only {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.poya-skip-link {
  position: fixed;
  z-index: 100000;
  inset-block-start: 10px;
  inset-inline-start: 12px;
  translate: 0 -180%;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--poya-brand-950);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--poya-shadow-lg);
  transition: translate var(--poya-motion-fast);
}
.poya-skip-link:focus { translate: 0; }

.poya-network-banner {
  position: sticky;
  z-index: 1000;
  inset-block-start: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 44px;
  padding: 9px 16px;
  border-block-end: 1px solid #e7c56a;
  background: #fff8dc;
  color: #664d03;
  text-align: center;
  font-size: .88rem;
  box-shadow: 0 8px 24px rgba(102, 77, 3, .08);
}
.poya-network-banner[hidden] { display: none; }

.poya-utility-dock {
  position: fixed;
  z-index: 900;
  inset-inline-end: 18px;
  inset-block-end: max(18px, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}
.poya-utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-inline-size: 74px;
  min-block-size: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(199, 213, 226, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: var(--poya-brand-900);
  box-shadow: 0 12px 34px rgba(20, 46, 72, .12);
  backdrop-filter: saturate(145%) blur(16px);
  font-weight: 750;
  transition: transform var(--poya-motion-fast), box-shadow var(--poya-motion-fast), background var(--poya-motion-fast);
}
.poya-utility-button:hover { transform: translateY(-2px); box-shadow: var(--poya-shadow-lg); }
.poya-utility-button[hidden] { display: none; }
.poya-utility-button > span:first-child { font-size: 1.1rem; }

a[aria-current="page"],
a.is-current-page {
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

.poya-character-counter {
  display: block;
  margin-block: 6px 14px;
  color: var(--poya-muted);
  text-align: end;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.poya-field-invalid {
  border-color: var(--poya-danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .14) !important;
}

/* Landing information architecture */
body[data-page="index"] .hero-overlay {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
body[data-page="index"] .hero-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(1080px, 100%);
  margin-inline: auto;
}
body[data-page="index"] .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 56px;
  padding-inline: 16px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: 0 12px 28px rgba(4, 24, 44, .13);
  backdrop-filter: blur(8px);
}
body[data-page="index"] .hero-btn[href="report.html"] {
  background: #fff;
  color: var(--poya-brand-950);
  box-shadow: 0 16px 34px rgba(4, 24, 44, .24);
}
body[data-page="index"] .hero-stat-number { min-inline-size: 4ch; }
body[data-page="index"] .section-card,
body[data-page="index"] .card { overflow: hidden; }

/* Report flow */
body[data-page="report"] .form-section {
  padding-block: clamp(30px, 5vw, 64px);
}
body[data-page="report"] .form-section > .container {
  width: min(1180px, calc(100% - 28px));
}
body[data-page="report"] .form-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 54px);
  border-radius: var(--poya-radius-xl);
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.16), transparent 24%),
    linear-gradient(135deg, var(--poya-brand-950), var(--poya-brand-700) 58%, #5b3aa8);
  box-shadow: var(--poya-shadow-lg);
}
body[data-page="report"] .form-intro::after {
  content: "";
  position: absolute;
  inset-inline-end: -80px;
  inset-block-end: -110px;
  inline-size: 260px;
  block-size: 260px;
  border-radius: 50%;
  background: rgba(255, 132, 72, .17);
  pointer-events: none;
}
.form-intro-kicker { color: #d9efff; }
.report-form-progress-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(680px, 100%);
  margin: 26px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 16px;
  background: rgba(255, 255, 255, .11);
  color: #fff;
  backdrop-filter: blur(10px);
  font-size: .84rem;
  font-weight: 750;
}
.report-form-progress-wrap progress {
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.2);
}
.report-form-progress-wrap progress::-webkit-progress-bar { background: rgba(255,255,255,.2); }
.report-form-progress-wrap progress::-webkit-progress-value { background: linear-gradient(90deg, #6ee7b7, #fde047); border-radius: 999px; }
.report-form-progress-wrap progress::-moz-progress-bar { background: linear-gradient(90deg, #6ee7b7, #fde047); border-radius: 999px; }

.web-draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block: 20px;
  padding: 15px 18px;
  border: 1px solid #f1d080;
  border-radius: var(--poya-radius-md);
  background: linear-gradient(145deg, #fff9e8, #fff);
  color: #674d00;
  box-shadow: var(--poya-shadow-sm);
}
.web-draft-banner[hidden] { display: none; }
.web-draft-banner strong,
.web-draft-banner small { display: block; }
.web-draft-banner small { margin-block-start: 4px; color: #806800; }
.web-draft-actions { display: flex; gap: 8px; }
.web-draft-actions button {
  padding-inline: 14px;
  border: 1px solid #dfc369;
  border-radius: 11px;
  background: #fff;
  color: #5d4800;
  font-weight: 750;
}
.web-draft-actions button:first-child { border-color: transparent; background: var(--poya-brand-700); color: #fff; }

.report-step-nav {
  position: sticky;
  z-index: 35;
  inset-block-start: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-block: 18px;
  padding: 8px;
  border: 1px solid var(--poya-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--poya-shadow-sm);
  backdrop-filter: saturate(145%) blur(16px);
}
.report-step-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 46px;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--poya-muted);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 750;
}
.report-step-nav a:hover,
.report-step-nav a:focus-visible { background: var(--poya-brand-50); color: var(--poya-brand-900); }
.report-step-nav a span {
  display: grid;
  place-items: center;
  inline-size: 26px;
  block-size: 26px;
  border-radius: 50%;
  background: var(--poya-brand-100);
  color: var(--poya-brand-900);
  font-variant-numeric: tabular-nums;
}

body[data-page="report"] #poyaForm {
  display: grid;
  gap: 22px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.form-step {
  min-inline-size: 0;
  margin: 0;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(220, 230, 239, .92);
  border-radius: var(--poya-radius-lg);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
  scroll-margin-block-start: 92px;
}
.form-step > legend {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  max-inline-size: min(620px, calc(100% - 12px));
  padding-inline: 6px 16px;
  color: var(--poya-ink);
}
.form-step > legend > span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--poya-brand-700), var(--poya-brand-900));
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 105, 170, .20);
  font-weight: 850;
}
.form-step > legend strong { font-size: 1.12rem; }
.form-step > legend small { margin-block-start: 3px; color: var(--poya-muted); font-weight: 500; }
.form-step-heading {
  margin: 24px 0 8px;
  color: var(--poya-ink);
  font-size: 1rem;
  line-height: 1.8;
}
.form-step > label {
  display: block;
  margin: 22px 0 8px;
  line-height: 1.75;
}
.form-step > input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
.form-step > select,
.form-step > textarea {
  width: 100%;
}
.form-step .help-text { color: var(--poya-muted); line-height: 1.8; }
.form-step .map-card:hover,
.form-step .options-type label:hover,
.form-step .category-grid label:hover { transform: translateY(-1px); }
.form-step .options-type label,
.form-step .category-grid label,
.form-step .options-cooperation label {
  border-color: var(--poya-border);
  background: var(--poya-surface-soft);
}
.form-step .options-type label:has(input:checked),
.form-step .category-grid label:has(input:checked),
.form-step .options-cooperation label:has(input:checked) {
  border-color: var(--poya-brand-600);
  background: var(--poya-brand-50);
  box-shadow: 0 0 0 2px rgba(23, 105, 170, .09);
}

.report-file-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-block: 12px 18px;
}
.report-file-preview[hidden] { display: none; }
.report-file-preview-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-inline-size: 0;
  padding: 10px;
  border: 1px solid var(--poya-border);
  border-radius: 14px;
  background: var(--poya-surface);
}
.report-file-preview-item img,
.report-file-icon {
  display: grid;
  place-items: center;
  inline-size: 64px;
  block-size: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--poya-brand-50);
  color: var(--poya-brand-900);
  font-size: .85rem;
  font-weight: 850;
}
.report-file-preview-item strong,
.report-file-preview-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-file-preview-item small { margin-block-start: 4px; color: var(--poya-muted); font-size: .77rem; }

.report-submit-state {
  padding: 15px 18px;
  border: 1px solid var(--poya-border);
  border-radius: 14px;
  background: var(--poya-brand-50);
  color: var(--poya-brand-900);
  line-height: 1.8;
}
.report-submit-state[hidden] { display: none; }
.report-submit-state[data-state="sending"] { border-color: #b8d8ef; background: #eef8ff; }
.report-submit-state[data-state="success"],
.report-submit-state[data-state="partial"] { border-color: #a7d8c5; background: #edf9f3; color: var(--poya-success); }
.report-submit-state[data-state="queued"],
.report-submit-state[data-state="warning"] { border-color: #e7c56a; background: #fff9e8; color: #745800; }
.report-submit-state[data-state="error"] { border-color: #e8aaa5; background: #fff1f0; color: var(--poya-danger); }
body[data-page="report"] .submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-block-size: 56px;
  border-radius: 16px;
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(23, 105, 170, .22);
}
.submit-btn-spinner {
  display: none;
  inline-size: 20px;
  block-size: 20px;
  border: 3px solid rgba(255,255,255,.35);
  border-block-start-color: #fff;
  border-radius: 50%;
  animation: poya-spin .75s linear infinite;
}
.submit-btn.is-loading .submit-btn-spinner { display: block; }
@keyframes poya-spin { to { rotate: 1turn; } }

/* Dashboard layout improvements shared by all three dashboard surfaces. */
body:is([data-page="dashboard"], [data-page="dashboard-pro"], [data-page="city"], [data-page="analyses"]) .container {
  width: min(94%, 1500px);
}
body:is([data-page="dashboard"], [data-page="dashboard-pro"], [data-page="city"], [data-page="analyses"]) :where(.dashboard-hero, .public-dashboard-hero, .city-hero, .analyses-hero) {
  overflow: hidden;
  border-radius: var(--poya-radius-xl);
  box-shadow: var(--poya-shadow-lg);
}
body:is([data-page="dashboard"], [data-page="dashboard-pro"], [data-page="city"], [data-page="analyses"]) :where(.filter-bar, .filters-section, .dashboard-filters) {
  border: 1px solid var(--poya-border);
  box-shadow: var(--poya-shadow-md);
}
body:is([data-page="dashboard"], [data-page="dashboard-pro"], [data-page="city"], [data-page="analyses"]) :where(.filter-group select, .filter-group input) {
  min-block-size: 46px;
}

/* Web dark mode parity. */
.theme-dark body,
html.theme-dark body {
  background:
    radial-gradient(circle at 12% 2%, rgba(41, 139, 210, .11), transparent 28rem),
    var(--poya-canvas);
  color: var(--poya-ink);
}
.theme-dark :where(.form-header, .top-header, .dashboard-menu, .dashboard-nav, .public-dashboard-nav, .report-step-nav, .poya-utility-button) {
  background: rgba(22, 34, 53, .94);
  border-color: var(--poya-border);
  color: var(--poya-ink);
}
.theme-dark :where(.section-card, .card, .cta-box, .table-card, .chart-card, .map-card, .filter-card, .stat-card, .mini-card, .dashboard-card, .auth-card, .form-step, .urban-data-store, .data-store-preview, .data-store-order, .data-store-empty, .data-store-progress-card) {
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  border-color: var(--poya-border);
  color: var(--poya-ink);
}
.theme-dark :where(.form-step .options-type label, .form-step .category-grid label, .form-step .options-cooperation label, .rating-box, .map-card) {
  background: var(--poya-surface-soft);
  border-color: var(--poya-border);
  color: var(--poya-ink);
}
.theme-dark :where(th) { background: #1d2c42; color: var(--poya-ink); }
.theme-dark :where(tbody tr:hover) { background: #1b2a3e; }
.theme-dark .poya-network-banner { background: #3a3119; border-color: #756323; color: #ffe9a6; }
.theme-dark .web-draft-banner { background: linear-gradient(145deg, #3a3119, #182437); border-color: #756323; color: #ffe9a6; }
.theme-dark .web-draft-banner small { color: #d9c678; }
.theme-dark .location-intelligence-card { background: linear-gradient(145deg, #162d3d, #162235); }
.theme-dark .location-intelligence-card[data-source="ai_suggested"] { background: linear-gradient(145deg, #3a3119, #162235); }
.theme-dark .location-intelligence-card[data-source^="official"] { background: linear-gradient(145deg, #16352c, #162235); }
.theme-dark .privacy-note { background: #332c18; color: #ffe9a6; border-color: #8a6b12; }
.theme-dark .report-submit-state[data-state="sending"] { background: #162d3d; }
.theme-dark .report-submit-state[data-state="success"],
.theme-dark .report-submit-state[data-state="partial"] { background: #16352c; }
.theme-dark .report-submit-state[data-state="queued"],
.theme-dark .report-submit-state[data-state="warning"] { background: #3a3119; }
.theme-dark .report-submit-state[data-state="error"] { background: #3b2022; }

@media (max-width: 800px) {
  .poya-network-banner { align-items: flex-start; flex-wrap: wrap; font-size: .8rem; }
  body[data-page="index"] .hero-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-step-nav { grid-template-columns: repeat(4, minmax(72px, 1fr)); overflow-x: auto; }
  .report-step-nav a { flex-direction: column; gap: 4px; font-size: .75rem; }
  .web-draft-banner { align-items: stretch; flex-direction: column; }
  .web-draft-actions > button { flex: 1; }
}

@media (max-width: 560px) {
  .poya-utility-dock { inset-inline-end: 10px; inset-block-end: max(10px, env(safe-area-inset-bottom)); }
  .poya-utility-button { min-inline-size: 48px; inline-size: 48px; padding: 8px; }
  .poya-utility-button span:last-child { display: none; }
  body[data-page="index"] .hero-buttons { grid-template-columns: 1fr; }
  .report-form-progress-wrap { grid-template-columns: 1fr; text-align: center; }
  .report-step-nav { margin-inline: -4px; }
  .form-step { padding: 18px 14px 22px; }
  .form-step > legend { grid-template-columns: 36px minmax(0, 1fr); padding-inline: 2px 8px; }
  .form-step > legend > span { inline-size: 36px; block-size: 36px; border-radius: 12px; }
  .form-step > legend small { display: none; }
  .report-file-preview { grid-template-columns: 1fr; }
}

/* Stage 2 dashboard experience */
.dashboard-page-shell {
  display: grid;
  gap: 0;
  min-block-size: 70vh;
}
.dashboard-product-hero {
  position: relative;
  isolation: isolate;
  margin-inline: auto;
  width: min(100% - 24px, 1500px);
  padding: clamp(34px, 5vw, 58px) 0;
  background:
    radial-gradient(circle at 14% 12%, rgba(255,255,255,.16), transparent 22%),
    linear-gradient(135deg, var(--poya-brand-950), var(--poya-brand-700) 54%, #6550b7) !important;
}
.dashboard-product-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -90px;
  inset-block-end: -130px;
  inline-size: 280px;
  block-size: 280px;
  border-radius: 50%;
  background: rgba(255, 117, 74, .18);
}
.dashboard-product-hero h1 { margin: 6px 0 8px; font-size: clamp(2rem, 4vw, 3rem); }
.dashboard-hero-kicker { color: #d8efff; }
.dashboard-freshness {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-start: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: .82rem;
  backdrop-filter: blur(8px);
}
.dashboard-freshness time { font-weight: 750; }

body[data-page="dashboard"] .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
body[data-page="dashboard"] .kpi-card {
  position: relative;
  overflow: hidden;
  min-block-size: 176px;
  border: 1px solid var(--poya-border);
  border-block-start: 5px solid var(--poya-brand-700);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
body[data-page="dashboard"] .kpi-card::after {
  content: "";
  position: absolute;
  inset-inline-start: -44px;
  inset-block-end: -54px;
  inline-size: 130px;
  block-size: 130px;
  border-radius: 50%;
  background: rgba(41,139,210,.06);
}
body[data-page="dashboard"] .kpi-icon { filter: saturate(.85); }
body[data-page="dashboard"] .kpi-number { color: var(--poya-brand-700); font-variant-numeric: tabular-nums; }

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-block: 4px 18px;
}
.dashboard-section-heading h2 { margin: 0; color: var(--poya-ink); font-size: clamp(1.25rem, 2.3vw, 1.75rem); }
.dashboard-section-heading p { max-inline-size: 560px; margin: 0; color: var(--poya-muted); line-height: 1.8; }
.dashboard-filter-toggle {
  display: none;
  width: 100%;
  grid-template-columns: 36px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  margin-block-end: 8px;
  padding: 10px 12px;
  border: 1px solid var(--poya-border);
  border-radius: 14px;
  background: var(--poya-surface);
  color: var(--poya-ink);
  text-align: start;
}
.dashboard-filter-toggle > span {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 11px;
  background: var(--poya-brand-50);
  color: var(--poya-brand-900);
}
.dashboard-filter-toggle strong,
.dashboard-filter-toggle small { display: block; }
.dashboard-filter-toggle small { color: var(--poya-muted); }
body[data-page="dashboard"] .filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px,1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  border-radius: 20px;
  background: var(--poya-surface);
}
body[data-page="dashboard"] .filter-reset-btn { min-block-size: 46px; white-space: nowrap; }
body[data-page="dashboard"] .search-box {
  min-block-size: 58px;
  border: 1px solid var(--poya-border);
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-md);
}
body[data-page="dashboard"] .search-box:focus-within {
  border-color: var(--poya-brand-600);
  box-shadow: var(--poya-focus), var(--poya-shadow-md);
}
body[data-page="dashboard"] .charts-grid { align-items: stretch; }
body[data-page="dashboard"] .chart-card {
  display: grid;
  grid-template-rows: auto minmax(260px,1fr);
  min-block-size: 350px;
}
body[data-page="dashboard"] .chart-card h3 { color: var(--poya-ink); }
.dashboard-commerce-section { padding-block: 12px 50px; }

.theme-dark .dashboard-product-hero { color: #fff; }
.theme-dark body[data-page="dashboard"] .search-box,
.theme-dark body[data-page="dashboard"] .filter-bar,
.theme-dark .dashboard-filter-toggle { background: var(--poya-surface); border-color: var(--poya-border); }

@media (max-width: 1050px) {
  body[data-page="dashboard"] .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body[data-page="dashboard"] .filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-page="dashboard"] .filter-reset-btn { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .dashboard-product-hero { width: calc(100% - 16px); border-radius: 24px !important; }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-filter-toggle { display: grid; }
  body[data-page="dashboard"] .filter-bar.is-collapsed { display: none; }
  body[data-page="dashboard"] .filter-bar { grid-template-columns: 1fr; padding: 14px; }
  body[data-page="dashboard"] .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-page="dashboard"] .kpi-card { min-block-size: 142px; padding: 16px 10px; }
  body[data-page="dashboard"] .kpi-number { font-size: 1.7rem; }
  body[data-page="dashboard"] .chart-card { min-block-size: 330px; padding: 16px; }
}
@media (max-width: 430px) {
  body[data-page="dashboard"] .kpi-grid { gap: 9px; }
  body[data-page="dashboard"] .kpi-card { min-block-size: 132px; }
  .dashboard-freshness { align-items: flex-start; border-radius: 16px; }
}

/* Stage 2 city and professional dashboard modernization */
.city-dashboard-shell,
.dashboard-pro-shell {
  gap: 24px;
  padding-block-end: 48px;
}
body[data-page="city"] .city-hero,
body[data-page="dashboard-pro"] .pro-hero {
  width: min(100% - 24px, 1500px);
  margin-inline: auto;
}
body[data-page="city"] .city-icon {
  width: 82px;
  height: 82px;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  box-shadow: 0 18px 42px rgba(7, 35, 61, .18);
  backdrop-filter: blur(8px);
}
body[data-page="city"] .city-search-section {
  margin: 0;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
}
body[data-page="city"] .city-search-box {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--poya-border);
  border-radius: 20px;
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-md);
}
body[data-page="city"] .city-search-box input,
body[data-page="city"] .city-search-box button {
  min-block-size: 48px;
  border-radius: 13px;
}
body[data-page="city"] .city-search-box input {
  border: 1px solid transparent;
  background: var(--poya-surface-soft);
  color: var(--poya-ink);
}
body[data-page="city"] .city-search-box input:focus {
  border-color: var(--poya-brand-600);
  box-shadow: var(--poya-focus);
}
body[data-page="city"] .city-search-box .secondary-action {
  background: var(--poya-surface-soft);
  color: var(--poya-brand-900);
  border: 1px solid var(--poya-border);
}
.city-filter-section { padding-block: 8px 0; }
.city-filter-bar,
.dashboard-pro-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--poya-border);
  border-radius: 20px;
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-md);
}
.city-filter-bar .filter-group,
.dashboard-pro-filter-grid .filter-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.city-filter-bar label,
.dashboard-pro-filter-grid label {
  color: var(--poya-ink);
  font-size: .84rem;
  font-weight: 780;
}
.city-filter-bar select,
.dashboard-pro-filter-grid select,
.dashboard-pro-filter-grid input {
  width: 100%;
  min-block-size: 46px;
  border: 1px solid var(--poya-border);
  border-radius: 12px;
  background: var(--poya-surface-soft);
  color: var(--poya-ink);
}
.city-filter-bar select:disabled,
.dashboard-pro-filter-grid select:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.city-filter-bar .filter-reset-btn,
.dashboard-pro-filter-grid > button {
  min-block-size: 46px;
  border-radius: 12px;
}
.dashboard-filter-summary {
  margin: 12px 2px 0;
  color: var(--poya-muted);
  font-size: .86rem;
  line-height: 1.8;
}
body[data-page="city"] .kpi-grid,
body[data-page="dashboard-pro"] .kpi-section {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body[data-page="city"] .kpi-card,
body[data-page="dashboard-pro"] .kpi-card {
  min-block-size: 150px;
  border: 1px solid var(--poya-border);
  border-block-start: 5px solid var(--poya-brand-700);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
body[data-page="city"] .chart-card,
body[data-page="dashboard-pro"] .chart-card,
body[data-page="city"] .bank-accordion-item,
body[data-page="dashboard-pro"] .bank-card,
body[data-page="dashboard-pro"] .map-section,
body[data-page="dashboard-pro"] .table-card {
  border: 1px solid var(--poya-border);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
body[data-page="city"] .chart-card {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr);
  min-block-size: 350px;
}
body[data-page="city"] .bank-accordion-header {
  width: 100%;
  border: 0;
  color: var(--poya-ink);
  text-align: start;
}
body[data-page="city"] .report-detail-card {
  border-color: var(--poya-border);
  background: var(--poya-surface-soft);
}
body[data-page="dashboard-pro"] .dashboard-layout {
  padding-inline: 0;
}
body[data-page="dashboard-pro"] .dashboard-pro-shell > :not(.dashboard-product-hero) {
  width: min(94%, 1500px);
  margin-inline: auto;
}
body[data-page="dashboard-pro"] .dashboard-pro-filter-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body[data-page="dashboard-pro"] .dashboard-pro-filter-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
body[data-page="dashboard-pro"] .dashboard-pro-filter-grid > button {
  align-self: end;
}
body[data-page="dashboard-pro"] .alert-banner {
  border: 1px solid #f2d19c;
  border-inline-start: 6px solid var(--poya-warning);
  box-shadow: var(--poya-shadow-sm);
}
.theme-dark body[data-page="city"] .city-search-box,
.theme-dark .city-filter-bar,
.theme-dark .dashboard-pro-filter-grid,
.theme-dark body[data-page="city"] .bank-accordion-header {
  background: var(--poya-surface);
  color: var(--poya-ink);
  border-color: var(--poya-border);
}

@media (max-width: 1100px) {
  .city-filter-bar,
  body[data-page="dashboard-pro"] .dashboard-pro-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-page="city"] .kpi-grid,
  body[data-page="dashboard-pro"] .kpi-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body[data-page="city"] .city-search-box { grid-template-columns: 1fr; }
  .city-filter-bar,
  body[data-page="dashboard-pro"] .dashboard-pro-filter-grid { grid-template-columns: 1fr; padding: 14px; }
  #filterBar.is-collapsed { display: none !important; }
  body[data-page="city"] .city-hero,
  body[data-page="dashboard-pro"] .pro-hero { width: calc(100% - 16px); }
  body[data-page="city"] .kpi-card,
  body[data-page="dashboard-pro"] .kpi-card { min-block-size: 132px; }
  body[data-page="dashboard-pro"] .bank-card,
  body[data-page="dashboard-pro"] .map-section { padding: 16px; }
  body[data-page="dashboard-pro"] .bank-header { align-items: flex-start; gap: 6px; }
}

/* Prevent decorative hero layers from widening RTL mobile viewports. */
.dashboard-product-hero {
  overflow: hidden;
  color: #fff;
}
.dashboard-product-hero :where(h1, p, .dashboard-hero-kicker, .dashboard-freshness) {
  color: #fff;
}

/* Checkout visual integrity and progressive loading states. */
.data-store-checkout-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.data-store-checkout-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -70px;
  inset-block-end: -110px;
  inline-size: 250px;
  block-size: 250px;
  border-radius: 50%;
  background: rgba(255,117,74,.16);
}
.data-store-checkout-hero :where(h1, p, .section-kicker) { color: #fff; }
.data-store-checkout-hero .section-kicker { opacity: .82; }
.checkout-loading-placeholder {
  display: grid;
  gap: 8px;
  min-block-size: 150px;
  place-content: center;
  padding: 24px;
  border: 1px dashed var(--poya-border);
  border-radius: 16px;
  background: var(--poya-surface-soft);
  color: var(--poya-muted);
  text-align: center;
}
.checkout-loading-placeholder strong { color: var(--poya-ink); }

/* ==========================================================
   Stage 3 — informational, account, administration and
   diagnostic surfaces. Shared across web and deploy assets.
========================================================== */
.content-topbar {
  position: sticky;
  z-index: 40;
  inset-block-start: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-block-size: 68px;
  padding: 10px max(18px, calc((100vw - var(--poya-content)) / 2));
  border-block-end: 1px solid rgba(220, 230, 239, .88);
  background: color-mix(in srgb, var(--poya-surface) 92%, transparent);
  box-shadow: var(--poya-shadow-sm);
  backdrop-filter: blur(16px) saturate(140%);
}
.content-topbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.content-topbar nav a {
  min-block-size: 40px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--poya-muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 720;
}
.content-topbar nav a:hover,
.content-topbar nav a[aria-current="page"] {
  color: var(--poya-brand-900);
  background: var(--poya-brand-50);
}
.content-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--poya-ink);
  text-decoration: none;
  font-weight: 850;
}
.content-brand img {
  inline-size: 38px;
  block-size: 38px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--poya-shadow-sm);
}
.content-shell {
  width: min(calc(100% - 28px), var(--poya-content));
  margin-inline: auto;
  padding-block: 28px 64px;
}
.content-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--poya-radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.18), transparent 28%),
    radial-gradient(circle at 88% 78%, rgba(0,168,107,.24), transparent 30%),
    linear-gradient(135deg, var(--poya-brand-950), var(--poya-brand-700) 58%, #4d2b8c);
  box-shadow: var(--poya-shadow-lg);
}
.content-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -70px;
  inset-block-start: -100px;
  inline-size: 270px;
  block-size: 270px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.content-hero :where(h1, p, .section-kicker, .content-meta) { color: #fff; }
.content-hero h1 {
  max-inline-size: 820px;
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.45rem);
  line-height: 1.25;
}
.content-hero > p:not(.section-kicker) {
  max-inline-size: 800px;
  margin: 0;
  color: rgba(255,255,255,.86);
  line-height: 2;
}
.section-kicker {
  margin: 0;
  color: var(--poya-brand-700);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .04em;
}
.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-block-start: 20px;
  color: rgba(255,255,255,.8);
  font-size: .82rem;
}
.content-meta span {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
  padding-inline: 11px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.content-card {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-lg);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
.content-card h2 { margin-block-start: 0; color: var(--poya-ink); }
.content-card p { color: var(--poya-muted); line-height: 2; }
.content-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin-block: 22px;
  padding: 17px 20px;
  border: 1px solid var(--poya-border);
  border-inline-start: 5px solid var(--poya-info);
  border-radius: var(--poya-radius-md);
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-sm);
}
.content-notice strong { color: var(--poya-ink); }
.content-notice p { grid-column: 2; margin: 0; color: var(--poya-muted); line-height: 1.9; }
.content-notice-info { border-inline-start-color: var(--poya-info); }
.content-notice-warning { border-inline-start-color: var(--poya-warning); background: color-mix(in srgb, var(--poya-surface) 90%, #fff3cd); }
.content-notice-danger { border-inline-start-color: var(--poya-danger); }
.content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-block-start: 20px;
}
.poya-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 46px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 780;
  text-decoration: none;
  transition: transform var(--poya-motion-fast), box-shadow var(--poya-motion-fast), background var(--poya-motion-fast);
}
.poya-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--poya-shadow-sm); }
.poya-button-primary { color: #fff; background: linear-gradient(135deg, var(--poya-brand-800), var(--poya-brand-600)); }
.poya-button-secondary { color: var(--poya-brand-900); border-color: var(--poya-border); background: var(--poya-surface-soft); }
.poya-button-danger { color: #fff; background: linear-gradient(135deg, #9f2219, var(--poya-danger)); }
.content-footer {
  width: min(calc(100% - 28px), var(--poya-content));
  min-block-size: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-inline: auto;
  padding: 18px;
  border-block-start: 1px solid var(--poya-border);
  color: var(--poya-muted);
  font-size: .86rem;
}
.content-footer a { color: var(--poya-brand-700); }
.two-column-content {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 22px;
  margin-block-start: 22px;
  align-items: start;
}
.poya-field { display: grid; gap: 7px; margin-block-end: 18px; }
.poya-field label { color: var(--poya-ink); font-size: .9rem; font-weight: 780; }
.poya-field :where(input, select, textarea) { width: 100%; min-block-size: 48px; padding: 11px 13px; background: var(--poya-surface-soft); }
.poya-field textarea { min-block-size: 130px; resize: vertical; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-text,
.card-helper,
.file-meta { color: var(--poya-muted); font-size: .82rem; line-height: 1.8; }
.form-result {
  min-block-size: 0;
  margin-block-start: 14px;
  padding: 0;
  border-radius: 12px;
  color: var(--poya-muted);
  line-height: 1.8;
}
.form-result:not(:empty) { min-block-size: 46px; padding: 12px 14px; border: 1px solid var(--poya-border); background: var(--poya-surface-soft); }
.form-result[data-state="success"] { color: var(--poya-success); border-color: color-mix(in srgb, var(--poya-success) 30%, var(--poya-border)); }
.form-result[data-state="error"] { color: var(--poya-danger); border-color: color-mix(in srgb, var(--poya-danger) 30%, var(--poya-border)); }
.form-result[data-state="loading"] { color: var(--poya-info); }
.poya-honeypot { position: fixed !important; inset-inline-start: -10000px !important; inline-size: 1px !important; block-size: 1px !important; opacity: 0 !important; }
.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-block: 10px 22px;
  color: var(--poya-muted);
  line-height: 1.9;
}
.consent-row input { inline-size: 20px; block-size: 20px; margin-block-start: 3px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-block-end: 14px; }
.card-heading h2 { margin: 4px 0 0; }
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 32px;
  padding: 5px 10px;
  border: 1px solid var(--poya-border);
  border-radius: 999px;
  color: var(--poya-muted);
  background: var(--poya-surface-soft);
  font-size: .75rem;
  font-weight: 740;
}
.system-console {
  max-block-size: 430px;
  overflow: auto;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid #26364a;
  border-radius: 14px;
  background: #101826;
  color: #d9e5f2;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.checklist-grid > div {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--poya-border);
  border-radius: 14px;
  background: var(--poya-surface-soft);
}
.checklist-grid strong { color: var(--poya-ink); }
.checklist-grid span { color: var(--poya-muted); font-size: .82rem; line-height: 1.8; }

/* Legal and support pages */
.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  inset-block-start: 92px;
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-md);
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-sm);
}
.legal-toc strong { margin-block-end: 6px; color: var(--poya-ink); }
.legal-toc a { padding: 7px 9px; border-radius: 8px; color: var(--poya-muted); text-decoration: none; font-size: .84rem; }
.legal-toc a:hover { color: var(--poya-brand-900); background: var(--poya-brand-50); }
.legal-content { display: grid; gap: 14px; }
.legal-content .content-card { scroll-margin-block-start: 90px; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-block: 22px; }
.support-card { display: flex; flex-direction: column; align-items: flex-start; }
.support-card .poya-button { margin-block-start: auto; }
.content-icon {
  inline-size: 48px;
  block-size: 48px;
  display: grid;
  place-items: center;
  margin-block-end: 14px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--poya-brand-800), var(--poya-brand-600));
  box-shadow: var(--poya-shadow-sm);
  font-size: 1.3rem;
}
.support-checklist { margin-block-start: 16px; }

/* Account deletion */
.danger-hero { background: radial-gradient(circle at 12% 20%, rgba(255,255,255,.16), transparent 28%), linear-gradient(135deg, #4d1714, #8e241c 60%, #b42318); }
.process-list { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; counter-reset: poya-process; }
.process-list li,
.compact-process > div {
  position: relative;
  display: grid;
  gap: 4px;
  min-block-size: 58px;
  padding: 12px 54px 12px 12px;
  border: 1px solid var(--poya-border);
  border-radius: 14px;
  background: var(--poya-surface-soft);
}
.process-list li { counter-increment: poya-process; }
.process-list li::before {
  content: counter(poya-process, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: 12px;
  inline-size: 32px;
  block-size: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--poya-brand-700);
  font-size: .75rem;
  font-weight: 800;
}
.process-list span,
.compact-process span { color: var(--poya-muted); font-size: .82rem; line-height: 1.7; }
.form-card > h2 { margin-block-end: 20px; }

/* Admin */
.admin-hero { margin-block-end: 22px; }
.access-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--poya-border);
  border-inline-start: 6px solid var(--poya-warning);
  border-radius: var(--poya-radius-lg);
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-md);
}
.access-state h2 { margin: 0 0 5px; font-size: 1.15rem; }
.access-state p { margin: 0; color: var(--poya-muted); line-height: 1.8; }
.access-state-icon { inline-size: 48px; block-size: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--poya-warning); background: #fff7df; font-size: 1.5rem; }
.admin-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-capability-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  padding: 20px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-lg);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
.admin-capability-card > span { grid-row: 1 / span 3; inline-size: 42px; block-size: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--poya-brand-50); font-size: 1.25rem; }
.admin-capability-card h2 { margin: 0; font-size: 1rem; }
.admin-capability-card p { margin: 0; color: var(--poya-muted); font-size: .82rem; line-height: 1.7; }
.admin-capability-card small { color: var(--poya-brand-700); line-height: 1.7; }
.admin-operations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-block-start: 18px; }

/* Analysis upload */
.analysis-upload-layout { grid-template-columns: minmax(250px, .68fr) minmax(0, 1.32fr); }
.analysis-guidance { position: sticky; inset-block-start: 90px; }
.compact-process { counter-reset: none; }
.analysis-form-card form { margin-block-start: 14px; }
.file-field input[type="file"] { padding: 9px; }
.file-meta {
  min-block-size: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px dashed var(--poya-border-strong);
  border-radius: 10px;
  background: var(--poya-surface-soft);
}
.poya-toast {
  position: fixed;
  z-index: 9999;
  inset-inline-start: 50%;
  inset-block-end: 26px;
  transform: translate(-50%, 90px);
  max-inline-size: min(90vw, 520px);
  padding: 13px 18px;
  border-radius: 12px;
  color: #fff;
  background: #172334;
  box-shadow: var(--poya-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--poya-motion), transform var(--poya-motion), visibility var(--poya-motion);
}
.poya-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.poya-toast.success { background: var(--poya-success); }
.poya-toast.error { background: var(--poya-danger); }
.poya-toast.warning { background: var(--poya-warning); }

/* Download center */
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block: 22px; }
.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-block-size: 270px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-lg);
  background: linear-gradient(180deg, var(--poya-surface), var(--poya-surface-soft));
  box-shadow: var(--poya-shadow-md);
}
.download-card::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; block-size: 5px; background: var(--poya-border-strong); }
.download-card[data-state="ready"]::before { background: var(--poya-success); }
.download-card h2 { margin: 12px 0 8px; color: var(--poya-ink); }
.download-card p { color: var(--poya-muted); line-height: 1.8; }
.download-platform-icon { inline-size: 48px; block-size: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--poya-brand-50); color: var(--poya-brand-900); font-size: 1.3rem; }
.download-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: auto; }
.download-actions :where(a, button, span) { min-block-size: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid var(--poya-border); border-radius: 11px; font: inherit; font-weight: 750; text-decoration: none; }
.download-actions :where(a, button) { color: #fff; border-color: transparent; background: var(--poya-brand-700); }
.download-actions [aria-disabled="true"] { color: var(--poya-muted); background: var(--poya-surface-soft); }
.release-state { font-size: .82rem; font-weight: 790; }
.release-state.pending { color: var(--poya-warning); }
.release-state.ready { color: var(--poya-success); }
.install-guidance { margin-block-start: 16px; }

/* Diagnostic */
.diagnostic-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-block: 22px;
  padding: 17px 20px;
  border: 1px solid var(--poya-border);
  border-radius: var(--poya-radius-md);
  background: var(--poya-surface);
  box-shadow: var(--poya-shadow-sm);
}
.diagnostic-status strong { color: var(--poya-ink); }
.diagnostic-status p { margin: 3px 0 0; color: var(--poya-muted); font-size: .83rem; }
.status-indicator { inline-size: 14px; block-size: 14px; border-radius: 50%; background: var(--poya-info); box-shadow: 0 0 0 6px color-mix(in srgb, var(--poya-info) 16%, transparent); }
.diagnostic-status[data-state="loading"] .status-indicator { animation: poya-pulse 1.4s infinite; }
.diagnostic-status[data-state="success"] .status-indicator { background: var(--poya-success); box-shadow: 0 0 0 6px color-mix(in srgb, var(--poya-success) 16%, transparent); }
.diagnostic-status[data-state="error"] .status-indicator { background: var(--poya-danger); box-shadow: 0 0 0 6px color-mix(in srgb, var(--poya-danger) 16%, transparent); }
.diagnostic-grid { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 16px; }
.diagnostic-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.diagnostic-metric { display: grid; place-items: center; min-block-size: 110px; padding: 14px; border: 1px solid var(--poya-border); border-radius: 14px; background: var(--poya-surface-soft); text-align: center; }
.diagnostic-metric strong { color: var(--poya-brand-700); font-size: 1.8rem; }
.diagnostic-metric span { color: var(--poya-muted); font-size: .8rem; }
@keyframes poya-pulse { 50% { opacity: .45; transform: scale(.8); } }

.theme-dark .content-topbar,
.theme-dark .content-card,
.theme-dark .content-notice,
.theme-dark .legal-toc,
.theme-dark .access-state,
.theme-dark .admin-capability-card,
.theme-dark .download-card,
.theme-dark .diagnostic-status {
  border-color: var(--poya-border);
  background: var(--poya-surface);
}
.theme-dark .content-topbar nav a:hover,
.theme-dark .content-topbar nav a[aria-current="page"],
.theme-dark .admin-capability-card > span,
.theme-dark .download-platform-icon { background: color-mix(in srgb, var(--poya-brand-700) 18%, var(--poya-surface)); }
.theme-dark .content-notice-warning { background: color-mix(in srgb, var(--poya-warning) 10%, var(--poya-surface)); }

@media (max-width: 980px) {
  .support-grid,
  .download-grid,
  .admin-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column-content,
  .analysis-upload-layout,
  .diagnostic-grid { grid-template-columns: 1fr; }
  .analysis-guidance { position: static; }
  .admin-operations-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .content-topbar { position: relative; align-items: flex-start; padding: 10px 14px; }
  .content-topbar nav { justify-content: flex-end; }
  .content-topbar nav a { min-block-size: 36px; padding: 6px 8px; font-size: .78rem; }
  .content-brand span { display: none; }
  .content-shell { width: min(calc(100% - 16px), var(--poya-content)); padding-block-start: 14px; }
  .content-hero { padding: 25px 20px; border-radius: 22px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-toc strong { grid-column: 1 / -1; }
  .form-pair,
  .checklist-grid,
  .diagnostic-summary { grid-template-columns: 1fr; }
  .access-state { grid-template-columns: auto 1fr; }
  .access-state .poya-button { grid-column: 1 / -1; }
  .card-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .support-grid,
  .download-grid,
  .admin-capability-grid { grid-template-columns: 1fr; }
  .content-notice { grid-template-columns: 1fr; }
  .content-notice p { grid-column: 1; }
  .legal-toc { grid-template-columns: 1fr; }
  .content-actions > * { width: 100%; }
  .content-footer { flex-direction: column; }
}
.content-footer {
  background: transparent !important;
  color: var(--poya-muted) !important;
}
.content-footer :where(a, span) { color: inherit; }
.content-footer a:hover { color: var(--poya-brand-700); }

/* Accessible authentication modal overrides */
body.poya-auth-open { overflow: hidden; }
.poya-auth-fab {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  background: linear-gradient(135deg, var(--poya-brand-800), var(--poya-brand-600));
  box-shadow: 0 14px 34px rgba(10, 60, 104, .25);
}
.poya-auth-fab-logged { background: linear-gradient(135deg, var(--poya-accent-strong), var(--poya-accent)); }
.poya-auth-overlay {
  padding: 20px;
  background: rgba(7, 18, 32, .58);
  backdrop-filter: blur(9px);
}
.poya-auth-modal {
  overflow: hidden;
  max-inline-size: 430px;
  padding: 30px;
  border: 1px solid rgba(220,230,239,.9);
  border-radius: 26px;
  background: var(--poya-surface);
  color: var(--poya-ink);
  box-shadow: 0 32px 100px rgba(4, 24, 43, .28);
}
.poya-auth-modal::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: 6px;
  background: linear-gradient(90deg, var(--poya-brand-700), var(--poya-accent), #6a3ca1);
}
.poya-auth-close {
  inline-size: 42px;
  block-size: 42px;
  display: grid;
  place-items: center;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  inset-inline-start: auto;
  border-radius: 12px;
  color: var(--poya-muted);
  background: var(--poya-surface-soft);
}
.poya-auth-step { padding-block-start: 18px; }
.poya-auth-modal h3 { margin: 4px 0 8px; color: var(--poya-ink); font-size: 1.3rem; }
.poya-auth-eyebrow { margin: 0; color: var(--poya-brand-700); font-size: .74rem; font-weight: 850; }
.poya-auth-hint { color: var(--poya-muted); line-height: 1.9; }
.poya-auth-label { display: block; margin-block: 14px 7px; color: var(--poya-ink); font-size: .86rem; font-weight: 760; }
.poya-auth-modal input {
  min-block-size: 50px;
  margin-block-end: 12px;
  border-color: var(--poya-border);
  background: var(--poya-surface-soft);
  color: var(--poya-ink);
}
.poya-auth-btn,
.poya-auth-btn-secondary { min-block-size: 48px; border-radius: 13px; font-family: inherit; }
.poya-auth-btn { background: linear-gradient(135deg, var(--poya-brand-800), var(--poya-brand-600)); }
.poya-auth-btn-secondary { color: var(--poya-brand-900); border-color: var(--poya-border); background: var(--poya-surface-soft); }
.poya-auth-error { color: var(--poya-danger); line-height: 1.7; }
.theme-dark .poya-auth-modal { background: var(--poya-surface); border-color: var(--poya-border); }
@media (max-width: 520px) {
  .poya-auth-overlay { align-items: flex-end; padding: 0; }
  .poya-auth-modal { max-inline-size: none; border-radius: 26px 26px 0 0; padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
}

/* Final hero contrast guard: later shared kicker rules must not override text on gradient surfaces. */
.dashboard-product-hero .dashboard-hero-kicker,
.data-store-checkout-hero .section-kicker,
.content-hero .section-kicker {
  color: #fff;
  opacity: .9;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .18);
}


/* Issue 59 — shared compact Persian visual contract */
:root{--poya-brand-900:#123b61;--poya-brand-700:#1769aa;--poya-brand-500:#2f86c8;--poya-accent:#f0a23a;--poya-text:#172432}
html{font-size:14px}body,input,select,textarea,button{font-family:Vazirmatn,Tahoma,Arial,sans-serif;font-variant-numeric:normal}body{font-size:1rem;line-height:1.75;color:var(--poya-text)}h1{font-size:clamp(1.65rem,3vw,2.3rem)}h2{font-size:clamp(1.25rem,2vw,1.65rem)}h3{font-size:1.05rem}.form-header,.content-topbar,.top-header{border-radius:0!important;margin:0!important;width:100%!important}.form-header-inner{max-width:none!important;width:100%;padding-inline:clamp(16px,4vw,64px)!important}.dashboard-product-hero,.city-hero,.pro-hero,.analyses-hero,.dash-hero,body[data-page="report"] .form-intro{border-radius:0!important;margin-inline:0!important;width:100%!important;background:linear-gradient(120deg,var(--poya-brand-900),var(--poya-brand-700),var(--poya-brand-500))!important}.hero{border-radius:0!important;margin:0!important;min-height:auto!important;background:linear-gradient(120deg,var(--poya-brand-900),var(--poya-brand-700),var(--poya-brand-500))!important}.hero-buttons{display:flex!important;flex-direction:column!important;align-items:stretch!important;max-width:380px;margin-inline:auto;gap:6px!important}.hero-buttons .hero-btn{border:0!important;border-radius:8px!important;padding:8px 12px!important;box-shadow:none!important;text-align:right;background:rgba(255,255,255,.12)!important;color:#fff!important}.scroll-top-btn{display:none!important}.poya-auth-fab{display:none!important}.poya-download-ribbon{position:absolute;inset-inline-start:clamp(10px,2vw,28px);top:100%;z-index:50;transform:translateY(-7px);padding:8px 14px;border-radius:0 0 12px 12px;background:var(--poya-accent);color:#172432!important;font-weight:800;text-decoration:none;box-shadow:0 8px 20px rgba(15,23,42,.22)}header{position:relative}.header-nav-group{gap:6px!important}.header-nav-group a,.back-link,.dash-switch-btn{font-size:.88rem!important;padding:7px 10px!important}.dashboard-section-heading p,.section-title p{font-size:.86rem}.kpi-card{padding:14px!important}.kpi-card .kpi-number,.kpi-card .value{font-size:1.45rem!important}.native-forum-auth-card{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px;border:1px solid rgba(23,105,170,.25);border-radius:14px;background:rgba(23,105,170,.07);margin-bottom:12px}.analysis-source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.analysis-source-grid article{background:#fff;border:1px solid #dbe6ef;border-radius:14px;padding:16px}.analysis-source-grid a{display:inline-block;margin-top:8px;font-weight:800;color:var(--poya-brand-700)}.data-product-check{display:grid;place-items:center;width:22px;height:22px;border:2px solid var(--poya-brand-700);border-radius:5px;font-size:0}.data-product-card input:checked+.data-product-check{background:var(--poya-brand-700)}.data-product-card input:checked+.data-product-check::after{content:'✓';font-size:14px;color:#fff}.data-store-intro{min-height:auto!important}.data-store-ai-contract,.data-store-rule-stack{display:none!important}footer{margin-top:28px!important;padding-block:18px!important}.footer-content p{margin-block:3px!important;font-size:.86rem}@media(max-width:760px){html{font-size:13px}.analysis-source-grid{grid-template-columns:1fr}.form-header-inner{padding-inline:12px!important}.poya-download-ribbon{font-size:.82rem}.native-forum-auth-card{align-items:flex-start;flex-direction:column}}

.native-forum-subscriptions,.native-forum-services{margin:12px 0;grid-template-columns:repeat(2,minmax(0,1fr))}.native-forum-subscriptions .forum-panel,.native-forum-services .forum-panel{padding:14px}.native-forum-services{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:760px){.native-forum-subscriptions,.native-forum-services{grid-template-columns:1fr}}

/* Package A dashboard-pro overflow containment v1. */
body[data-page="dashboard-pro"] :where(
  .dashboard-layout,
  .dashboard-page-shell,
  .dashboard-pro-shell,
  .dashboard-pro-shell > *,
  .form-header,
  .form-header-inner,
  .header-nav-group,
  .kpi-section,
  .filter-panel,
  .dashboard-pro-filter-grid,
  .map-section,
  .banks-container,
  .bank-card,
  .bank-content,
  .chart-card,
  .table-card,
  .comparison-grid,
  .comparison-section,
  .commerce-section,
  .correlation-section,
  .emerging-section
) {
  min-inline-size: 0;
  max-inline-size: 100%;
  box-sizing: border-box;
}
body[data-page="dashboard-pro"] .dashboard-layout,
body[data-page="dashboard-pro"] .dashboard-pro-shell {
  inline-size: 100%;
  overflow-x: clip;
}
body[data-page="dashboard-pro"] .dashboard-pro-shell > :not(.dashboard-product-hero) {
  inline-size: min(94%, 1500px);
  max-inline-size: calc(100% - 16px);
}
body[data-page="dashboard-pro"] .dashboard-pro-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}
body[data-page="dashboard-pro"] :where(.bank-content, .comparison-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
body[data-page="dashboard-pro"] .kpi-section {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
body[data-page="dashboard-pro"] :where(canvas, svg, img, video, iframe) {
  max-inline-size: 100%;
}
body[data-page="dashboard-pro"] :where(.table-card, .map-section, #iranMap, .leaflet-container) {
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
body[data-page="dashboard-pro"] #iranMap,
body[data-page="dashboard-pro"] .leaflet-container {
  overflow: hidden;
}
body[data-page="dashboard-pro"] .table-card table {
  inline-size: 100%;
  max-inline-size: 100%;
}
@media (max-width: 720px) {
  body[data-page="dashboard-pro"] .form-header-inner {
    inline-size: calc(100% - 16px);
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  body[data-page="dashboard-pro"] :where(
    .back-link,
    .form-header-logo,
    .header-nav-group,
    .dash-switch-btn,
    .bank-header,
    .bank-tabs,
    .export-buttons
  ) {
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Owner visual-correction wave: readable light/dark surfaces and critical alert motion. */
.theme-dark {
  --poya-text: var(--poya-ink);
  --text: var(--poya-ink);
  --text-color: var(--poya-ink);
}
.theme-dark body { color: var(--poya-ink) !important; }
.theme-dark section h2,
.theme-dark :where(form) label,
.theme-dark :where(.section-card, .card, .cta-box, .benefits li, .analysis-card, .participation-card, .chart-card, .kpi-card, .bank-accordion-item, .filter-panel) :where(h1, h2, h3, h4, p, li, label, span, div) {
  color: var(--poya-ink);
}
.theme-dark .benefits li,
.theme-dark .analysis-card {
  background: var(--poya-surface);
  border-color: var(--poya-border);
}
.theme-dark .cta-box p,
.theme-dark .section-card p { color: var(--poya-muted); }
.theme-dark #poyaForm,
.theme-dark #poyaForm .report-form-card {
  background: var(--poya-surface);
  border-color: var(--poya-border);
  color: var(--poya-ink);
}
.theme-dark #poyaForm :where(.options-type label, .category-grid label, .options-cooperation label, .rating-box, .map-card) {
  background: var(--poya-surface-soft);
  border-color: var(--poya-border);
  color: var(--poya-ink);
}
.theme-dark #poyaForm :where(.category-description, .help-text, .rating-labels) { color: var(--poya-muted); }

.content-footer > :where(a, span, nav),
.content-footer nav > a { margin-inline: .45rem; }

body[data-page="dashboard-pro"] .alert-banner.show.critical {
  animation: poyaCriticalAlertJump 1.45s ease-in-out infinite;
  transform-origin: center;
}
@keyframes poyaCriticalAlertJump {
  0%, 100% { transform: translateY(0); }
  18% { transform: translateY(-8px); }
  34% { transform: translateY(0); }
  48% { transform: translateY(-4px); }
  62% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="dashboard-pro"] .alert-banner.show.critical { animation: none; }
}
