/* Running low on the Shift Pass: the card (slim when all stocked), the full-screen sheet, the undo bar. */
.rl-card {
  --rl-shell: #1d2031;
  --rl-panel: #282b3e;
  --rl-line: #4c4b5d;
  --rl-ink: #fff4df;
  --rl-muted: #cec8c6;
  --rl-good: #a9e4c3;
  --rl-warn: #ffb89f;
  display: grid; gap: 12px; margin-bottom: 22px; padding: 18px;
  border: 1px solid var(--rl-line); border-radius: 20px;
  background: var(--rl-shell); color: var(--rl-ink); box-shadow: 0 8px 20px #15172726;
}
.rl-card[hidden], .rl-sheet[hidden], .rl-undo[hidden] { display: none; }
.rl-card.is-compact { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; }
.rl-compact { flex: 1; margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--rl-muted); }
.rl-compact b { color: var(--rl-ink); }

.rl-add-sm {
  flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px;
  background: var(--yellow); color: var(--navy); font: 900 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-head { display: flex; align-items: center; gap: 12px; }
.rl-head-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--yellow); font-size: 22px; }
.rl-head-text { flex: 1; min-width: 0; }
.rl-head-text h2 { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 900; }
.rl-head-text p { margin: 3px 0 0; color: var(--rl-muted); font-size: 14px; }

