:root{
  --bg:#f6f8fc;
  --text:#0f172a;
  --muted:rgba(15,23,42,.65);
  --line:rgba(15,23,42,.10);

  --blue:#1a73e8;
  --blue2:#1558c0;
  --shadow:0 10px 26px rgba(2,6,23,.08);

  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

*{box-sizing:border-box}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
}

/* ---------- Topbar ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:#fff;
  border-bottom:1px solid var(--line);
}

.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.logo{
  width:26px;
  height:26px;
  object-fit:contain;
}

.appname{
  font-weight:750;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(26,115,232,.08);
  border:1px solid rgba(26,115,232,.18);
  color:rgba(26,115,232,.95);
  font-size:12px;
  font-weight:650;
}

/* ---------- Main ---------- */
.main{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px 20px;
}

/* ---------- HERO (Background reliable) ---------- */
/* IMPORTANT: use absolute path /assets/bg.jpg to avoid path issues */
.hero{
  margin-top:10px;
  border-radius:20px;
  overflow:hidden;

  /* fallback first */
  background: linear-gradient(135deg, rgba(2,6,23,.92), rgba(2,6,23,.55));

  /* background image layer */
  background-image:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
    url('/assets/bg.jpg');
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}

.hero-inner{
  text-align:center;
  padding:70px 16px 60px;
  color:#fff;
}

.title{
  margin:0;
  font-size:36px;
  font-weight:850;
  letter-spacing:-.3px;
}

.subtitle{
  margin:10px 0 0;
  color:rgba(255,255,255,.85);
  font-size:14px;
}

/* ---------- Search ---------- */
.searchWrap{
  margin:26px auto 0;
  max-width:720px;
}

.searchBox{
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(6px);
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;
  padding:10px 14px;
  box-shadow:0 14px 34px rgba(0,0,0,.18);
  transition:.15s ease;
}

.searchBox:focus-within{
  box-shadow:
    0 0 0 4px rgba(26,115,232,.20),
    0 16px 40px rgba(0,0,0,.22);
}

.searchBox input{
  flex:1;
  border:0;
  outline:none;
  font-size:16px;
  padding:8px;
  background:transparent;
}

/* sheet dropdown */
.sheetSelect{
  border:0;
  outline:none;
  background:transparent;
  color:#334155;
  font-size:14px;
  font-weight:650;
  padding:6px 4px;
  max-width:220px;
  cursor:pointer;
}

/* ---------- Voice Button ---------- */
.voiceBtn{
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:9px 14px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:.12s ease;
}

.voiceBtn:hover{
  border-color:rgba(26,115,232,.35);
  box-shadow:0 10px 24px rgba(2,6,23,.10);
}

.voiceBtn.listening{
  border-color:rgba(16,185,129,.65);
  box-shadow:0 0 0 4px rgba(16,185,129,.20);
}

/* mic button content */
.micIcon{font-size:16px;line-height:1}
.micText{margin-left:8px}

/* ---------- Buttons ---------- */
.btnRow{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

button{
  border:0;
  border-radius:12px;
  padding:10px 14px;
  font-size:14px;
  cursor:pointer;
}

.primary{
  background:linear-gradient(180deg,var(--blue),var(--blue2));
  color:#fff;
  font-weight:750;
  min-width:120px;
}

.ghost{
  background:#fff;
  border:1px solid rgba(15,23,42,.14);
  color:var(--text);
  font-weight:700;
  min-width:90px;
}

.danger{
  border-color:rgba(220,38,38,.25) !important;
}

.status{
  margin-top:12px;
  color:rgba(255,255,255,.85);
  min-height:18px;
  font-size:13px;
}

/* ---------- Results ---------- */
.results{
  margin-top:30px;
}

.resultsHead{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  margin-bottom:12px;
}

.resultsTitle{font-weight:800}

.resultsHint{
  color:var(--muted);
  font-size:13px;
}

.list{
  display:grid;
  gap:14px;
}

/* ---------- Cards ---------- */
.card{
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:15px;
  box-shadow:var(--shadow);
  transition:.15s ease;
}

.card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(2,6,23,.12);
}

.card .locRow{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.card .loc{
  font-weight:850;
  color:#b1182b;
}

.card .pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:rgba(26,115,232,.08);
  border:1px solid rgba(26,115,232,.16);
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  color:rgba(26,115,232,.95);
}

.card .title{
  margin-top:10px;
  font-weight:850;
  font-size:17px;
}

.card .meta{
  margin-top:6px;
  color:rgba(15,23,42,.70);
}

.card .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.card .smallBtn{
  background:#fff;
  border:1px solid rgba(15,23,42,.14);
  color:var(--text);
  padding:9px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:650;
}

.card .smallBtn:hover{
  border-color:rgba(26,115,232,.25);
  box-shadow:0 10px 22px rgba(2,6,23,.06);
}

/* ---------- Footer ---------- */
.footer{
  margin-top:30px;
  border-top:1px solid var(--line);
  background:#fff;
  text-align:center;
  padding:16px;
  font-size:13px;
  color:var(--muted);
}

/* ---------- Toast ---------- */
.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  background:rgba(15,23,42,.92);
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-size:14px;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
.toast.show{opacity:1}

/* ---------- Mobile ---------- */
@media (max-width:680px){
  .title{font-size:26px}

  .hero{border-radius:14px}
  .hero-inner{padding:56px 14px 48px}

  .sheetSelect{max-width:140px}

  .resultsHead{
    flex-direction:column;
    align-items:flex-start;
  }

  .searchWrap{max-width:100%}

  .micText{display:none}
  .voiceBtn{padding:9px 12px}
}

/* Screen-reader only label */
.srOnly{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* Admin button (topbar) */
.adminBtn{
  display:inline-flex;
  align-items:center;
  margin-left:10px;
  padding:7px 12px;
  border-radius:10px;
  background:#fff;
  border:1px solid rgba(15,23,42,.14);
  color:var(--text);
  font-size:13px;
  font-weight:700;
  text-decoration:none;
  transition:.12s ease;
}
.adminBtn:hover{
  border-color:rgba(26,115,232,.35);
  box-shadow:0 6px 16px rgba(2,6,23,.08);
}

/* Hero hint pills + helper line */
.heroHints{
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:14px;
}
.hintPill{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  color:rgba(255,255,255,.92);
  font-size:12px;
  font-weight:700;
}
.helperLine{
  margin-top:10px;
  color:rgba(255,255,255,.85);
  font-size:13px;
}