/* The Gig Stack Toolkit – styles.
   Colours and parts copied from reference/mockups/mockups.html. */

:root {
  --navy-900: #0A1428;  /* page background */
  --navy-800: #0E1B33;  /* cards */
  --navy-700: #16264A;  /* inputs, raised cards, borders */
  --sunrise:  #FF7A1A;  /* main buttons, active tab */
  --gold:     #FFB547;  /* numbers, accents */
  --white:    #FFFFFF;
  --muted:    #A9B4C8;  /* labels, secondary text */
  --good:     #3DDC97;  /* TAKE IT */
  --okay:     #FFB547;  /* CLOSE CALL */
  --skip:     #FF5C5C;  /* SKIP IT, warnings */
  --outside:  #05080F;  /* around the app on big screens */

  --grad: linear-gradient(160deg, #FF7A1A 0%, #FFB547 35%, #16264A 75%, #0A1428 100%);

  --font-head: Poppins, "Arial Black", Arial, sans-serif;
  --font-body: Inter, "Helvetica Neue", Arial, sans-serif;

  --tabs-h: 78px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--outside);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .num { font-family: var(--font-head); }

a { color: var(--gold); }

/* App column: phone width, centred on desktop */
.app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--navy-900);
  position: relative;
}

main {
  padding-bottom: calc(var(--tabs-h) + var(--safe-bottom) + 24px);
  outline: none;
}

