@charset "utf-8";
/* ECDC Satellite -- phone first (iPhone, iPhone Max, Android), iPad too.
 * The Taller look (tokens.css, base.css); safe areas for the notch and the
 * home bar; every button at least 44px tall. On a wide screen (iPad, a big
 * phone turned) the run and the open stop sit side by side. */

.sat { min-height: 100vh; min-height: 100dvh; background: var(--background); padding: 0; }
.sat__bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: .6rem;
  padding: calc(.55rem + env(safe-area-inset-top)) calc(1rem + env(safe-area-inset-right)) .55rem calc(1rem + env(safe-area-inset-left));
  background: var(--panel-bg); border-bottom: 1px solid var(--border);
}
.sat__title { font-size: 1rem; }
.sat__who { margin-left: auto; display: flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--paragraph-muted); }
.sat__main { max-width: 64rem; margin: 0 auto; padding: 1rem calc(1rem + env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left)); }

.sat .button { min-height: 44px; }
.sat .button--small { min-height: 36px; }
.sat__wide { width: 100%; justify-content: center; }
.sat__small { font-size: .8rem; color: var(--paragraph-muted); margin: 0; }
/* Under Directions: which app it opens, and Change */
.sat__dirline { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; margin: -.2rem 0 .6rem; }
.sat__empty { color: var(--paragraph-muted); padding: 1rem 0; }

/* Sign in, Set up this phone */
.sat__card { max-width: 26rem; margin: 2rem auto; padding: 1.5rem 1.25rem; border-radius: var(--radius-lg); background: var(--panel-bg); box-shadow: var(--shadow); }
.sat__center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .75rem; }
.sat__center h1 { margin: 0; font-size: 1.4rem; }
.sat__center p { margin: 0; }
.sat__center .alert { text-align: left; width: 100%; margin: 0; }
.sat__big { font-size: 3.5rem; color: var(--ctrl-face); }

/* The link's state */
.sat__sync { display: flex; align-items: center; gap: .45rem; margin: -1rem -1rem 1rem; padding: .5rem 1rem; font-size: .8rem; text-decoration: none; }
.sat__sync .icon { font-size: 1.1rem; }
.sat__sync b { margin-left: auto; }
.sat__sync--ok { background: var(--credit-bg); color: var(--credit); }
.sat__sync--off { background: var(--warn-bg); color: var(--warn); }

.sat__head { display: flex; align-items: center; gap: .4rem; margin-bottom: .75rem; }
.sat__head h2 { margin: 0; font-size: 1.15rem; }

/* The jobs */
.sat__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.sat__tile { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-height: 7rem; padding: 1rem .9rem; border: 0; border-radius: var(--radius-lg); background: var(--panel-bg); box-shadow: var(--shadow); color: var(--headline); text-align: left; font: inherit; cursor: pointer; }
.sat__tile .icon { font-size: 2rem; color: var(--ctrl-face); }
.sat__tile small { color: var(--paragraph-muted); font-size: .8rem; }
.sat__tile--later { opacity: .5; cursor: default; }
.sat__outbox { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 48px; padding: .6rem .9rem; border: 0; border-radius: var(--radius); background: var(--panel-bg); color: var(--paragraph); font: inherit; cursor: pointer; }
.sat__outbox b { margin-left: auto; }

/* My run */
.sat__stops { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.sat__stop { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; width: 100%; min-height: 56px; padding: .7rem; border: 2px solid transparent; border-radius: var(--radius); background: var(--panel-bg); color: var(--paragraph); text-align: left; font: inherit; cursor: pointer; transition: border-color .2s; }
.sat__stop.is-open { border-color: var(--ctrl-face); }
.sat__stop--done { opacity: .6; }
.sat__stopbody { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.sat__stopbody b { color: var(--headline); }
.sat__stopbody small { color: var(--paragraph-muted); font-size: .8rem; }
.sat__num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ctrl-face); color: var(--ctrl-face-text); font-weight: 700; }
/* Something the customer hands back: in the accent colour, so it is not missed */
.sat__collect { display: inline-flex !important; align-self: flex-start; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent) !important; font-weight: 600; }
.sat__collect .icon { font-size: 1rem; }

