:root {
  --navy: #0c3450;
  --teal: #1f9fc4;
  --teal-dark: #167a97;
  --cream: #f6f2e8;
  --ink: #14202b;
  --muted: #5c6b78;
  --line: #d9dee3;
  --ok: #1e8e4b;
  --warn: #c8791a;
  --bad: #c0392b;
  --card: #ffffff;
  --bg: #eef2f5;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Calibri, "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.4; color: var(--ink); background: var(--bg);
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--teal-dark); }
.top {
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
nav { display: flex; gap: 12px; white-space: nowrap; }
nav a { color: #cfe6f0; text-decoration: none; font-size: 15px; }
nav a.active { color: #fff; font-weight: 700; text-decoration: underline; }
main { max-width: 640px; margin: 0 auto; padding: 14px 14px 40px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
h1 { font-size: 24px; margin: 6px 0 10px; }
h2 { font-size: 20px; margin: 18px 0 8px; }
h3 { font-size: 17px; margin: 12px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card.accent { border-left: 6px solid var(--teal); }
.card.warn { border-left: 6px solid var(--warn); background: #fff8ee; }
.card.bad { border-left: 6px solid var(--bad); background: #fff2f0; }
.card.ok { border-left: 6px solid var(--ok); background: #f0faf3; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 16px; font-size: 18px; font-weight: 700;
  background: var(--teal); color: #fff; cursor: pointer; text-align: center; text-decoration: none; margin: 8px 0; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn.big { font-size: 20px; padding: 20px; }
.btn.ok { background: var(--ok); }
.btn.warn { background: var(--warn); }
.btn.bad { background: var(--bad); }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); }
.btn.navy { background: var(--navy); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.inline { display: inline-block; width: auto; padding: 10px 14px; font-size: 15px; margin: 4px 6px 4px 0; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
label { display: block; font-weight: 700; margin: 10px 0 4px; font-size: 15px; }
input[type=text], input[type=email], input[type=number], input[type=password], select, textarea {
  width: 100%; font: inherit; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
textarea { min-height: 90px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; cursor: pointer; }
.check input { width: 26px; height: 26px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
.progress { height: 12px; background: #dbe3e9; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.progress > div { height: 100%; background: var(--ok); transition: width .3s; }
.stat { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); }
.address { font-size: 19px; font-weight: 700; margin: 4px 0; }
.qty { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1; }
.qty small { font-size: 16px; font-weight: 400; color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #e3eef4; color: var(--navy); }
.pill.delivered { background: #d8f1e1; color: var(--ok); }
.pill.skipped { background: #fde3dc; color: var(--bad); }
.pill.pending { background: #e9ecef; color: var(--muted); }
.pill.open { background: #d8f1e1; color: var(--ok); }
.pill.closed { background: #e9ecef; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .name { font-weight: 700; }
.photo-preview { width: 100%; border-radius: 12px; margin-top: 8px; display: block; max-height: 320px; object-fit: cover; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.zone-btn { display: block; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px; margin: 8px 0; font: inherit; cursor: pointer; }
.zone-btn.done { opacity: .6; }
.zone-btn b { display: block; font-size: 17px; }
.zone-btn span { color: var(--muted); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 9; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #e3eef4; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tabs a { padding: 8px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--line); text-decoration: none; color: var(--navy); font-weight: 700; font-size: 15px; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.callbar { display: flex; gap: 8px; }
.callbar .btn { margin: 0; }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.hidden { display: none !important; }
@media (min-width: 700px) { body { font-size: 16px; } }
