:root {
  --ink: #14181c;
  --ink-soft: #5b6470;
  --paper: #ffffff;
  --surface: #f5f6f8;
  --line: #e4e7eb;
  --brand: #0f766e;        /* civic teal */
  --brand-dark: #0b574f;
  --accent: #e8a33d;       /* points / badges */
  --danger: #c0392b;
  --ok: #16a34a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 24, 28, 0.12);
  --font: 'Hind Siliguri', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--brand); }

/* App bar */
.appbar {
  position: fixed; inset: 0 0 auto 0; height: 60px; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand .logo {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--brand); display: inline-block;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.35);
}
.brand b { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.brand small { color: var(--ink-soft); font-size: 12px; }
.spacer { flex: 1; }

.chip {
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--ink);
}
.chip:hover { border-color: var(--brand); }
.chip.brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.accent { color: var(--brand-dark); border-color: var(--accent); }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle button { border: 0; background: var(--paper); padding: 7px 12px; font-size: 13px; color: var(--ink-soft); }
.lang-toggle button.active { background: var(--brand); color: #fff; }

/* Map fills the screen below the app bar */
#map { position: fixed; inset: 60px 0 0 0; }

/* Floating map controls */
.panel {
  position: fixed; z-index: 15; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.maps-panel { top: 76px; left: 16px; padding: 12px; width: 220px; }
.maps-panel h3 { margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.cat-toggle { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.cat-toggle:hover { background: var(--surface); }
.cat-toggle input { accent-color: var(--brand); width: 16px; height: 16px; }
.cat-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cat-toggle label { font-size: 15px; }

.tools { top: 76px; right: 16px; display: flex; flex-direction: column; gap: 8px; }
.tools .chip { box-shadow: var(--shadow); }

.fab {
  position: fixed; right: 16px; bottom: 24px; z-index: 16;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: 14px 20px; font-size: 16px; font-weight: 600; box-shadow: var(--shadow);
}
.fab:hover { background: var(--brand-dark); }

/* Place detail / forms — bottom sheet on mobile, card on desktop */
.sheet {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: 0; width: min(460px, 100%);
  background: var(--paper); border-radius: 18px 18px 0 0; box-shadow: var(--shadow);
  padding: 18px; max-height: 80vh; overflow: auto;
}
.sheet.hidden, .hidden { display: none; }
.sheet h2 { margin: 2px 0 12px; font-size: 19px; }
.sheet .close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 22px; color: var(--ink-soft); }

.verified-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--brand-dark); background: rgba(15,118,110,.1); padding: 4px 10px; border-radius: 999px;
}

label.field { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; padding: 11px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.btn-primary {
  width: 100%; margin-top: 16px; padding: 13px; border: 0; border-radius: 11px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { width: 100%; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }

.hint { font-size: 13px; color: var(--ink-soft); margin: 6px 0; }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow);
}
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

@media (max-width: 520px) {
  .maps-panel { width: 170px; padding: 10px; }
  .brand small { display: none; }
}
