/* Kitti Gutierrez — CRM & inventory
   Typographic and airy: text-labelled controls, hairline rules, no decorative icons.
   Type is Montserrat, as on lifewave.com. Colour comes from the light photographs
   (light/*.webp): sky blue for actions, with their white-to-gold glow for highlights. */
:root {
  --bg: #F4F9FD;
  --surface: #FFFFFF;
  --tint: #EAF3FA;
  --rule: #DCE7F0;
  --rule-strong: #C2D3E1;
  --ink: #26323A;
  --ink-2: #4A5A66;
  --muted: #74838F;
  --faint: #A3B1BC;
  --brand: #1478BE;
  --brand-hover: #0F639E;
  --brand-tint: #E6F3FC;
  --glow: linear-gradient(100deg, #1C8FDC 0%, #74BDF0 34%, #F6D58E 70%, #EDA545 100%);
  --hot: #E5603F;
  --warm: #E9A23B;
  --cold: #2C98DC;
  --dnc: #6F7C86;
  --c-received: #1F8AD6;
  --c-given: #D9608F;
  --c-removed: #E3953A;
  --c-adjusted: #74838F;
  --ok: #2B8A62;
  --err: #C2362A;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  /* Figures use Montserrat's tabular numerals rather than a separate monospace face. */
  --mono: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

/* ---------------- Frame: top bar with text navigation ---------------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--rule); }
.bar-in { max-width: 1320px; margin: 0 auto; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 28px; }
@media (min-width: 1024px) { .bar-in { padding: 0 32px; } }
.mark { flex: none; text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.mark span { font-weight: 400; color: var(--muted); letter-spacing: .08em; margin-left: 8px; }
.nav { display: none; align-self: stretch; gap: 24px; }
.nav a { position: relative; display: flex; align-items: center; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); font-weight: 500; }
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); }
.nav .n { margin-left: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--brand); }
.bar .grow { flex: 1; }
.find { display: none; width: 240px; }
.bar-actions { display: none; gap: 8px; }
.mob-only { display: inline-flex; }
@media (min-width: 1024px) { .nav, .find, .bar-actions { display: flex; } .mob-only { display: none; } }
.mob-links { display: flex; gap: 14px; margin-left: auto; }
.mob-links a, .mob-links button { border: 0; background: none; padding: 0; font-size: 14px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
@media (min-width: 1024px) { .mob-links { display: none; } }

.main { max-width: 1320px; margin: 0 auto; padding: 24px 16px 96px; }
@media (min-width: 1024px) { .main { padding: 32px 32px 64px; } }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 1024px) { .tabbar { display: none; } }
.tabbar a { position: relative; display: grid; place-items: center; height: 52px; font-size: 13px; color: var(--muted); text-decoration: none; }
.tabbar a.on { color: var(--ink); font-weight: 500; }
.tabbar a.on::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; background: var(--brand); }

/* ---------------- Controls ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: 3px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .1s, border-color .1s, color .1s;
}
.btn:hover { background: var(--tint); border-color: #A9BFD0; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #3A4852; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.link { border: 0; background: none; padding: 0; font-size: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--ink); text-decoration-color: var(--ink); }
.link.danger { color: var(--err); text-decoration-color: rgba(194, 54, 42, .35); }
.link.quiet { text-decoration: none; color: var(--muted); }
.link.quiet:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 1023px) { .btn { height: 40px; } .btn.sm { height: 34px; } }

.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: 3px; background: #fff;
  font-size: 16px; color: var(--ink); transition: border-color .1s, box-shadow .1s;
}
@media (min-width: 1024px) { .input, select.input, textarea.input { height: 34px; font-size: 14px; } }
textarea.input { height: auto; min-height: 76px; padding: 8px 10px; line-height: 1.5; resize: vertical; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input.invalid { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field small { font-size: 12px; color: var(--muted); }
.row2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr 1fr; } }

/* Segmented text control */
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-left: 1px solid var(--rule-strong); background: #fff; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--tint); }
.seg button.on { background: var(--ink); color: #fff; }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 1023px) { .seg button { height: 36px; } }

/* Checkbox */
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; user-select: none; }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--rule-strong); border-radius: 2px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }

