:root {
  --bg: #fbf6ee; --bg-2: #f6ead6; --card: #fffdf9; --ink: #2b1d14; --muted: #7a6a5c; --line: #ecdfcc;
  --brand: #b45309; --brand-2: #c2570a; --brand-3: #e8a33d; --teal: #d97706; --brand-soft: #fdebc8;
  --grad: linear-gradient(135deg, #9a3f06 0%, #c2570a 48%, #dd8a1a 100%);
  --warn: #7c5e00; --warn-soft: #fff3bf; --bad: #c81e4b; --bad-soft: #ffe4ea; --info: #4f46e5; --info-soft: #e0e7ff;
  --shadow: 0 1px 2px rgba(60, 35, 10, .05), 0 10px 28px -14px rgba(60, 35, 10, .22);
  --shadow-lg: 0 20px 44px -18px rgba(194, 87, 10, .5);
  --r: 16px; --r-sm: 12px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] { --bg: #17110b; --bg-2: #20170f; --card: #231b12; --ink: #f7ecdc; --muted: #b9a58d; --line: #382c1e;
    --brand: #f0a64a; --brand-2: #c2570a; --brand-soft: #3d2b10; --warn: #f3d36b; --warn-soft: #36300c;
    --bad: #fb7185; --bad-soft: #3d151e; --info: #a5b4fc; --info-soft: #1e2142;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px -14px rgba(0,0,0,.7); --shadow-lg: 0 20px 44px -18px rgba(194,87,10,.45); }* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1200px 500px at 100% -10%, var(--bg-2), transparent 60%), var(--bg); background-attachment: fixed; min-height: 100vh; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; font-weight: 800; } h3 { font-size: 1.05rem; font-weight: 700; }
.center { display: grid; place-items: center; min-height: 60vh; text-align: center; padding: 16px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }

/* header */
.top { position: sticky; top: 0; z-index: 5; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.brand img, .brand svg { width: 36px; height: 36px; object-fit: contain; }
.me { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 2px; }
nav { display: flex; flex-wrap: wrap; gap: 4px; max-width: 1100px; margin: 10px auto 0;
  padding: 4px; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
.bell { position: relative; border: 0; background: transparent; font-size: 1.25rem; line-height: 1; padding: 6px 8px; cursor: pointer; box-shadow: none; }
.badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font: 700 .7rem/18px var(--font); text-align: center; }
.notif { display: block; padding: 10px 12px; margin: 0 -4px; border-radius: 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.notif:hover { background: var(--bg-2); }
.notif.unread { background: var(--brand-soft); border-left: 3px solid var(--brand-2); }
/* schedule tabs, view switcher, everyone's schedule */
.seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 12px; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); max-width: 100%; }
.seg a, .seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 7px; font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg a.on, .seg button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(194,87,10,.8); }
.seg.sm { margin-bottom: 0; } .seg.sm button { padding: 5px 12px; font-size: .85rem; }
.mine { box-shadow: inset 3px 0 0 var(--brand-2); background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.sched td.name.mine { background: color-mix(in srgb, var(--brand-soft) 70%, var(--card)); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .mh { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.mday { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 68px; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; font: inherit; overflow: hidden; box-shadow: none; }
.mday.dim { opacity: .45; } .mday.today { border-color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--brand-2); } .mday.mine { background: var(--brand-soft); }
.mday .dn { font-weight: 800; font-size: .85rem; } .mday .cnt { font-size: .7rem; font-weight: 700; color: var(--brand); } .mday .nm { display: none; font-size: .68rem; color: var(--muted); line-height: 1.25; }
.mday .wk { display: none; } .mday .cnt { font-size: .85rem; }
@media (min-width: 700px) { .mday { min-height: 96px; } .mday .nm { display: block; } .mday .wk { display: inline; } .mday .cnt { font-size: .7rem; } }
.menu { position: relative; }
.menu > button { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 7px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; box-shadow: none; }
.menu > button::after { content: " ▾"; font-size: .75em; }
.menu > button:hover { color: var(--ink); }
.menu > button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(194,87,10,.8); }
.pop { position: absolute; top: calc(100% + 8px); z-index: 30; min-width: 190px; display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; }
nav .pop a { color: var(--ink); padding: 9px 12px; border-radius: 7px; font-size: .92rem; }
nav .pop a:hover { background: var(--bg-2); }
nav .pop a.on { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
nav a { color: var(--muted); text-decoration: none; padding: 7px 14px; border-radius: 7px; white-space: nowrap; font-size: .9rem; font-weight: 600; transition: .15s; }
nav a:hover { color: var(--ink); }
nav a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(194,87,10,.8); }
nav .sep { width: 1px; background: var(--line); margin: 6px 4px; flex: none; }
main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 90px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* surfaces */
.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.page-h h2 { margin: 0; }

/* controls */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: transform .1s, box-shadow .15s, background .15s; }
button:hover { box-shadow: var(--shadow); }
button:active { transform: scale(.97); }
button.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -10px rgba(194,87,10,.9); }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--card); }
button.ghost { border-color: transparent; background: transparent; }
button.big { width: 100%; justify-content: center; padding: 16px; font-size: 1.05rem; border-radius: 10px; }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.link { border: 0; background: none; color: var(--brand); padding: 4px 6px; box-shadow: none; }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 500; color: var(--ink);
  background: var(--bg); border: 1.5px solid transparent; border-radius: var(--r-sm); padding: 10px 12px; transition: .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); background: var(--card); box-shadow: 0 0 0 4px var(--brand-soft); }
