:root {
  --accent: #009E60;
  --accent-dark: #007a4b;
  --text: #111;
  --text-muted: #666;
  --bg: #f9f9f9;
  --card-bg: #fff;
  --border: #e0e0e0;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 64px;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ── Header ── */
#app-header {
  background: var(--accent);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
}
#main-nav { display: flex; gap: 8px; }
#main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
#main-nav a:hover { background: rgba(255,255,255,0.15); }
#menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; }

/* ── Bottom nav ── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
#bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 10px 4px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: color 0.15s;
}
#bottom-nav a.active { color: var(--accent); font-weight: 600; }

/* ── Page container ── */
#page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.card-badge.grey { background: var(--border); color: var(--text-muted); }

/* ── Stars ── */
.stars { color: #f4a100; font-size: 0.9rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: none; border: 2px solid var(--accent); color: var(--accent); }
.btn-danger { background: #e53935; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { min-height: 80px; resize: vertical; }
.form-error { color: #e53935; font-size: 0.8rem; margin-top: 4px; }

/* ── Search bar ── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-bar input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.95rem; }
.search-bar select { padding: 10px 10px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.9rem; }

/* ── Verified badge ── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px 3px 5px;
  border-radius: 20px;
  background: #1976d2;
  color: #fff;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.verified-badge::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #fff;
  color: #1976d2;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Points widget ── */
.points-widget {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.points-widget .points-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.points-widget .points-label { font-size: 0.85rem; opacity: 0.85; }
.points-progress {
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.points-progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}

/* ── Status badges ── */
.status-pending { color: #f4a100; font-weight: 600; }
.status-approved { color: #2e7d32; font-weight: 600; }
.status-rejected { color: #e53935; font-weight: 600; }
.status-verified { color: #2e7d32; font-weight: 600; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title { font-size: 1.1rem; font-weight: 700; }

/* ── Alert ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.alert-info { background: #e3f2fd; color: #1565c0; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }

/* ── Modal ── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#modal-overlay.hidden { display: none; }
#modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 24px 20px;
  position: relative;
}
#modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--border);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Loading ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 32px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Earnings summary ── */
.earnings-stat { transition: background 0.15s; }
.earnings-stat:hover { background: #f5f5f5; }

/* ── Area filter chips ── */
.area-chip {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.area-chip.active, .area-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #f0faf5;
}

/* ── Featured banner ── */
.featured-banner-wrap {
  margin-bottom: 16px;
}
.featured-banner-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 10px;
}
.featured-banner-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}
.featured-banner-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.featured-banner-strip::-webkit-scrollbar { display: none; }
.featured-banner-card {
  flex-shrink: 0;
  width: 150px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid #f4a100;
  padding: 10px 10px 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.featured-banner-card.sponsored { border-top-color: #7c3aed; }
.featured-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.featured-card-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #f4a100;
  margin-bottom: 5px;
  letter-spacing: 0.03em;
}
.featured-card-tag.sponsored-tag { color: #7c3aed; }
.featured-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-card-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-card-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* ── Notification card ── */
.notif-card.unread { background: #f8fffe; }

/* ── Responsive ── */
@media (max-width: 480px) {
  #main-nav { display: none; }
  #menu-toggle { display: block; }
}
