@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600&display=swap');

:root {
  --palm:     #0B4F3C;
  --palm-dk:  #073A2C;
  --sand:     #F6F1E4;
  --gold:     #C9962B;
  --ink:      #1C2321;
  --muted:    #6B7570;
  --white:    #FFFFFF;
  --danger:   #B3372B;
  --radius:   16px;
  --shadow:   0 10px 30px rgba(11, 79, 60, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: 'Hind Siliguri', 'Poppins', sans-serif;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, .brand {
  font-family: 'Poppins', 'Hind Siliguri', sans-serif;
  font-weight: 700;
  margin: 0;
}

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

/* ---------- Mobile shell: caps width so it feels like an app ---------- */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--sand);
  position: relative;
  padding-bottom: 90px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--palm);
  color: var(--white);
  padding: 18px 20px 40px;
  border-radius: 0 0 28px 28px;
  position: relative;
}
.topbar .brand {
  font-size: 20px;
  letter-spacing: 0.3px;
}
.topbar .brand span { color: var(--gold); }
.topbar .sub {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
}
.topbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logout-btn {
  font-size: 13px;
  background: rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 20px;
}

/* ---------- Search ---------- */
.search-wrap {
  margin: -26px 20px 20px;
  position: relative;
  z-index: 2;
}
.search-wrap input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow);
  font-size: 15px;
  font-family: inherit;
}
.search-wrap input:focus {
  outline: 2px solid var(--gold);
}

/* ---------- Auth pages (centered card) ---------- */
.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  background: var(--white);
  border-radius: 20px;
  padding: 32px 26px;
  box-shadow: var(--shadow);
}
.auth-card .badge {
  width: 52px; height: 52px;
  background: var(--palm);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 24px; font-weight: 800;
  margin-bottom: 16px;
}
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card p.lead { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid #E4E0D2;
  font-size: 15px;
  font-family: inherit;
  background: #FCFBF7;
}
.field input:focus {
  outline: none;
  border-color: var(--palm);
}

.btn-main {
  width: 100%;
  padding: 14px;
  background: var(--palm);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease;
}
.btn-main:active { transform: scale(0.98); background: var(--palm-dk); }

.link-row {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}
.link-row a { color: var(--palm); font-weight: 600; }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert-error { background: #FBEAE7; color: var(--danger); }
.alert-success { background: #E7F3EC; color: var(--palm); }

/* ---------- Hamburger button ---------- */
.hamburger-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  z-index: 5;
}
.hamburger-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}
.topbar { position: relative; }
.topbar .topbar-row { padding-left: 44px; }

/* ---------- Sidebar drawer ---------- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 17, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.sidebar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 78%;
  max-width: 300px;
  background: var(--white);
  box-shadow: 8px 0 30px rgba(0,0,0,0.15);
  padding: 20px 0 20px;
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-overlay.open .sidebar {
  transform: translateX(0);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
}
.sidebar-head .brand { font-size: 18px; color: var(--palm); }
.sidebar-head .brand span { color: var(--gold); }
.sidebar-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 18px;
  border-bottom: 1px solid #EFEBDE;
  margin-bottom: 8px;
}
.sidebar-user-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--palm);
  color: var(--gold);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-name { font-size: 14px; font-weight: 700; }
.sidebar-user-email { font-size: 11.5px; color: var(--muted); word-break: break-all; }
.sidebar-label {
  padding: 12px 20px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-link {
  display: block;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.sidebar-link.sub {
  padding-left: 32px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.sidebar-link:active { background: var(--sand); }
.sidebar-link.logout { color: var(--danger); }
.sidebar-divider {
  height: 1px;
  background: #EFEBDE;
  margin: 8px 0;
}

/* ---------- Live clock ---------- */
.live-clock-wrap {
  margin: 14px 20px 0;
}
.live-clock {
  background: var(--white);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--palm);
  text-align: center;
}

/* ---------- Notice board ---------- */
.notice-board {
  margin: 14px 20px 0;
  background: #FFF7E6;
  border: 1.5px solid #F0DBA1;
  border-radius: 14px;
  padding: 14px 16px;
}
.notice-board .notice-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin-bottom: 6px;
}
.notice-board .notice-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
}

/* ---------- About page ---------- */
.about-content {
  margin: 0 20px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
}
textarea.textarea-field {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid #E4E0D2;
  font-size: 14.5px;
  font-family: inherit;
  background: #FCFBF7;
  resize: vertical;
  min-height: 160px;
}
textarea.textarea-field:focus {
  outline: none;
  border-color: var(--palm);
}

/* ---------- Profile page ---------- */
.profile-card {
  margin: 0 20px 20px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}
.profile-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- Category filter chips ---------- */
.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 14px;
  scrollbar-width: none;
}
.category-chips::-webkit-scrollbar { display: none; }
.category-chips .chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.category-chips .chip.active {
  background: var(--palm);
  color: var(--white);
}

/* ---------- Service grid (user home) ---------- */
.section-title {
  padding: 4px 20px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 20px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.service-card img.logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--sand);
}
.service-card .logo-fallback {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--palm);
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.service-card .name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
}
.service-card .cat {
  font-size: 11px;
  color: var(--muted);
}
.service-card .go-btn {
  margin-top: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--palm);
  align-self: flex-end;
}
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: calc(50% - 240px + 20px);
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
  z-index: 50;
}
@media (max-width: 520px) {
  .whatsapp-fab { right: 20px; }
}
.whatsapp-fab svg { width: 28px; height: 28px; }

/* ---------- Admin ---------- */
.admin-list {
  padding: 0 20px 100px;
}
.admin-row {
  background: var(--white);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.admin-row img, .admin-row .logo-fallback {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  background: var(--sand);
}
.admin-row .info { flex: 1; min-width: 0; }
.admin-row .info .name { font-weight: 700; font-size: 14px; }
.admin-row .info .cat { font-size: 11px; color: var(--muted); }
.admin-row .actions { display: flex; gap: 8px; }
.icon-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.icon-btn.edit { background: #EAF1EE; color: var(--palm); }
.icon-btn.delete { background: #FBEAE7; color: var(--danger); }

.fab-add {
  position: fixed;
  bottom: 24px;
  left: calc(50% - 240px + 20px);
  right: auto;
  background: var(--gold);
  color: var(--ink);
  padding: 14px 22px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(201, 150, 43, 0.4);
  z-index: 50;
}
@media (max-width: 520px) {
  .fab-add { left: 20px; }
}

.form-page { padding: 20px 20px 100px; }
.form-page .back { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: inline-block; }
.current-logo { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; margin-bottom: 10px; }