input[type=checkbox] { display: inline; width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--brand-2); vertical-align: -3px; }
input[type=time] { min-width: 0; }

/* avatars */
.av { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center;
  font-size: calc(var(--s) * .38); font-weight: 700; color: #fff; background: hsl(var(--h, 160) 55% 45%); box-shadow: 0 0 0 2px var(--card); }
.av-stack { display: flex; } .av-stack .av { margin-left: -8px; } .av-stack .av:first-child { margin-left: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* clock screen */
.hero { position: relative; overflow: hidden; border-radius: 14px; padding: 22px; color: #fff; background: var(--grad); box-shadow: var(--shadow-lg); margin-bottom: 22px; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 55%, rgba(255,255,255,.10) 55%, rgba(255,255,255,.04) 80%, transparent 80%); }

.hero > * { position: relative; z-index: 1; }
.hero .muted { color: rgba(255,255,255,.8); }
.hero .pill { background: rgba(255,255,255,.2); color: #fff; }
.big-time { font-size: 3.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero-shift { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.14); font-weight: 600; font-size: .92rem; }
.clockbtn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; width: 100%; max-width: 460px; height: 120px; margin: 22px auto 18px; border-radius: 12px; border: 0; color: #fff;
  font-size: 1.35rem; font-weight: 800; background: var(--grad); box-shadow: 0 0 0 6px var(--brand-soft), var(--shadow-lg); animation: glow 2.6s ease-in-out infinite; }
.clockbtn.out { background: linear-gradient(135deg, #e11d48, #f97316); box-shadow: 0 0 0 10px var(--bad-soft), 0 18px 40px -16px rgba(225,29,72,.5); animation: none; }
.clockbtn small { display: block; font-size: .8rem; font-weight: 600; opacity: .85; }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 6px var(--brand-soft), var(--shadow-lg); } 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--brand-soft) 50%, transparent), var(--shadow-lg); } }
.actions { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 460px; margin: 0 auto; }

