:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --accent: #d97706;
  --btn-primary-bg: #0f172a;
  --btn-primary-text: #ffffff;
  --wa-green: #16a34a;
  --wa-dark: #15803d;
  --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] {
  --bg: #090d16;
  --surface: #111827;
  --surface-alt: #1f2937;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #1f2937;
  --accent: #fbbf24;
  --btn-primary-bg: #f8fafc;
  --btn-primary-text: #0f172a;
  --wa-green: #16a34a;
  --wa-dark: #15803d;
  --hero-bg: linear-gradient(135deg, #05080f 0%, #111827 100%);
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navbar */
.navbar {
  background: #0f172a;
  color: #ffffff;
  padding: 14px 0;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand span {
  color: #fbbf24;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Toggle Sun/Moon SVG visibility */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-cta {
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Hero Section */
.hero {
  background: var(--hero-bg);
  color: #ffffff;
  padding: 36px 0 42px;
  text-align: center;
  border-bottom: 1px solid #1e293b;
}

.pill {
  display: inline-block;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero p {
  color: #cbd5e1;
  max-width: 620px;
  margin: 0 auto 22px;
  font-size: 0.98rem;
}

/* Mission Progress Card */
.progress-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 18px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.progress-track {
  background: rgba(255, 255, 255, 0.15);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  background: #22c55e;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.45s ease;
}

/* Search & Place Filters */
.controls {
  margin: 24px 0 18px;
  display: grid;
  gap: 12px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.results-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Store Directory Grid */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.store-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--surface-alt);
  display: block;
}

.store-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.store-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.store-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn-visit {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-align: center;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-wa {
  background: var(--wa-green);
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.btn-wa:hover {
  background: var(--wa-dark);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 40px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-reset {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* Owner CTA Banner */
.owner-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 36px;
}

.owner-banner h2 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.owner-banner p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 16px;
  font-size: 0.92rem;
}

.btn-dilsegrow {
  display: inline-block;
  background: var(--wa-green);
  color: #ffffff;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

/* Legal Hosting Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-links {
  margin-bottom: 8px;
  font-weight: 600;
}

footer a {
  color: var(--text);
  text-decoration: underline;
}