/* Tags (health concerns, filters) */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: 3px; background: #fff; font-size: 13px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.tag:hover { border-color: var(--ink-2); color: var(--ink); }
.tag.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag .n { margin-left: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.tag.on .n { color: #C9D8E4; }
.tag-add { width: 110px; height: 28px; padding: 0 8px; border: 1px dashed var(--rule-strong); border-radius: 3px; font-size: 13px; background: transparent; }
.tag-add:focus { outline: none; border-style: solid; border-color: var(--ink); }

/* Status markers: a small square + text, never colour alone */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; background: var(--c, var(--faint)); }
.st.hot { --c: var(--hot); } .st.warm { --c: var(--warm); } .st.cold { --c: var(--cold); } .st.none { --c: transparent; box-shadow: none; }
.st.none::before { border: 1px solid var(--rule-strong); }
.st.dnc { --c: var(--dnc); color: var(--dnc); }
.st.ok { --c: var(--ok); } .st.low { --c: var(--c-removed); } .st.out { --c: var(--err); color: var(--err); }
button.st { border: 0; background: none; padding: 2px 4px; margin: -2px -4px; border-radius: 2px; cursor: pointer; }
button.st:hover { background: var(--tint); }
.pkg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.pkg::before { content: ""; width: 3px; height: 14px; background: var(--pkg, var(--brand)); }

/* ---------------- Page structure ---------------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.head h1 { font-size: 26px; font-weight: 500; letter-spacing: -.015em; line-height: 1.2; }
.head .sub { margin-top: 6px; color: var(--muted); }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { display: inline-block; margin-bottom: 8px; font-size: 13px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.subnav { display: flex; gap: 22px; margin: -8px 0 24px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.subnav a { position: relative; padding: 10px 0 12px; font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.subnav a.on { color: var(--ink); font-weight: 500; }
.subnav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

.sec { margin-top: 36px; }
.sec:first-child { margin-top: 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 0; border-bottom: 1px solid var(--ink); }
.sec-h h2 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sec-h .aside { font-size: 13px; color: var(--muted); }
.sec-h a { font-size: 13px; color: var(--ink-2); }
.sec-b { padding-top: 14px; }
.cols { display: grid; gap: 36px 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .cols.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols.c21 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } .cols.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cols > .sec { margin-top: 0; }
.cols + .sec, .sec + .cols, .cols + .cols { margin-top: 36px; }
.empty { padding: 28px 0; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-weight: 500; }

/* Figures strip */
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .figs { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); } }
.fig { display: block; padding: 14px 16px 16px 0; text-decoration: none; color: var(--ink); min-width: 0; }
.fig + .fig { padding-left: 16px; border-left: 1px solid var(--rule); }
@media (max-width: 759px) { .fig { padding: 12px 12px 14px 0; border-left: 0 !important; } .fig:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule) !important; } .fig:nth-child(n+3) { border-top: 1px solid var(--rule); } }
a.fig:hover .fig-v { color: var(--brand); }
.fig-l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig-l i { width: 8px; height: 8px; flex: none; background: var(--c); }
.fig-v { margin-top: 6px; font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.fig-v small { margin-left: 6px; font-family: var(--sans); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.fig-f { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.fig-f .up { color: var(--ok); } .fig-f .down { color: var(--err); }

/* Statement (inventory) */
.statement { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 3px solid var(--ink); background: var(--surface); border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .statement { grid-template-columns: minmax(240px, .8fr) minmax(0, 2fr); } }
.st-total { padding: 20px 20px 22px 0; }
.st-total .fig-v { font-size: 56px; letter-spacing: -.05em; margin-top: 10px; }
.st-total p { margin-top: 8px; color: var(--muted); }
.st-total .flags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13px; }
.ledger { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lg { position: relative; padding: 20px 14px 18px; border-left: 1px solid var(--rule); text-decoration: none; color: var(--ink); min-width: 0; }
a.lg:hover .fig-v { color: var(--brand); }
.lg .op { position: absolute; left: -8px; top: 22px; width: 15px; height: 18px; display: grid; place-items: center; background: var(--surface); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.lg .fig-v { font-size: 26px; margin-top: 8px; }
.lg.total { background: var(--tint); }
@media (max-width: 899px) {
  .st-total { padding: 18px 0; border-bottom: 1px solid var(--rule); }
  .ledger { grid-template-columns: 1fr; }
  .lg { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 8px; padding: 10px 0; border-left: 0; border-top: 1px dotted var(--rule-strong); }
  .lg:first-child { border-top: 0; }
  .lg .op { position: static; width: auto; height: auto; background: none; }
  .lg .fig-v { margin: 0; font-size: 18px; grid-column: 3; grid-row: 1; }
  .lg .fig-f { grid-column: 2 / 4; margin: 0; }
  .lg.total { background: none; border-top: 1px solid var(--ink); }
}

/* Tables */
.tbl { width: 100%; }
.tr { display: grid; grid-template-columns: var(--cols); gap: 16px; align-items: center; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.thead .tr { min-height: 34px; padding: 0; font-size: 12px; color: var(--muted); }
.tbody .tr.go { cursor: pointer; }
.tbody .tr.go:hover { background: linear-gradient(90deg, transparent, var(--tint) 2%, var(--tint) 98%, transparent); }
.td { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td.r { text-align: right; justify-self: end; }
.td.n { font-family: var(--mono); letter-spacing: -.01em; }
.td.b { font-weight: 500; }
.td .sub { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.td a { text-decoration: none; } .td a:hover { text-decoration: underline; }
.tr.dim .td.b { color: var(--muted); }
.row-act { display: flex; justify-content: flex-end; gap: 14px; opacity: 0; transition: opacity .1s; font-size: 13px; }
.tr:hover .row-act, .tr:focus-within .row-act { opacity: 1; }
@media (hover: none) { .row-act { opacity: 1; } }
.bar-cell { display: flex; align-items: center; gap: 10px; }
.bar-cell .track { flex: 1; height: 6px; background: var(--tint); min-width: 40px; position: relative; }
.bar-cell .track span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--ink-2)); }
.bar-cell .track em { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--ink); }
.bar-cell b { min-width: 30px; text-align: right; font-family: var(--mono); font-weight: 500; }
@media (max-width: 759px) {
  .thead { display: none; }
  .tbody .tr { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 12px 0; }
  .tbody .td { grid-column: 1; }
  .tbody .td.m { grid-column: 2; grid-row: 1 / span 3; align-self: center; text-align: right; }
  .hs { display: none !important; }
}

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .search { width: 280px; max-width: 100%; }
@media (max-width: 759px) { .toolbar .search { width: 100%; } }

/* Charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; background: var(--c); }
.legend b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.chart { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; margin-top: 16px; }
.ch-y { position: relative; font-family: var(--mono); font-size: 11px; color: var(--faint); text-align: right; }
.ch-y span { position: absolute; right: 0; transform: translateY(-50%); }
.ch-plot { position: relative; height: 200px; }
.ch-gl { position: absolute; left: 0; right: 0; border-top: 1px solid #E6EEF5; }
.ch-gl.base { border-top-color: var(--ink-2); }
.ch-cols { position: absolute; inset: 0; display: flex; gap: 3px; }
.ch-col { position: relative; flex: 1; }
.ch-col:hover { background: rgba(30, 50, 70, .03); }
.ch-seg { position: absolute; left: 18%; right: 18%; background: var(--c, var(--ink-2)); min-height: 2px; outline: none; }
.ch-seg:hover, .ch-seg:focus { filter: brightness(.85); }
.ch-x { grid-column: 2; display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.ch-side { position: absolute; left: 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.comp { display: flex; height: 14px; gap: 2px; margin: 14px 0 12px; }
.comp a { display: block; background: var(--c); min-width: 2px; }
.comp a:hover { filter: brightness(.88); }

/* Follow-up list */
.todo { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.todo b { font-family: var(--mono); font-size: 18px; font-weight: 500; }
.todo span:last-child { font-size: 13px; color: var(--muted); }
.todo:hover span:last-child { color: var(--ink); text-decoration: underline; }

/* Entries grouped by day (activity, movements) */
.day { display: flex; justify-content: space-between; padding: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule-strong); }
.entry { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.entry .kind { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.entry .kind::before { content: ""; width: 8px; height: 8px; background: var(--c, var(--faint)); flex: none; transform: translateY(-1px); }
.entry.received { --c: var(--c-received); } .entry.given { --c: var(--c-given); } .entry.removed { --c: var(--c-removed); } .entry.adjusted { --c: var(--c-adjusted); }
.entry .what { min-width: 0; }
.entry .what b { font-weight: 500; }
.entry .what a { text-decoration: none; } .entry .what a:hover { text-decoration: underline; }
.entry .what small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .amt { text-align: right; font-family: var(--mono); white-space: nowrap; }
.entry .amt.pos { color: var(--c-received); }
.entry .amt small { display: block; font-size: 11.5px; color: var(--faint); }
.entry .x { font-size: 13px; opacity: 0; transition: opacity .1s; }
.entry:hover .x, .entry:focus-within .x { opacity: 1; }
.entry.rec { cursor: pointer; }
.entry.rec:hover { background: linear-gradient(90deg, transparent, var(--tint) 12%, var(--tint) 88%, transparent); }
@media (hover: none) { .entry .x { opacity: 1; } }
.rec-del { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; padding-top: 16px; border-top: 1px solid var(--rule); }
.rec-del small { color: var(--muted); font-size: 12.5px; }
@media (hover: none) { .entry .x { opacity: 1; } }
@media (max-width: 640px) {
  .entry { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .entry .kind { grid-column: 1; }
  .entry .what { grid-column: 1; }
  .entry .amt { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .entry .x { grid-column: 2; justify-self: end; }
  .entry .what small { white-space: normal; }
}

/* ---------------- Contact page ---------------- */
.c-head { display: grid; gap: 16px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
@media (min-width: 1024px) { .c-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.c-head h1 { font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.c-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.c-reach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 1024px) { .c-reach { display: flex; } }
.c-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 0; border-top: 1px solid var(--rule); }
.c-ctrl .grow { flex: 1; }
.c-ctrl .links { display: flex; gap: 18px; font-size: 13.5px; }
.notice { padding: 10px 12px; border-left: 3px solid var(--ink-2); background: var(--tint); font-size: 13.5px; color: var(--ink-2); }
.notice.signed { border-left-color: var(--pkg, var(--brand)); }
.notice.dnc { border-left-color: var(--dnc); }
.c-grid { display: grid; gap: 36px 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .c-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.c-grid > div { display: grid; gap: 36px; align-content: start; min-width: 0; }
.logbox { display: grid; gap: 10px; padding: 14px 0 4px; }
.logbox .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.logbox .row .field { flex: 1 1 160px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 16px; }
.kv > div { display: contents; }
.kv dt, .kv dd { padding: 9px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.kv dt { font-size: 13px; color: var(--muted); }
.kv dd { overflow-wrap: anywhere; }
.kv dd .lb { color: var(--muted); font-size: 12.5px; margin-right: 8px; }
.kv dd a { text-decoration: none; } .kv dd a:hover { text-decoration: underline; }

/* ---------------- Drawer (forms) ---------------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(30, 50, 70, .3); animation: fade .12s ease; }
.drawer { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 94vh; display: flex; flex-direction: column; background: var(--surface); border-top: 3px solid var(--ink); animation: rise .18s ease; }
@media (min-width: 760px) { .drawer { left: auto; top: 0; width: 540px; max-height: none; border-top: 0; border-left: 1px solid var(--rule-strong); box-shadow: -20px 0 50px rgba(30, 50, 70, .1); animation: slide .2s ease; } }
.dr-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--rule); }
.dr-h h2 { font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.dr-h p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.dr-b { flex: 1; overflow: auto; padding: 20px 24px 28px; display: grid; gap: 20px; align-content: start; }
.dr-f { display: flex; align-items: center; gap: 10px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--surface); }
.dr-f .sum { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.dr-f .sum b { display: block; font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--ink); }
.fs { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.fs legend { padding: 0 0 8px; margin-bottom: 4px; width: 100%; border-bottom: 1px solid var(--rule); font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.multi { display: grid; gap: 8px; }
.multi-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.addr { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.addr .street { grid-column: 1 / -1; }
@media (max-width: 460px) { .multi-row { grid-template-columns: 96px minmax(0, 1fr) auto; } }
.multi-row .link { height: 36px; font-size: 13px; }
details.more summary { cursor: pointer; list-style: none; font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
details.more summary::-webkit-details-marker { display: none; }
details.more > div { display: grid; gap: 20px; margin-top: 18px; }

/* Line items */
.lines { border-top: 1px solid var(--rule); }
.line { display: grid; grid-template-columns: minmax(0, 1fr) 76px 108px auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.line .hint { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.line .hint b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
.line .hint.warn, .line .hint.warn b { color: var(--err); }
@media (max-width: 520px) { .line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .line [data-l=product] { grid-column: 1 / 3; } .line [data-l=qty] { grid-column: 1; } .line [data-l=unit] { grid-column: 2; } .line .rm { grid-column: 3; grid-row: 1; } }
.line .rm { font-size: 13px; }

/* Contact picker */
.picker { position: relative; }
.pick-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--rule-strong); box-shadow: 0 12px 30px rgba(30, 50, 70, .12); }
.pick-list button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--rule); background: #fff; font-size: 14px; text-align: left; cursor: pointer; }
.pick-list button:last-child { border-bottom: 0; }
.pick-list button:hover, .pick-list button.hl { background: var(--tint); }
.pick-list button small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pick-list .add { color: var(--brand); font-weight: 500; }
.picked { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--rule-strong); background: var(--tint); }
.picked b { font-weight: 500; }
.picked small { display: block; color: var(--muted); font-size: 12.5px; }
.newbox { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--rule-strong); border-left: 3px solid var(--brand); }
.newbox p { font-size: 13.5px; color: var(--ink-2); }

/* ---------------- Menus, tooltip, toasts ---------------- */
.menu { position: fixed; z-index: 60; min-width: 200px; padding: 4px 0; background: #fff; border: 1px solid var(--rule-strong); box-shadow: 0 12px 30px rgba(30, 50, 70, .12); }
.menu button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 8px 14px; border: 0; background: none; font-size: 14px; text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--tint); outline: none; }
.menu hr { border: 0; border-top: 1px solid var(--rule); margin: 4px 0; }
.menu .chk { font-size: 12.5px; color: var(--muted); }
.tip { position: fixed; z-index: 90; padding: 6px 9px; background: var(--ink); color: #fff; font-size: 12.5px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .08s; }
.tip.on { opacity: 1; }
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(66px + env(safe-area-inset-bottom)); display: grid; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 28px; } }
.toast { padding: 11px 14px; background: var(--ink); color: #fff; font-size: 13.5px; pointer-events: auto; animation: rise .15s ease; }
.toast.error { background: #fff; color: var(--err); border: 1px solid var(--err); border-left-width: 3px; }
.toast.info { background: var(--ink-2); }
.toast.leaving { opacity: 0; transition: opacity .2s; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: min(100%, 360px); }
.login-box .mark { display: block; margin-bottom: 28px; }
.login-box h1 { font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.login-box form { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }
.login-box .btn { height: 40px; }
.login-box .err { min-height: 18px; color: var(--err); font-size: 13px; }

/* Settings */
.set { display: grid; gap: 14px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.set:first-of-type { padding-top: 0; }
@media (min-width: 1024px) { .set { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; } }
.set h2 { font-size: 15px; font-weight: 500; }
.set p { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.erow { display: grid; grid-template-columns: var(--cols); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.erow.head { padding: 0 0 8px; font-size: 12px; color: var(--muted); border-bottom-color: var(--rule-strong); }
.erow .acts { display: flex; gap: 14px; justify-content: flex-end; font-size: 13px; }
.erow input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--rule-strong); border-radius: 3px; background: #fff; cursor: pointer; }
@media (max-width: 640px) { .erow.head { display: none; } .erow { grid-template-columns: 1fr 1fr !important; } .erow > :first-child, .erow > .acts { grid-column: 1 / -1; } .erow .acts { justify-content: flex-start; } }
.help { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.help ol { margin: 6px 0 0; padding-left: 18px; }
code { font: 12.5px var(--mono); padding: 1px 5px; background: var(--tint); }

.loading { padding: 60px 0; color: var(--muted); font-size: 13.5px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Item rows in the give / receive / remove forms */
.line { grid-template-columns: minmax(0, 1fr) 128px 112px auto; }
.lines .line:only-child .rm { visibility: hidden; }
.stepper { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; border: 1px solid var(--rule-strong); border-radius: 3px; background: #fff; overflow: hidden; }
.stepper:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.stepper button { border: 0; background: var(--tint); font-size: 18px; line-height: 1; color: var(--ink-2); cursor: pointer; touch-action: manipulation; }
.stepper button:hover { background: #E1ECF5; color: var(--ink); }
.stepper button:active { background: #D6E5F1; }
.stepper .input { height: 34px; border: 0; border-radius: 0; box-shadow: none; text-align: center; font-family: var(--mono); padding: 0 4px; -moz-appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .input:focus { box-shadow: none; }
.add-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin-top: 10px; padding: 0 12px; border: 1px dashed var(--rule-strong); border-radius: 3px; background: transparent; font-size: 14px; color: var(--ink-2); text-align: left; cursor: pointer; touch-action: manipulation; }
.add-row:hover { border-style: solid; border-color: var(--ink-2); color: var(--ink); background: var(--surface); }
.add-row .plus { position: relative; flex: none; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 3px; }
.add-row .plus::before, .add-row .plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; transform: translate(-50%, -50%); }
.add-row .plus::before { width: 10px; height: 1.5px; }
.add-row .plus::after { width: 1.5px; height: 10px; }
@media (max-width: 1023px) {
  .stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .stepper .input { height: 40px; font-size: 16px; }
  .add-row { min-height: 48px; }
  .line .rm { min-height: 40px; padding: 0 4px; }
}
@media (max-width: 520px) {
  .line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; row-gap: 10px; }
  .line [data-l=product] { grid-column: 1 / 3; }
  .line .stepper { grid-column: 1; grid-row: 2; }
  .line [data-l=unit] { grid-column: 2; grid-row: 2; }
  .line .rm { grid-column: 3; grid-row: 1; }
}
.line .stepper [data-l=qty] { grid-column: 2; grid-row: 1; }
@media (max-width: 1023px) { .line > .input, .line select.input { height: 42px; } }
@media (min-width: 1024px) { .line > .input, .line select.input { height: 36px; } .stepper .input { height: 34px; } }
@media (max-width: 520px) { .line .hint { flex-direction: column; gap: 2px; } }

/* =================================================================
   Light: the LifeWave light image, feathered into white
   ================================================================= */
.photo-light { position: absolute; pointer-events: none; background: url("/light/signin.webp") var(--pos, 50% 60%) / cover no-repeat; }

/* Sign-in: the light fills the screen; the form sits in front of it */
.login { position: relative; overflow: hidden; isolation: isolate; background: #fff; }
.login > .photo-light { z-index: -1; inset: 0; --pos: 50% 62%; }
@media (max-width: 700px) { .login > .photo-light { --pos: 34% 60%; } }
.login > .photo-light::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 45%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); }
.login-box { position: relative; z-index: 1; padding: 32px 30px; background: rgba(255, 255, 255, .96); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 30px 80px rgba(20, 40, 70, .22); }

/* =================================================================
   Inventory: patches, counted in sleeves
   ================================================================= */
.inv-hero { position: relative; isolation: isolate; overflow: hidden; margin: -32px -32px 0; padding: 40px 32px 36px; border-bottom: 1px solid var(--rule); background: #fff; }
@media (max-width: 1023px) { .inv-hero { margin: -24px -16px 0; padding: 220px 16px 26px; } }
.inv-light { position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 62%; background: url("/light/inventory.webp") 78% 50% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .5) 28%, #000 60%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .5) 28%, #000 60%); }
@media (max-width: 1023px) { .inv-light { left: 0; width: 100%; bottom: auto; height: 260px; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); } }
.inv-hero-in { max-width: 560px; }
.inv-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font-weight: 400; }
.inv-figure .num { font-family: var(--mono); font-size: 76px; font-weight: 500; letter-spacing: -.05em; line-height: .95; color: var(--ink); }
.inv-figure .unit { font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 520px) { .inv-figure .num { font-size: 60px; } }
.inv-sub { margin-top: 12px; color: var(--ink-2); }
.inv-sub a { color: var(--err); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.inv-hero + .subnav { margin-top: 0; }

/* 30-day flow, read left to right */
.flow-row { display: grid; grid-template-columns: 120px repeat(5, minmax(0, 1fr)); align-items: stretch; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.flow-row > .label { align-self: center; }
.flow-step { position: relative; display: grid; gap: 2px; padding: 14px 14px 14px 22px; border-left: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
a.flow-step:hover b { color: var(--brand); }
.flow-step .op { position: absolute; left: -8px; top: 50%; width: 15px; margin-top: -10px; text-align: center; background: var(--bg); font-family: var(--mono); color: var(--muted); }
.fs-l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.fs-l i { width: 8px; height: 8px; background: var(--c); }
.flow-step b { font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.flow-step small { font-size: 12px; color: var(--faint); }
.flow-step:last-child { background: var(--tint); }
@media (max-width: 899px) {
  .flow-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .flow-row > .label { grid-column: 1 / -1; padding: 12px 0 0; }
  .flow-step { padding: 10px 6px 12px 12px; }
  .flow-step:first-of-type { border-left: 0; padding-left: 0; }
  .flow-step b { font-size: 18px; }
  .flow-step small { display: none; }
}

/* Patch cards */
.patch-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.patch { display: grid; gap: 14px; align-content: start; padding: 20px 20px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--surface); }
.patch header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.patch-name { font-size: 15px; font-weight: 600; letter-spacing: .02em; text-decoration: none; }
.patch-name:hover { text-decoration: underline; }
.patch-figure { display: flex; align-items: baseline; gap: 8px; }
.patch-figure .num { font-family: var(--mono); font-size: 44px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.patch-figure span:last-child { font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.patch.out .patch-figure .num { color: var(--err); }
.meter { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 14px; }
.meter i { position: relative; overflow: hidden; background: var(--tint); box-shadow: inset 0 0 0 1px var(--rule); }
.meter i b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink-2); }
.meter.low i b { background: var(--c-removed); }
.meter.out i { box-shadow: inset 0 0 0 1px rgba(194, 54, 42, .35); }
.meter em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.patch-facts { display: grid; gap: 0; margin: 0; font-size: 13px; }
.patch-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); }
.patch-facts dt { color: var(--muted); }
.patch-facts dd { margin: 0; color: var(--ink-2); }
.patch footer { display: flex; gap: 18px; padding-top: 4px; font-size: 13.5px; }
@media (max-width: 520px) { .patch-grid { grid-template-columns: 1fr; } }
/* Phones: the 30-day flow reads as a receipt, one line per step */
@media (max-width: 640px) {
  .flow-row { grid-template-columns: 1fr; }
  .flow-row > .label { padding: 14px 0 6px; }
  .flow-step, .flow-step:first-of-type { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: baseline; gap: 0 8px; padding: 9px 0; border-left: 0; border-top: 1px dotted var(--rule-strong); }
  .flow-step .op { position: static; width: auto; margin: 0; background: none; grid-column: 1; }
  .flow-step .fs-l { grid-column: 2; font-size: 14px; color: var(--ink-2); }
  .flow-step b { grid-column: 3; font-size: 18px; text-align: right; }
  .flow-step small { display: block; grid-column: 2 / 4; text-align: right; margin-top: -2px; }
  .flow-step:last-child { background: none; border-top: 1px solid var(--ink); }
  .flow-step:last-child .fs-l { font-weight: 600; color: var(--ink); }
}

/* =================================================================
   LifeWave look: Montserrat type, sky-blue actions, the light's glow
   ================================================================= */
body { font-variant-numeric: tabular-nums; background:
  radial-gradient(1200px 520px at 100% -10%, rgba(240, 141, 181, .10), transparent 60%),
  radial-gradient(900px 520px at -10% 0%, rgba(28, 155, 230, .10), transparent 60%), var(--bg); background-attachment: fixed; }
.num, .fig-v, .td.n, .todo b, .flow-step b, .patch-figure .num, .inv-figure .num { letter-spacing: -.02em; }
/* Headings follow lifewave.com: uppercase, widely tracked, medium weight */
.head h1, .c-head h1, .login-box h1, .hero h1 { font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--ink); }
.head h1 { font-size: 24px; } .c-head h1 { font-size: 26px; } .login-box h1 { font-size: 20px; }
.sec-h { border-bottom: 0; background: linear-gradient(90deg, var(--ink-2), var(--rule-strong)) bottom / 100% 1px no-repeat; }
.sec-h h2, .label, .day { letter-spacing: .14em; }
.mark { letter-spacing: .24em; font-weight: 600; }
.figs { border-top: 0; background: var(--glow) top / 100% 2px no-repeat; padding-top: 2px; }
.fig-v { font-weight: 500; }

/* Top bar: white, with a hairline of the light along its bottom edge */
.bar { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 0; }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--glow); opacity: .9; }
.nav a.on::after, .tabbar a.on::before { background: var(--glow); height: 3px; }
.nav .n, .tabbar .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--hot); color: #fff; font-family: var(--sans); font-size: 11px; font-weight: 600; }
.nav .n[hidden], .tabbar .n[hidden] { display: none; }
.tabbar { border-top: 0; box-shadow: 0 -1px 0 var(--rule), 0 -10px 30px rgba(30, 50, 70, .06); }
.tabbar a { font-size: 11.5px; }
.tabbar .n { position: absolute; top: 5px; right: 4px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }

/* Controls: rounded like lifewave.com, with the blue as the one action colour */
.btn { border-radius: 999px; padding: 0 18px; letter-spacing: .01em; }
.btn.sm { padding: 0 12px; }
.btn.primary { background: linear-gradient(100deg, var(--brand), #1C9BE6); border-color: transparent; box-shadow: 0 6px 16px rgba(20, 120, 190, .22); }
.btn.primary:hover { background: linear-gradient(100deg, var(--brand-hover), var(--brand)); border-color: transparent; }
.input, select.input, textarea.input { border-radius: 8px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 120, 190, .15); }
:focus-visible { outline-color: var(--brand); }
.seg { border-radius: 999px; }
.seg button.on, .tag.on, .check input:checked { background: var(--brand); border-color: var(--brand); }
.tag, .tag-add { border-radius: 999px; padding: 0 12px; }
.tag.on .n { color: #CFE6F7; }
.drawer { border-top-color: transparent; }
.drawer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--glow); }
@media (min-width: 760px) { .drawer::before { right: auto; bottom: 0; width: 3px; height: auto; } }
.notice { border-radius: 0 8px 8px 0; }
.menu, .pick-list, .toast { border-radius: 10px; }
.login-box { border-radius: 18px; }

/* Page hero: the light image feathered into the page (Overview, Renewals) */
.hero { position: relative; isolation: isolate; overflow: hidden; margin: -32px -32px 28px; padding: 44px 32px 34px; }
@media (max-width: 1023px) { .hero { margin: -24px -16px 22px; padding: 150px 16px 22px; } }
.hero-light { position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 64%; background: url("/light/overview.webp") 72% 52% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 30%, #000 65%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 30%, #000 65%); }
@media (max-width: 1023px) { .hero-light { left: 0; width: 100%; bottom: auto; height: 190px; -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%); mask-image: linear-gradient(180deg, #000 35%, transparent 100%); } }
.hero-light.is-renewals { background-image: url("/light/renewals.webp"); background-position: 62% 56%; }
.hero-in { max-width: 560px; }
.hero h1 { margin-top: 8px; font-size: 30px; line-height: 1.15; }
.hero-sub { margin-top: 10px; color: var(--ink-2); font-weight: 300; font-size: 15px; }
.hero-sub a { color: var(--hot); font-weight: 600; }
.inv-hero { background: transparent; }

/* Start-up screen */
.boot { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 6px; padding: 24px; }
.boot .empty { max-width: 380px; }

/* =================================================================
   Renewals: 30-day (blue), 14-day (amber) and 5-day (coral) alerts
   ================================================================= */
.rn { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--brand-tint); color: var(--brand); }
.rn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rn.s14 { background: #FDF3E3; color: #A9670B; }
.rn.s5 { background: #FDEAE5; color: #BC3B25; }
.rn.done { background: #E5F4EC; color: var(--ok); }
.rn-aside { color: var(--hot); font-weight: 600; }
.tr.alert { box-shadow: -10px 0 0 -7px var(--cold); }
.tr.alert.s14 { box-shadow: -10px 0 0 -7px var(--warm); }
.tr.alert.s5 { box-shadow: -10px 0 0 -7px var(--hot); }
.td.acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; overflow: visible; }
@media (max-width: 759px) { .td.acts { justify-content: flex-start; margin-top: 8px; } }
.renew-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.renew-now b { display: block; margin-top: 2px; font-size: 20px; font-weight: 500; }
.renew-now small { display: block; color: var(--muted); font-size: 13px; }
.renew-now.alert { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glow) border-box; }
.renew-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.renew-form { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.renew-save { display: flex; align-items: center; gap: 16px; }
.notice.renew { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; border-left-color: var(--cold); background: var(--brand-tint); color: var(--ink); }
.notice.renew.s14 { border-left-color: var(--warm); background: #FDF5E8; }
.notice.renew.s5 { border-left-color: var(--hot); background: #FDEEEA; }
.notice.renew .renew-acts { margin: 0; }

/* Top bar on narrower desktops: the search box goes first, then the New contact button
   (both stay available on the Contacts page). */
@media (min-width: 1024px) and (max-width: 1365px) { .find { display: none; } .bar-in { gap: 22px; } .nav { gap: 18px; } }
@media (min-width: 1024px) and (max-width: 1179px) { .bar-actions [data-new-contact] { display: none; } .nav { gap: 14px; } .nav a { font-size: 13.5px; } }
@media (max-width: 1023px) { .bar-in { gap: 12px; } .mark { font-size: 12px; letter-spacing: .14em; } .mob-links { gap: 12px; } .mob-links a, .mob-links button { font-size: 13.5px; } }
