/* WorkBites client portal: shared styles.
   Colours and fonts match the workbites.ca website. */

:root {
  --space: #09203f;
  --space-2: #12305a;
  --slate: #537895;
  --crema: #f2a65a;
  --crema-deep: #d9822f;
  --crema-ink: #3a1f0b;
  --cream: #f4f5f7;
  --card: #ffffff;
  --white: #ffffff;
  --mint: #7fe3c4;
  --muted: #a9bdd0;
  --ink: #09203f;
  --ink-soft: #46617d;
  --line: rgba(9, 32, 63, 0.12);
  --line-strong: rgba(9, 32, 63, 0.22);
  --ok-bg: #dff5ec;
  --ok-fg: #0f5b45;
  --warn-bg: #fdebd3;
  --warn-fg: #7a4510;
  --bad-bg: #fde0dc;
  --bad-fg: #8a2416;
  --info-bg: #e3ebf4;
  --info-fg: #1d3d63;
  --radius: 22px;
  --display: "Fredoka", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--ink); }
a:hover { color: #b8661f; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--crema-deep); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
h1 { font-weight: 700; font-size: clamp(32px, 5vw, 40px); }
h2 { font-weight: 600; font-size: 24px; }
.muted { color: var(--ink-soft); }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-badge {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cream);
  display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.55);
  flex: none;
}
.brand-badge img { width: 40px; height: 40px; display: block; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 22px; }
.pill-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(244, 245, 247, 0.35);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--crema); color: var(--crema-ink); }
.btn-primary:hover { background: #f5b574; color: var(--crema-ink); }
.btn-dark { background: var(--space); color: var(--cream); }
.btn-dark:hover { background: var(--space-2); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: rgba(9, 32, 63, 0.05); color: var(--ink); }
.btn-block { width: 100%; }
.link-btn {
  background: none; border: 0; padding: 0; font-weight: 600; font-size: 15px;
  color: var(--ink); text-decoration: underline; cursor: pointer;
}
.link-btn:hover { color: #b8661f; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.input {
  width: 100%;
  font-size: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
}
.input:focus { outline: none; border-color: var(--crema-deep); box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.3); }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--crema-deep); }

/* ---------- Notices ---------- */
.notice {
  padding: 14px 16px; border-radius: 16px; font-size: 15px; line-height: 1.5;
}
.notice-error { background: var(--bad-bg); color: var(--bad-fg); }
.notice-info { background: var(--info-bg); color: var(--info-fg); }
.notice-ok { background: var(--ok-bg); color: var(--ok-fg); }
.notice-dashed {
  border: 1.5px dashed rgba(83, 120, 149, 0.45);
  background: #eef1f5;
  color: var(--ink-soft);
}
.notice-dashed strong { color: var(--ink); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px var(--line);
  padding: 24px;
}
.card-navy { background: var(--space); color: var(--cream); box-shadow: none; }

