/* Hours — design system. Tokens lifted from the .dc.html mockups:
   Fredoka (logo/headings) + Nunito (body), nardo-grey bg, baby-blue accent,
   dark-teal earnings cards, amber/orange weekend+OT, green logged. */

:root {
  --bg: #e8e7e3;            /* light nardo grey */
  --bg-2: #e0dfda;
  --surface: #ffffff;
  --surface-2: #f2f1ee;    /* input / inset */
  --surface-3: #f6f6f3;
  --line: #e4e4e0;
  --line-2: #d8d8d4;

  --ink: #1a1a1a;
  --ink-2: #6f6f69;        /* muted label */
  --ink-3: #9c9c96;        /* placeholder / faint */

  --blue: #4faee0;         /* baby blue — primary */
  --blue-press: #3f9fd6;
  --blue-tint: #eaf6fc;
  --blue-ink: #2f7da6;

  --teal: #1d2b33;         /* dark teal/charcoal earnings card */
  --teal-2: #243843;

  --amber: #c98a1e;        /* OT */
  --amber-tint: #fbf3e2;
  --orange: #e0633f;       /* weekend / OD */
  --orange-tint: #fdefea;

  --green: #34a36b;        /* logged */
  --green-press: #2c8c5b;
  --green-tint: #e6f6ec;

  --r-card: 24px;
  --r-field: 15px;
  --r-pill: 9999px;
  --r-sheet: 34px;

  --shadow-card: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.06);
  --shadow-blue: 0 8px 28px rgba(79,174,224,.45);
  --shadow-sheet: 0 -12px 40px rgba(20,20,20,.18);

  --maxw: 480px;
  --nav-h: 76px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
a { color: var(--blue-ink); text-decoration: none; }

/* ── App shell ─────────────────────────────────────────────────────────── */
#app { min-height: 100%; }
.screen {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.screen--nav .scroll { padding-bottom: calc(var(--nav-h) + 24px); }
.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 24px;
  -webkit-overflow-scrolling: touch;
}
.safe-top { padding-top: max(14px, env(safe-area-inset-top)); }

/* ── Typography ────────────────────────────────────────────────────────── */
.fredoka { font-family: 'Fredoka', sans-serif; }
h1.page { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 30px; margin: 4px 0 18px; letter-spacing: -.5px; }
.logo {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  color: var(--blue); font-size: 64px; line-height: 1; letter-spacing: -1px;
  text-align: center;
}
.subtitle { text-align: center; letter-spacing: 3px; font-weight: 800; font-size: 13px;
  color: var(--ink-3); text-transform: uppercase; margin-top: 6px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.label { font-size: 13px; font-weight: 800; color: var(--ink-2); margin: 0 0 8px 2px; }
.section-title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 19px; margin: 22px 2px 12px; display:flex; align-items:center; justify-content: space-between; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-row { display: flex; align-items: center; gap: 12px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 17px 20px; border-radius: var(--r-pill);
  font-weight: 800; font-size: 17px; transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn--primary:disabled { background: var(--line-2); color: var(--ink-3); box-shadow: none; }
.btn--green { background: var(--green); color: #fff; }
.btn--ghost { background: var(--surface-2); color: var(--ink); box-shadow: none; }
.btn--text { background: none; color: var(--blue-ink); width: auto; padding: 10px; font-weight: 800; }
.link { color: var(--blue-ink); font-weight: 800; }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.field { position: relative; margin-bottom: 16px; }
.input {
  width: 100%; padding: 16px 16px; border-radius: var(--r-field);
  background: var(--surface-2); border: 1.5px solid transparent;
  font-size: 16px; font-weight: 600; color: var(--ink); outline: none;
}
.input::placeholder { color: var(--ink-3); font-weight: 600; }
.input:focus { border-color: var(--blue); background: #fff; }
.input--icon { padding-right: 50px; }
.input-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-3); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
.help-text { font-size: 12.5px; color: var(--ink-3); margin: 6px 2px 0; font-weight: 700; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input--money { padding-left: 30px; }
.money-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-2); font-weight: 800; }

/* dropdown-style selector */
.select-fake {
  width: 100%; padding: 16px; border-radius: var(--r-field); background: var(--surface-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 16px; font-weight: 700; color: var(--ink);
}
.select-fake.placeholder { color: var(--ink-3); }
.select-fake .chev { color: var(--ink-3); }

/* disabled / greyed fields before ticket chosen */
.is-disabled { opacity: .5; pointer-events: none; filter: grayscale(.2); }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: .2px; }
.badge--blue { background: var(--blue-tint); color: var(--blue-ink); }
.badge--amber { background: var(--amber-tint); color: var(--amber); }
.badge--orange { background: var(--orange-tint); color: var(--orange); }
.badge--green { background: var(--green-tint); color: var(--green-press); }
.badge--grey { background: var(--surface-2); color: var(--ink-2); }

/* prefix avatar circle (PR/BF/OD/I) */
.prefix { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px; flex: none; }
.prefix--PR { background: var(--blue-tint); color: var(--blue-ink); }
.prefix--BF { background: var(--amber-tint); color: var(--amber); }
.prefix--OD { background: var(--orange-tint); color: var(--orange); }
.prefix--I  { background: var(--green-tint); color: var(--green-press); }
.prefix--X  { background: var(--surface-2); color: var(--ink-2); }

/* avatar initials */
.avatar { width: 48px; height: 48px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: var(--blue); color: #fff; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 18px; flex: none; }
.avatar--lg { width: 64px; height: 64px; font-size: 24px; border-radius: 22px; }

/* ── Earnings / teal cards ─────────────────────────────────────────────── */
.teal-card { background: var(--teal); color: #fff; border-radius: 20px; padding: 18px; }
.teal-card .big { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 34px; }
.blue-card { background: var(--blue); color: #fff; border-radius: var(--r-card); padding: 20px;
  box-shadow: var(--shadow-blue); }
.blue-card .big { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 40px; line-height: 1.05; }

/* stat trio */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: 18px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow-card); }
.stat .n { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 24px; }
.stat .k { font-size: 12px; color: var(--ink-2); font-weight: 800; margin-top: 2px; }
.stat--teal { background: var(--teal); color: #fff; }
.stat--teal .k { color: #9fd0e6; }

/* list rows */
.row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface);
  border-radius: 18px; box-shadow: var(--shadow-card); width: 100%; text-align: left;
}
.row + .row { margin-top: 10px; }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t2 { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row .chev { color: var(--ink-3); flex: none; }
.amount-pos { color: var(--green-press); font-weight: 800; font-family: 'Fredoka', sans-serif; }

/* live dot */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--green-press); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,163,107,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,163,107,.5)} 70%{box-shadow:0 0 0 8px rgba(52,163,107,0)} 100%{box-shadow:0 0 0 0 rgba(52,163,107,0)} }

