/* ============================================================
   Hittle Greenline — styles
   ============================================================ */

:root {
  --bg: #09090b;
  --bg-deep: #050506;
  --card: rgba(255, 255, 255, 0.04);
  --card-strong: rgba(255, 255, 255, 0.07);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --accent: #c1d72e;
  --accent-dim: rgba(193, 215, 46, 0.14);
  --accent-border: rgba(193, 215, 46, 0.35);
  --olive: #778e1d;
  --ok: #4ade80;
  --ok-dim: rgba(74, 222, 128, 0.13);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.13);
  --text: #f4f4f5;
  --muted: #9ca3af;
  --faint: #6b7280;
  --radius: 16px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------- Stage + phone shell ---------- */
.stage { min-height: 100dvh; }

.shell {
  height: 100dvh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

@media (min-width: 761px) {
  .stage {
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
      radial-gradient(ellipse 900px 620px at 50% 42%, rgba(119, 142, 29, 0.16), transparent 65%),
      radial-gradient(ellipse 500px 380px at 78% 80%, rgba(193, 215, 46, 0.05), transparent 70%),
      var(--bg-deep);
  }
  .shell {
    width: 430px;
    height: min(880px, 92vh);          /* bounded height — main scrolls inside */
    border-radius: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
      0 0 0 10px #101012,
      0 0 0 11px rgba(255, 255, 255, 0.07),
      0 40px 90px rgba(0, 0, 0, 0.7),
      0 0 130px rgba(193, 215, 46, 0.09);
  }
}

/* ---------- Icons ---------- */
.icon { display: inline-flex; width: 24px; height: 24px; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; }
.icon-sm { width: 18px; height: 18px; }

/* ---------- Top bar ---------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { height: 30px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.clock-pill {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--muted);
}
.icon-btn:active { background: var(--card); }
.bell-dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

/* ---------- Main ---------- */
.main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.main::-webkit-scrollbar { display: none; }
.main.main--chat { overflow: hidden; display: flex; flex-direction: column; }

.view { padding: 18px 18px 28px; animation: viewIn 0.28s ease both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Shared bits ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 22px 2px 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-accent { color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-border); }
.pill-ok { color: var(--ok); background: var(--ok-dim); border: 1px solid rgba(74, 222, 128, 0.3); }
.pill-amber { color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-muted { color: var(--muted); background: var(--card); border: 1px solid var(--hairline); }

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   TODAY
   ============================================================ */
.greeting {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.greeting-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 300px 180px at 88% -10%, rgba(193, 215, 46, 0.14), transparent 70%),
    var(--card);
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  padding: 18px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hero-kicker {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint);
}
.hero-title { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 3px; }
.hero-crew { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.hero-eta {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.hero-eta-num {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-width: 76px;
}
.hero-eta-unit { display: block; font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.hero-eta-copy { font-size: 13px; color: var(--muted); line-height: 1.45; }
.hero-eta-copy strong { color: var(--text); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14.5px;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #131505; width: 100%; }
.btn-primary .icon { color: #131505; }
.btn-ghost { background: var(--card-strong); border: 1px solid var(--hairline-strong); color: var(--text); }

/* weather strip */
.weather {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 13px 14px;
  background: linear-gradient(90deg, var(--amber-dim), transparent 65%), var(--card);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
}
.weather .icon { color: var(--amber); width: 28px; height: 28px; }
.weather-main { font-weight: 700; font-size: 14px; }
.weather-main .num { color: var(--amber); }
.weather-note { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* attention list */
.attn { display: flex; flex-direction: column; gap: 10px; }
.attn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}
.attn-item:active { border-color: var(--hairline-strong); background: var(--card-strong); }
.attn-badge {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.attn-badge.is-amber { background: var(--amber-dim); color: var(--amber); }
.attn-badge.is-accent { background: var(--accent-dim); color: var(--accent); }
.attn-badge.is-ok { background: var(--ok-dim); color: var(--ok); }
.attn-badge .icon { width: 20px; height: 20px; }
.attn-copy { flex: 1; min-width: 0; }
.attn-title { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.attn-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.attn-chev { color: var(--faint); }

/* quick actions */
.qa-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 84px;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 6px;
  transition: border-color 0.15s ease;
}
.qa:active { border-color: var(--accent-border); background: var(--card-strong); }
.qa .icon { color: var(--accent); }
.qa-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.3; }

.demo-foot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
}
.demo-foot strong { color: var(--muted); font-weight: 600; }

/* ============================================================
   SCHEDULE
   ============================================================ */
.day-group { margin-bottom: 6px; }
.day-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 2px 10px;
}
.day-head:first-child { margin-top: 2px; }
.day-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.day-tag { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }

.visit {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.visit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  text-align: left;
  padding: 13px 14px;
}
.visit-rail { width: 4px; align-self: stretch; border-radius: 4px; flex: 0 0 auto; }
.visit-rail.t-mowing { background: var(--accent); }
.visit-rail.t-irrigation { background: #38bdf8; }
.visit-rail.t-enhancement { background: #e879f9; }
.visit-rail.t-turf { background: var(--olive); }
.visit-copy { flex: 1; min-width: 0; }
.visit-title { display: block; font-weight: 600; font-size: 14px; }
.visit-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.visit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.type-chip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}
.type-chip.t-mowing { color: var(--accent); background: var(--accent-dim); }
.type-chip.t-irrigation { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.type-chip.t-enhancement { color: #e879f9; background: rgba(232, 121, 249, 0.12); }
.type-chip.t-turf { color: #b5cc50; background: rgba(119, 142, 29, 0.2); }
.visit-chev { color: var(--faint); transition: transform 0.22s ease; }
.visit.is-open .visit-chev { transform: rotate(180deg); }

.visit-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.visit.is-open .visit-body { grid-template-rows: 1fr; }
.visit-body-inner { overflow: hidden; min-height: 0; }
.visit-body-pad { padding: 2px 16px 15px; border-top: 1px solid var(--hairline); margin: 0 0 0 0; }
.scope-title { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 12px 0 8px; }
.scope-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.scope-list li { display: flex; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.scope-list .icon-sm { color: var(--olive); margin-top: 1px; }
.visit-note { margin-top: 12px; font-size: 12.5px; color: var(--faint); font-style: italic; line-height: 1.5; }

/* ============================================================
   TRACK
   ============================================================ */
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.track-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.track-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.mapwrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  background: #0b0d09;
}
.mapwrap svg { width: 100%; height: auto; display: block; }

.eta-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
}
.eta-big {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 84px;
}
.eta-big small { display: block; font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.eta-copy { flex: 1; font-size: 13px; color: var(--muted); line-height: 1.5; }
.eta-copy strong { color: var(--text); }

/* on-site progress */
.progress-card { margin-top: 12px; }
.progress-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.progress-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.progress-val { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.progress-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--olive), var(--accent));
  transition: width 0.6s ease;
}

.tasklist { list-style: none; display: flex; flex-direction: column; margin-top: 6px; }
.tasklist li {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--muted);
}
.tasklist li:last-child { border-bottom: 0; }
.task-check {
  width: 24px; height: 24px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  display: grid; place-items: center;
  color: transparent;
  transition: all 0.25s ease;
}
.tasklist li.is-done { color: var(--text); }
.tasklist li.is-done .task-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #131505;
  animation: checkPop 0.35s ease;
}
.task-time { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
@keyframes checkPop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* stops */
.stoplist { list-style: none; display: flex; flex-direction: column; }
.stop {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 2px;
  min-height: 56px;
  border-bottom: 1px solid var(--hairline);
}
.stop:last-child { border-bottom: 0; }
.stop-n {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--hairline-strong);
  color: var(--faint);
}
.stop.is-done .stop-n { background: rgba(119, 142, 29, 0.25); border-color: transparent; color: #b5cc50; }
.stop.is-current .stop-n { background: var(--accent); border-color: var(--accent); color: #131505; box-shadow: 0 0 14px rgba(193, 215, 46, 0.45); }
.stop-copy { flex: 1; min-width: 0; }
.stop-name { font-size: 13.5px; font-weight: 600; }
.stop.is-done .stop-name { color: var(--muted); font-weight: 500; }
.stop-place { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.stop.is-current .stop-place { color: var(--accent); font-weight: 600; }
.stop-time { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stop.is-current .stop-time { color: var(--accent); font-weight: 700; }

/* map svg bits */
.map-road { stroke: #1d2118; stroke-linecap: round; fill: none; }
.map-road-hair { stroke: #171a13; stroke-width: 1.5; fill: none; }
.map-hwy { stroke: #262c1c; fill: none; stroke-linecap: round; }
.map-label { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.28em; fill: #454b3a; }
.map-road-label { font-family: var(--font-ui); font-size: 8px; font-weight: 600; letter-spacing: 0.08em; fill: #3b4132; }
/* real-geometry town labels + water (added alongside the road classes
   above when the Track mini-map swapped from a hand-drawn schematic to
   real Indianapolis-metro geometry shared with Groundspeed) */
.map-label-g text { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.24em; fill: #3a3f30; }
.map-label-hub { fill: #4c5240 !important; font-size: 12px !important; }
path.water-lake { fill: rgba(38, 74, 84, 0.55); stroke: rgba(70, 110, 130, 0.35); stroke-width: 1; }
path.water-river { fill: none; stroke: rgba(60, 100, 120, 0.4); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.map-route-done { stroke: rgba(119, 142, 29, 0.55); stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 1 7; }
.map-route-active { stroke: var(--accent); stroke-width: 3.5; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(193, 215, 46, 0.5)); }
.map-route-ahead { stroke: rgba(193, 215, 46, 0.22); stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 2 8; }
.map-pin-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0.6; }
.pin-pulse { animation: pinPulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pinPulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ============================================================
   CHAT
   ============================================================ */
.view-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; }
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  flex: 0 0 auto;
}
.avatar {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--olive), var(--accent));
  color: #131505;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-display);
}
.chat-head-name { font-weight: 700; font-size: 15px; }
.chat-head-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: none;
}
.chat-log::-webkit-scrollbar { display: none; }

.msg-time { text-align: center; font-size: 10.5px; color: var(--faint); margin: 12px 0 6px; letter-spacing: 0.04em; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: break-word; }
.msg.them {
  align-self: flex-start;
  background: var(--card-strong);
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 6px;
}
.msg.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #96ab21, var(--accent));
  color: #131505;
  font-weight: 500;
  border-bottom-right-radius: 6px;
}
.msg.typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.typing-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typingB 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingB { 0%, 60%, 100% { transform: none; opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-bottom { flex: 0 0 auto; border-top: 1px solid var(--hairline); background: rgba(9, 9, 11, 0.94); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--hairline-strong);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.chip:active { border-color: var(--accent-border); color: var(--accent); }
.chat-inputrow { display: flex; align-items: flex-end; gap: 10px; padding: 10px 18px 12px; }
.chat-input {
  flex: 1;
  min-height: 44px;
  max-height: 110px;
  padding: 12px 16px;
  border-radius: 22px;
  background: var(--card-strong);
  border: 1px solid var(--hairline-strong);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  resize: none;
  outline: none;
  line-height: 1.35;
}
.chat-input:focus { border-color: var(--accent-border); }
.chat-input::placeholder { color: var(--faint); }
.send-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: #131505;
  display: grid; place-items: center;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.send-btn:disabled { opacity: 0.35; }
.send-btn:active { transform: scale(0.92); }
.ai-caption {
  text-align: center;
  font-size: 10px;
  color: var(--faint);
  padding: 0 18px 10px;
  letter-spacing: 0.03em;
}

/* ============================================================
   REPORTS
   ============================================================ */
.report-card { margin-bottom: 14px; overflow: hidden; padding: 0; }
.report-photo { position: relative; aspect-ratio: 16 / 9.5; overflow: hidden; }
.report-photo img { width: 100%; height: 100%; object-fit: cover; }
.report-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(9, 9, 11, 0.85), transparent 55%);
}
.report-photo .pill { position: absolute; top: 12px; left: 12px; z-index: 2; backdrop-filter: blur(6px); }
.report-photo-cam {
  position: absolute; bottom: 10px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.75); font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em;
}
.report-photo-cam .icon { width: 15px; height: 15px; }
.report-body { padding: 15px 16px 16px; }
.report-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.report-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.report-meta .num { color: var(--accent); font-weight: 700; }
.report-tasks { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.report-tasks li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.4; }
.report-tasks .icon-sm { color: var(--ok); margin-top: 1px; flex: 0 0 auto; }
.report-note {
  margin-top: 13px;
  padding: 11px 13px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--olive);
  border-radius: 0 10px 10px 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.report-note strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* proposal */
.proposal-card { border-color: rgba(232, 121, 249, 0.25); }
.proposal-card.is-approved { border-color: rgba(74, 222, 128, 0.35); }
.proposal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.btn-approve { background: var(--accent); color: #131505; }
.pricing-note { margin-top: 11px; text-align: center; font-size: 11px; color: var(--faint); font-style: italic; }

.approved-banner {
  display: flex; align-items: center; gap: 12px;
  margin-top: 15px;
  padding: 13px 15px;
  background: var(--ok-dim);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 13px;
  color: var(--ok);
  font-weight: 700;
  font-size: 14px;
  animation: viewIn 0.35s ease both;
}
.approved-banner .check-anim { width: 30px; height: 30px; flex: 0 0 auto; }
.check-anim circle { stroke: var(--ok); stroke-width: 2; fill: none; stroke-dasharray: 88; stroke-dashoffset: 88; animation: draw 0.5s ease forwards; }
.check-anim path { stroke: var(--ok); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.35s ease 0.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.approved-sub { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* ============================================================
   TAB BAR
   ============================================================ */
.tabbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hairline);
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(14px);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 52px;
  padding: 7px 2px 5px;
  border-radius: 12px;
  color: var(--faint);
  transition: color 0.15s ease;
}
.tab .icon { width: 23px; height: 23px; }
.tab-label { font-size: 10px; font-weight: 600; letter-spacing: 0.03em; }
.tab.is-active { color: var(--accent); }
.tab.is-active .tab-label { color: var(--text); }
.tab-dot {
  position: absolute; top: 6px; right: calc(50% - 17px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2.5px var(--bg);
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-root {
  position: absolute;
  top: 68px; left: 14px; right: 14px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 40;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 11px;
  background: rgba(20, 22, 16, 0.96);
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  padding: 12px 15px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  backdrop-filter: blur(10px);
}
.toast.hide { animation: toastOut 0.3s ease both; }
.toast .icon { color: var(--accent); flex: 0 0 auto; }
.toast-title { font-weight: 700; font-size: 13.5px; }
.toast-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(0.97); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
