/* JAYCO theme: white, Ferrari red, charcoal. */
:root {
  --bg: #ffffff; --panel: #ffffff; --soft: #f5f5f5; --ink: #222426; --muted: #5f6366; --line: #e2e3e4;
  --red: #d40000; --red-ink: #ffffff; --char: #222426;
  --ok: #2e7d4f; --okbg: #e6f2ea; --warn: #a86400; --warnbg: #fbf1df; --bad: #c40000; --badbg: #fde6e6;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", "Noto Sans Gujarati", "Noto Sans Devanagari", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1d1f; --panel: #26282a; --soft: #2e3033; --ink: #f2f2f2; --muted: #a3a6a9; --line: #3a3c3f;
    --red: #e01010; --ok: #6cc792; --okbg: #1f3328; --warn: #e6b04f; --warnbg: #3a2e14; --bad: #ff6a6a; --badbg: #3e1a1a; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
body { padding-bottom: env(safe-area-inset-bottom, 0px); }
h1, h2 { font-family: var(--display); margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.3rem; }
a { color: var(--red); }
.bar { background: var(--red); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); position: sticky; top: 0; z-index: 5; }
.bar-logo { height: 22px; width: auto; display: block; }
.bar-right { display: flex; gap: 12px; align-items: center; font-size: .85rem; }
.demo { background: var(--warnbg); color: var(--warn); font-size: .82rem; padding: 6px max(16px, env(safe-area-inset-left, 0px)); }
.pad { padding: 20px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); max-width: 520px; margin: 0 auto; }
.pad.wide { max-width: 1240px; display: flex; flex-direction: column; gap: 18px; }
.narrow { max-width: 400px; } .narrowish { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; } .grow { flex: 1; } .qty { width: 110px; }
.center { text-align: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tag { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.note { font-size: .84rem; color: var(--muted); }
.muted { color: var(--muted); }
.err { color: var(--bad); }
.big { font-family: var(--mono); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.pill { font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; display: inline-block; white-space: nowrap; }
.pill.ok { background: var(--okbg); color: var(--ok); } .pill.warn { background: var(--warnbg); color: var(--warn); } .pill.bad { background: var(--badbg); color: var(--bad); }
.btn { font: 600 1.02rem var(--body); border: 0; border-radius: 12px; padding: 15px; background: var(--red); color: var(--red-ink); cursor: pointer; width: 100%; }
.btn.small { width: auto; padding: 9px 16px; font-size: .9rem; border-radius: 9px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--char); }
@media (prefers-color-scheme: dark) { .btn.ghost { border-color: var(--muted); } }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--red); font: inherit; font-size: .9rem; cursor: pointer; padding: 4px; text-decoration: underline; }
.link.light { color: #fff; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; width: 100%; min-width: 0; }
textarea { min-height: 80px; resize: vertical; }
.langs { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 500 .95rem var(--body); border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--red); background: var(--badbg); }
.shifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shifts button { font: 500 .82rem var(--body); background: var(--panel); color: var(--ink); border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 4px; cursor: pointer; }
.shifts button b { display: block; font-family: var(--display); font-size: 1.05rem; }
.shifts button[aria-pressed="true"] { border-color: var(--red); background: var(--badbg); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 480px; border-radius: 18px 18px 0 0; padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; max-height: 95vh; overflow: auto; }
.wide-sheet { max-width: 760px; }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 18px; } }
.cam { position: relative; aspect-ratio: 3/4; max-width: 100%; background: #000; border-radius: 14px; overflow: hidden; }
.cam video, .cam canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam video { transform: scaleX(-1); }
.oval { position: absolute; inset: 12% 18% 22%; border: 3px dashed rgba(255,255,255,.8); border-radius: 50%; pointer-events: none; }
.cam canvas:not([hidden]) ~ .oval { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--char); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 30; max-width: 90vw; font-size: .92rem; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--soft); }
.tabs button { font: 600 .92rem var(--body); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.kpi b { font-family: var(--mono); font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .78rem; color: var(--muted); }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 9px 10px; border-bottom: 1.5px solid var(--line); background: var(--soft); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.num, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td .in { padding: 6px 8px; font-size: .86rem; min-width: 90px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; background: var(--soft); align-self: flex-start; }
.switch button { font: 600 .9rem var(--body); border: 0; border-radius: 999px; padding: 8px 18px; background: transparent; color: var(--muted); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--red); color: #fff; }
.selfies { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.selfies figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.selfies img, .noimg { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; background: var(--soft); }
.noimg { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.list { margin: 0; padding-left: 18px; }
html:not([lang="en"]) .tag { font-family: var(--body); letter-spacing: 0; font-size: .8rem; }
#af > * { flex: 1 1 160px; width: auto; }
#af > .btn { flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.avatar { width: 72px; aspect-ratio: 3/4; border-radius: 10px; background: var(--soft); overflow: hidden; flex: none; border: 1px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 110px; margin: 0 auto; }
.pending-row td { background: var(--warnbg); }

/* ---------- Worker app look (v2): red hero, soft cards, sharp SVG icons, bottom tabs ---------- */
:root { --wkbg: #f3f4f6; --shadow: 0 1px 2px rgba(20,20,25,.06), 0 6px 18px rgba(20,20,25,.07); --red-2: #a30000; }
@media (prefers-color-scheme: dark) { :root { --wkbg: #141516; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); --red-2: #8f0000; } }
body.wk { background: var(--wkbg); }
.ic { width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; } .ic.lg { width: 30px; height: 30px; } .ic.xl { width: 46px; height: 46px; }
.wk .bar { background: linear-gradient(180deg, var(--red), var(--red)); box-shadow: none; }
.iconbtn { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.iconbtn:active { transform: scale(.96); }
.wkmain { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); padding-top: 0; }
.hero { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 6px 20px 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #ff3b3b 0%, var(--red) 45%, var(--red-2) 100%); border-radius: 0 0 26px 26px; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { color: #fff; font-size: 2rem; letter-spacing: .01em; }
.hero-row { display: flex; gap: 14px; align-items: center; }
.hero-hi { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; opacity: .85; }
.hero-sub { font-size: .9rem; opacity: .9; }
.hero-av { width: 64px; border: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.15); display: grid; place-items: center; color: #fff; border-radius: 16px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-l { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.16); color: #fff; padding: 6px 11px; border-radius: 999px; font-size: .84rem; font-weight: 500; text-decoration: none; backdrop-filter: blur(4px); }
.wk .card { border: 0; border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.wk .hero + * { margin-top: -6px; }
.wk .btn { border-radius: 16px; padding: 17px; font-size: 1.05rem; box-shadow: 0 8px 18px rgba(212,0,0,.25); }
.wk .btn.ghost, .wk .btn.small { box-shadow: none; }
.wk .btn:disabled { box-shadow: none; }
.btn-ic { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rico { width: 38px; height: 38px; border-radius: 12px; background: var(--badbg); color: var(--red); display: grid; place-items: center; flex: none; }
.rico .ic { width: 20px; height: 20px; }
.big-ico { width: 52px; height: 52px; border-radius: 16px; } .big-ico .ic { width: 28px; height: 28px; }
.shiftfix { flex-direction: row; align-items: center; gap: 14px; }
.pagehead { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.pagehead > .ic { color: var(--red); background: var(--badbg); padding: 10px; width: 50px; height: 50px; border-radius: 16px; }
.paycard { background: linear-gradient(135deg, var(--char), #3a3d40); color: #fff; }
.paycard .tag, .paycard .note { color: rgba(255,255,255,.75); }
.paybig { font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.06);
  padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
.tabbar button { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font: 600 .72rem var(--body); cursor: pointer; border-radius: 12px; }
.tabbar button[aria-current="page"] { color: var(--red); background: var(--badbg); }
.tabbar .ic { width: 24px; height: 24px; }
@media (min-width: 700px) { .tabbar { max-width: 520px; margin: 0 auto 12px; border-radius: 20px; border: 1px solid var(--line); bottom: 0; } }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; line-height: 1.45; }
.rulesbox { max-height: 300px; overflow: auto; padding-right: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 12px; }
.tick { flex-direction: row; align-items: flex-start; gap: 10px; font-size: .98rem; color: var(--ink); font-weight: 600; cursor: pointer; }
.tick input { width: 24px; height: 24px; flex: none; accent-color: var(--red); margin: 0; }
fieldset.card { margin: 0; } fieldset.card legend { padding: 0 4px; }
.tour-modal { align-items: center; padding: 16px; }
.tour { border-radius: 24px; align-items: center; text-align: center; padding: 28px 22px; gap: 10px; max-width: 400px; }
.tour h2 { font-size: 1.7rem; } .tour p { margin: 0; color: var(--muted); font-size: 1rem; }
.tour-ic { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; color: #fff; margin-bottom: 6px;
  background: radial-gradient(120% 120% at 100% 0%, #ff3b3b, var(--red) 50%, var(--red-2)); box-shadow: 0 12px 26px rgba(212,0,0,.35); }
.dots { display: flex; gap: 6px; margin: 8px 0 6px; } .dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line); transition: width .2s; }
.dots i.on { width: 22px; background: var(--red); }
.tour .btn { width: 100%; }
.wk .shifts button { border-radius: 14px; padding: 12px 4px; }
.wk .pill .ic { vertical-align: -3px; }