/* ---------- Login page ---------- */
.login {
  min-height: 100vh;
  display: flex; flex-wrap: wrap;
}
.login-hero {
  flex: 1 1 480px; min-width: 0;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 40px 48px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  color: var(--cream);
  background:
    radial-gradient(70% 60% at 50% 45%, var(--space-2), transparent 75%),
    radial-gradient(40% 40% at 8% 90%, rgba(83, 120, 149, 0.22) 0%, transparent 70%),
    var(--space);
}
.login-hero > canvas.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.login-hero .brand-badge { width: 44px; height: 44px; }
.login-hero .brand-badge img { width: 44px; height: 44px; }
.login-pitch { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 460px; }
.login-astro {
  width: 168px; height: 168px; border-radius: 50%;
  background: var(--cream);
  display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(127, 227, 196, 0.12), 0 0 0 22px rgba(127, 227, 196, 0.06);
  animation: float 6s ease-in-out infinite;
}
.login-astro img { width: 168px; height: 168px; display: block; }
.login-pitch h2 { font-weight: 700; font-size: clamp(34px, 5vw, 44px); line-height: 1.05; }
.login-pitch h2 span { color: var(--crema); }
.login-pitch p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); }
.login-foot { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.login-panel {
  flex: 1 1 420px; min-width: 0;
  padding: 48px 32px;
  display: flex; align-items: center; justify-content: center;
}
.login-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.login-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@media (max-width: 720px) {
  .login { flex-direction: column; }
  .login-hero { flex: none; padding: 20px 16px 24px; gap: 16px; }
  .login-astro, .login-pitch p, .login-foot { display: none; }
  .login-pitch h2 { font-size: 28px; }
  .login-panel { flex: none; align-items: flex-start; padding: 28px 16px 48px; }
}

/* ---------- Client header ---------- */
.topbar { background: var(--space); color: var(--cream); padding: 14px 32px; }
.topbar-inner {
  max-width: 1216px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
}
.topnav { display: flex; flex-wrap: wrap; gap: 6px; }
.topnav a {
  color: var(--muted); text-decoration: none; font-weight: 600;
  padding: 10px 14px; border-radius: 999px;
}
.topnav a:hover { color: var(--cream); }
.topnav a[aria-current="page"] {
  color: var(--cream);
  background: rgba(242, 166, 90, 0.18);
  box-shadow: inset 0 0 0 1.5px var(--crema);
}
.topbar-who { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.topbar-who .link-btn { color: var(--muted); font-size: 14px; }
.topbar-who .link-btn:hover { color: var(--cream); }

.page { max-width: 1216px; margin: 0 auto; padding: 32px 32px 56px; display: flex; flex-direction: column; gap: 22px; }

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .page { padding: 24px 16px 48px; }
}

/* ---------- Loading ---------- */
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Cart button in the top bar ---------- */
.cart-btn { min-height: 44px; padding: 10px 18px; font-size: 15px; }

/* ---------- Order page ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.search {
  width: 320px; max-width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2346617d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px 50%;
  font-size: 16px;
}
.search:focus { outline: none; border-color: var(--crema-deep); box-shadow: 0 0 0 3px rgba(242, 166, 90, 0.3); }

.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 14px 18px; border-radius: 16px;
  background: var(--space); color: var(--cream);
}
.banner strong { font-weight: 600; }
.banner span { color: var(--muted); font-size: 15px; }

.shop { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cats {
  flex: 1 1 220px; max-width: 260px; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 16px;
  max-height: calc(100vh - 32px); overflow-y: auto;
  padding-right: 4px;
}
.cats .kicker { padding: 0 12px 6px; }
.cat-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; font-weight: 500; font-size: 15px; cursor: pointer;
}
.cat-btn:hover { background: rgba(9, 32, 63, 0.05); }
.cat-btn[aria-pressed="true"] { background: var(--white); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line); }
.cat-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cat-count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

.results { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.results-head h2 { font-size: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.product {
  background: var(--card); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px var(--line);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.product.in-cart { box-shadow: inset 0 0 0 2px var(--crema-deep); }
.product-art {
  height: 112px; border-radius: 16px;
  background: radial-gradient(70% 70% at 35% 30%, var(--space-2), var(--space));
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.product-art svg { width: 72px; height: 72px; }
.product-art img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }
.product-art .star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: var(--cream); opacity: 0.7; }
.product-cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.product h3 { font-weight: 600; font-size: 18px; line-height: 1.25; }
.product-brand { font-size: 14px; color: var(--ink-soft); margin-top: -6px; }
.packs { display: flex; flex-wrap: wrap; gap: 6px; }
.pack {
  min-height: 34px; padding: 5px 12px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.pack[aria-pressed="true"] { background: var(--space); border-color: var(--space); color: var(--cream); }
.pack-single { font-size: 14px; color: var(--ink-soft); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.price { display: flex; flex-direction: column; line-height: 1.1; }
.price strong { font-family: var(--display); font-weight: 700; font-size: 24px; }
.price small { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.stepper {
  display: inline-flex; align-items: center; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--crema-deep); background: var(--white);
}
.stepper button {
  width: 40px; height: 44px; border: 0; background: transparent;
  font-size: 20px; line-height: 1; cursor: pointer; border-radius: 999px;
}
.stepper button:hover { background: rgba(242, 166, 90, 0.18); }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; }
.add-btn { min-height: 44px; padding: 10px 18px; font-size: 15px; }

.more-row { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 0; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-soft); }
.empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 20px; margin-bottom: 4px; }

@media (max-width: 860px) {
  .cats {
    position: static; max-width: none; max-height: none; flex-basis: 100%;
    flex-direction: row; overflow-x: auto; gap: 6px; padding: 0 0 6px;
    scrollbar-width: thin;
  }
  .cats .kicker { display: none; }
  .cat-btn { width: auto; flex: none; white-space: nowrap; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
  .cat-count { margin-left: 4px; }
  .search { width: 100%; }
}

/* ---------- Cart drawer ---------- */
.drawer {
  margin: 0 0 0 auto; height: 100%; max-height: 100%;
  width: min(440px, 100%); border: 0; padding: 0;
  background: var(--cream); color: var(--ink);
  box-shadow: -20px 0 60px rgba(9, 32, 63, 0.25);
}
.drawer::backdrop { background: rgba(9, 32, 63, 0.45); }
.drawer-inner { height: 100%; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(9, 32, 63, 0.06);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: rgba(9, 32, 63, 0.12); }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 20px; display: flex; flex-direction: column; gap: 10px; }
.line {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  padding: 12px 14px; border-radius: 16px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
}
.line-title { font-weight: 600; line-height: 1.3; }
.line-meta { font-size: 13px; color: var(--ink-soft); }
.line-total { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.line-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line .stepper button { height: 38px; width: 36px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-row strong { font-family: var(--display); font-size: 28px; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--space); color: var(--cream); padding: 12px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; box-shadow: 0 12px 30px rgba(9, 32, 63, 0.3);
  z-index: 50;
  max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .topbar-inner { gap: 10px 12px; }
  .topbar-who > span { display: none; }
  .topnav a { padding: 8px 12px; }
}

/* ---------- My account ---------- */
.two-col { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.card-feature { background: var(--white); box-shadow: inset 0 0 0 2px var(--space), 0 0 0 5px rgba(242, 166, 90, 0.3); }
.card h2 + p, .card .card-head + p { margin: 8px 0 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.card-stack { display: flex; flex-direction: column; gap: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .field { flex: 1 1 220px; max-width: 320px; }
.po-input { font-size: 18px; font-weight: 600; }
.fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hint { font-size: 14px; color: var(--ink-soft); }
.form-msg { font-size: 14px; font-weight: 600; }
.form-msg.ok { color: var(--ok-fg); }
.form-msg.bad { color: var(--bad-fg); }
.input[readonly] { background: rgba(9, 32, 63, 0.04); color: var(--ink-soft); }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.card-navy .kicker { color: var(--mint); }
.card-navy .hint { color: var(--muted); }
.card-navy a { color: var(--crema); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.people li { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--info-bg); color: var(--info-fg);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.people .who { display: flex; flex-direction: column; min-width: 0; }
.people .who span { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.office-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 6px 0 -4px; }

/* ---------- Checkout ---------- */
.back-link { font-size: 15px; color: var(--ink-soft); }
.step-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.office-choice, .pay-choice { display: flex; flex-wrap: wrap; gap: 14px; }
.choice {
  flex: 1 1 240px; min-width: 0; position: relative;
  display: flex; flex-direction: column; gap: 8px; padding: 18px;
  border-radius: 18px; background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.choice-title::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 2px var(--line-strong); background: var(--white);
}
.choice-text { font-size: 15px; color: var(--ink-soft); }
.choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--space), 0 0 0 4px rgba(242, 166, 90, 0.35); }
.choice:has(input:checked) .choice-title::before { box-shadow: inset 0 0 0 6px var(--space); }
.choice:has(input:focus-visible) { outline: 3px solid var(--crema-deep); outline-offset: 2px; }
.choice:has(input:disabled) { cursor: not-allowed; opacity: 0.65; background: rgba(9, 32, 63, 0.03); }
.soon-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--info-bg); color: var(--info-fg); margin-left: auto;
}

.label-like { font-size: 15px; font-weight: 600; }
.card-form { max-width: 520px; min-height: 58px; }
.card-form .notice { margin: 0; }
.lock-note { display: flex; align-items: flex-start; gap: 8px; }
.lock-note svg { flex: none; margin-top: 3px; }

.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cal-head { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); text-align: center; padding-bottom: 2px; }
.cal-month { grid-column: 1 / -1; font-family: var(--display); font-weight: 600; font-size: 17px; padding-top: 8px; }
.day {
  min-height: 58px; border-radius: 14px; border: 1.5px solid var(--line-strong);
  background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-weight: 600; cursor: pointer; padding: 4px 2px;
}
.day:hover { border-color: var(--space); }
.day small { font-size: 11px; font-weight: 500; color: #0f6b52; line-height: 1.1; text-align: center; }
.day[disabled] { cursor: default; background: rgba(9, 32, 63, 0.04); border-color: transparent; color: rgba(9, 32, 63, 0.4); }
.day[disabled] span { text-decoration: line-through; }
.day[disabled] small { color: rgba(9, 32, 63, 0.5); }
.day[aria-pressed="true"] { background: var(--space); border-color: var(--space); color: var(--cream); box-shadow: 0 0 0 4px rgba(242, 166, 90, 0.45); }
.day[aria-pressed="true"] small { color: var(--crema); }
.day-blank { min-height: 58px; }

.warn-box {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px;
  background: rgba(242, 166, 90, 0.12); box-shadow: inset 0 0 0 1.5px rgba(217, 130, 47, 0.5);
  font-size: 15px; line-height: 1.5;
}
.warn-box svg { flex: none; margin-top: 2px; }
textarea.input { resize: vertical; min-height: 84px; }

.summary { flex: 1 1 340px; min-width: 0; position: sticky; top: 16px; }
.summary-lines { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.sum-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-meta { border-top: 1px dashed rgba(169, 189, 208, 0.5); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.sum-meta div { display: flex; justify-content: space-between; gap: 12px; }
.sum-meta strong { color: var(--cream); font-weight: 600; text-align: right; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed rgba(169, 189, 208, 0.5); padding-top: 14px; }
.sum-total strong { font-family: var(--display); font-size: 32px; font-variant-numeric: tabular-nums; }
.card-navy .notice-error { background: #fde0dc; }

/* ---------- Confirmation ---------- */
.confirm { max-width: 760px; }
.confirm-badge {
  width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-fg);
  display: grid; place-items: center; font-size: 34px; font-weight: 700;
}
.order-no { font-family: var(--display); font-weight: 700; font-size: 26px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.items-table th { text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; padding: 8px 8px 8px 0; }
.items-table td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.items-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; }
.items-table tfoot td { font-weight: 700; border-top: 2px solid var(--space); }

/* ---------- Past orders ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--space); border-color: var(--space); color: var(--cream); }
.table-wrap { position: relative; overflow-x: auto; min-width: 0; max-width: 100%; background: var(--card); border-radius: var(--radius); box-shadow: inset 0 0 0 1.5px var(--line); }
.orders-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 15px; }
.orders-table th {
  text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500; padding: 16px 12px;
}
.orders-table th:first-child, .orders-table td:first-child { padding-left: 20px; }
.orders-table th:last-child, .orders-table td:last-child { padding-right: 20px; }
.orders-table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.orders-table .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orders-table .sub { display: block; font-size: 13px; color: var(--ink-soft); }
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill-info { background: var(--info-bg); color: var(--info-fg); }
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-bad { background: var(--bad-bg); color: var(--bad-fg); }
.row-actions { white-space: nowrap; display: flex; gap: 12px; }
.detail-row td { background: var(--white); }
.detail { display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 6px 0 10px; }
.detail .items-table { flex: 999 1 420px; }
.detail .facts { flex: 1 1 240px; align-content: start; }
.detail .facts dt { color: var(--ink-soft); }
.contact-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: 18px;
  background: var(--space); color: var(--cream); font-size: 15px;
}
.contact-strip a { color: var(--crema); font-weight: 600; }
.orders-table th.num { font-weight: 500; }

/* ---------- Admin ---------- */
.btn-sm { padding: 8px 14px; font-size: 14px; min-height: 0; }
.btn-danger { background: var(--bad-fg); color: #fff; }
.btn-danger:hover { background: #6e1c11; color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--bad-fg); box-shadow: inset 0 0 0 1.5px var(--bad-fg); }
.btn-danger-ghost:hover { background: var(--bad-bg); color: var(--bad-fg); }
.notice-warn { background: var(--warn-bg); color: var(--warn-fg); }
.input-sm { padding: 8px 12px; font-size: 15px; min-height: 0; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.inline-field.grow { flex: 1 1 280px; }
.inline-field.grow .input { flex: 1; min-width: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.admin-filters { gap: 14px; }
.row-warn td { background: rgba(253, 235, 211, 0.45); }
.admin-orders { min-width: 900px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 18px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); text-decoration: none;
}
.stat:hover { box-shadow: inset 0 0 0 1.5px var(--space); }
.stat-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.stat-value { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.stat-sub { font-size: 14px; color: var(--ink-soft); }
.stat-warn { background: var(--warn-bg); box-shadow: inset 0 0 0 1.5px rgba(217, 130, 47, 0.6); }
.stat-warn .stat-value, .stat-warn .stat-label, .stat-warn .stat-sub { color: var(--warn-fg); }

.dash-list, .day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-order { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.dash-order:first-child { border-top: 0; padding-top: 4px; }
.dash-order.is-warn .dash-main > a { color: var(--warn-fg); }
.dash-main { flex: 1 1 320px; min-width: 0; }
.dash-main .sub, .day-list .sub { display: block; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.dash-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.day-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.day-list li:first-child { border-top: 0; padding-top: 0; }
.day-list li > span:not(.pill) { flex: 1 1 160px; min-width: 0; }
.two-col > .grow { flex: 1 1 340px; min-width: 0; }

.admin-detail .detail-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.admin-detail .facts dd { overflow-wrap: anywhere; }
.history h3 { margin: 0 0 6px; font-size: 15px; }
.history ol { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.admin-actions { padding: 4px 0 12px; }
.cancel-box { padding: 16px; margin-bottom: 12px; border-radius: 16px; background: var(--bad-bg); max-width: 640px; }
.cancel-box label { color: var(--bad-fg); }
.refund-box { padding: 16px; margin-bottom: 12px; border-radius: 16px; background: #eef1f5; max-width: 720px; }
.refund-box .form-grid { gap: 12px 16px; }
.refund-line + .refund-line { margin-top: 6px; }
.cancel-box .check { color: var(--ink); margin: 2px 0; }
.admin-detail { align-items: flex-start; }
.inline-field { white-space: nowrap; }

/* Admin: companies & offices */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; }
.form-grid .field-wide { grid-column: 1 / -1; }
.req { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; margin-left: 6px; }
fieldset.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
fieldset.checks legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.company-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line);
}
.company-card:hover { box-shadow: inset 0 0 0 1.5px var(--space); }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 18px; }
.cc-line { font-size: 14px; color: var(--ink-soft); }
.office-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.office-item { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--line); }
.office-item:first-child { border-top: 0; padding-top: 0; }
.office-item.editing { display: block; }
.office-item.editing h3 { margin: 0 0 12px; font-size: 17px; }
.office-item.editing .btn-row { margin-top: 14px; }
.office-item.editing .notice { margin-top: 12px; }
.office-item.is-paused .office-main { opacity: 0.7; }
.office-main { flex: 1 1 320px; min-width: 0; }
.office-main .sub { display: block; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.office-title { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.office-actions { display: flex; gap: 14px; align-items: flex-start; }
.warn-text { color: var(--warn-fg) !important; }
.danger-link { color: var(--bad-fg); }
.confirm-box { flex-basis: 100%; padding: 14px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-fg); font-size: 15px; line-height: 1.5; }
.confirm-box .btn-row { margin-top: 10px; }
.day-list li, .company-card, .cc-line { overflow-wrap: anywhere; }

/* Admin: people */
.people-table { min-width: 760px; }
.row-muted td { opacity: 0.65; }
.person-manage { padding: 6px 0 12px; max-width: 920px; }

/* Admin: staff (what each person can use) */
fieldset.areas { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.areas legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.area-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; color: var(--ink-soft); }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.area-check {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line);
}
.area-check:has(input:checked) { box-shadow: inset 0 0 0 2px var(--space); background: #eef1f5; }
.area-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--space); }
.area-check strong { display: block; font-size: 15px; }
.area-check span { display: block; font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.area-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.area-tag { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: #eef1f5; color: var(--ink); white-space: nowrap; }
.staff-table { min-width: 720px; }

/* ---------- Admin side panel ---------- */
body.admin-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
body.admin-layout > .sidebar { grid-column: 1; grid-row: 1 / span 4; }
body.admin-layout > main.page { grid-column: 2; grid-row: 1; width: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 28px; padding: 24px 16px 20px;
  color: var(--cream);
  background:
    radial-gradient(120% 50% at 20% 10%, var(--space-2), transparent 70%),
    radial-gradient(80% 40% at 0% 100%, rgba(83, 120, 149, 0.22), transparent 70%),
    var(--space);
}
.sidebar > canvas.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px; }
.sidebar .brand-name { font-size: 20px; }
.side-toggle { display: none; }
.side-menu { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 20px; }
.sidenav { display: flex; flex-direction: column; gap: 4px; }
.sidenav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px; position: relative;
}
.sidenav a svg { flex: none; opacity: 0.85; }
.sidenav a:hover { color: var(--cream); background: rgba(244, 245, 247, 0.06); }
.sidenav a[aria-current="page"] { color: var(--cream); background: rgba(244, 245, 247, 0.1); box-shadow: inset 0 0 0 1px rgba(242, 166, 90, 0.35); }
.sidenav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--crema);
}
.sidenav a[aria-current="page"] svg { color: var(--crema); opacity: 1; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(244, 245, 247, 0.12); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-who { display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.side-who small { font-weight: 400; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .link-btn { color: var(--muted); font-size: 14px; flex: none; }
.side-foot .link-btn:hover { color: var(--cream); }

@media (max-width: 900px) {
  body.admin-layout { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; padding: 12px 16px; gap: 0; }
  .side-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid rgba(244, 245, 247, 0.3); background: transparent; color: var(--cream); font: inherit; font-weight: 600;
  }
  .side-head { padding: 0; }
  .side-menu { display: none; padding-top: 14px; }
  .sidebar.is-open .side-menu { display: flex; }
  .sidenav a[aria-current="page"]::before { display: none; }
}
@media print { .sidebar { display: none; } body.admin-layout { display: block; } }

/* Order page: product photos sit in a fixed square white frame (never stretched) */
.product-art .photo-frame-sm { width: 96px; height: 96px; border-radius: 14px; background: var(--white); display: grid; place-items: center; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.product-art .photo-frame-sm img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }

/* Admin: products */
.prod-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.prod-item { background: var(--card); border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--line); }
.prod-item.is-open { box-shadow: inset 0 0 0 2px var(--space); }
.prod-item.is-hidden .prod-main { opacity: 0.65; }
.prod-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.thumb { width: 56px; height: 56px; flex: none; border-radius: 12px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; font-family: var(--display); font-size: 22px; color: var(--ink-soft); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.prod-main { flex: 1 1 auto; min-width: 0; }
.prod-main .sub { display: block; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.prod-flags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.strike { text-decoration: line-through; opacity: 0.7; }
.product-editor { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 6px 18px 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.photo-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.photo-frame { width: 200px; height: 200px; border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; overflow: hidden; }
.photo-frame img { width: 100%; height: 100%; object-fit: contain; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.cat-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.cat-checks .check { font-size: 14px; }
.editor-main h3 { margin: 0; font-size: 17px; }
.pack-list { display: flex; flex-direction: column; gap: 10px; }
.pack-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) 80px 110px 110px minmax(160px, 1.4fr); gap: 8px 12px; align-items: end; padding: 12px 14px; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.pack-row.is-hidden { background: rgba(9, 32, 63, 0.03); }
.pack-row label { font-size: 13px; }
.pack-margin { font-size: 14px; padding-bottom: 10px; }
.pack-flags { grid-column: 1 / -1; display: flex; gap: 20px; flex-wrap: wrap; }
.pack-flags .check { font-size: 14px; }
.pack-flags .review-on { color: var(--warn-fg); font-weight: 600; }
.pack-ref { grid-column: 1 / -1; margin-top: -2px; }
.m-ok { color: var(--ok-fg); font-weight: 600; }
.m-warn { color: var(--warn-fg); font-weight: 600; }
.m-bad { color: var(--bad-fg); font-weight: 700; }
@media (max-width: 760px) {
  .product-editor { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .pack-row { grid-template-columns: 1fr 1fr; }
  .pack-row .field:first-child, .pack-margin { grid-column: 1 / -1; }
  .prod-row { flex-wrap: wrap; }
}

/* Admin: invoices and settings */
.inv-group .card-head h2 { font-size: 21px; }
.inv-office + .inv-office { margin-top: 6px; }
.inv-office h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink-soft); font-weight: 600; }
.pdf-frame { display: block; width: 100%; height: min(1000px, 85vh); border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); margin-top: 14px; }
.pdf-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.adjust-box { margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--warn-fg); }
.adjust-table .qty-input { width: 76px; text-align: right; margin-left: auto; }
.qty-input.is-bad { box-shadow: inset 0 0 0 2px var(--bad-fg); }

/* Admin: statements */
.make-statements .filter-row { align-items: center; }
.st-company h3 { margin: 6px 0 8px; font-size: 18px; }
.st-office { border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; margin-bottom: 10px; }
.st-office-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.st-office-head .muted { flex: 1 1 auto; font-size: 14px; }
.st-pick { list-style: none; margin: 8px 0 0; padding: 0; }
.st-pick li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.st-pick .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stmt-list { list-style: none; margin: 0; padding: 0; }
.stmt-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.stmt-list li:first-child { border-top: 0; }
.stmt-list .sub { display: block; font-size: 14px; color: var(--ink-soft); }
.stmt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Admin: books */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; font-size: 16px; color: var(--ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; margin-bottom: -1.5px; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--space); border-bottom-color: var(--crema-deep); }
.tab:hover { color: var(--space); }
.books-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.confirm-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; color: var(--bad-fg); }
.receipt-view { padding: 6px 0 10px; }
.receipt-view img { max-width: min(100%, 520px); max-height: 640px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
.cat-edit { list-style: none; margin: 0; padding: 0; }
.cat-edit li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.cat-edit li .input { flex: 1 1 220px; max-width: 320px; }
.stat-good { background: var(--ok-bg); box-shadow: inset 0 0 0 1.5px rgba(31, 110, 67, 0.35); }
.stat-good .stat-value, .stat-good .stat-label, .stat-good .stat-sub { color: var(--ok-fg); }
.ov-main .stat-value { font-size: 34px; }
.month-table .neg { color: var(--bad-fg); }
.ss-meter { display: flex; flex-direction: column; gap: 6px; }
.ss-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.ss-track { position: relative; height: 16px; border-radius: 999px; background: var(--line); overflow: visible; }
.ss-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--ok-fg); }
.ss-warn .ss-fill { background: var(--crema-deep); }
.ss-over .ss-fill { background: var(--bad-fg); }
.ss-warnmark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--space); opacity: .55; }
.plain-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.todo-list li:first-child { border-top: 0; }
.todo-list li.is-warn strong { color: var(--bad-fg); }
.todo-list .sub { color: var(--ink-soft); font-size: 14px; margin-left: 6px; }

