:root {
  --bg: #f8f9ff;
  --surface: #ffffff;
  --surface-soft: #f0f4ff;
  --text: #16213d;
  --muted: #576489;
  --primary: #1f67d2;
  --primary-dark: #184ea4;
  --secondary: #f28b22;
  --accent: #22a36a;
  --success: #1b9e5a;
  --warning: #ff9f1a;
  --danger: #e04f5f;
  --border: #d8e0f2;
  --shadow: 0 10px 28px rgba(37, 56, 120, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.menu-trigger {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.menu-trigger:hover {
  background: var(--surface-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.brand-text {
  line-height: 1;
  white-space: nowrap;
}

.brand span {
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #e8f0ff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), #2f7be6);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--primary-dark), #1f67d2);
}

.btn-outline {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.btn-outline:hover {
  background: #f7faff;
  border-color: #cbd9f6;
}

.hero {
  padding: 64px 0 42px;
}

.hero-home {
  position: relative;
  min-height: 620px;
  padding: 0;
  overflow: hidden;
}

.hero-home-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-home-overlay {
  position: relative;
  min-height: 620px;
  background: linear-gradient(120deg, rgba(13, 22, 48, 0.58), rgba(13, 22, 48, 0.3));
}

.hero-home-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding-top: 200px;
}

.hero-home-content h1 {
  max-width: 18ch;
  margin-bottom: 22px;
}

.home-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 240px 180px;
  gap: 10px;
  align-items: start;
  max-width: 980px;
}

.home-search input,
.home-search select,
.home-search button {
  min-height: 54px;
  border-radius: 12px;
}

.home-search button {
  padding-inline: 20px;
}

.address-wrap {
  position: relative;
}

.address-wrap input {
  padding-right: 62px;
}

.map-open-icon {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 5;
}

.map-open-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.address-suggestions {
  list-style: none;
  padding: 6px;
  margin: 8px 0 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow: auto;
  z-index: 6;
}

.address-suggestions li button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  border-radius: 8px;
  font-size: 0.9rem;
  padding: 9px 10px;
  cursor: pointer;
}

.address-suggestions li button:hover {
  background: var(--surface-soft);
}

.location-help {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  max-width: 72ch;
}

.map-panel {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(8, 16, 45, 0.55);
  backdrop-filter: blur(4px);
  overflow: hidden;
  max-width: 980px;
}

.map-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
}

.map-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-stage {
  position: relative;
}

.map-frame {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.map-center-pointer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 450;
}

.map-center-pointer img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.market-shell {
  padding: 18px 0 10px;
  background: #f4f6fb;
  border-bottom: 1px solid var(--border);
}

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.market-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.market-chip.active {
  background: #e8f0ff;
  border-color: #c8d9ff;
  color: var(--primary);
}

.market-chip-location {
  max-width: min(480px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
}

.market-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.market-nav-item {
  display: block;
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--text);
  font-weight: 600;
}

.market-nav-item.active,
.market-nav-item:hover {
  background: #e8f0ff;
  color: var(--primary);
}

.market-main-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.market-main-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.market-main-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 45, 0.42);
  z-index: 20;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(360px, 88vw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 21;
  padding: 24px;
  transform: translateX(-100%);
  transition: transform 0.24s ease;
  overflow-y: auto;
}

.side-menu.is-open {
  transform: translateX(0);
}

.side-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 1.25rem;
  color: var(--text);
  cursor: pointer;
  display: block;
}

.side-item,
.side-link {
  display: block;
  margin-top: 12px;
}

.side-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-weight: 600;
}

.side-item-strong {
  background: var(--text);
  color: #fff;
  border-color: transparent;
}

.side-link {
  color: var(--text);
  font-weight: 500;
}

.app-callout {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--surface-soft);
}

.app-callout p {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 600;
}

.app-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #167c4f;
  background: #e1f6ea;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.1;
  margin: 0 0 14px;
}

