:root {
  --y:      #EAB308;
  --y-dim:  rgba(234,179,8,0.12);
  --y-dark: #92400E;
  --bg:     #080808;
  --s1:     #111111;
  --s2:     #181818;
  --s3:     #222222;
  --s4:     #2A2A2A;
  --txt:    #F0F0F0;
  --dim:    #888888;
  --faint:  #444444;
  --border: rgba(255,255,255,0.06);
  --r:      18px;
  --r-sm:   12px;
  --sidebar-w: 240px;
  --topbar-h:  60px;
  --botbar-h:  68px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --safe-t:    env(safe-area-inset-top, 0px);
}

[data-theme="light"] {
  --y:      #CA8A04;
  --y-dim:  rgba(202,138,4,0.08);
  --y-dark: #854D0E;
  --bg:     #F5F5F0;
  --s1:     #FFFFFF;
  --s2:     #F0F1F3;
  --s3:     #E5E7EB;
  --s4:     #D1D5DB;
  --txt:    #111827;
  --dim:    #6B7280;
  --faint:  #9CA3AF;
  --border: rgba(0,0,0,0.08);
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html { background: var(--bg); transition: background 0.25s ease; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* ── LAYOUT SHELL ── */
.shell {
  display: flex;
  min-height: 100dvh;
}

/* ── SIDEBAR (desktop only) ── */
.sidebar {
  display: none;
  flex-direction: column;
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--s1);
  border-right: 1px solid var(--border);
  height: 100dvh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  padding: 28px 16px 24px;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.logo-icon {
  width: 40px; height: 40px;
  background: var(--y);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.logo-text {
  font-size: 20px; font-weight: 900; letter-spacing: -0.6px;
}
.logo-text em { font-style: normal; color: var(--y); }

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.sidebar-nav-item:hover { background: var(--s2); color: var(--txt); }
.sidebar-nav-item.active { background: var(--y-dim); color: var(--y); }

.nav-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.sidebar-nav-item.active .nav-icon-wrap { background: var(--y-dim); }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--faint);
  padding: 16px 12px 6px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.theme-toggle-sidebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
}

.theme-toggle-sidebar:hover {
  background: var(--s2);
  color: var(--txt);
}

.theme-icon-light { display: none; }
.theme-icon-dark  { display: inline; }
[data-theme="light"] .theme-icon-light { display: inline; }
[data-theme="light"] .theme-icon-dark  { display: none; }

.sidebar-contact {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.8;
}

/* ── MAIN AREA ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  transition: background 0.2s;
}

/* ── MOBILE TOP BAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  height: var(--topbar-h);
  background: rgba(8,8,8,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: background 0.2s, border-color 0.2s;
}

.topbar-logo {
  display: flex; align-items: center; gap: 9px;
}

.topbar-logo .logo-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.topbar-logo .logo-text { font-size: 19px; }

.topbar-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--s2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background 0.15s;
}
.icon-btn:active { background: var(--s3); }

/* ── CONTENT SCROLL ── */
.content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--botbar-h) + var(--safe-b) + 12px);
}

/* ── MOBILE BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--botbar-h);
  padding-bottom: var(--safe-b);
  background: rgba(14,14,14,0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 100;
  transition: background 0.2s, border-color 0.2s;
}

.bot-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex: 1; padding: 0;
  background: none; border: none;
}

.bot-nav-icon {
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; transition: background 0.15s;
}

.bot-nav-item.active .bot-nav-icon { background: var(--y-dim); }

.bot-nav-label {
  font-size: 10px; font-weight: 600; color: var(--faint);
}
.bot-nav-item.active .bot-nav-label { color: var(--y); }

/* ── SHARED COMPONENTS ── */

.section { padding: 0 18px 24px; }