/* Books → Year-end */
.export-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.export-file { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--cream, #f4f5f7); }
.export-file strong { overflow-wrap: anywhere; }
.export-counts { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* Order → My list */
.cat-heart { width: 14px; height: 14px; flex: none; fill: var(--crema); stroke: var(--crema-deep); stroke-width: 1.5; }
.product-art .fav {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: #ffffff; background: rgba(9, 32, 63, 0.55);
  transition: background .15s, transform .15s;
}
.product-art .fav:hover { background: rgba(9, 32, 63, 0.8); transform: scale(1.06); }
.product-art .fav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.product-art .fav[aria-pressed="true"] svg { fill: var(--crema); stroke: var(--crema); }
.product-art .fav:disabled { opacity: .6; cursor: wait; }
.ml-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 20px; }
.ml-empty span { max-width: 460px; color: var(--ink-soft); line-height: 1.5; }
.ml-empty-heart { width: 44px; height: 44px; fill: rgba(242, 166, 90, 0.25); stroke: var(--crema-deep); stroke-width: 1.6; }
.ml { background: var(--card); border-radius: var(--radius); box-shadow: inset 0 0 0 1.5px var(--line); padding: 8px 18px; }
.ml-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.ml-row {
  display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) auto 84px auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ml-row.ml-unticked .ml-name, .ml-row.ml-unticked .ml-amt, .ml-row.ml-unticked .ml-thumb { opacity: .45; }
.ml-row.ml-off .ml-name { color: var(--ink-soft); }
.ml-pick input, .ml-head input { width: 20px; height: 20px; accent-color: var(--crema-deep); cursor: pointer; }
.product-art.ml-thumb { width: 56px; height: 56px; border-radius: 12px; }
.product-art.ml-thumb svg { width: 36px; height: 36px; }
.product-art.ml-thumb .photo-frame-sm { width: 56px; height: 56px; border-radius: 12px; box-shadow: none; }
.ml-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ml-name strong { font-weight: 600; }
.ml-name span { font-size: 14px; color: var(--ink-soft); }
.ml-amt { text-align: right; font-variant-numeric: tabular-nums; }
.ml-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 8px; }
@media (max-width: 640px) {
  .ml { padding: 6px 14px; }
  .ml-row { grid-template-columns: 28px 48px minmax(0, 1fr); grid-template-areas: "pick thumb name" ". qty qty" ". amt rm"; gap: 8px 12px; }
  .ml-row .ml-pick { grid-area: pick; } .ml-row .ml-thumb { grid-area: thumb; } .ml-row .ml-name { grid-area: name; }
  .ml-row .ml-qty { grid-area: qty; justify-self: start; } .ml-row .ml-amt { grid-area: amt; text-align: left; } .ml-row .link-btn { grid-area: rm; justify-self: end; }
  .product-art.ml-thumb { width: 48px; height: 48px; }
  .ml-foot .btn { width: 100%; }
}

