/* REI Tax Guys Hours Tracker — app styles. Tokens come from vendor/colors_and_type.css. */
@import url('vendor/colors_and_type.css');

:root {
  --t-green-bg:#ECFAF0; --t-green-fg:#136430; --t-green-bar:#1F9E4B;
  --t-amber-bg:#FBF6EA; --t-amber-fg:#7E5D1B; --t-amber-bar:#D2A53A;
  --t-red-bg:#FDECEA;   --t-red-fg:#A8322A;   --t-red-bar:#D6453B;
  --t-gray-bg:#F3F1EA;  --t-gray-fg:#6B6557;  --t-gray-bar:#B3AD9D;
  --t-blue-bg:#EEF3FE;  --t-blue-fg:#0B3A9E;  --t-blue-bar:#0A47C2;
  --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; height: 100%; }
body {
  background: var(--neutral-50); color: var(--fg-default);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; }
input, textarea, select { font: inherit; color: var(--fg-strong); }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: var(--ring-focus); }
b, strong { font-weight: 700; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); }
.hidden { display: none !important; }

/* ---------- App shell ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--neutral-50); max-width: 560px; margin: 0 auto; }
@media (min-width: 600px) { #app { box-shadow: 0 0 0 1px var(--border-subtle); } }
#top { flex: none; height: var(--safe-top); }
#main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#tabs {
  flex: none; display: flex; justify-content: space-around; align-items: flex-start;
  padding: 8px 10px calc(8px + var(--safe-bottom)); background: rgba(250,249,245,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border-subtle); z-index: 2;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 4px; font-size: 11px; font-weight: 600; color: #8C8676; }
.tab.on { color: var(--blue-600); }
.tab .ic { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 22px; border-radius: 16px; }
.tab.add .ic { width: 52px; height: 52px; margin-top: -22px; font-size: 26px; background: var(--blue-600); color: #fff; box-shadow: 0 8px 20px rgba(10,71,194,.35); }

.screen { display: flex; flex-direction: column; gap: 16px; padding: 14px 16px 28px; }
.screen-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; gap: 12px; }
.eyebrow { font: 700 11px/1.2 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-green); }
.eyebrow.muted { color: var(--fg-subtle); padding: 8px 4px 0; }
.eyebrow.blue { color: var(--blue-600); }
.h1 { font: 700 26px/1.15 var(--font-display); letter-spacing: -.02em; color: var(--fg-strong); }
.h1.big { font-size: 30px; line-height: 1.1; }
.h2 { font: 600 17px/1.2 var(--font-display); color: var(--fg-strong); }
.h3 { font: 600 15px/1.2 var(--font-display); color: var(--fg-strong); }
.lead { font-size: 15px; line-height: 1.55; color: var(--fg-muted); }
.small { font-size: 13px; line-height: 1.5; color: var(--fg-muted); }
.tiny { font-size: 12px; line-height: 1.5; color: var(--fg-subtle); }
.label { font-size: 13px; font-weight: 600; color: var(--fg-strong); }
.label .opt { font-weight: 400; color: var(--fg-subtle); }
.disclaimer { font-size: 11px; line-height: 1.5; color: var(--fg-subtle); text-align: center; padding: 4px 12px 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.baseline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Cards ---------- */
.card { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 16px; }
.card.shadow { box-shadow: var(--shadow-sm); }
.card.tap:active { box-shadow: var(--shadow-md); }
.card.soft { background: var(--neutral-100); border: 0; }
.card.gold { background: var(--gold-50); border-color: var(--gold-200); color: var(--gold-800); }
.card.navy { background: var(--blue-900); border: 0; color: var(--fg-on-dark); }
.list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-subtle); border-radius: 16px; overflow: hidden; }
.list > * { border-top: 1px solid var(--border-subtle); }
.list > *:first-child { border-top: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; }
.list-row .grow .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .pill { flex: none; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--neutral-100); color: var(--fg-muted); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.avatar.sq { border-radius: 10px; font-size: 18px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.blue { background: var(--t-blue-bg); color: var(--t-blue-fg); }

.note { display: flex; gap: 10px; padding: 14px; border-radius: 12px; background: var(--blue-50); color: var(--blue-800); font-size: 13px; line-height: 1.5; }
.note.gold { background: var(--gold-50); border: 1px solid var(--gold-200); color: var(--gold-800); font-size: 14px; font-weight: 500; }
.note.red { background: var(--t-red-bg); color: var(--t-red-fg); }
.note i { font-size: 16px; margin-top: 1px; flex: none; }

/* ---------- Badges, bars ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.mono { font: 600 12px/1 var(--font-mono); padding: 5px 9px; }
.tone-green { background: var(--t-green-bg); color: var(--t-green-fg); }
.tone-amber { background: var(--t-amber-bg); color: var(--t-amber-fg); }
.tone-red   { background: var(--t-red-bg);   color: var(--t-red-fg); }
.tone-gray  { background: var(--t-gray-bg);  color: var(--t-gray-fg); }
.tone-blue  { background: var(--t-blue-bg);  color: var(--t-blue-fg); }
.tone-green .dot, .bar-green { background: var(--t-green-bar); }
.tone-amber .dot, .bar-amber { background: var(--t-amber-bar); }
.tone-red .dot,   .bar-red   { background: var(--t-red-bar); }
.tone-gray .dot,  .bar-gray  { background: var(--t-gray-bar); }
.tone-blue .dot,  .bar-blue  { background: var(--t-blue-bar); }
.fg-green { color: var(--t-green-fg); } .fg-amber { color: var(--t-amber-fg); } .fg-red { color: var(--t-red-fg); } .fg-strong { color: var(--fg-strong); }
.pill { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); white-space: nowrap; }
.bar { position: relative; height: 8px; border-radius: 999px; background: var(--neutral-100); overflow: hidden; }
.bar.thin { height: 6px; }
.bar > span { display: block; height: 100%; border-radius: 999px; transition: width .5s var(--ease-standard); }
.bar .mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--neutral-500); }
.stat { font: 500 13px/1 var(--font-mono); color: var(--fg-subtle); white-space: nowrap; }
.stat b { font-size: 22px; font-weight: 600; color: var(--fg-strong); }
.stat.sm b { font-size: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini .k { font-size: 11px; color: var(--fg-subtle); }
.mini .v { font: 600 13px/1.2 var(--font-mono); color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 14px; }
.tile .v { font: 600 20px/1 var(--font-mono); color: var(--fg-strong); }
.tile .k { font-size: 11px; color: var(--fg-muted); }

/* ---------- Buttons, chips, inputs ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 20px; border-radius: 12px; font-size: 16px; font-weight: 600; transition: background var(--dur-fast), transform var(--dur-fast); }
.btn.primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-brand); font-family: var(--font-display); font-weight: 700; }
.btn.primary:active { background: var(--blue-700); transform: translateY(1px); }
.btn.secondary { background: #fff; border: 1px solid var(--border-default); color: var(--fg-strong); }
.btn.soft { background: var(--blue-50); color: var(--blue-700); }
.btn.green { background: var(--green-500); color: #fff; font-weight: 700; border-radius: 999px; height: 44px; font-size: 14px; }
.btn.greenSoft { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-200); height: 50px; font-size: 14px; font-weight: 700; border-radius: 14px; }
.btn.dashed { border: 1.5px dashed var(--border-default); color: var(--blue-600); font-size: 14px; height: 48px; }
.btn.big { height: 60px; border-radius: 16px; font-size: 18px; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.xs { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--danger); background: #fff; border: 1px solid var(--border-default); }
.btn.tall { height: 54px; border-radius: 14px; }
.btn { white-space: nowrap; }
.btn.greenSoft { white-space: normal; text-align: center; height: auto; min-height: 50px; padding: 12px 16px; }
.link { font-size: 13px; font-weight: 600; color: var(--blue-600); display: inline-flex; align-items: center; gap: 6px; }
.link.muted { color: var(--fg-muted); }
.back { align-self: flex-start; display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--blue-600); padding: 4px 0; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--fg-muted); }
.iconbtn.round { width: 32px; height: 32px; border-radius: 50%; background: var(--neutral-200); border: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.fill > .chip { flex: 1; text-align: center; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: #fff; color: #34312B; border: 1px solid #D6D1C4; flex: none; }
.chip.on { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.chip.sq { border-radius: 12px; height: 42px; padding: 0 12px; }
.chip.mono { font-family: var(--font-mono); }
.chip .sub { font-weight: 500; opacity: .7; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--neutral-200); }
.seg > button { flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: #6B6557; }
.seg > button.on { background: #fff; color: #211F1B; box-shadow: 0 1px 2px rgba(33,31,27,.08), 0 1px 3px rgba(33,31,27,.06); }
.field { display: flex; flex-direction: column; gap: 6px; }
.input { height: 48px; width: 100%; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 12px; background: #fff; font-size: 16px; color: var(--fg-strong); }
.input.mono { font: 600 14px/1 var(--font-mono); }
.input.ro { background: var(--neutral-100); color: var(--fg-muted); border-color: transparent; }
.input-wrap { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 12px; background: #fff; }
.input-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; }
.input-wrap input:focus { box-shadow: none; }
.input-wrap i { color: var(--fg-subtle); }
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: none; line-height: 1.45; font-size: 15px; }
textarea.input.err, .input.err { border: 1.5px solid var(--danger); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--border-default); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--fg-strong); }
.stepper .val { flex: 1; text-align: center; font: 600 30px/48px var(--font-mono); color: var(--fg-strong); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.toggle .track { flex: none; width: 46px; height: 28px; border-radius: 999px; background: #D6D1C4; position: relative; transition: background .2s; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: left .2s var(--ease-standard); }
.toggle.on .track { background: var(--green-500); }
.toggle.on .track::after { left: 21px; }
.toggle-card { padding: 14px 16px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 12px; }
.check { flex: none; width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid #D6D1C4; color: #fff; font-size: 15px; }
.check.on { background: var(--blue-600); border-color: var(--blue-600); }
.select-card { display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: #fff; border: 1.5px solid #D6D1C4; width: 100%; }
.select-card.on { background: #EEF3FE; border-color: var(--blue-600); }
.select-card .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #F3F1EA; color: #6B6557; font-size: 22px; }
.select-card.on .ic { background: var(--blue-600); color: #fff; }
.err-text { font-size: 12px; color: var(--danger); min-height: 1px; }

/* ---------- Setup ---------- */
.setup { min-height: 100%; display: flex; flex-direction: column; padding: 12px 24px 24px; gap: 24px; }
.progress { height: 4px; border-radius: 999px; background: var(--neutral-200); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue-600); border-radius: 999px; transition: width .25s var(--ease-standard); }
.setup-nav { display: flex; gap: 10px; margin-top: auto; }
.setup-nav .btn.primary { flex: 1; }