.rl-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rl-line { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--rl-panel); }
.rl-line.is-ordered { box-shadow: inset 0 0 0 1px var(--blue); }
.rl-line-main {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.rl-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy-panel); font-size: 20px; line-height: 1; }
.rl-line-text { min-width: 0; }
.rl-line-text b { display: block; font-size: 15px; line-height: 1.3; }
.rl-line-text small { display: block; margin-top: 2px; color: var(--rl-muted, #cec8c6); font-size: 12.5px; line-height: 1.35; }

.rl-tag { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; white-space: nowrap; color: var(--navy); }
.rl-tag--out { background: #ffb89f; }
.rl-tag--low { background: var(--yellow); }
.rl-tag--ordered { background: var(--blue-soft); color: var(--blue-dark); }
.rl-tag--ok { background: #4c4b5d; color: #fff4df; }

.rl-arrived {
  min-height: 46px; border-radius: 12px; border: 1px solid #a9e4c3; background: transparent; color: #a9e4c3;
  font: 800 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-arrived--big { width: 100%; min-height: 52px; background: #a9e4c3; color: var(--navy); border: 0; }
.rl-see-all, .rl-order-btn {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--navy-border); background: transparent; color: var(--rl-ink);
  font: 800 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-order-btn { border-color: var(--blue); background: var(--navy-panel); }
.rl-foot { margin: 0; color: var(--rl-muted); font-size: 12.5px; line-height: 1.5; }
.rl-card button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Full-screen sheet ---------- */
body.rl-sheet-open { overflow: hidden; }
.rl-sheet {
  position: fixed; inset: 0; z-index: 900; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #1d2031; color: #fff4df;
}
.rl-sheet-inner {
  display: flex; flex-direction: column; gap: 14px; max-width: 520px; min-height: 100%; margin: 0 auto; box-sizing: border-box;
  padding: max(16px, env(safe-area-inset-top)) 14px max(96px, calc(env(safe-area-inset-bottom) + 88px));
}
.rl-sheet button:focus-visible, .rl-sheet a:focus-visible, .rl-sheet input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.rl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rl-back {
  min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--yellow);
  font: 800 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-outlet { color: #ee9981; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-align: right; }
.rl-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 900; outline: none; }
.rl-sub { margin: -8px 0 0; color: #cec8c6; font-size: 14px; line-height: 1.45; }
.rl-sec { margin: 4px 2px -6px; color: #ee9981; font: 800 11.5px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.rl-rows { display: grid; gap: 6px; }
.rl-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; box-sizing: border-box;
  border: 0; border-radius: 14px; background: #282b3e; color: #fff4df; font: inherit; text-align: left; cursor: pointer;
}
.rl-row-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; }
.rl-chev { color: #768091; font-size: 20px; line-height: 1; }

.rl-banner { margin: 0; padding: 10px 12px; border-radius: 12px; background: #a9e4c3; color: var(--navy); font-size: 13.5px; font-weight: 700; }
.rl-item-head { display: flex; align-items: center; gap: 12px; }
.rl-big-icon { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 14px; background: var(--navy-panel); border: 1px solid var(--navy-border); font-size: 28px; }
.rl-item-name { min-width: 0; }
.rl-item-name .rl-title { font-size: 22px; }
.rl-owner { margin: 2px 0 0; color: #cec8c6; font-size: 13px; }
.rl-link {
  min-height: 32px; padding: 0; border: 0; background: none; color: var(--yellow);
  font: 700 13px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-field { display: grid; gap: 6px; color: #cec8c6; font-size: 13px; font-weight: 700; }
.rl-field input {
  min-height: 48px; box-sizing: border-box; padding: 0 12px; border-radius: 12px; border: 1px solid #4c4b5d;
  background: #282b3e; color: #fff4df; font: 500 16px Inter, ui-sans-serif, system-ui, sans-serif;
}
.rl-field input::placeholder { color: #a8a3a6; }

.rl-locked { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: #282b3e; border: 1px solid var(--blue); }
.rl-locked p { margin: 0; font-size: 14px; line-height: 1.5; color: #cec8c6; }
.rl-locked b { color: #fff4df; }

.rl-panel { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: #282b3e; border: 1px solid #4c4b5d; }
.rl-panel-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.rl-counter { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 10px; }
.rl-step {
  height: 64px; border-radius: 16px; border: 2px solid #768091; background: #1d2031; color: #fff4df;
  font: 900 30px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; touch-action: manipulation;
}
.rl-count { text-align: center; }
.rl-count b { display: block; font-size: 48px; font-weight: 900; line-height: 1; }
.rl-count span { display: block; margin-top: 4px; color: #cec8c6; font-size: 13px; }
.rl-lowline { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: #1d2031; color: #cec8c6; font-size: 13px; }
.rl-lowline b { color: var(--yellow); }
.rl-low-mark { flex: none; width: 16px; height: 3px; border-radius: 2px; background: var(--yellow); }
.rl-none {
  min-height: 46px; border-radius: 12px; border: 2px solid #70444a; background: transparent; color: #ffb89f;
  font: 800 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-note { margin: 0; color: #cec8c6; font-size: 13px; line-height: 1.45; }

.rl-why { display: grid; gap: 8px; }
.rl-why-title { margin: 0; font-size: 14px; font-weight: 800; }
.rl-why-title span { color: #cec8c6; font-weight: 500; }
.rl-why-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rl-why-btn {
  min-height: 46px; border-radius: 12px; border: 2px solid #4c4b5d; background: #282b3e; color: #fff4df;
  font: 700 14px/1.2 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-why-btn[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }

.rl-error { margin: 0; color: #ffb89f; font-size: 14px; font-weight: 700; }
.rl-actions { display: grid; gap: 10px; margin-top: auto; }
.rl-remove {
  min-height: 44px; border: 0; background: none; color: #ffb89f; cursor: pointer;
  font: 800 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px;
}
.rl-submit { width: 100%; min-height: 56px; font-size: 17px; }

.rl-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 0 8px; }
.rl-done-icon { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 26px; background: #a9e4c3; color: var(--navy); font-size: 44px; font-weight: 900; }
.rl-done-icon--muted { background: #282b3e; color: #fff4df; border: 1px solid #4c4b5d; font-size: 36px; }
.rl-done-line { margin: 0; color: #cec8c6; font-size: 16px; line-height: 1.5; }
.rl-done-tip { margin: 0; padding: 10px 14px; border-radius: 12px; background: #282b3e; font-size: 13.5px; line-height: 1.5; }
.rl-done-actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.rl-done-actions .btn { width: 100%; min-height: 54px; }
.rl-ghost {
  min-height: 50px; border-radius: 14px; border: 1px solid #768091; background: transparent; color: #fff4df;
  font: 800 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}

/* Order list (people who order) */
.rl-supplier { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: #282b3e; border: 1px solid #4c4b5d; }
.rl-supplier-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rl-supplier-head b { display: block; font-size: 16px; }
.rl-supplier-head small { display: block; color: #cec8c6; font-size: 12.5px; margin-top: 2px; }
.rl-wa {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px;
  background: #23794a; color: #fff; font-size: 14px; font-weight: 800; text-decoration: none;
}
.rl-mark-all {
  min-height: 46px; border-radius: 12px; border: 0; background: var(--blue); color: var(--cream);
  font: 900 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.rl-order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rl-order-line { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #1d2031; }
.rl-mark, .rl-unmark {
  min-height: 40px; padding: 0 10px; border-radius: 10px; font: 800 13px/1.1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; white-space: nowrap;
}
.rl-mark { border: 1px solid var(--blue); background: transparent; color: #fff4df; }
.rl-unmark { border: 0; background: var(--blue-soft); color: var(--blue-dark); }

/* Undo bar: sits above the sheet and the pass for 10 seconds after a save. */
.rl-undo {
  position: fixed; left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 950;
  display: flex; align-items: center; gap: 10px; max-width: 500px; margin: 0 auto; padding: 10px 10px 10px 16px;
  border-radius: 14px; background: #fff4df; color: var(--navy); box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.rl-undo span { flex: 1; font-size: 14px; font-weight: 700; }
.rl-undo button {
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--navy); color: #fff4df;
  font: 900 14px/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}

/* Closing question: the extra "Running low for tomorrow" button. */
.flag-rl-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
  border-radius: 14px; border: 2px solid var(--blue); background: var(--navy-panel); color: #fff4df;
  font: 900 15px/1.1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.flag-rl-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