.sat__chip { display: inline-flex; align-items: center; gap: .3rem; align-self: flex-start; margin: .25rem 0; padding: .15rem .55rem; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 500; }
.sat__chip .icon { font-size: 1rem; }
.sat__chip--ok { background: var(--credit-bg); color: var(--credit); }
.sat__chip--wait { background: var(--info-bg); color: var(--info); }
.sat__chip--local { background: var(--warn-bg); color: var(--warn); }
.sat__chip--bad { background: var(--debit-bg); color: var(--debit); }

/* A stop */
.sat__view[data-view="stop"] { display: flex; flex-direction: column; gap: .75rem; }
.sat__view[data-view="stop"][hidden] { display: none; }
.sat__name { margin: 0; font-size: 1.35rem; }
.sat__line { margin: -.5rem 0 0; font-size: .9rem; }
.sat__address { display: flex; align-items: flex-start; gap: .3rem; margin: .1rem 0 0; font-size: .9rem; color: var(--paragraph); }     /* the work place's address, under the line */
.sat__address .icon { font-size: 1.1rem; color: var(--paragraph-muted); }
/* Previously delivered: what an earlier trip already handed over (a reopened order) */
/* The pick screen's General · My batch (main's pick batches) */
.pk__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; margin: 0 0 .8rem; border-radius: var(--radius); background: var(--panel-bg); border: 1px solid var(--border); }
.pk__tab { display: flex; align-items: center; justify-content: center; gap: .3rem; min-height: 44px; border: 0; border-radius: calc(var(--radius) - 2px); background: transparent; color: var(--paragraph); font: inherit; font-weight: 700; cursor: pointer; }
.pk__tab small { font-weight: 400; color: var(--paragraph-muted); }
.pk__tab.is-on { background: var(--ctrl-face); color: var(--ctrl-face-text); }
.pk__tab.is-on small { color: inherit; opacity: .8; }
.sat__h4--before { display: flex; align-items: center; gap: .3rem; color: var(--paragraph-muted); }
.sat__items--before { color: var(--paragraph-muted); }
.sat__two { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sat__two .button { justify-content: center; }
.sat__two--small { display: inline-flex; gap: .3rem; }
.sat__h4 { margin: .5rem 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--paragraph-muted); }
.sat__items { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.sat__items li { padding: .6rem .7rem; border-radius: var(--radius); background: var(--panel-bg); }
.sat__items b { display: inline-block; min-width: 1.5rem; }
.sat__items small { color: var(--paragraph-muted); }
.sat__missing { opacity: .65; border: 1px dashed var(--border); background: transparent !important; }
.sat__collectrow { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-bg)) !important; }
.sat__collectrow small { color: var(--accent) !important; }
.sat__h4--collect { display: flex; align-items: center; gap: .3rem; color: var(--accent); }
.sat__h4--collect .icon { font-size: 1.1rem; }
.sat__collectrow--done { opacity: .6; }
.sat__collectrow--done > .icon { color: var(--credit); }
/* The delivery notes: in the accent colour too, so they are not missed */
.sat__note { display: flex; gap: .45rem; margin: 0; padding: .6rem .7rem; border-radius: var(--radius); border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel-bg)); color: var(--accent); font-weight: 600; }
.sat__note .icon { color: var(--accent); }
.sat__owed { display: flex; justify-content: space-between; padding: .6rem .2rem; border-top: 1px solid var(--border); }
.sat__form { display: flex; flex-direction: column; gap: .75rem; padding: 1rem; border-radius: var(--radius-lg); background: var(--panel-bg); box-shadow: var(--shadow); }

/* Waiting for main */
.sat__ops { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .45rem; }
.sat__ops li { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); gap: .5rem; padding: .7rem; border-radius: var(--radius); background: var(--panel-bg); }
.sat__ops small { display: block; color: var(--paragraph-muted); font-size: .8rem; }
.sat__op--ok { color: var(--credit); }
.sat__op--wait { color: var(--info); }
.sat__op--local { color: var(--warn); }
.sat__op--bad { color: var(--debit); }

/* iPad, a big phone turned: the run and the open stop side by side */
@media (min-width: 768px) {
  .sat__app.is-split .sat__views { display: grid; grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
  .sat__app.is-split [data-view="run"] { position: sticky; top: 4.5rem; max-height: calc(100dvh - 6rem); overflow-y: auto; }
  .sat__app.is-split [data-view="run"] .sat__head .button { display: none; }
  .sat__card { margin-top: 4rem; }
}

/* ===== The pick list (10b) ===== */

/* "Check this box" -- the boxes not counted in a long time, one at a time */
.pk__ask { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1rem; padding: .7rem .8rem; border-radius: var(--radius); background: var(--info-bg); color: var(--info); }
.pk__ask p { margin: 0; flex: 1; font-size: .85rem; }
.pk__ask .sat__two { margin-top: .5rem; }

.pk__progress { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--paragraph-muted); margin-bottom: .5rem; }
.pk__bar { height: .35rem; border-radius: var(--radius-pill); background: var(--border); overflow: hidden; margin-bottom: 1rem; }
.pk__bar span { display: block; height: 100%; background: var(--ctrl-face); }

