/* Maple EOD on the web: one look for every section. Plain CSS, light and dark, phone to desktop. */
:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --line: #e3e3e8;
  --line-strong: #c9c9d0;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #9a9aa0;
  --accent: #0a64d6;
  --accent-soft: #e6effc;
  --warn: #a55300;
  --warn-soft: #fff1e0;
  --bad: #c4231c;
  --bad-soft: #fde9e8;
  --good: #1d7a32;
  --good-soft: #e6f4e9;
  --grey-soft: #efeff2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618; --surface: #1e1e20; --surface-2: #232326; --line: #333337; --line-strong: #46464b;
    --text: #f2f2f7; --muted: #a1a1a6; --faint: #75757a; --accent: #4d9bff; --accent-soft: #17304f;
    --warn: #ffb35c; --warn-soft: #3a2a14; --bad: #ff7a72; --bad-soft: #3d1c1a; --good: #5fd77b; --good-soft: #17331f;
    --grey-soft: #2b2b2f; --shadow: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Controls */
button, .button {
  font: inherit; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); border-radius: 8px; padding: 5px 12px; cursor: pointer; white-space: nowrap;
}
button:hover:not(:disabled) { border-color: var(--faint); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.quiet { border-color: transparent; background: transparent; color: var(--muted); padding: 5px 7px; }
button.quiet:hover:not(:disabled) { background: var(--grey-soft); border-color: transparent; color: var(--text); }
button.small { padding: 3px 9px; font-size: 13px; }
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 8px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 8px; color: var(--faint); pointer-events: none; }
.search input { padding-left: 28px; width: 190px; }
.segmented { display: inline-flex; background: var(--grey-soft); border-radius: 8px; padding: 2px; }
.segmented button { border: none; background: transparent; padding: 4px 11px; color: var(--muted); border-radius: 6px; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.count { font-size: 12px; color: var(--faint); margin-left: 3px; }
.segmented button.on .count { color: var(--muted); }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.grey { background: var(--grey-soft); color: var(--muted); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* Sign-in */
.signin { max-width: 380px; margin: 16vh auto; padding: 32px 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.signin .mark { margin: 0 auto 14px; }
.signin h1 { font-size: 22px; margin: 0 0 6px; }
.signin p { color: var(--muted); margin: 0 0 18px; }
.problem { color: var(--bad); }

/* App frame */
.app { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface-2); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 14px; font-weight: 600; font-size: 15px; }
.mark { width: 28px; height: 28px; flex: none; display: block; }
.mark.large { width: 64px; height: 64px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; padding: 6px 9px; border-radius: 8px; }
.nav a svg { color: var(--muted); }
.nav a:hover { background: var(--grey-soft); }
.nav a.current { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.nav a.current svg { color: var(--accent); }
.nav .badge { margin-left: auto; font-size: 11px; background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 7px; border: 1px solid var(--line); }
.nav a.current .badge { color: var(--accent); }
.account { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 4px 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--grey-soft); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none; }
.account .email { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main { min-width: 0; }
.content { min-width: 0; }
/* While the service's automatic fixes are off: across the top of every page. */
.banner { display: flex; align-items: center; gap: 8px; padding: 8px 26px; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line); }
.banner svg { flex: none; }
.banner > span { flex: 1; min-width: 0; }
.banner button { flex: none; }
.header.with-control { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* A switch: a checkbox drawn as one. */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch .note { color: var(--muted); font-size: 12px; }
.switch input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 10px; border: none; padding: 0; background: var(--line-strong); position: relative; cursor: pointer; flex: none; }
.switch input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.12s; }
.switch input[type="checkbox"]:checked { background: var(--accent); }
.switch input[type="checkbox"]:checked::after { left: 18px; }
.switch input[type="checkbox"]:disabled { opacity: 0.45; cursor: default; }

/* Pages */
.page { padding: 22px 26px 40px; max-width: 1200px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 36%); min-height: 100vh; }
.split > .page { max-width: none; }
.split > .side { border-left: 1px solid var(--line); background: var(--surface-2); padding: 22px 20px 40px; min-width: 0; }
.side-sticky { position: sticky; top: 22px; }
.header { margin-bottom: 14px; }
.header h1 { font-size: 22px; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
.header .sub { color: var(--muted); margin: 2px 0 0; font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.toolbar .spacer { flex: 1; }
h2.section { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
.side h2.section:first-child { margin-top: 0; }

/* Cards and tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.card.padded { padding: 12px 14px; }
.card + .card { margin-top: 12px; }
.card-title { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.card-title .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
.card-title .spacer { flex: 1; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.card > table th:first-child { border-top-left-radius: var(--radius); }
.card > table th:last-child { border-top-right-radius: var(--radius); }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface-2); }
tr.row.selected td { background: var(--accent-soft); }
td.note { color: var(--muted); font-size: 13px; padding-top: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--faint); }

/* Home tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 4px 0 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; }
.tile .glyph { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.tile .glyph.warn { background: var(--warn-soft); color: var(--warn); }
.tile .glyph.good { background: var(--good-soft); color: var(--good); }
.tile .glyph svg { width: 18px; height: 18px; }
.tile .label { color: var(--muted); font-size: 12px; }
.tile .value { font-size: 22px; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }

/* Details */
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-title { font-size: 20px; font-weight: 650; margin: 6px 0 2px; }
.callout { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0; }
.callout svg { margin-top: 2px; color: var(--warn); }
.compare { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 14px; font-variant-numeric: tabular-nums; }
.compare .head { font-size: 12px; color: var(--muted); }
.compare .label { color: var(--muted); }
.compare .differs { color: var(--warn); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.side .actions { justify-content: flex-start; }

/* Empty states */
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty svg { width: 30px; height: 30px; color: var(--faint); margin-bottom: 8px; }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* End of Day */
.eod-day { padding: 8px 14px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; border-top: 1px solid var(--line); }
.eod-day:first-child { border-top: none; }
.eod-pick { display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; }
.eod-pick:hover { background: var(--surface-2); }
.picklist-wrap { display: flex; justify-content: center; }
.picklist-sheet { display: block; width: 288px; max-width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; box-shadow: var(--shadow); }

/* Weights */
.weights td input { width: 90px; text-align: right; }
.unit { color: var(--muted); font-size: 12px; margin-left: 6px; }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }

/* Sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 12px 12px; z-index: 10; }
.sheet { background: var(--surface); border-radius: 14px; width: min(760px, 100%); max-height: 84vh; overflow: auto; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); }
.sheet .sheet-head { padding: 16px 18px 8px; }
.sheet .sheet-head h2 { margin: 0; font-size: 17px; }
.sheet .sheet-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.sheet .sheet-body { padding: 4px 18px; }
.sheet .sheet-body .card { box-shadow: none; }
.sheet .actions { padding: 12px 18px 16px; margin: 0; border-top: 1px solid var(--line); }

/* Tablet: an icon-only sidebar */
@media (max-width: 1100px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .brand > span:not(.mark), .nav a span.label, .nav .badge, .account .email { display: none; }
  .brand { justify-content: center; padding: 2px 0 14px; }
  .nav a { justify-content: center; padding: 9px 0; }
  .account { flex-direction: column; padding: 12px 0 0; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(300px, 40%); }
}

/* Narrow: the details below the list */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split > .side { border-left: none; border-top: 1px solid var(--line); }
  .side-sticky { position: static; }
}

/* Phone: the sections along the top, one column, fewer table columns */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; height: auto; z-index: 5; flex-direction: row; align-items: center; padding: 8px 10px; border-right: none; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand { padding: 0 6px 0 0; }
  .nav { flex-direction: row; gap: 2px; }
  .nav a { padding: 7px 9px; }
  .account { margin: 0 0 0 auto; border-top: none; padding: 0; flex-direction: row; }
  .avatar { display: none; }
  .page { padding: 16px 14px 32px; }
  .banner { padding: 8px 14px; }
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split > .side { border-left: none; border-top: 1px solid var(--line); padding: 18px 14px 32px; }
  .side-sticky { position: static; }
  .search input { width: 100%; }
  .search { flex: 1 1 160px; }
  .hide-sm { display: none; }
  th, td { padding: 8px 9px; }
  .header h1 { font-size: 20px; }
}

/* Counts entered by hand (Edit…) and the USPS pickup, as the Mac's sheets. */
button.danger { color: var(--bad); }
button.danger:hover:not(:disabled) { background: var(--bad-soft); }
td.nowrap { white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
.stepper button { border: 0; border-radius: 0; padding: 2px 9px; min-height: 0; background: transparent; font-size: 14px; line-height: 1.4; }
.stepper b { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 4px;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.edit-grid .problem { grid-column: 1 / -1; }
.edit-skus { display: grid; grid-template-columns: 1fr auto auto; gap: 7px 14px; align-items: center; }
.edit-boxes { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; }
.edit-skus .head, .edit-boxes .head { font-size: 12px; color: var(--muted); }
.sheet .actions .tiny { align-self: center; }
.pickup { margin-top: 14px; }
.pickup p { margin: 6px 0; }
.pickup .booked { color: var(--good); font-weight: 600; display: flex; align-items: center; gap: 4px; margin: 6px 0; }
.pickup .actions { margin: 10px 0 4px; }
.tiny.warn { color: var(--warn); }
.env { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; border: 1px solid currentColor; border-radius: 99px; padding: 1px 7px; }
.env.prod { color: var(--bad); }
.env.test { color: var(--warn); }
.pickup-form { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px 16px; align-items: start; padding: 4px 0 8px; }
.pickup-form > .label { color: var(--muted); padding-top: 3px; }
.pickup-form > .problem { grid-column: 1 / -1; }
.pickup-form input[type="date"] { width: auto; }
.pickup-counts { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; max-width: 340px; align-items: center; }
.pickup-counts .total { border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 760px) {
  .edit-grid { grid-template-columns: 1fr; gap: 18px; }
  .pickup-form { grid-template-columns: 1fr; gap: 4px; }
  .pickup-form > .label { padding-top: 10px; }
}

/* Home: the shipping day, Up next, readiness, and bars for SKUs and makeups. */
.day-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.day-step { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; font: inherit; color: inherit; }
.day-step:hover { border-color: var(--accent); }
.day-step.next { border: 2px solid var(--accent); padding: 11px; }
.day-step .label { font-size: 12px; color: var(--muted); }
.day-step .value { font-size: 20px; font-weight: 700; }
.day-step .note { font-size: 12px; color: var(--muted); }
.day-step .note.good { color: var(--good); }
.day-step .note.warn { color: var(--warn); }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.todo-row:last-child { border-bottom: 0; }
.todo-row .pill { min-width: 26px; justify-content: center; }
.todo-done { display: flex; align-items: center; gap: 8px; color: var(--good); padding: 6px 2px; }
.readiness { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 18px 0 6px; }
.readiness .card { margin: 0; }
.ring { display: flex; align-items: center; gap: 14px; }
.ring .value { font-size: 22px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill.chip { border: 0; cursor: pointer; font-size: 13px; padding: 3px 10px; }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 34%) 1fr auto auto; align-items: center; gap: 10px; padding: 5px 2px;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; width: 100%; }
.bar-row.link { cursor: pointer; border-radius: 6px; }
.bar-row.link:hover { background: var(--grey-soft); }
.bar-name { font-weight: 600; overflow-wrap: anywhere; }
.bar-track { height: 8px; border-radius: 4px; background: var(--grey-soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bar-fill.grey { background: var(--faint); }
.bar-fill.pro { background: #8e44d9; }
.num.strong { font-weight: 700; }
.muted.small { font-size: 12px; }
@media (max-width: 760px) { .bar-row { grid-template-columns: minmax(80px, 38%) 1fr auto; } .bar-row .muted.small { display: none; } }
.todo-row .grow { flex: 1; }
.todo { padding: 0 14px; }
.todo-done { padding: 12px 14px; }
.readiness .card { padding: 14px; }
.bars { padding: 8px 12px; }
.bar-row { white-space: normal; }
.bar-name { min-width: 0; }
