:root {
  --primary: #17b34a;
  --primary-dark: #0f8f39;
  --primary-darker: #0a5f26;
  --bg: #f3f5f4;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #7a7a7a;
  --danger: #e53935;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

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

body {
  font-family: 'Segoe UI', 'Hind Siliguri', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 76px;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Top Header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 18px;
}
.topbar .logo .badge {
  background: var(--primary);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.topbar .logo .x { color: var(--primary); }
.btn-signin {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.topbar .user-chip img {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--primary);
}
.topbar .balance {
  background: #eafbef;
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Announcement strip ---------- */
.announce {
  background: var(--primary-darker);
  color: #fff;
  font-size: 12.5px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.announce .close { cursor: pointer; opacity: 0.8; font-size: 16px; }

/* ---------- Hero banner ---------- */
.hero-banner {
  margin: 12px 14px 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 150px;
  background: linear-gradient(120deg, #0c1f12 0%, #123a1e 55%, #1b7a3d 100%);
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-banner h2 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
  max-width: 78%;
}
.hero-banner h2 .accent { color: #7CFC9A; }
.hero-banner .url {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 8px;
}
.hero-banner .glow {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(124,252,154,0.35), transparent 70%);
}

/* ---------- Homepage Slider ---------- */
.slider-wrap {
  margin: 12px 14px 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}
.slider-slide img {
  width: 100%;
  aspect-ratio: 15 / 7;
  object-fit: cover;
  display: block;
}
.slider-slide .slide-title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
  max-width: 80%;
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.slider-dots .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #cfd6d1;
}
.slider-dots .dot.active { background: var(--primary); width: 16px; border-radius: 4px; }

/* ---------- Section headers ---------- */
.section {
  margin: 22px 14px 0;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}
.section-title .bar {
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 3px;
}

/* ---------- Grid cards ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.cat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #eef0ee;
  transition: transform .15s ease;
}
.cat-card:active { transform: scale(0.97); }
.cat-card .thumb {
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  position: relative;
  color: #fff;
}
.cat-card .thumb .icon-emoji {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.4));
}
.cat-card .thumb .badge-tag {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
}
.cat-card .thumb .name-on-image {
  font-weight: 800;
  font-size: 13px;
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
  line-height: 1.2;
}
.cat-card .label {
  padding: 8px 10px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.cat-card .label .sub {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
  display: block;
  margin-top: 2px;
}

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px 10px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 60;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  flex: 1;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav .icon { font-size: 18px; }
.bottom-nav .fab {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  margin-top: -30px;
  box-shadow: 0 4px 14px rgba(23,179,74,0.5);
  border: 4px solid #fff;
}

/* ---------- Floating WhatsApp/Telegram support ---------- */
.support-fab {
  position: fixed;
  right: 14px;
  bottom: 88px;
  background: #fff;
  color: var(--danger);
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 55;
  max-width: 480px;
}
.support-fab .dot {
  width: 30px; height: 30px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Generic buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: #fff; border: 1.5px solid var(--primary); color: var(--primary-dark); }
.btn-block { width: 100%; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* ---------- Forms (login/order/deposit) ---------- */
.page-wrap { padding: 16px; }
.card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #e2e5e3;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.pay-method-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pay-method-chip {
  flex: 1;
  min-width: 70px;
  border: 1.5px solid #e2e5e3;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pay-method-chip.active {
  border-color: var(--primary);
  background: #eafbef;
  color: var(--primary-dark);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.status-pending { background: #fff4d6; color: #a97a00; }
.status-processing { background: #dce8ff; color: #1a4fbf; }
.status-completed { background: #dcf7e3; color: #157a3a; }
.status-cancelled, .status-rejected { background: #fde0e0; color: #b32323; }
.status-approved { background: #dcf7e3; color: #157a3a; }

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.order-row:last-child { border-bottom: none; }

.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-success { background: #dcf7e3; color: #157a3a; }
.alert-error { background: #fde0e0; color: #b32323; }