/* ---------- Timer ---------- */
.timer-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border-subtle); border-radius: 20px; box-shadow: var(--shadow-md); }
.timer-run { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--blue-900); border-radius: 20px; color: var(--fg-on-dark); box-shadow: var(--shadow-lg); }
.timer-run .live { width: 8px; height: 8px; border-radius: 50%; background: var(--green-400); box-shadow: 0 0 0 4px rgba(52,182,95,.25); }
.timer-run .elapsed { font: 500 52px/1 var(--font-mono); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.timer-run .warn { padding: 10px 12px; border-radius: 10px; background: rgba(210,165,58,.18); color: var(--gold-200); font-size: 13px; line-height: 1.45; }
.timer-run .stop { height: 54px; border-radius: 14px; background: #fff; color: var(--blue-900); display: flex; align-items: center; justify-content: center; gap: 10px; font: 700 17px/1 var(--font-display); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; width: 100%; font-size: 13px; line-height: 1.45; }
.alert i:first-child { font-size: 18px; margin-top: 1px; }
.alert .chev { font-size: 16px; opacity: .6; margin-top: 2px; }

/* ---------- Sheets, toast, scan ---------- */
.scrim { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(33,31,27,.45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.scrim .gap { flex: 1; min-height: 40px; }
.sheet { max-height: 92%; display: flex; flex-direction: column; background: var(--neutral-50); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-lg); animation: up .22s var(--ease-standard); }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 10px 16px 12px; border-bottom: 1px solid var(--border-subtle); }
.sheet-head .grip { align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--neutral-300); }
.sheet-title { font: 700 20px/1.2 var(--font-display); color: var(--fg-strong); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 18px; }
.toast { position: absolute; left: 16px; right: 16px; top: calc(12px + var(--safe-top)); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--neutral-900); color: #fff; font-size: 13px; line-height: 1.4; box-shadow: var(--shadow-lg); animation: up .2s var(--ease-standard); }
.toast i { font-size: 18px; color: var(--green-300); flex: none; }
.confirm { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(33,31,27,.45); }
.confirm .box { width: 100%; max-width: 340px; background: #fff; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); }
.photo-thumb { width: 100%; max-height: 200px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border-subtle); }

/* ---------- Icons (Lucide font) ---------- */
[class^="icon-"]:before, [class*=" icon-"]:before { line-height: 1; }
i[class^="icon-"], i[class*=" icon-"] { display: inline-block; font-style: normal; }

/* ---------- Report preview page (print) ---------- */
.paper { flex: none; width: 118px; height: 152px; padding: 10px 9px; background: #fff; border: 1px solid var(--border-default); border-radius: 4px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
.paper .t { font: 700 7px/1.2 var(--font-display); color: var(--fg-strong); }
.paper .s { font-size: 5px; color: var(--fg-subtle); }
.paper .rule { height: 1px; background: var(--gold-300); }
.paper .r { display: flex; justify-content: space-between; align-items: center; font-size: 5.5px; color: var(--fg-default); }
.paper .r span:last-child { padding: 1px 3px; border-radius: 3px; font-weight: 700; }
.paper .b { height: 3px; border-radius: 2px; background: var(--neutral-100); overflow: hidden; }
.paper .b span { display: block; height: 100%; border-radius: 2px; }
.paper .ln { height: 2px; background: var(--neutral-200); }
