:root {
  --navy: #0B1626; --navy-2: #14233a; --amber: #F2A541; --bg: #f3f5f8; --card: #fff;
  --text: #16202e; --muted: #5b6573; --line: #d9dee6; --ok: #1f8a4c; --warn: #b26a00; --bad: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg);
  display: flex; flex-direction: column; -webkit-text-size-adjust: 100%; }
header#top { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
#brand { font-weight: 700; letter-spacing: .2px; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--navy-2); color: #fff; text-decoration: none; white-space: nowrap; }
.pill.ok { color: #9be3b8; } .pill.warn { color: var(--amber); } .pill.bad { color: #ffb4ab; }
main { flex: 1; overflow-y: auto; padding: 16px; max-width: 760px; width: 100%; margin: 0 auto; }
nav#tabs { display: flex; background: var(--navy); padding-bottom: env(safe-area-inset-bottom); }
nav#tabs a { flex: 1; text-align: center; padding: 14px 2px; color: #b8c2d0; text-decoration: none; font-size: 14px; border-top: 3px solid transparent; }
nav#tabs a.on { color: #fff; border-top-color: var(--amber); }
h1 { font-size: 20px; margin: 0 0 12px; } h2 { font-size: 15px; margin: 22px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; display: block; color: inherit; text-decoration: none; }
a.card:active { background: #eef1f5; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); font-size: 14px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #e8ecf2; color: var(--muted); white-space: nowrap; }
.tag.done { background: #dff3e7; color: var(--ok); } .tag.in_progress { background: #fff0d6; color: var(--warn); } .tag.cancelled, .tag.failed { background: #fde7e5; color: var(--bad); }
[hidden] { display: none !important; }
.f { display: block; margin: 12px 0; } label.f > span, .flabel { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.req::after { content: " *"; color: var(--bad); }
input, select, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
input[type=checkbox] { width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; }
button, .btn { font: inherit; font-weight: 600; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
button.primary, .btn.primary { background: var(--amber); border-color: var(--amber); color: var(--navy); }
button.wide, .btn.wide { display: block; width: 100%; margin-top: 12px; }
button.small { padding: 7px 10px; font-size: 14px; font-weight: 500; }
button.danger { color: var(--bad); }
.li { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #fafbfc; }
.li-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; align-items: end; }
.li-grid small { display: block; color: var(--muted); font-size: 12px; }
.amount { font-weight: 600; padding: 11px 0; text-align: right; }
.calc { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.calc b { font-variant-numeric: tabular-nums; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumb { position: relative; width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; padding: 2px 7px; border-radius: 999px; font-size: 13px; }
canvas.sig { width: 100%; height: 170px; border: 1px solid var(--line); border-radius: 8px; background: #fff; touch-action: none; display: block; }
.problems { background: #fde7e5; color: var(--bad); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.problems ul { margin: 4px 0 0; padding-left: 18px; }
.banner { background: #fff0d6; color: #6b4300; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; max-width: 90%; z-index: 5; }
.empty { text-align: center; color: var(--muted); padding: 32px 8px; }
.li > .row { margin-bottom: 4px; color: var(--muted); }
.suggest { border: 1px solid var(--line); border-radius: 8px; background: #fff; max-height: 240px; overflow-y: auto; margin-top: 4px; box-shadow: 0 6px 18px rgba(11,22,38,.12); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-weight: 500; padding: 11px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; font-size: 14px; max-width: 100%; overflow: hidden; }
.chip button { padding: 2px 7px; border-radius: 999px; font-size: 13px; }
input[readonly], textarea[readonly] { background: #f3f5f8; color: var(--muted); }
.ttable { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; overflow: hidden; }
.trow { display: grid; grid-template-columns: 44px 1.6fr 1fr 1fr; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; } .trow:nth-child(odd):not(.thead) { background: #fafbfc; }
.trow.thead { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.trow .num { text-align: right; font-variant-numeric: tabular-nums; } .trow.thead span:last-child { text-align: right; }
.trow input[type=checkbox] { width: 26px; height: 26px; margin: 0; }
a.plain { color: inherit; text-decoration: none; display: block; }
button.small.primary, .btn.small { padding: 7px 10px; font-size: 14px; }
h2.due { color: var(--bad); }
.jbar { margin: 4px 0 2px; flex-wrap: wrap; } .jbar > span { display: flex; align-items: center; gap: 4px; }
button.link, select.link { border: 0; background: none; color: #1456c4; font-weight: 600; padding: 8px 6px; width: auto; font-size: 15px; }
.card.job .jtitle { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 8px; font-size: 17px; }
.chev { color: #1456c4; font-size: 22px; line-height: 1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; } .kv span { color: var(--muted); } .kv b { font-weight: 500; text-align: right; }
.detail { padding: 10px 0; border-bottom: 1px solid var(--line); } .detail > span { display: block; color: var(--muted); font-size: 14px; }
.detail > div { font-size: 17px; overflow-wrap: anywhere; } .detail a { color: #1456c4; text-decoration: none; }
.card > .detail:last-of-type, #review > .detail:last-child { border-bottom: 0; }
.two { display: flex; gap: 10px; margin-top: 12px; } .two > * { flex: 1; }
ul.plain { margin: 4px 0; padding-left: 18px; font-size: 15px; }
main.wide { max-width: 1280px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .three.two-up { grid-template-columns: 1fr 1fr; } .three .f { margin: 6px 0; }
@media (max-width: 480px) { .three.two-up { grid-template-columns: 1fr; } }
details { margin: 12px 0; } summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: #1456c4; }
nav#tabs a { font-size: 13px; }
.sbar { flex-wrap: wrap; margin-bottom: 8px; } .sbar b { margin-left: 6px; }
.techs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; font-size: 14px; } .techs label { white-space: nowrap; }
.cal { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.chead, .cbody { display: grid; grid-template-columns: 52px repeat(var(--n), minmax(0, 1fr)); }
.chead > div { padding: 6px 4px; text-align: center; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); } .chead > div:first-child { border-left: 0; }
.chead .today, .day.today { background-color: #fff8e6; }
.hours > div { font-size: 12px; color: var(--muted); text-align: right; padding: 2px 6px 0 0; }
.day { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); cursor: cell; }
.blk { position: absolute; border-radius: 6px; color: #fff; padding: 3px 6px; font-size: 12px; line-height: 1.25; overflow: hidden; text-decoration: none; border: 1px solid #fff; }
.blk b { display: block; font-size: 13px; } .blk span { opacity: .9; } .blk.done { opacity: .6; }
.tag.new { background: var(--amber); color: var(--navy); font-weight: 700; }
.trow.prow { grid-template-columns: 36px 1fr 0 auto; cursor: pointer; padding: 12px 10px; }
.seg { display: flex; gap: 8px; } .seg button { flex: 1; padding: 12px 6px; } .seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.bad { color: var(--bad); }

/* Sign-in button in Google's own style: white, grey outline, the G mark */
.btn.google { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #747775; border-radius: 4px; color: #1f1f1f; font-family: Roboto, Arial, sans-serif; font-weight: 500; font-size: 16px; padding: 10px 14px; }
.btn.google svg { width: 20px; height: 20px; flex: none; }
.btn.google:hover { background: #f6f8fb; }
