/* Snow Removal App — deep-winter theme: dark navy, ice blue, numbered stops. */
:root {
  --bg: #0b1d33; --bg2: #0e2745; --card: #12294a; --card2: #17335c;
  --ink: #eef6ff; --muted: #9db9d9; --ice: #6ec3ff; --ice2: #a8dcff;
  --ok: #37d99a; --warn: #ffb454; --bad: #ff7a7a; --line: #24507f;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--ink); min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1 { font-size: 1.35rem; margin: 0.2rem 0; }
h2 { font-size: 1.1rem; margin: 0.4rem 0 0.6rem; color: var(--ice2); }
a { color: var(--ice); }
label { display: block; margin: 0.55rem 0; font-size: 0.92rem; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.7rem 0.8rem;
  border-radius: 10px; border: 1px solid var(--line); background: #0a1930;
  color: var(--ink); font-size: 1rem;
}
.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--card2);
  color: var(--ink); border-radius: 12px; padding: 0.65rem 1rem; font-size: 1rem;
  cursor: pointer; text-decoration: none; text-align: center; min-height: 48px;
}
.btn.primary { background: var(--ice); color: #06263f; border-color: var(--ice); font-weight: 700; }
.btn.ok { background: var(--ok); color: #04301f; border-color: var(--ok); font-weight: 700; }
.btn.big { width: 100%; padding: 0.9rem 1rem; font-size: 1.1rem; margin-top: 0.6rem; }
.btn.small { min-height: 40px; padding: 0.4rem 0.8rem; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; }
.error { color: var(--bad); min-height: 1.2em; }
.hint { color: var(--muted); font-size: 0.88rem; }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ok); color: #04301f; font-weight: 700; padding: 0.8rem 1.2rem;
  border-radius: 999px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  max-width: 92vw; text-align: center;
}

/* Lock screen */
.lock-wrap { display: flex; align-items: center; justify-content: center; padding: 1.2rem; min-height: 100vh; }
.lock-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 1.6rem 1.4rem; width: 100%; max-width: 430px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.lock-sub { color: var(--muted); margin: 0.2rem 0 1rem; }
.route-motif { display: flex; align-items: center; gap: 0; margin-bottom: 1rem; }
.pin {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ice); color: #06263f;
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.pin-2 { background: var(--ice2); } .pin-3 { background: var(--ok); }
.pin-line { height: 3px; flex: 1; background: repeating-linear-gradient(90deg, var(--ice) 0 8px, transparent 8px 14px); opacity: 0.7; }
.lock-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.lock-tab {
  flex: 1; padding: 0.6rem 0.4rem; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 0.95rem; cursor: pointer; min-height: 44px;
}
.lock-tab.active { background: var(--card2); color: var(--ink); border-color: var(--ice); }

/* App frame */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.9rem 1rem 0.4rem; max-width: 860px; margin: 0 auto;
}
.who { color: var(--muted); margin: 0; font-size: 0.9rem; }
.tabs {
  display: flex; gap: 0.4rem; padding: 0.6rem 1rem; max-width: 860px; margin: 0 auto;
  overflow-x: auto;
}
.tab {
  flex: 1; white-space: nowrap; padding: 0.7rem 0.5rem; border-radius: 10px; min-height: 48px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 1rem; cursor: pointer;
}
.tab.active { background: var(--card2); color: var(--ink); border-color: var(--ice); }
.badge { background: var(--warn); color: #3a2400; border-radius: 999px; padding: 0 0.5em; font-weight: 800; }
main { max-width: 860px; margin: 0 auto; padding: 0.4rem 1rem 3rem; }
.view { display: block; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 1rem; margin: 0.7rem 0;
}
.stop-head { display: flex; gap: 0.8rem; align-items: flex-start; }
.stop-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ice); color: #06263f;
  font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; flex: none;
}
.stop-num.done { background: var(--ok); } .stop-num.skipped { background: var(--muted); }
.stop-name { font-size: 1.1rem; font-weight: 700; }
.stop-addr { color: var(--muted); font-size: 0.95rem; }
.status-chip { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 0.15em 0.7em; background: var(--card2); color: var(--ice2); }
.status-chip.arrived { background: var(--warn); color: #3a2400; }
.status-chip.done { background: var(--ok); color: #04301f; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.7rem; }
.btn-row .btn { flex: 1; min-width: 130px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.code-chip {
  font-family: ui-monospace, monospace; background: #0a1930; border: 1px dashed var(--ice);
  border-radius: 10px; padding: 0.5rem 0.8rem; font-size: 1.05rem; letter-spacing: 0.04em;
}
table.codes { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.codes td, table.codes th { padding: 0.45rem 0.3rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