/* Card payment link page (/portal/pay/) */
.paylink-page { width: 100%; max-width: 460px; }
.paylink-page h1 { font-size: clamp(28px, 4vw, 36px); }
.paylink-page .loading { min-height: 30vh; }
.pay-amount { font-family: var(--display); font-size: 24px; }
.pay-details summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 4px 0; }
.pay-details .items-table { margin-top: 10px; font-size: 14px; }
.card-container { min-height: 90px; margin-top: 6px; }
.paylink-box { margin: 4px 0 12px; padding: 14px 16px; border-radius: 16px; background: #eef1f5; max-width: 760px; font-size: 15px; }
.paylink-box .btn-row { margin-top: 10px; }
.paylink-box .field { max-width: 460px; }

/* Admin: Route (one delivery day, made for a phone) */
.route-days { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route-days .input { width: auto; }
.route-maps .btn { flex: 1 1 220px; justify-content: center; }
.route-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.route-stop { display: flex; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); scroll-margin-top: 80px; }
.route-stop.is-next { box-shadow: inset 0 0 0 2.5px var(--crema); }
.route-stop.is-done { opacity: 0.62; }
.route-num { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--space); color: var(--cream); font-family: var(--display); font-weight: 700; font-size: 18px; }
.route-stop.is-next .route-num { background: var(--crema); color: var(--crema-ink); }
.route-stop.is-done .route-num { background: var(--ok-bg); color: var(--ok-fg); }
.route-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.route-title { font-size: 17px; overflow-wrap: anywhere; }
.route-addr { color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.route-note { font-size: 14.5px; padding: 8px 10px; border-radius: 10px; background: #eef1f5; overflow-wrap: anywhere; }
.route-note-office { background: var(--warn-bg); color: var(--warn-fg); }
.route-order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.route-items { margin: 6px 0 0; padding-left: 18px; font-size: 14.5px; display: flex; flex-direction: column; gap: 3px; }
.route-body .btn-row { margin-top: 4px; }
@media (max-width: 600px) { .route-stop { padding: 14px; gap: 10px; } .route-body .btn-row .btn-primary { flex: 1 1 100%; justify-content: center; } }

/* ---------- Mission Control (admin + client) ---------- */
.qty-step { display: inline-flex; align-items: center; gap: 4px; }
.qty-step .icon-btn { width: 36px; height: 36px; font-size: 20px; }
.qty-step .qty-input { width: 56px; text-align: center; padding: 6px 4px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.mc-table td { vertical-align: middle; }
.mc-table .mc-x { width: 1%; white-space: nowrap; padding-left: 10px; }
.mc-table tfoot td { font-weight: 600; }
.mc-table tfoot tr.mc-total td { font-weight: 700; border-top: 2px solid var(--space); }
.mc-table tfoot tr:not(.mc-total) td { border-top: 1px solid var(--line); }
@media (max-width: 560px) { .mc-table .mc-price { display: none; } .qty-step .icon-btn { width: 32px; height: 32px; } .qty-step .qty-input { width: 46px; } }
.mc-add { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.mc-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-results li { padding: 12px 14px; border-radius: 14px; background: #eef1f5; display: flex; flex-direction: column; gap: 8px; }
.mc-results .btn { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.mc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mc-run { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: inherit; text-decoration: none; }
a.mc-run:hover { box-shadow: inset 0 0 0 1.5px var(--space); }
.mc-run.is-urgent { box-shadow: inset 0 0 0 2px var(--crema-deep); }
.mc-date { flex: none; width: 60px; text-align: center; border-radius: 14px; background: var(--space); color: var(--cream); padding: 7px 0 8px; }
.mc-date small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mint); }
.mc-date strong { display: block; font-family: var(--display); font-size: 24px; line-height: 1.05; }
.mc-date span { display: block; font-size: 12px; color: var(--muted); }
.mc-run-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mc-run-title { font-size: 17px; overflow-wrap: anywhere; }
.mc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-section h2 { font-size: 20px; margin: 4px 0 10px; }
.mc-meter { position: relative; height: 14px; border-radius: 999px; background: #e7ecf2; overflow: hidden; display: flex; }
.mc-meter > span { display: block; height: 100%; }
.mc-meter .mc-spent { background: var(--slate); }
.mc-meter .mc-this { background: var(--crema); }
.mc-meter.is-over .mc-this { background: #d4573f; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.mc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.mc-budget-big { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.mc-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.mc-events li { padding-left: 14px; border-left: 3px solid var(--line-strong); }
.mc-events li.is-client { border-left-color: var(--crema); }
.mc-events .hint { display: block; font-size: 13px; }
.mc-office { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.mc-office:first-of-type { border-top: 0; }
.mc-office-main { flex: 1 1 260px; min-width: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.switch::before { content: ""; width: 46px; height: 26px; border-radius: 999px; background: var(--line-strong); transition: background 0.15s ease; flex: none; }
.switch::after { content: ""; position: absolute; left: 3px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(9, 32, 63, 0.3); transition: transform 0.15s ease; }
.switch[aria-checked="true"]::before { background: var(--ok-fg); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid rgba(242, 166, 90, 0.6); outline-offset: 2px; border-radius: 8px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.day-chips .chip { min-height: 40px; padding: 8px 14px; }
.mc-request { padding: 12px 14px; border-radius: 14px; background: #eef1f5; display: flex; flex-direction: column; gap: 6px; }
.mc-request + .mc-request { margin-top: 10px; }
.mc-request .reply { padding: 8px 10px; border-radius: 10px; background: var(--white); font-size: 14.5px; }
.mc-note { padding: 12px 14px; border-radius: 14px; background: var(--info-bg); color: var(--info-fg); font-size: 15px; }
/* client: the Mission Control banner */
.mc-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius); background: var(--space); color: var(--cream); padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.mc-hero > canvas.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.mc-hero h1 { color: var(--cream); }
.mc-hero .kicker { color: var(--mint); }
.mc-hero p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }
.mc-countdown { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; padding: 8px 14px; border-radius: 999px; background: rgba(244, 245, 247, 0.1); color: var(--cream); }
.mc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mc-lock { display: flex; gap: 10px; align-items: flex-start; }
@media (max-width: 600px) { .mc-run { gap: 10px; padding: 12px; } .mc-date { width: 52px; } .mc-hero { padding: 22px 20px; } }
/* phones: each product becomes a small block (name, then − qty +, total, Remove) */
@media (max-width: 560px) {
  .mc-table thead { display: none; }
  .mc-table, .mc-table tbody, .mc-table tfoot { display: block; width: 100%; }
  .mc-table tbody tr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .mc-table tbody td { border: 0; padding: 0; }
  .mc-table tbody td:first-child { grid-column: 1 / -1; }
  .mc-table tbody td[colspan] { grid-column: 1 / -1; }
  .mc-table td.mc-qty { text-align: left; }
  .mc-table .mc-x { padding-left: 0; }
  .mc-table tfoot tr { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; }
  .mc-table tfoot tr:not(.mc-total) { border-top: 1px solid var(--line); }
  .mc-table tfoot tr.mc-total { border-top: 2px solid var(--space); }
  .mc-table tfoot td { border: 0 !important; padding: 0; }
  .mc-table tfoot td:empty { display: none; }
  .table-scroll { overflow-x: visible; }
}
