/* Hatod-Sugat passenger portal: light, warm, liquid-glass cards over a
   soft pastel gradient. Map is a contained card within the flow. */

:root {
  --paper: #f6f3ec;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 10px 32px rgba(90, 62, 32, 0.14);
  --pastel-orange: #f2a874;
  --pastel-orange-deep: #c96f34;
  --pastel-orange-soft: rgba(242, 168, 116, 0.22);
  --pastel-teal: #8fc9bd;
  --pastel-teal-deep: #3f8f80;
  --pastel-green: #8fbf7f;
  --pastel-red: #c9694f;
  --ink-strong: #241a10;
  --text-dim: #7a6d59;
}

html, body { height: 100%; }

body {
  color: var(--ink-strong);
  min-height: 100vh;
  background:
    radial-gradient(900px 700px at 12% -10%, rgba(242, 168, 116, 0.30), transparent 60%),
    radial-gradient(800px 620px at 105% 15%, rgba(143, 201, 189, 0.28), transparent 55%),
    radial-gradient(760px 600px at 50% 115%, rgba(242, 168, 116, 0.16), transparent 60%),
    var(--paper);
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
}
.wordmark { color: var(--ink-strong); }
.wordmark .accent { color: var(--pastel-orange-deep); }

#app { position: relative; z-index: 2; }

.screen:not([hidden]) {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px 60px;
  display: flex;
  justify-content: center;
}

/* ---- Liquid glass surface: soft blur + a specular sheen across the top ---- */
.glass-card {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.8);
  padding: 26px 24px;
  width: 100%;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.65) 0%, rgba(255,255,255,0.18) 32%, rgba(255,255,255,0) 58%);
  pointer-events: none;
}
.glass-card > * { position: relative; z-index: 1; }

.screen h1 { font-size: 1.5rem; margin-bottom: 6px; color: var(--ink-strong); }
.lead { color: var(--text-dim); margin: 0 0 20px; line-height: 1.5; }

.tabs { display: flex; border-bottom: 1px solid rgba(36,26,16,0.12); margin-bottom: 20px; }
.tab { background: none; padding: 10px 4px; margin-right: 24px; font-weight: 600; color: var(--text-dim); border-bottom: 2px solid transparent; }
.tab.active { color: var(--ink-strong); border-bottom-color: var(--pastel-orange-deep); }

.tab-panel { display: none; flex-direction: column; gap: 14px; }
.tab-panel.active { display: flex; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 500; color: var(--text-dim); }

input[type="text"], input[type="tel"], input[type="password"] {
  padding: 12px 14px;
  border: 1px solid rgba(36,26,16,0.15);
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
  font-size: 1rem;
  color: var(--ink-strong);
}
input::placeholder { color: rgba(122,109,89,0.6); }

.btn-primary {
  background: var(--pastel-orange);
  color: #2b1c10;
  font-weight: 700;
  padding: 14px;
  border-radius: 14px;
  font-size: 1rem;
  margin-top: 6px;
  width: 100%;
  box-shadow: 0 6px 20px rgba(201, 111, 52, 0.25);
}
.btn-primary:disabled { opacity: 0.4; box-shadow: none; cursor: not-allowed; }

.btn-secondary {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(36,26,16,0.15);
  color: var(--ink-strong);
  padding: 12px;
  border-radius: 14px;
  width: 100%;
  margin-top: 14px;
  font-weight: 600;
}

.link-btn { background: none; color: var(--pastel-orange-deep); font-weight: 600; padding: 10px 0; text-decoration: underline; text-underline-offset: 3px; display: block; text-align: center; }
.error-text { color: var(--pastel-red); font-size: 0.85rem; margin-top: 12px; }

/* ---- Contained map card: fixed, clearly-bounded, same liquid-glass edge ---- */
.map-card {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 4px 18px rgba(90,62,32,0.16);
  margin: 6px 0 20px;
}
.map-inner { position: absolute; inset: 0; width: 100%; height: 100%; }
.leaflet-container { background: #eae6da; font-family: var(--font-body); }
.leaflet-control-attribution { background: rgba(255,255,255,0.75) !important; color: var(--text-dim) !important; }
.leaflet-control-attribution a { color: var(--pastel-orange-deep) !important; }

.map-fab {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.pin-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(255,255,255,0.5); }
.pin-dot.pickup { background: var(--pastel-orange-deep); }
.pin-dot.dropoff { background: var(--pastel-teal-deep); }
.pin-text { font-weight: 500; color: var(--text-dim); font-size: 0.92rem; }

.fare-preview {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid rgba(36,26,16,0.12);
  padding-top: 14px;
  margin: 4px 0 4px;
}
.fare-preview span { display: block; font-size: 0.78rem; color: var(--text-dim); }
.fare-preview strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--pastel-orange-deep); }
.fare-preview .dim { color: var(--text-dim); font-size: 0.85rem; }

.route { font-size: 1.05rem; margin: 14px 0 12px; color: var(--ink-strong); }
.fare-line { color: var(--text-dim); margin: 0 0 16px; }
.driver-info { border-top: 1px solid rgba(36,26,16,0.12); margin-top: 16px; padding-top: 16px; }
.dim { color: var(--text-dim); }

.stars { display: flex; gap: 10px; font-size: 2.2rem; margin: 20px 0; }
.stars button { background: none; color: rgba(36,26,16,0.18); }
.stars button.selected { color: var(--pastel-orange-deep); }

.manifest-list { list-style: none; padding: 0; margin: 16px 0; }
.manifest-list li { padding: 14px 0; border-bottom: 1px solid rgba(36,26,16,0.10); }
.manifest-list .row-top { display: flex; justify-content: space-between; }
.manifest-list .dim { font-size: 0.85rem; }

.status-pill.completed { background: rgba(143,191,127,0.22); color: #4f7a3f; }
.status-pill.cancelled, .status-pill.rejected { background: rgba(201,105,79,0.18); color: var(--pastel-red); }
.status-pill.requested, .status-pill.accepted, .status-pill.arrived, .status-pill.in_progress { background: var(--pastel-orange-soft); color: var(--pastel-orange-deep); }

/* Custom Leaflet pin markers (pickup/dropoff/driver) */
.hs-marker { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); width: 26px; height: 26px; box-shadow: 0 4px 10px rgba(90,62,32,0.35); border: 2px solid #fff; }
.hs-marker.pickup { background: var(--pastel-orange-deep); }
.hs-marker.dropoff { background: var(--pastel-teal-deep); }
.hs-marker-inner { transform: rotate(45deg); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hs-driver-marker { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--pastel-orange-deep); box-shadow: 0 4px 10px rgba(90,62,32,0.4); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