.lead {
  color: var(--muted);
  font-size: 1.03rem;
  margin: 0 0 24px;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.banner-slider {
  padding: 14px;
}

.fake-window {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.window-head {
  background: #f4f6ff;
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.window-body {
  background: #fff;
  padding: 16px;
}

.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #fcfdff;
}

.stat p {
  margin: 0;
}

.stat .label {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat .value {
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.section {
  padding: 18px 0 54px;
}

.section h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.results-count {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.results-progress {
  width: 100%;
  height: 8px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: #e5ebfb;
  overflow: hidden;
}

.results-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  transition: width 0.24s ease;
}

.results-progress-text {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(43, 64, 132, 0.06);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.04rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.card-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eef3ff;
  color: #2b4c83;
}

.cards-business .card.is-hidden {
  display: none;
}

.cards-business .card.is-animated {
  animation: cardFadeIn 0.28s ease both;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-wrap {
  max-width: 560px;
  margin: 52px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.merchant-hero {
  padding-bottom: 12px;
}

.form-wrap h1 {
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.form-wrap .help {
  color: var(--muted);
  margin: 0 0 20px;
}

.form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 7px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(56, 93, 255, 0.22);
  border-color: var(--primary);
}

.tip {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-message {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.form-message.success {
  color: #0d7a46;
  background: #ddf6ea;
  border-color: #b6e9cd;
}

.form-message.error {
  color: #8e2a36;
  background: #ffe0e5;
  border-color: #f8bec8;
}

.form-message.info {
  color: var(--text);
  background: var(--surface-soft);
}

.session-banner {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer {
  margin-top: 34px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard {
  padding: 30px 0 45px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.kpi small {
  color: var(--muted);
}

.kpi strong {
  margin-top: 6px;
  display: block;
  font-size: 1.25rem;
}

.columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 700;
}

.tag.success {
  color: #0d7a46;
  background: #ddf6ea;
}

.tag.warning {
  color: #936100;
  background: #fff0d4;
}

.tag.danger {
  color: #8e2a36;
  background: #ffe0e5;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.list-item strong {
  display: block;
}

.list-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.slides {
  position: relative;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 16, 45, 0.68), rgba(8, 16, 45, 0.12));
}

.slide-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  color: #fff;
  z-index: 1;
}

.slide-content h3 {
  margin: 0 0 5px;
  font-size: 1.06rem;
}

.slide-content p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.92);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #d1dbf7;
  cursor: pointer;
}

.dot.active {
  background: var(--secondary);
}

.cards-business .card:nth-child(odd) {
  border-top: 4px solid var(--primary);
}

.cards-business .card:nth-child(even) {
  border-top: 4px solid var(--accent);
}

.categories-section {
  padding-top: 0;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #214066;
  background: #e5eeff;
  border: 1px solid #ccd9fb;
  cursor: pointer;
  transition: 0.2s ease;
}

.category-pill:hover {
  background: #d9e8ff;
}

.category-pill.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--primary), #2a74df);
}

.empty-state {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  border-left: 3px solid var(--secondary);
  padding-left: 10px;
}

@media (max-width: 960px) {
  .hero-grid,
  .cards,
  .columns,
  .market-layout {
    grid-template-columns: 1fr;
  }

  .home-search {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .hero-home,
  .hero-home-overlay {
    min-height: 560px;
  }

  .market-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-frame {
    height: 280px;
  }

  .map-panel-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-home-content {
    padding-top: 130px;
  }

  .slides {
    height: 260px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }

  .topbar-inner .nav {
    width: 100%;
  }

  .market-sidebar {
    grid-template-columns: 1fr;
  }

  .hero-home-content {
    padding-top: 110px;
  }

  .hero-home-content h1 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .map-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-panel-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .address-wrap input {
    padding-right: 56px;
  }

  .map-open-icon {
    width: 40px;
    height: 40px;
    right: 7px;
  }

  .map-open-icon img {
    width: 26px;
    height: 26px;
  }

  .map-frame {
    height: 240px;
  }

  .form-row,
  .kpi-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 40px;
  }

  .brand-logo {
    height: 30px;
  }

  .slides {
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cards-business .card.is-animated {
    animation: none;
  }
}
