/* Logi App — Bahor palette (same family as the Mesama app):
   deep teal + amber on a light spring background. */
:root {
  --bg: #eef4f4;
  --surface: #ffffff;
  --surface2: #e2eeee;
  --text: #07333b;
  --muted: #5b7a80;
  --border: #cfe0e0;
  --accent: #f5b301;
  --accent-text: #07333b;
  --teal: #08424b;
  --teal2: #178091;
  --danger: #b3261e;
  --ok: #1a7f37;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #04191f;
    --surface: #0a2e36;
    --surface2: #0e3a44;
    --text: #e8f4f4;
    --muted: #9dbec3;
    --border: #17505c;
    --teal: #0a2e36;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 86px;
  -webkit-tap-highlight-color: transparent;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #08424b, #0b5561);
  color: #fff;
  box-shadow: 0 2px 10px rgba(4, 40, 48, .25);
}
.topbar .logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar .appname { font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.topbar .appsub { font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.langswitch { display: flex; gap: 4px; }
.langswitch button {
  border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff;
  border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.langswitch button.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
main { max-width: 560px; margin: 0 auto; padding: 14px 12px 4px; }
.tab { display: none; }
.tab.active { display: block; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(7, 51, 59, .06);
}
.cardtitle { font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.fld { display: block; margin-bottom: 10px; }
.fld span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.fld input, .fld select {
  width: 100%; padding: 12px; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; outline: none;
}
.fld input:focus, .fld select:focus { border-color: var(--teal2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.placewrap { position: relative; }
.placewrap input { padding-right: 48px; }
.geobtn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: var(--surface2); border-radius: 10px;
  width: 38px; height: 38px; font-size: 17px; cursor: pointer;
}
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: none; box-shadow: 0 8px 24px rgba(4,40,48,.18);
}
.suggest.show { display: block; }
.suggest button {
  display: block; width: 100%; text-align: left; padding: 11px 12px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--text); cursor: pointer;
}
.suggest button:last-child { border-bottom: none; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chips button {
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.chips button.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.chips.emg button.on { background: var(--danger); border-color: var(--danger); }
.seg { display: flex; background: var(--surface2); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.seg button {
  flex: 1; border: none; background: transparent; padding: 9px; border-radius: 9px;
  font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer;
}
.seg button.on { background: var(--surface); box-shadow: 0 1px 4px rgba(7,51,59,.18); }
.primary {
  width: 100%; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-text);
  font-size: 16.5px; font-weight: 800; padding: 14px; border-radius: 14px;
  box-shadow: 0 4px 14px rgba(245, 179, 1, .35);
}
.primary:active { transform: scale(.99); }
.primary[disabled] { opacity: .55; }
.ghost {
  width: 100%; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 700; font-size: 15px; padding: 12px;
  border-radius: 12px; cursor: pointer; margin-top: 4px;
}
.pool { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.note { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.hidden { display: none !important; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(4,40,48,.08);
}
.tabbar button {
  flex: 1; border: none; background: none; cursor: pointer; color: var(--muted);
  padding: 8px 2px 10px; font-size: 11.5px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button .ic { font-size: 20px; }
.tabbar button.on { color: var(--teal2); }
.result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px; }
.result .route { font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.result .price { font-size: 19px; font-weight: 800; color: #8a6400; margin-top: 3px; }
@media (prefers-color-scheme: dark) { .result .price { color: var(--accent); } }
.result .meta { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.result .contact { margin-top: 7px; font-size: 14.5px; line-height: 1.55; }
.result a { color: var(--teal2); font-weight: 700; text-decoration: none; }
.banner { border-radius: 12px; padding: 11px 12px; font-weight: 700; font-size: 14.5px; margin-bottom: 10px; line-height: 1.45; }
.banner.bad { background: #fdeceb; color: var(--danger); border: 1px solid #f3c1bd; }
.banner.good { background: #e7f6ec; color: var(--ok); border: 1px solid #bfe6cc; }
.banner.warn { background: #fff6db; color: #7a5800; border: 1px solid #f0dfa0; }
@media (prefers-color-scheme: dark) {
  .banner.bad { background: #3d1512; color: #ff9d94; border-color: #6e2a24; }
  .banner.good { background: #0f2f1a; color: #7ee2a0; border-color: #1d5231; }
  .banner.warn { background: #38300e; color: #ffd94d; border-color: #6b5c14; }
}
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.kv:last-child { border-bottom: none; }
.kv b { text-align: right; }
.kv span { color: var(--muted); }
.statebox {
  text-align: center; padding: 26px 16px; color: var(--muted); font-size: 15px; line-height: 1.55;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); margin-bottom: 12px;
}
.statebox .retry { margin-top: 12px; }
.spin { display: inline-block; animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.booterror {
  position: fixed; inset: auto 12px 96px 12px; z-index: 40;
  background: #fdeceb; color: var(--danger); border: 1px solid #f3c1bd;
  border-radius: 12px; padding: 13px; font-size: 14.5px; text-align: center;
}
.stars { color: #e8a100; font-weight: 800; }
.openbadge { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.openbadge.open { background: #e7f6ec; color: var(--ok); }
.openbadge.closed { background: #fdeceb; color: var(--danger); }
.ncrow { cursor: pointer; }
.ncrow:active { background: var(--surface2); }