/* ── Bottom nav ────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: var(--maxw);
  height: var(--nav-h); background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom); z-index: 40;
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 11px; font-weight: 800; }
.nav-item.active { color: var(--blue); }
.nav-item svg { width: 24px; height: 24px; }

/* ── Bottom sheet ──────────────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20,20,20,.42); opacity: 0; transition: opacity .25s ease; z-index: 50; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(100%); bottom: 0; width: 100%; max-width: var(--maxw);
  background: var(--surface); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-sheet); z-index: 51; transition: transform .28s cubic-bezier(.22,1,.36,1);
  max-height: 82vh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom);
}
.sheet.show { transform: translateX(-50%) translateY(0); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 12px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 12px; }
.sheet-title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 20px; }
.sheet-body { overflow-y: auto; padding: 4px 16px 20px; }

/* ── Scroll wheel picker ───────────────────────────────────────────────── */
.wheel { position: relative; height: 220px; overflow: hidden; margin: 6px 0 4px; }
.wheel::before, .wheel::after { content: ''; position: absolute; left: 0; right: 0; height: 88px; pointer-events: none; z-index: 2; }
.wheel::before { top: 0; background: linear-gradient(var(--surface), rgba(255,255,255,0)); }
.wheel::after { bottom: 0; background: linear-gradient(rgba(255,255,255,0), var(--surface)); }
.wheel-center { position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%); height: 44px;
  background: var(--surface-2); border-radius: 12px; z-index: 0; }
.wheel-track { position: absolute; left: 0; right: 0; top: 0; overflow-y: scroll; height: 100%; scroll-snap-type: y mandatory;
  z-index: 1; scrollbar-width: none; -ms-overflow-style: none; }
.wheel-track::-webkit-scrollbar { display: none; }
.wheel-pad { height: 88px; }
.wheel-opt { height: 44px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center;
  font-size: 20px; font-weight: 700; color: var(--ink-3); transition: color .12s, font-size .12s; }
.wheel-opt.sel { color: var(--ink); font-size: 23px; font-weight: 800; }

/* ── Calendar ──────────────────────────────────────────────────────────── */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 12px; }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-card);
  display: grid; place-items: center; }
.cal-title { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 20px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-3); padding: 4px 0 8px; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; border-radius: 50%; font-weight: 700; font-size: 15px; }
.cal-cell.dim { color: var(--ink-3); opacity: .45; }
.cal-cell.today { color: #fff; }
.cal-cell.today .num { background: var(--blue); color: #fff; }
.cal-cell.selected .num { box-shadow: 0 0 0 2px var(--blue); }
.cal-cell .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.cal-cell.weekend .ot { position: absolute; top: 1px; right: 6px; font-size: 8px; font-weight: 900; color: var(--orange); }
.cal-dots { display: flex; gap: 3px; height: 6px; margin-top: 1px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; }
.cal-dot.s { background: var(--blue); }
.cal-dot.l { background: var(--green); }
.legend { display: flex; gap: 16px; margin: 14px 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ── Toast ─────────────────────────────────────────────────────────────── */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 14px); display: flex; justify-content: center; z-index: 80; pointer-events: none; }
.toast { background: var(--teal); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-sheet); opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 90%; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--orange); }

/* ── Success confirmation ──────────────────────────────────────────────── */
.confirm { text-align: center; padding: 30px 8px; }
.confirm .check { width: 72px; height: 72px; border-radius: 50%; background: var(--green-tint); color: var(--green);
  display: grid; place-items: center; margin: 0 auto 18px; }
.confirm h2 { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.confirm .earn { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 40px; color: var(--green-press); margin: 14px 0; }

/* ── Accordion (help) ──────────────────────────────────────────────────── */
.acc { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); margin-bottom: 10px; overflow: hidden; }
.acc-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; font-weight: 800; font-size: 15px; width: 100%; text-align: left; }
.acc-a { padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; color: var(--ink-2); font-weight: 600; line-height: 1.55; font-size: 14px; }
.acc.open .acc-a { max-height: 300px; padding: 0 16px 16px; }
.acc.open .acc-q .chev { transform: rotate(180deg); }
.acc-q .chev { transition: transform .25s; color: var(--ink-3); }

/* ── Greeting / dashboard header ───────────────────────────────────────── */
.greet { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.greet .g1 { font-size: 14px; color: var(--ink-2); font-weight: 800; }
.greet .g2 { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 24px; line-height: 1.1; }

.spacer-sm { height: 8px; }
.center { text-align: center; }
.hide { display: none !important; }

/* spinner */
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--blue); animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--ink-3); padding: 30px 16px; font-weight: 700; }