/* pills / banners */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 5px; font-size: .75rem; font-weight: 700; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.banner { border-radius: 8px; padding: 12px 14px; margin: 10px 0; font-weight: 500; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.ok { background: var(--brand-soft); color: var(--brand); }
.banner.info { background: var(--info-soft); color: var(--info); }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* schedule grid */
.sched td { min-width: 98px; vertical-align: top; padding: 8px 5px; }
.sched th { padding: 10px 5px; }
.sched td.name { min-width: 168px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.sched th.today, .sched td.today { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.shift { display: block; width: 100%; text-align: left; padding: 6px 8px; margin-bottom: 4px; border-radius: 6px; font-size: .78rem; font-weight: 700;
  background: color-mix(in srgb, var(--c, #10b981) 16%, var(--card)); border: 0; border-left: 4px solid var(--c, #10b981); color: var(--ink); box-shadow: none; line-height: 1.3; }
.shift .muted { font-weight: 500; }
.shift.draft { background: var(--card); border: 1.5px dashed color-mix(in srgb, var(--c, #10b981) 70%, transparent); border-left-width: 4px; border-left-style: solid; }
.addcell { width: 100%; justify-content: center; padding: 3px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); font-size: .8rem; opacity: .6; box-shadow: none; }
.addcell:hover { opacity: 1; border-color: var(--brand-2); color: var(--brand); }

/* templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tpl { border-top: 5px solid var(--c); display: flex; flex-direction: column; gap: 10px; margin: 0; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day { min-width: 38px; text-align: center; padding: 5px 4px; border-radius: 6px; font-size: .7rem; font-weight: 700; background: var(--bg); color: var(--muted); line-height: 1.2; }
.day.on { background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--ink); }
.day span { display: block; font-weight: 500; font-size: .66rem; opacity: .8; }
.swatches { display: flex; gap: 8px; margin-top: 6px; }
.swatches input { display: none; }
.swatches label { margin: 0; width: 30px; height: 30px; border-radius: 7px; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px var(--card), 0 0 0 2px transparent; transition: .15s; }
.swatches input:checked + label { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--c); }
.dayrow { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.dayrow label { margin: 0; color: var(--ink); font-size: .9rem; }
.dayrow input[type=time] { margin: 0; padding: 8px; }
.picklist { max-height: 260px; overflow: auto; border-radius: var(--r-sm); background: var(--bg); padding: 4px; }
.picklist label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 8px; border-radius: 6px; color: var(--ink); font-size: .92rem; cursor: pointer; }
.picklist label:hover { background: var(--card); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.chips button { padding: 5px 10px; font-size: .78rem; }

/* lists */
.list-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

/* stats */
.stat { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-card { margin: 0; }
.stat-card .muted { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(36, 20, 8, .5); backdrop-filter: blur(4px); z-index: 20; display: grid; place-items: center; padding: 12px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 12px; width: min(540px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); animation: pop .2s ease-out; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
.modal-h h3 { margin: 0; font-size: 1.2rem; }
.modal-b { padding: 10px 20px 20px; }
.x { border: 0; font-size: 1.5rem; padding: 0 8px; background: var(--bg); width: 36px; height: 36px; justify-content: center; }
.photo-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-edit input[type=file] { display: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 8px; z-index: 30; max-width: 90vw; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); animation: pop .2s; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(400px, 100%); text-align: left; }
.login-logo { display: grid; place-items: center; margin-bottom: 18px; }
.login-logo img, .login-logo svg { max-width: 200px; max-height: 170px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 600px) {
  h2 { font-size: 1.3rem; }
  .brand span { display: none; }
  nav { width: 100%; }
}

[hidden] { display: none !important; }

/* ===== EV Recipes additions (same tokens and components as the timeclock) ===== */
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-chips button { padding: 6px 12px; font-size: .85rem; border-radius: 999px; }
.cat-chips button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -8px rgba(194,87,10,.8); }
.cat-chips .n { opacity: .7; font-weight: 500; margin-left: 2px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--brand-3)); flex: none; }
.rcp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rcp { margin: 0; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border-top: 4px solid var(--c, var(--brand-3)); cursor: pointer; transition: transform .1s, box-shadow .15s; }
.rcp:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.rcp b { font-size: 1.02rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rcp .flv { font-size: .82rem; color: var(--muted); }
.rcp.sel { box-shadow: 0 0 0 2px var(--brand-2), var(--shadow); }
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.searchbar input { margin: 0; flex: 1 1 220px; }
.searchbar select { margin: 0; width: auto; flex: 0 0 auto; }
.calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.calc .card { margin-bottom: 14px; }
.calc h3 { display: flex; align-items: center; gap: 8px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.fgrid label { margin-bottom: 0; }
.unit { display: flex; align-items: center; gap: 6px; }
.unit input { margin-top: 5px; }
.unit span { margin-top: 5px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.flrow { display: grid; grid-template-columns: 22px minmax(110px, 2fr) 70px 64px 64px 78px; gap: 8px; align-items: end; margin-bottom: 8px; }
.flrow label { margin: 0; }
.flrow .n { color: var(--muted); font-weight: 700; font-size: .8rem; padding-bottom: 12px; }
.flrow input { padding: 8px 9px; }
.flrow .ck { display: flex; align-items: center; gap: 4px; padding-bottom: 9px; color: var(--ink); font-size: .78rem; white-space: nowrap; }
.flhead { display: grid; grid-template-columns: 22px minmax(110px, 2fr) 70px 64px 64px 78px; gap: 8px; margin-bottom: 4px; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 640px) {
  .flhead { display: none; }
  .flrow { grid-template-columns: 1fr 1fr 1fr; }
  .flrow .n { display: none; }
  .flrow .nm { grid-column: 1 / -1; }
  .flrow .ck { grid-column: 1 / -1; padding-bottom: 0; }
}
.result td, .result th { padding: 8px 6px; }
.result tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
.result td.neg { color: var(--bad); font-weight: 700; }
.result .muted-row td { color: var(--muted); }
.sticky-side { position: sticky; top: 130px; }
@media (max-width: 860px) { .sticky-side { position: static; } }
.imp-row { display: grid; grid-template-columns: 26px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.imp-row:last-child { border-bottom: 0; }
.imp-row select { margin: 0; padding: 7px 9px; }
.imp-row input[type=checkbox] { margin: 0; }
.imp-row .nm { overflow-wrap: anywhere; font-weight: 600; }
@media (max-width: 640px) { .imp-row { grid-template-columns: 26px 1fr; } .imp-row > :nth-child(n+3) { grid-column: 2; } }
.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 28px 16px; text-align: center; color: var(--muted); background: var(--bg); transition: .15s; }
.drop.over { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); }
.drop input { display: none; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cat-item:last-child { border-bottom: 0; }
.cat-item .grow { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.bulkbar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-lg); }
.bulkbar select { margin: 0; width: auto; padding: 8px 10px; }

@media print {
  .top, .page-h button, .page-h a.btn, .bulkbar, #toast, .sticky-side + * { display: none !important; }
  body { background: #fff !important; } .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  input, select, textarea { border: 0 !important; background: transparent !important; padding: 2px 0 !important; }
  .calc { grid-template-columns: 1fr 1fr; } .sticky-side { position: static; }
  #addf, .flhead + * .ck { display: none; }
}
.fgrid { align-items: end; }

/* ===== accent colors for recipes (on top of the shared timeclock palette) ===== */
:root { --flavor: #be185d; --flavor-soft: #fce7f3; --violet: #6d28d9; --violet-soft: #ede9fe; --sky: #0369a1; --sky-soft: #e0f2fe; }
:root[data-theme="dark"] { --flavor: #f9a8d4; --flavor-soft: #3b1527; --violet: #c4b5fd; --violet-soft: #251a45; --sky: #7dd3fc; --sky-soft: #0c2a3d; }
.pill.nic { background: var(--violet-soft); color: var(--violet); }
.pill.ratio { background: var(--sky-soft); color: var(--sky); }
.result tr.flv td:first-child { box-shadow: inset 3px 0 0 var(--flavor); padding-left: 10px; font-weight: 600; }
.result tr.flv td.num:nth-child(4) { color: var(--flavor); font-weight: 700; }
.result tr.muted-row td { color: var(--flavor); font-weight: 600; }

/* ===== category dropdown (replaces the chip row) ===== */
.cat-dd { position: relative; flex: 1 1 100%; }
@media (min-width: 700px) { .cat-dd { flex: 0 0 260px; } }
.cat-dd > button { width: 100%; justify-content: flex-start; gap: 10px; padding: 11px 14px; font-weight: 700; border-radius: 10px; box-shadow: var(--shadow); }
.cat-dd > button::after { content: "▾"; margin-left: auto; color: var(--muted); }
.cat-dd .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-dd .n { margin-left: auto; margin-right: 6px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.cat-dd > button .n { margin-left: 0; }
.cat-dd .pop { left: 0; right: 0; max-height: min(60vh, 420px); overflow-y: auto; padding: 6px; }
.cat-dd .pop .opt { width: 100%; justify-content: flex-start; gap: 10px; border: 0; background: transparent; box-shadow: none; padding: 11px 12px; border-radius: 8px; font-weight: 600; text-align: left; }
.cat-dd .pop .opt:hover { background: var(--bg-2); }
.cat-dd .pop .opt.on { background: var(--brand-soft); color: var(--brand); }


/* ===== EV Recipes theme: warm amber + cream, softer shapes, serif headings (overrides the shared base above) ===== */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.7rem; } h3 { font-size: 1.15rem; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
html, body { background: radial-gradient(1100px 520px at 100% -10%, var(--bg-2), transparent 62%), radial-gradient(800px 400px at -10% 110%, color-mix(in srgb, var(--brand-3) 14%, transparent), transparent 60%), var(--bg); background-attachment: fixed; }
.card { border-radius: 18px; border: 1px solid var(--line); }
button, .btn { border-radius: 999px; padding: 9px 18px; }
button.primary { box-shadow: 0 10px 22px -12px rgba(194, 87, 10, .95); }
button.big { border-radius: 16px; }
button.x { border-radius: 12px; }
nav { border-radius: 999px; padding: 5px; }
nav a, .seg a, .seg button, .menu > button { border-radius: 999px; }
.seg { border-radius: 999px; }
input, select, textarea { border-radius: 12px; background: color-mix(in srgb, var(--bg-2) 70%, var(--card)); }
input:focus, select:focus, textarea:focus { background: var(--card); }
.modal { border-radius: 22px; }
.pill { border-radius: 999px; padding: 3px 10px; }
.banner { border-radius: 14px; }
.toast { border-radius: 999px; }
.rcp { border-top-width: 5px; border-radius: 18px; }
.rcp b { font-family: var(--display); font-size: 1.12rem; font-weight: 700; }
.cat-dd > button { border-radius: 16px; }
.cat-dd .pop { border-radius: 16px; }
.cat-dd .pop .opt { border-radius: 12px; }
.bulkbar { border-radius: 20px; }
.drop { border-radius: 20px; }
.login { border-radius: 24px; }
.result tr.total td { border-top-color: var(--brand-3); }
th { color: var(--muted); }
::selection { background: var(--brand-soft); }
.rcp { border-top-color: var(--c, var(--line)); }

/* ===== production recipe view: the two quick controls ===== */
.quick { padding: 18px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 440px) { .qgrid { grid-template-columns: 1fr; } }
.ql { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.qin { display: flex; align-items: baseline; gap: 8px; padding: 4px 16px; border-radius: 16px; background: color-mix(in srgb, var(--bg-2) 70%, var(--card)); border: 1.5px solid transparent; transition: .15s; }
.qin:focus-within { border-color: var(--brand-2); background: var(--card); box-shadow: 0 0 0 4px var(--brand-soft); }
.qin input { flex: 1; min-width: 0; margin: 0; border: 0; background: transparent; box-shadow: none; padding: 8px 0; font: 800 2.1rem/1.1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.qin input:focus { background: transparent; box-shadow: none; }
.qin span { color: var(--muted); font-weight: 700; font-size: .9rem; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qchips button { min-width: 46px; justify-content: center; padding: 8px 12px; font-size: .95rem; }
.qchips button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px rgba(194, 87, 10, .9); }
#adj { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
@media print { .qchips, #adj .link { display: none !important; } .qin { border: 0; background: transparent; } }
/* ===== Recipe table: alternating row shading so each line is easy to follow ===== */
.result { border-collapse: separate; border-spacing: 0; }
.result th { padding: 8px 12px; }
.result td { padding: 12px; border-bottom: 0; }
.result tr:nth-child(even) td { background: color-mix(in srgb, var(--brand-soft) 70%, var(--card)); }
.result tr:nth-child(odd) td { background: transparent; }
.result tr:nth-child(even) td:first-child { border-radius: 10px 0 0 10px; }
.result tr:nth-child(even) td:last-child { border-radius: 0 10px 10px 0; }
.result tr.total td, .result tr.muted-row td { background: transparent; border-radius: 0; }
.result tr.total td { border-top: 2px solid var(--brand-3); padding-top: 14px; }
.result tr.flv td:first-child { padding-left: 12px; }
.result tr.total td:first-child, .result tr.total td:last-child { border-radius: 0; }
.result tr.flv:nth-child(even) td:first-child { border-radius: 0 0 0 0; }

/* flavor rows: a straight colored bar on the left (a real border, so row rounding can't clip it) and the % cell in the flavor color */
.result tr.flv:nth-child(n) td:first-child { box-shadow: none; border-left: 4px solid var(--flavor); border-radius: 0; padding-left: 12px; }
.result tr.flv td.num:nth-child(4) { color: inherit; font-weight: inherit; }
.result tr.flv td.num:nth-child(3) { color: var(--flavor); font-weight: 700; }
/* every row the same: square shaded rows, and a 4px left edge on all of them (colored on flavors, clear elsewhere) so the text lines up */
.result tr:nth-child(n) td:first-child, .result tr:nth-child(n) td:last-child { border-radius: 0; }
.result tr:nth-child(n) td:first-child { border-left: 4px solid transparent; padding-left: 12px; }
.result tr.flv:nth-child(n) td:first-child { border-left-color: var(--flavor); }
.qnote { margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--muted); }

/* ===== site width and type (overrides above) ===== */
:root { --w: 760px; --display: var(--font); }
#app.wide { --w: 1040px; }
.top-row, nav, main { max-width: var(--w); }
h1, h2, h3, .brand, .rcp b, .qin input { font-family: var(--font); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.1rem; }
.brand { font-weight: 800; font-size: 1.05rem; }
.rcp b { font-size: 1.05rem; font-weight: 700; }
.qin input { font-weight: 800; letter-spacing: -.03em; }

/* ===== recipe table: % on the left, ML highlighted ===== */
.result th.ml, .result td.ml { background-image: linear-gradient(rgba(194, 87, 10, .12), rgba(194, 87, 10, .12)); font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.result th.ml { color: var(--brand-2); }
.result td.pct { color: var(--muted); font-weight: 600; }
.result tr.flv td.pct { color: var(--flavor); font-weight: 700; }
.result tr.flv td.num:nth-child(3), .result tr.flv td.num:nth-child(4) { color: inherit; }
.result tr.flv td.ml { color: var(--ink); font-weight: 800; }
.result tr.total td.pct { color: var(--ink); }
.result tr.total td.ml { color: var(--ink); }
.result td.ml.neg { color: var(--bad); }
.result tr.total td.ml { background-image: linear-gradient(rgba(194, 87, 10, .12), rgba(194, 87, 10, .12)); }

/* the row-shading rules use the background shorthand, so the ML tint needs equal specificity and to come last */
.result tr:nth-child(n) td.ml, .result tr:nth-child(n) th.ml { background-image: linear-gradient(rgba(194, 87, 10, .13), rgba(194, 87, 10, .13)); }

/* ===== tap an ingredient row to check it off (light gray) ===== */
:root { --done: #e2e2e2; }
:root[data-theme="dark"] { --done: #3d3a36; }
#res tr:not(.total) { cursor: pointer; user-select: none; -webkit-user-select: none; }
#res tr:first-child { cursor: default; }
.result tr.done:nth-child(n) td, .result tr.done:nth-child(n) td.ml { background-color: var(--done); background-image: none; }
.result tr.done:nth-child(n) td { transition: background-color .12s; }
/* checked rows: text and the flavor bar fade to gray too */
:root { --done-ink: #9c9c9c; --done-bar: #bdbdbd; }
:root[data-theme="dark"] { --done-ink: #8c877f; --done-bar: #6a655e; }
.result tr.done:nth-child(n) td, .result tr.done:nth-child(n) td.pct, .result tr.done:nth-child(n) td.ml, .result tr.done:nth-child(n) td.num { color: var(--done-ink); }
.result tr.flv.done:nth-child(n) td:first-child { border-left-color: var(--done-bar); }
/* ===== paint splat behind the logo ===== */
:root { --splat: #fbe0b0; --splat-2: #f2c27c; }
:root[data-theme="dark"] { --splat: #4d3516; --splat-2: #35240e; }
.logo-wrap { position: relative; display: inline-grid; place-items: center; isolation: isolate; flex: none; }
.logo-wrap .splat { position: absolute; left: 50%; top: 50%; width: 175%; aspect-ratio: 1; height: auto; transform: translate(-50%, -50%) rotate(-8deg); z-index: -1; pointer-events: none; overflow: visible; }
.logo-wrap .splat .s1 { fill: var(--splat); }
.logo-wrap .splat .s2 { fill: var(--splat-2); }
.brand .logo-wrap { width: 36px; height: 36px; }
.brand .logo-wrap .splat { width: 170%; }
.login-logo .logo-wrap .splat { width: 150%; }
.login-logo { padding: 8px 0; }
.brand { gap: 14px; }
.brand .logo-wrap .splat { width: 148%; transform: translate(-50%, -50%) rotate(-8deg) translateX(-2%); }
