:root { --bg:#f5f5f4; --card:#fff; --ink:#111827; --muted:#6b7280; --line:#e5e7eb;
  --red:#fee2e2; --red-ink:#991b1b; --yellow:#fef3c7; --yellow-ink:#92400e;
  --green:#dcfce7; --green-ink:#166534; --orange:#ffedd5; --orange-ink:#9a3412; --blue:#2563eb; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font:16px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; background:var(--bg); color:var(--ink);
  padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
main { max-width: 720px; margin: 0 auto; padding: 12px 14px; }
h1 { font-size: 22px; margin: 6px 0 12px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
a { color: var(--blue); }
.top { position: sticky; top:0; z-index:5; display:flex; justify-content:space-between; align-items:center;
  background: var(--ink); color:#fff; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
.brand { font-weight: 700; }
.who { display:flex; gap:8px; align-items:center; margin:0; }
button.link { background:none; border:0; color:#93c5fd; font:inherit; text-decoration:underline; min-height:44px; padding:0 4px; }
.tabs { position: fixed; bottom:0; left:0; right:0; display:flex; background:#fff; border-top:1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); z-index:5; }
.tabs a { flex:1; text-align:center; padding: 14px 4px; min-height:56px; color: var(--muted); text-decoration:none; font-weight:600; font-size:15px; }
.tabs a.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--ink); }
.stack { display:flex; flex-direction:column; gap:12px; }
label { display:flex; flex-direction:column; gap:4px; font-weight:600; }
input, select, textarea { font: inherit; padding: 10px 12px; border:1px solid #d1d5db; border-radius:10px; min-height:44px; background:#fff; width:100%; }
textarea { min-height: 72px; }
.row { display:flex; gap:10px; } .row > * { flex:1; }
.checkrow { flex-direction:row; align-items:center; gap:10px; font-weight:600; min-height:44px; }
.checkrow input { width:24px; height:24px; min-height:0; }
button, .btn { font: inherit; font-weight: 600; border-radius: 10px; border: 1px solid #d1d5db; background:#fff; color:var(--ink);
  min-height: 44px; padding: 10px 14px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button.primary, .btn.primary { background: var(--ink); color:#fff; border-color: var(--ink); }
button.danger { color: var(--red-ink); }
.error { background: var(--red); color: var(--red-ink); padding:10px 12px; border-radius:10px; }
.names { display:grid; grid-template-columns: 1fr 1fr; gap:8px; }
.name-pick input { position:absolute; opacity:0; }
.name-pick span { display:flex; align-items:center; justify-content:center; min-height:56px; border:2px solid #d1d5db; border-radius:12px; background:#fff; font-size:18px; }
.name-pick input:checked + span { border-color: var(--ink); background: var(--ink); color:#fff; }
.card { display:block; background:var(--card); border:1px solid var(--line); border-left-width:6px; border-radius:12px; padding:12px; margin-bottom:10px; color:inherit; text-decoration:none; }
.card .head { display:flex; justify-content:space-between; gap:8px; font-weight:700; }
.card .sub { color: var(--muted); font-size: 14px; }
.card .lines { display:flex; gap:12px; margin-top:6px; font-size:14px; }
.u-red { border-left-color:#dc2626; background: var(--red); }
.u-yellow { border-left-color:#d97706; background: var(--yellow); }
.u-ready { border-left-color:#16a34a; background: var(--green); }
.u-nodate { border-left-color:#ea580c; background: var(--orange); }
.pill { display:inline-block; border-radius:999px; padding:2px 10px; font-size:13px; font-weight:700; }
.pill.red { background:#dc2626; color:#fff; } .pill.yellow { background:#d97706; color:#fff; }
.pill.ready { background:#16a34a; color:#fff; } .pill.nodate { background:#ea580c; color:#fff; } .pill.none { background:#e5e7eb; }
.steps { display:flex; flex-direction:column; gap:6px; }
.step { margin:0; }
.step button { width:100%; justify-content:flex-start; text-align:left; gap:12px; min-height:56px; }
.step button .box { flex:none; width:28px; height:28px; border:2px solid #9ca3af; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; font-size:18px; }
.step.done button { background: var(--green); border-color:#86efac; }
.step.done .box { background:#16a34a; border-color:#16a34a; color:#fff; }
.step .who { display:block; font-weight:400; font-size:13px; color: var(--muted); }
.panel { background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:12px; }
.kv { display:grid; grid-template-columns: auto 1fr; gap:4px 12px; }
.kv dt { color: var(--muted); } .kv dd { margin:0; font-weight:600; }
.photos { display:flex; gap:8px; flex-wrap:wrap; } .photos img { width:96px; height:96px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
table.list { width:100%; border-collapse:collapse; background:#fff; border-radius:12px; overflow:hidden; font-size:14px; }
table.list th, table.list td { text-align:left; padding:10px 8px; border-bottom:1px solid var(--line); }
.late { color: var(--red-ink); font-weight:700; } .ontime { color: var(--green-ink); font-weight:700; }
.muted { color: var(--muted); } .empty { text-align:center; color:var(--muted); padding:32px 0; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin: 12px 0; }
@media print { .top, .tabs, .noprint { display:none !important; } body { background:#fff; padding:0; } }
.banner { background:#dbeafe; color:#1e3a8a; padding:10px 12px; border-radius:10px; font-weight:600; }
label.need input, label.need { color: var(--orange-ink); }
label.need input { border: 2px solid #ea580c; background: var(--orange); }
fieldset.methods { border:1px solid var(--line); border-radius:12px; padding:8px 12px 12px; display:flex; flex-direction:column; gap:8px; background:#fff; }
fieldset.methods legend { font-weight:700; padding:0 4px; }
fieldset.methods details summary { min-height:44px; display:flex; align-items:center; font-weight:600; color: var(--blue); cursor:pointer; }
fieldset.methods details[open] { display:flex; flex-direction:column; gap:8px; }
fieldset.need { border:2px solid #ea580c; }
.designs { display:flex; flex-direction:column; gap:8px; margin: 4px 0 12px; }
.design { background:#f9fafb; border:1px solid var(--line); border-radius:10px; padding:8px 10px; }
.design ul { margin:4px 0 0; padding-left:18px; font-size:14px; }
.design .sizes { font-weight:700; }
.design-pic { display:block; width:100%; max-width:520px; max-height:420px; margin:8px 0; border-radius:8px; border:1px solid var(--line); background:#fff; object-fit:contain; }
.pic-actions { display:flex; gap:6px; flex-wrap:wrap; margin:6px 0; }
.pic-actions form { margin:0; }
.btn.small, button.small { min-height:40px; padding:6px 10px; font-size:14px; }
.badge { display:inline-block; min-width:20px; padding:0 6px; border-radius:999px; background:#dc2626; color:#fff; font-size:12px; line-height:20px; }
.tabs a { font-size:14px; padding:14px 2px; }
.email-text { white-space: pre-wrap; font-size:14px; background:#f9fafb; border:1px solid var(--line); border-radius:8px; padding:8px; max-height:300px; overflow:auto; margin-top:6px; }
.photos .file { display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
button.armed { background:#dc2626 !important; color:#fff !important; border-color:#dc2626 !important; }
.stats { display:flex; flex-direction:column; gap:6px; margin: 8px 0 12px; }
.stat { display:flex; justify-content:space-between; align-items:center; background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 14px; min-height:52px; color:var(--ink); text-decoration:none; font-weight:600; }
.stat strong { font-size:20px; }
.stat.hot { border-color:#dc2626; background: var(--red); }
.methods-row { flex-direction:row; flex-wrap:wrap; } .methods-row .stat { flex:1 1 30%; }
.tags { margin-top:6px; }
.tag { display:inline-block; font-size:12px; font-weight:700; border-radius:6px; padding:2px 8px; background:#e5e7eb; color:#374151; }
.src-chipply_wo { background:#dbeafe; color:#1e3a8a; } .src-omg_wo { background:#e0e7ff; color:#3730a3; }
.src-metro_po { background:#ede9fe; color:#5b21b6; } .src-product_report { background:#fce7f3; color:#9d174d; }
.src-ai { background:#fef3c7; color:#92400e; } .src-manual { background:#f3f4f6; color:#4b5563; }
.tabs a { font-size:13px; }
.inbox-item { margin-bottom:12px; }
.inbox-item .card { margin-bottom:4px; }
.dismiss-row { display:flex; justify-content:flex-end; margin:0; }
.u-overdue { border-left-color:#7f1d1d; background:#fecaca; }
.u-blue { border-left-color:#2563eb; background:#dbeafe; }
.u-yellow { border-left-color:#d97706; background: var(--yellow); }
.pill.overdue { background:#7f1d1d; color:#fff; } .pill.blue { background:#2563eb; color:#fff; }
.warn-overdue { display:block; background:#7f1d1d; color:#fff; font-weight:700; padding:12px 14px; border-radius:12px; margin:8px 0; text-decoration:none; }