/* The item */
.pk__item { padding: 1rem; border-radius: var(--radius-lg); background: var(--panel-bg); box-shadow: var(--shadow); }
.pk__name { margin: 0; font-size: 1.25rem; }
.pk__sub { margin: .15rem 0 .6rem; color: var(--paragraph-muted); font-size: .9rem; }
.pk__boxes { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.pk__box { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: .8rem; }
.pk__box b { font-family: var(--font-code); }
.pk__box--first { border-color: var(--ctrl-face); color: var(--ctrl-face); }
.pk__need { display: flex; align-items: baseline; gap: .5rem; margin-bottom: 1rem; }
.pk__need b { font-size: 2.6rem; line-height: 1; color: var(--headline); font-variant-numeric: tabular-nums; }
.pk__need span { color: var(--paragraph-muted); }

/* Retrieved, and what should be left (tap: count the box) */
.pk__take { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; align-items: stretch; }
.pk__label { display: block; font-size: .8rem; color: var(--paragraph-muted); margin-bottom: .3rem; }
.pk__qty { width: 100%; height: 56px; font-size: 1.6rem; font-weight: 700; text-align: center; }
.pk__left { display: flex; justify-content: center; align-items: center; width: 100%; height: 56px; padding: 0 .4rem; border: 1px dashed var(--ctrl-face); border-radius: var(--radius); background: transparent; color: var(--ctrl-face); font: inherit; cursor: pointer; }
.pk__left b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.pk__left--done { border-style: solid; background: var(--credit-bg); border-color: var(--credit); color: var(--credit); }

.pk__weight { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) 7rem; gap: .6rem; align-items: center; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.pk__weight .icon { color: var(--paragraph-muted); }
.pk__weight small { display: block; color: var(--paragraph-muted); font-size: .75rem; }

.pk__nav { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; margin-top: 1rem; }
.pk__nav .button { justify-content: center; }

/* The count dialog (a sheet from the bottom on a phone) */
.pk__sheet { width: 100%; padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--panel-bg); display: flex; flex-direction: column; gap: .8rem; }
.pk__sheet h3 { margin: 0; }
.pk__or { text-align: center; font-size: .8rem; color: var(--paragraph-muted); }

/* Scanning a box card */
.pk__camera { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); background: #111; overflow: hidden; display: grid; place-items: center; }
.pk__frame { width: 62%; aspect-ratio: 1; border-radius: .8rem; box-shadow: 0 0 0 999px #0008; outline: 3px solid #fff; }
.pk__camera small { position: absolute; bottom: .8rem; left: 0; right: 0; text-align: center; color: #fff; font-size: .8rem; }
.pk__type { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; margin-top: 1rem; }
.pk__recent { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }

/* A box's contents */
.pk__boxhead { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .25rem; }
.pk__boxhead b { font-family: var(--font-code); font-size: 1.3rem; }
.pk__rows { list-style: none; margin: .75rem 0; padding: 0; display: grid; gap: .4rem; }
.pk__row { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem 5rem; gap: .5rem; align-items: center; padding: .55rem .6rem; border-radius: var(--radius); background: var(--panel-bg); }
.pk__row small { display: block; color: var(--paragraph-muted); font-size: .75rem; }
.pk__row em { font-style: normal; text-align: center; color: var(--paragraph-muted); font-variant-numeric: tabular-nums; }
.pk__row input { text-align: center; }
.pk__row--off { border: 1px solid var(--warn); }
.pk__rowhead { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem 5rem; gap: .5rem; padding: 0 .6rem; font-size: .7rem; color: var(--paragraph-muted); text-transform: uppercase; letter-spacing: .04em; }
.pk__rowhead span:not(:first-child) { text-align: center; }

/* The list of items (iPad: beside the open item) */
.pk__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.pk__li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; width: 100%; min-height: 48px; padding: .45rem .6rem; border: 2px solid transparent; border-radius: var(--radius); background: var(--panel-bg); color: var(--paragraph); text-align: left; font: inherit; cursor: pointer; }
.pk__li code { font-size: .75rem; color: var(--paragraph-muted); }
.pk__li small { display: block; color: var(--paragraph-muted); font-size: .75rem; }
.pk__li.is-open { border-color: var(--ctrl-face); }
.pk__li--done { opacity: .55; }
.pk__split { display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }

.pk__done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2rem 1rem; }
.pk__done .icon { font-size: 3.5rem; color: var(--credit); }