.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 14px;
}
.section-hd-title { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.section-hd-link  { font-size: 13px; font-weight: 700; color: var(--y); cursor: pointer; }

.card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  transition: background 0.2s, border-color 0.2s;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
}
.badge-y   { background: var(--y); color: #000; }
.badge-g   { background: rgba(34,197,94,0.15); color: #22C55E; }
.badge-dim { background: var(--s3); color: var(--dim); }

.divider { height: 1px; background: var(--border); margin: 0 18px 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  border-radius: var(--r-sm); border: none; cursor: pointer;
  padding: 13px 20px; transition: opacity 0.15s;
  text-decoration: none;
}
.btn:active { opacity: 0.8; }
.btn-y   { background: var(--y); color: #000; }
.btn-ghost { background: var(--s2); color: var(--txt); border: 1px solid var(--border); }
.btn-block { width: 100%; }

.page-title-bar { padding: 22px 18px 16px; }
.page-title { font-size: 24px; font-weight: 900; letter-spacing: -0.7px; }
.page-sub   { font-size: 13px; color: var(--dim); margin-top: 3px; }

/* ── HOME PAGE ── */
.hero {
  padding: 28px 18px 20px;
  background: linear-gradient(180deg, var(--s1) 0%, transparent 100%);
}

.hero-location {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--s2); border: 1px solid var(--border);
  border-radius: 30px; padding: 6px 13px;
  font-size: 12px; font-weight: 600; color: var(--dim);
  margin-bottom: 16px;
}
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 6px #22C55E; flex-shrink: 0; }

.hero-h1 {
  font-size: 30px; font-weight: 900; letter-spacing: -1px;
  line-height: 1.15; margin-bottom: 10px;
}
.hero-h1 em { font-style: normal; color: var(--y); }

.hero-sub {
  font-size: 14px; color: var(--dim); line-height: 1.6;
  margin-bottom: 22px; max-width: 380px;
}

.search-row {
  display: flex; gap: 10px; margin-bottom: 10px;
}

.search-wrap { position: relative; flex: 1; }
.search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--dim); pointer-events: none;
}
.search-input {
  width: 100%; height: 48px;
  border-radius: var(--r); background: var(--s2);
  border: 1.5px solid var(--border); color: var(--txt);
  font-size: 14px; padding: 0 48px 0 42px; outline: none;
  transition: border-color 0.2s;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--y); }

.search-filter {
  width: 48px; height: 48px; border-radius: var(--r);
  background: var(--y); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; border: none; cursor: pointer;
}

.stats-strip {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 8px; padding: 0 18px 24px;
}
.stat-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 10px; text-align: center;
}
.stat-num { font-size: 18px; font-weight: 900; color: var(--y); letter-spacing: -0.5px; }
.stat-lbl { font-size: 10px; color: var(--dim); font-weight: 600; margin-top: 3px; line-height: 1.3; }

.cats-scroll {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  padding: 0 18px 24px;
}
.cats-scroll::-webkit-scrollbar { display: none; }

.cat {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 7px; cursor: pointer; border: none; background: none;
}
.cat-icon {
  width: 62px; height: 62px; border-radius: 18px;
  background: var(--s2); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.cat:active .cat-icon, .cat:hover .cat-icon { background: var(--s3); transform: scale(0.94); }
.cat.active .cat-icon { background: var(--y-dim); border-color: rgba(234,179,8,0.4); }
.cat-lbl { font-size: 11px; font-weight: 700; color: var(--dim); white-space: nowrap; }
.cat.active .cat-lbl { color: var(--y); }

.promo {
  margin: 0 18px 24px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #1C1500 0%, #241B00 60%, #1A1200 100%);
  border: 1.5px solid rgba(234,179,8,0.2);
  padding: 22px 20px 22px;
  position: relative; overflow: hidden;
}
.promo::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(234,179,8,0.12) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.promo-inner { position: relative; }
.promo-title {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
  margin: 10px 0 6px; line-height: 1.2;
}
.promo-sub { font-size: 13px; color: var(--dim); margin-bottom: 18px; line-height: 1.6; }

.steps { padding: 0 18px 24px; display: flex; flex-direction: column; gap: 10px; }
.step-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 16px;
  display: flex; align-items: flex-start; gap: 14px;
}
.step-num {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--y); color: #000; font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.step-desc  { font-size: 12px; color: var(--dim); line-height: 1.5; }

.feat-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0 18px 24px;
}
.feat-card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 16px 14px;
}
.feat-ico   { font-size: 24px; margin-bottom: 8px; }
.feat-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.feat-desc  { font-size: 11px; color: var(--dim); line-height: 1.5; }