/* Headers */
.hero { background: var(--grad); padding: 28px 20px 26px; }
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: .5px; line-height: 1.2; }
.hero p { color: #1B1206; font-weight: 600; margin-top: 4px; }

.title { padding: 24px 20px 10px; }
.title h1 { font-size: 26px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.title p { color: var(--muted); font-size: 14px; margin-top: 2px; }

.body { padding: 0 16px; }
.hero + .body { padding-top: 14px; }

/* Cards and text */
.card {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.lbl { color: var(--muted); font-size: 13px; margin-bottom: 6px; display: block; }
.small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.num { font-weight: 800; color: var(--gold); }
.empty { color: var(--muted); text-align: center; padding: 18px 8px; }

/* Buttons */
.btn, .btn2 {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  border-radius: 14px;
  font-size: 16px;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
}
.btn {
  background: var(--sunrise);
  border: 0;
  min-height: 52px;
  font-family: var(--font-head);
  font-weight: 800;
}
.btn2 {
  background: transparent;
  border: 1px solid var(--navy-700);
  min-height: 48px;
  font-family: var(--font-body);
  font-weight: 600;
}
.btn:active, .btn2:active { transform: scale(.98); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

/* Inputs */
.input {
  width: 100%;
  height: 48px;
  background: var(--navy-700);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 10px;
  color: var(--white);
  font: 600 20px var(--font-body);
}
.input:focus { outline: none; border-color: var(--sunrise); }

/* Callouts */
.tip, .mind, .warn {
  background: var(--navy-800);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}
.tip  { border-left: 4px solid var(--gold); }
.mind { border-left: 4px solid var(--sunrise); font-size: 15px; padding: 12px; }
.warn { border-left: 4px solid var(--skip); }
.tip b, .mind b, .warn b { display: block; font-size: 12px; letter-spacing: .5px; margin-bottom: 3px; }
.tip b  { color: var(--gold); }
.mind b { color: var(--sunrise); }
.warn b { color: var(--skip); }

.center { text-align: center; }
.input.bad { border-color: var(--skip); }
.form-error { color: var(--skip); font-size: 14px; min-height: 20px; margin: -2px 0 8px; }
.form-error:empty { min-height: 0; margin: 0; }

/* Unlock screen */
.unlock-hero {
  background: var(--grad);
  min-height: 330px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
}
.unlock-sun { font-size: 54px; line-height: 1.1; }
.unlock-hero h1 { font-size: 32px; font-weight: 800; line-height: 1.1; }
.unlock-body { padding-top: 24px; }
.unlock-intro { margin-bottom: 16px; }
.input.code { letter-spacing: 4px; text-transform: uppercase; }
.unlock-help { margin-top: 16px; font-size: 13px; }
.unlock-by { margin-top: 40px; }
body.locked .tabs { display: none; }
body.locked main { padding-bottom: 32px; }

/* Order Check */
.hint { margin: -2px 0 10px; }
.note { margin-top: 14px; }
.input::placeholder { color: var(--muted); opacity: .6; }
.select { font-size: 16px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px; background-repeat: no-repeat; }
.gas summary {
  list-style: none; cursor: pointer;
  min-height: 44px; display: flex; align-items: center;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.gas summary::-webkit-details-marker { display: none; }
.gas-row { margin-top: 4px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 99px;
  font-size: 13px; font-weight: 800; letter-spacing: .5px; }
.verdict { text-align: center; padding: 16px 14px; }
.verdict .big { font-size: 52px; line-height: 1.1; margin-top: 8px; }
.verdict .big span { font-size: 20px; }
.verdict .extras { font-size: 13px; }
.verdict-text { margin-top: 8px; font-size: 15px; }
.verdict-take  { border-color: var(--good); }
.verdict-close { border-color: var(--okay); }
.verdict-skip  { border-color: var(--skip); }
.verdict-take  .pill { background: var(--good); color: #06281A; }
.verdict-close .pill { background: var(--okay); color: #2A1A00; }
.verdict-skip  .pill { background: var(--skip); color: #2B0606; }

/* Tracker */
:root { --app-ss: #FFB547; --app-dd: #FF7A1A; --app-ic: #6FA8FF; --app-ot: #A9B4C8; }
.gap-top { margin-top: 10px; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0 6px;
  color: var(--muted); font-weight: 600; text-decoration: none; }

.stats { display: flex; text-align: center; }
.stats > div { flex: 1; min-width: 0; }
.stats .num { font-size: 20px; line-height: 1.2; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding: 12px 4px 0; }
.chart .col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart .stack { width: 100%; min-height: 0; display: flex; flex-direction: column-reverse;
  border-radius: 6px 6px 0 0; overflow: hidden; }
.chart .seg { flex-basis: 0; min-height: 3px; }
.days { display: flex; gap: 10px; padding: 4px; font-size: 11px; color: var(--muted); }
.days span { flex: 1; text-align: center; }
.days .is-today { color: var(--white); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.app-pill { background: var(--navy-700); color: var(--white); font-weight: 600; font-size: 12px; gap: 6px; }
.app-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.app-ss .dot, .seg.app-ss { background: var(--app-ss); }
.app-dd .dot, .seg.app-dd { background: var(--app-dd); }
.app-ic .dot, .seg.app-ic { background: var(--app-ic); }
.app-ot .dot, .seg.app-ot { background: var(--app-ot); }

.day-head { margin-top: 14px; }
.card.list { padding: 4px 14px; }
.entry, .app-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 52px; padding: 8px 0;
  border-bottom: 1px solid var(--navy-700);
  color: var(--white); text-decoration: none; font-size: 14px;
}
.entry:last-child, .app-row:last-child { border-bottom: 0; }
.entry-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.entry-when { color: var(--muted); }
.entry .num { font-size: 17px; }
.app-row .num { font-size: 22px; white-space: nowrap; }
.app-row .per { font-size: 13px; }
.app-row .small { margin-top: 4px; }
.best { color: var(--gold); font-size: 12px; font-weight: 700; margin-left: 4px; }

.import { margin-top: 14px; }
.import .small { margin-bottom: 10px; }

.apps { border: 0; margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.apps legend { margin-bottom: 6px; }
.app-choice input { position: absolute; opacity: 0; pointer-events: none; }
.app-choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; border-radius: 12px;
  background: var(--navy-700); border: 2px solid transparent;
  font-weight: 600; cursor: pointer;
}
.app-choice input:checked + span { border-color: var(--sunrise); color: var(--sunrise); }
.app-choice input:checked + span::before { content: "✓ "; white-space: pre; }
.app-choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.lbl-extra { opacity: .8; }
.textarea { height: auto; min-height: 72px; padding: 12px 14px; font-size: 16px; font-weight: 400; resize: vertical; }
input[type="date"].input, input[type="time"].input { font-size: 17px; color-scheme: dark; min-width: 0; padding: 0 10px; }
.danger { color: var(--skip); border-color: var(--skip); }
.danger.confirm { background: var(--skip); color: #2B0606; font-weight: 800; }

/* Home */
.card-link { display: block; text-align: right; margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.count { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Today checklist (from the mockup's .check / .box / .sec) */
.checklist { padding: 8px 14px; }
.check-sec { border: 0; }
.check-sec + .check-sec { margin-top: 8px; }
.sec { font-size: 12px; letter-spacing: 1px; color: var(--gold); font-weight: 700; margin: 6px 0 2px; padding: 0; }
.check {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 9px 0;
  border-bottom: 1px solid var(--navy-700);
  font-size: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.check-sec:last-child .check:last-child { border-bottom: 0; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.box {
  width: 24px; height: 24px; flex: none; position: relative;
  border-radius: 6px; border: 2px solid var(--navy-700); background: var(--navy-900);
  transition: background .15s, border-color .15s;
}
.check input:checked + .box { background: var(--sunrise); border-color: var(--sunrise); }
.check input:checked + .box::after {
  content: "✓"; position: absolute; left: 4px; top: -1px;
  font-weight: 800; font-size: 15px; color: var(--white);
}
.check input:checked ~ .check-text { color: var(--muted); text-decoration: line-through; }
.check input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }
.day-done { border-color: var(--good); color: var(--white); text-align: center; font-size: 16px; }
.day-done b { color: var(--good); }

/* More menu (from the mockup's .grid / .gi) */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gi {
  display: block; min-height: 96px;
  background: var(--navy-800); border: 1px solid var(--navy-700); border-radius: 16px;
  padding: 16px 12px; font-size: 15px; font-weight: 600;
  color: var(--white); text-decoration: none;
}
.gi:active { transform: scale(.98); }
.gi-icon { display: block; font-size: 24px; margin-bottom: 8px; }
.story p { font-size: 15px; }

/* Content pages */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-name { font-size: 18px; }
.app-line { font-size: 14px; margin: 4px 0 10px; }
.btn-slim { min-height: 48px; }
.list-head { font-size: 17px; margin-bottom: 6px; }
.list-head.good { color: var(--good); }
.list-head.bad { color: var(--skip); }
.list-plain { list-style: none; counter-reset: n; }
.list-plain li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--navy-700); font-size: 15px; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain li::before { position: absolute; left: 2px; top: 8px; font-weight: 800; }
.checks li::before { content: "✓"; color: var(--good); }
.crosses li::before { content: "✕"; color: var(--skip); }
.numbered li::before { counter-increment: n; content: counter(n) "."; color: var(--gold); }

.copy-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 60px; text-align: left;
  color: var(--white); font: 400 15px var(--font-body); cursor: pointer;
}
.copy-card mark { background: none; color: var(--gold); font-weight: 600; }
.copy-hint { flex: none; font-size: 12px; font-weight: 700; color: var(--sunrise);
  border: 1px solid var(--navy-700); border-radius: 99px; padding: 4px 10px; }
.copy-card.copied { border-color: var(--good); }
.copy-card.copied .copy-hint { color: var(--good); }
.copy-card.copied .copy-hint::before { content: "✓ "; }
.copy-card:active { transform: scale(.99); }

/* 7-day challenge */
.ch { display: flex; gap: 12px; align-items: center; cursor: pointer; position: relative; }
.ch input { position: absolute; opacity: 0; pointer-events: none; }
.ch input:checked + .box { background: var(--sunrise); border-color: var(--sunrise); }
.ch input:checked + .box::after { content: "✓"; position: absolute; left: 4px; top: -1px; font-weight: 800; font-size: 15px; }
.ch input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }
.ch .small { font-size: 13px; margin-top: 2px; }
.ch-done { opacity: .7; }
.ch-now { border-color: var(--sunrise); }
.ch-locked { opacity: .45; cursor: default; }
.ch-lock { width: 24px; text-align: center; flex: none; }
.challenge-preview { margin-top: 8px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px;
  animation: fall linear forwards; }
@keyframes fall { to { top: 105%; transform: rotate(720deg) translateX(40px); } }

/* Best-times planner */
.planner { padding: 12px 10px; }
.pgrid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.pgrid th { font-size: 10px; color: var(--muted); font-weight: 600; }
.pgrid thead th { padding-bottom: 2px; }
.pgrid tbody th { width: 34px; text-align: right; padding-right: 4px; white-space: nowrap; }
.pc { height: 16px; border-radius: 4px; }
.pc-none { background: var(--navy-900); box-shadow: inset 0 0 0 1px var(--navy-700); }
.pc-low { background: #2A3F72; }
.pc-mid { background: var(--sunrise); }
.pc-high { background: var(--gold); }
.pkey { font-size: 11px; color: var(--muted); gap: 10px; }
.pkey span { display: inline-flex; align-items: center; gap: 4px; }
.pkey i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.note-row { align-items: flex-start; }
.note-row .input { flex: 3; }
.add-btn { flex: 1; min-height: 48px; }
.area-notes li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-left: 0; }
.area-notes li::before { content: none; }
.x-btn { flex: none; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }

/* Tax helper */
.seg-choice { border: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.seg-choice legend { width: 100%; }
.seg-choice label { flex: 1; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px;
  background: var(--navy-700); border: 2px solid transparent; font-weight: 600; cursor: pointer; }
.seg-choice input:checked + span { border-color: var(--sunrise); color: var(--sunrise); }
.seg-choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.slider { width: 100%; height: 44px; accent-color: var(--sunrise); margin-bottom: 6px; }
.aside-result { text-align: center; font-size: 18px; font-weight: 600; padding-top: 6px; }
.aside-result .num { display: block; font-size: 46px; line-height: 1.15; }
.mile-result { margin-top: 10px; font-size: 16px; }
.mile-result .num { font-size: 22px; }

/* Car care */
.car-item { padding: 10px 0; border-bottom: 1px solid var(--navy-700); }
.car-item:last-child { border-bottom: 0; }
.car-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.car-item .input { margin-bottom: 0; }
.due-now { color: var(--skip); font-weight: 700; font-size: 14px; }
.due-ok { color: var(--good); font-size: 14px; }
.due-never { color: var(--muted); font-size: 14px; }
.weather li { border-bottom: 0; padding: 4px 0 4px 20px; }
.weather li::before { content: "•"; color: var(--skip); top: 4px; }
.warn p { margin-top: 6px; }
.car-due { display: block; color: var(--white); text-decoration: none; }

/* Settings */
.danger-zone { border-color: rgba(255, 92, 92, .4); }
.about p { font-size: 15px; }
label.btn2 { cursor: pointer; }

/* Install hint */
.install-hint { display: flex; align-items: center; gap: 8px; border-color: var(--sunrise); }
.install-hint a { flex: 1; color: var(--white); text-decoration: none; }
.install-hint b { display: block; margin-bottom: 2px; }

/* Pop-up message */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 14px);
  transform: translate(-50%, 20px);
  width: calc(100% - 32px); max-width: 448px;
  background: var(--good); color: #06281A;
  border-radius: 12px; padding: 12px 16px;
  font-weight: 700; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Bottom tab bar */
.tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--tabs-h) + var(--safe-bottom));
  padding: 8px 4px var(--safe-bottom);
  background: var(--navy-800);
  border-top: 1px solid var(--navy-700);
  display: flex;
  justify-content: space-around;
  z-index: 10;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 48px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tab svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.tab.on { color: var(--sunrise); }
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 10px; }