/* The count sheet over the page; the camera; finding a product */
.pk__scrim { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); }
.pk__scrim .pk__sheet { max-width: 32rem; }
@media (min-width: 768px) { .pk__scrim { align-items: center; } .pk__scrim .pk__sheet { border-radius: var(--radius-lg); } }
.pk__camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pk__camera .pk__frame { position: relative; }
.pk__camera--off { aspect-ratio: auto; min-height: 6rem; }
.pk__camera--off .pk__frame { display: none; }
.pk__camera--off small { position: static; padding: 1rem; }
.pk__gap { margin-top: .75rem; }
.pk__add { margin: .5rem 0; }
.pk__addlabel { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .5rem; align-items: center; }
.pk__addlabel .icon { color: var(--ctrl-face); }
.pk__found { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .3rem; }
.pk__found .pk__li { grid-template-columns: 1.6rem minmax(0, 1fr) auto; }
.pk__nav .button[disabled] { opacity: .45; }
.pk__split .pk__list { position: sticky; top: 4.5rem; max-height: calc(100dvh - 8rem); overflow-y: auto; }   /* the iPad list scrolls on its own */

/* ===== Delivering, second round: quantities, refused units, the signature ===== */
.dl__items { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.dl__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .6rem; align-items: center; padding: .6rem .7rem; border-radius: var(--radius); background: var(--panel-bg); }
.dl__item small { display: block; color: var(--paragraph-muted); font-size: .75rem; }
.dl__item--short { border: 1px solid var(--warn); }
.dl__qty { display: inline-grid; grid-template-columns: 44px 3rem 44px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dl__qty button { height: 44px; border: 0; background: var(--background); color: var(--headline); font-size: 1.3rem; cursor: pointer; }
.dl__qty b { text-align: center; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.dl__of { font-size: .75rem; color: var(--paragraph-muted); text-align: right; }
.dl__refused { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; align-items: center; color: var(--warn); font-size: .85rem; }
.dl__refused .field__input { min-height: 40px; }

.dl__sum { list-style: none; margin: 0; padding: .6rem .7rem; border-radius: var(--radius); background: var(--panel-bg); display: grid; gap: .25rem; font-size: .9rem; }
.dl__sum b { display: inline-block; min-width: 1.4rem; }
.dl__sum .dl__no { color: var(--warn); }
.dl__pad { position: relative; height: 12rem; border: 2px dashed var(--ctrl-face); border-radius: var(--radius-lg); background: #fff; touch-action: none; }
.dl__pad canvas, .dl__pad svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dl__pad svg path { stroke: #111; }
.dl__line { position: absolute; left: 1rem; right: 1rem; bottom: 2.4rem; border-bottom: 1px solid #9aa; }
.dl__x { position: absolute; left: 1rem; bottom: 2.6rem; color: #9aa; font-size: 1.1rem; }
.dl__padbar { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--paragraph-muted); }
.dl__phone { margin: 0 0 .25rem; text-align: center; font-size: 1.8rem; font-weight: 700; letter-spacing: .02em; color: var(--headline); font-variant-numeric: tabular-nums; }   /* the Contact sheet's number */
/* Record a return: the button under the notes, the items being taken back */
.sat__returnbtn { border-color: var(--accent) !important; color: var(--accent) !important; }
.sat__view[data-view="return"] { display: flex; flex-direction: column; gap: .75rem; }
.sat__view[data-view="return"][hidden] { display: none; }
.rt__list { display: flex; flex-direction: column; gap: .5rem; }
.rt__take { border: 1px solid var(--accent); }
.rt__why { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; align-items: center; color: var(--accent); font-size: .85rem; }
.rt__why .field__input { min-height: 40px; }
.rt__note { display: grid; gap: .5rem; margin-top: .5rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.sat__collectrow .sat__chip { display: flex; width: max-content; }