.cta-block {
  margin: 0 18px 28px;
  background: var(--y); border-radius: var(--r);
  padding: 26px 20px; text-align: center;
}
.cta-title { font-size: 22px; font-weight: 900; color: #000; letter-spacing: -0.6px; margin-bottom: 6px; }
.cta-sub   { font-size: 13px; color: rgba(0,0,0,0.55); margin-bottom: 20px; }
.cta-btn-dark {
  display: block; background: #000; color: var(--y);
  font-size: 15px; font-weight: 800; padding: 14px;
  border-radius: var(--r-sm); margin-bottom: 10px;
  text-decoration: none; transition: opacity 0.15s;
}
.cta-btn-dark:active { opacity: 0.8; }
.cta-btn-ghost {
  display: block; background: rgba(0,0,0,0.1); color: #000;
  font-size: 15px; font-weight: 700; padding: 14px;
  border-radius: var(--r-sm); text-decoration: none;
}

/* ── PROVIDERS PAGE ── */
.filter-bar {
  padding: 0 18px 16px; display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.fpill {
  flex-shrink: 0; padding: 8px 16px; border-radius: 30px;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--dim); font-family: inherit; font-size: 13px;
  font-weight: 700; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.fpill.active { background: var(--y); border-color: var(--y); color: #000; }
.fpill:hover:not(.active) { border-color: var(--s4); background: var(--s2); color: var(--txt); }

.empty-state {
  text-align: center; padding: 64px 24px;
}
.empty-ico   { font-size: 56px; margin-bottom: 14px; }
.empty-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.empty-sub   { font-size: 14px; color: var(--dim); margin-bottom: 26px; line-height: 1.6; max-width: 280px; margin-left: auto; margin-right: auto; }

/* ── EARN / AFFILIATE PAGE ── */
.earn-hero {
  margin: 18px 18px 20px;
  background: linear-gradient(135deg, #1C1500, #241B00);
  border: 1.5px solid rgba(234,179,8,0.2);
  border-radius: var(--r);
  padding: 28px 22px;
  position: relative; overflow: hidden;
}
.earn-hero::before {
  content: '';
  position: absolute; bottom: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(234,179,8,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.earn-hero-inner { position: relative; }
.earn-hero-title {
  font-size: 26px; font-weight: 900; letter-spacing: -0.8px;
  line-height: 1.2; margin: 10px 0 8px;
}
.earn-hero-sub { font-size: 13px; color: var(--dim); line-height: 1.6; margin-bottom: 20px; }

/* ── ACCOUNT PAGE ── */
.account-hero {
  text-align: center; padding: 32px 18px 24px;
}
.acct-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--s2); border: 3px solid var(--y);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; margin: 0 auto 14px;
}
.acct-name { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 4px; }
.acct-sub  { font-size: 13px; color: var(--dim); margin-bottom: 22px; }

.acct-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.menu-list { padding: 0 18px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.menu-item {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 15px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: background 0.15s; cursor: pointer;
  text-decoration: none; color: inherit;
}
.menu-item:hover, .menu-item:active { background: var(--s2); }
.menu-item-icon { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.menu-item-body { flex: 1; }
.menu-item-label { font-size: 14px; font-weight: 700; }
.menu-item-sub   { font-size: 12px; color: var(--dim); margin-top: 2px; }
.menu-item-arrow { color: var(--faint); font-size: 18px; }

/* ── PROVIDER CARDS (for providers page) ── */
.provider-grid {
  display: grid;
  gap: 12px;
  padding: 0 18px 24px;
}
@media (min-width: 640px) {
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
}

.provider-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--s1);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.provider-card:hover, .provider-card:active { background: var(--s2); }

.prov-card-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--s3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}

.prov-card-body { flex: 1; min-width: 0; }
.prov-card-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.prov-card-cat  { font-size: 12px; color: var(--y); font-weight: 600; margin-bottom: 4px; }
.prov-card-meta { font-size: 11px; color: var(--dim); display: flex; gap: 12px; flex-wrap: wrap; }

.prov-card-cta {
  flex-shrink: 0;
  display: flex; align-items: center;
  color: var(--faint);
  font-size: 20px;
}

/* ── RESPONSIVE ── */
@media (min-width: 768px) {
  .sidebar     { display: flex; }
  .topbar      { display: none; }
  .bottom-nav  { display: none; }

  .content {
    padding-bottom: 32px;
  }

  .hero-h1 { font-size: 36px; }
  .hero-sub { font-size: 15px; }

  .feat-grid { grid-template-columns: repeat(4, 1fr); }

  .steps {
    flex-direction: row;
  }
  .step-card { flex: 1; flex-direction: column; }
  .step-num { margin-bottom: 4px; }

  .content-inner {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* ── AUTH / FORM PAGES ── */
.auth-card {
  max-width: 440px;
  margin: 32px auto;
  padding: 0 18px;
}

.auth-card-inner {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.auth-card-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 4px;
}

.auth-card-sub {
  font-size: 13px;
  color: var(--dim);
  text-align: center;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--txt);
}

.form-input {
  width: 100%;
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--s2);
  border: 1.5px solid var(--border);
  color: var(--txt);
  font-size: 14px;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input::placeholder { color: var(--faint); }
.form-input:focus { border-color: var(--y); }

.form-error {
  font-size: 12px;
  color: #EF4444;
  margin-top: 4px;
}

.form-alert {
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}

.form-alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #FCA5A5;
}

.form-alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  color: #86EFAC;
}

.auth-link {
  font-size: 13px;
  color: var(--dim);
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.auth-link a {
  color: var(--y);
  font-weight: 700;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.role-option {
  cursor: pointer;
}

.role-option input { display: none; }

.role-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.role-option input:checked + .role-card {
  border-color: var(--y);
  background: var(--y-dim);
}

.role-card-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.role-card-title { font-size: 13px; font-weight: 700; }
.role-card-sub { font-size: 11px; color: var(--dim); margin-top: 2px; }

@media (min-width: 1280px) {
  .hero-h1 { font-size: 42px; }
  .stat-num { font-size: 22px; }
  .sidebar { width: 260px; }
}
