/* SkippaPen phone app: big targets, high contrast for sunlight, gloves and dirty hands. */
:root {
  --navy: #12305a;
  --navy-2: #1d4580;
  --orange: #ff6b1a;
  --red: #d7263d;
  --green: #1f8a4c;
  --amber: #b86e00;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #111827;
  --muted: #5b6474;
  --line: #d9dee7;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; min-height: 100vh; }
button, input, select, textarea { font: inherit; }

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: var(--navy); color: #fff;
}
.bar-title { flex: 1; font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-back { background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; padding: 0 8px 4px 0; }
.bar-status { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.15); }
.bar-status.off { background: var(--amber); }

.view { padding: 16px 16px calc(28px + var(--safe-bottom)); max-width: 560px; margin: 0 auto; }
h1 { font-size: 24px; margin: 6px 0 14px; }
h2 { font-size: 17px; margin: 22px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.stack > * + * { margin-top: 12px; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number] {
  width: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 17px;
}
input:focus { outline: 3px solid rgba(29,69,128,.3); border-color: var(--navy-2); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 14px 18px;
  border: 0; border-radius: var(--radius); font-weight: 700; font-size: 18px;
  background: var(--navy); color: #fff;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; }
.btn.secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn.big { min-height: 76px; font-size: 21px; }
.btn.go { background: var(--green); }
.btn.danger { background: #fff; color: var(--red); border: 2px solid var(--red); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* the record button */
.rec-wrap { display: flex; flex-direction: column; align-items: center; padding: 26px 0 8px; }
.rec {
  width: 168px; height: 168px; border-radius: 50%; border: 8px solid #ffd9c4;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .03em;
  box-shadow: 0 10px 26px rgba(255,107,26,.35);
}
.rec.on { background: var(--red); border-color: #f7c1c9; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(215,38,61,.12); } }
.timer { font: 700 34px/1 ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 14px; }
.hint { text-align: center; color: var(--muted); font-size: 15px; margin: 6px 12px 0; }

.items { list-style: none; padding: 0; margin: 0; }
.items li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #e7ebf1; display: grid; place-items: center; font-size: 24px; flex: none; }
.items .grow { flex: 1; min-width: 0; }
.items .x { background: none; border: 0; color: var(--red); font-size: 15px; font-weight: 700; padding: 10px; }

.job { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; text-decoration: none; color: inherit; }
.job .grow { flex: 1; min-width: 0; }
.job .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: #e7ebf1; color: var(--muted); }
.pill.wait { background: #fff1d6; color: var(--amber); }
.pill.work { background: #e1ebfb; color: var(--navy-2); }
.pill.ready { background: #dcf3e5; color: var(--green); }
.pill.bad { background: #fde2e5; color: var(--red); }

.banner { border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; font-weight: 600; }
.banner.warn { background: #fff1d6; color: #6b4000; }
.banner.info { background: #e1ebfb; color: #173a6b; }
.banner.bad { background: #fde2e5; color: #7a1020; }
.banner ul { margin: 6px 0 0 18px; padding: 0; font-weight: 500; }

table.lines { width: 100%; border-collapse: collapse; font-size: 15px; }
table.lines td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lines td.amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.lines tr.total td { font-weight: 800; font-size: 18px; border-bottom: 0; }
.noprice { color: var(--red); font-weight: 700; }

.spinner { width: 42px; height: 42px; border: 5px solid #d9e2f0; border-top-color: var(--navy-2); border-radius: 50%; animation: spin 1s linear infinite; margin: 18px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(18px + var(--safe-bottom)); z-index: 10;
  background: #111827; color: #fff; padding: 14px 16px; border-radius: 12px; font-weight: 600; text-align: center; }
.center { text-align: center; }
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

a.btn { text-decoration: none; }
textarea, select, .line input[type=text] {
  width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px;
}
textarea { resize: vertical; line-height: 1.4; }
select { min-height: 52px; font-weight: 600; color: var(--navy); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin: 10px 0; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 1px; accent-color: var(--green); }
.line { padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-top { display: flex; gap: 8px; align-items: center; }
.line-top .grow { flex: 1; min-width: 0; }
.line .x { background: none; border: 0; color: var(--red); font-size: 20px; padding: 6px 10px; }
.line-nums { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.line-nums label { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); flex: 1; }
.line-nums input { width: 100%; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 17px; margin-top: 4px; }
.line-nums input.need { border-color: var(--red); background: #fff5f6; }
.line-nums .amt { flex: 1; text-align: right; font-weight: 700; padding-bottom: 10px; font-variant-numeric: tabular-nums; }
.pad { width: 100%; height: 190px; background: #fff; border: 2px dashed var(--navy-2); border-radius: var(--radius); touch-action: none; display: block; }
