/* Order Log — soft and friendly, large text, amber. Light mode only, phone-first. */

:root {
  --amber: #EE8A1E;        /* small marks: VIP star, today's chip */
  --amber-deep: #C96A0A;   /* big buttons */
  --amber-tint: #FCE9CE;
  --bg: #FBF7F2;
  --card: #FFFFFF;
  --ink: #26201A;
  --ink-soft: #7A6E63;
  --green: #2E9E5B;
  --red: #C8322A;
  --band: #3A322B;
  --line: #EDE5DA;
  --edge: #D9CFC2;
  --shadow: 0 1px 2px rgba(38, 32, 26, .06), 0 4px 14px rgba(38, 32, 26, .05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  /* SF Pro Rounded on iPhone — soft, and nothing to download. */
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

.screen { display: none; padding-bottom: 108px; }
.screen.active { display: block; }
.hidden { display: none !important; }

/* ---- chrome ---- */

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.topbar h1 { font-size: 30px; font-weight: 800; margin: 0; flex: 1; letter-spacing: -.02em; }
.topbar h2 { font-size: 21px; font-weight: 800; margin: 0; flex: 1; text-align: center; }
.topbar h2 + * { width: 44px; }

.back {
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  font-family: inherit; font-size: 34px; line-height: 1; color: var(--ink);
}

.link {
  background: none; border: 0; padding: 4px;
  font-family: inherit; font-size: 17px; font-weight: 700;
  color: var(--amber-deep); text-decoration: underline; text-underline-offset: 3px;
}

.searchbar { padding: 0 16px 10px; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 68%, rgba(251, 247, 242, 0));
}

/* ---- controls ---- */

input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 18px;               /* 16px+ stops iOS zooming on focus */
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
input:focus, textarea:focus { outline: none; border-color: var(--amber); }
textarea { resize: none; }
::placeholder { color: #AFA396; }

.btn {
  display: block; width: 100%;
  border: 0; border-radius: 14px; padding: 17px;
  font-family: inherit; font-size: 19px; font-weight: 800;
  text-align: center; text-decoration: none;
}
.btn-primary { background: var(--amber-deep); color: #fff; }
.btn-primary:active { background: #A85708; }
.btn-quiet {
  width: auto; flex: none;
  background: #F1E7DA; color: var(--ink);
  padding: 14px 18px; font-size: 16px;
}
.btn-delete {
  display: block; width: 100%;
  background: none; border: 0; padding: 18px;
  font-family: inherit; font-size: 17px; font-weight: 800; color: var(--red);
}

/* ---- main list ---- */

.list { min-height: 40vh; }

.dateband {
  background: var(--band); color: #fff;
  padding: 9px 16px;
  font-size: 14px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
}

.order {
  background: var(--card);
  border-radius: 16px;
  margin: 10px 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.order-head { display: flex; align-items: baseline; gap: 10px; }
.order-name { flex: 1; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.order-time { font-size: 15px; color: var(--ink-soft); white-space: nowrap; }
.vip { color: var(--amber); }

.order-items { margin-top: 6px; }
.order-item { font-size: 18px; line-height: 1.5; }
.order-item b { font-weight: 800; }

.order-comment {
  margin: 8px 0 0;
  font-size: 16px; color: var(--ink-soft);
  border-left: 3px solid var(--line); padding-left: 10px;
}

.order-controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}

/* Two different shapes on purpose: a pill you fill in, and a circle you tick.
   Confusing these means an order recorded as gone that is still in the building. */
.chip {
  border: 1.5px dashed var(--edge); background: none; color: var(--ink-soft);
  border-radius: 999px; padding: 8px 14px;
  font-family: inherit; font-size: 14px; font-weight: 700;
}
.chip.on { background: var(--amber); border: 1.5px solid var(--amber); color: #fff; }

.tick {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 6px 8px; margin-left: auto;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink-soft);
}
.tick .dot {
  width: 27px; height: 27px; border-radius: 50%;
  border: 2px solid var(--edge);
  display: grid; place-items: center;
  font-size: 15px; color: transparent;
}
.tick.on { color: var(--green); }
.tick.on .dot { background: var(--green); border-color: var(--green); color: #fff; }

.empty { text-align: center; color: var(--ink-soft); padding: 60px 30px; font-size: 17px; }

/* ---- forms ---- */

.form { padding: 0 16px; }
.label {
  font-size: 14px; font-weight: 800; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .08em;
  margin: 22px 0 8px;
}

.picked {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow);
}
#cust-picked-name { flex: 1; font-size: 20px; font-weight: 800; }

/* Capped so a long customer list never pushes the products off the screen. */
.results {
  margin-top: 8px;
  border-radius: 14px;
  overflow-y: auto;
  max-height: 264px;
  -webkit-overflow-scrolling: touch;
}
.result {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 0; border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  font-family: inherit; font-size: 18px; color: var(--ink);
}
.result:last-child { border-bottom: 0; }
.result.add { background: var(--amber-tint); color: var(--amber-deep); font-weight: 800; }
.result .vip { margin-right: 4px; }

.chosen-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 10px 8px 10px 14px;
  margin-bottom: 8px; box-shadow: var(--shadow);
}
.chosen-row .nm { flex: 1; font-size: 18px; font-weight: 700; }
.chosen-row .qty {
  width: 76px; text-align: center;
  font-size: 22px; font-weight: 800; padding: 10px 6px;
}
.chosen-row .rm {
  background: none; border: 0; padding: 8px 10px;
  font-family: inherit; font-size: 22px; color: var(--ink-soft);
}

.sublabel {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .07em;
  margin: 16px 0 8px;
  padding-top: 14px; border-top: 1px solid var(--line);
}

/* Outlines, not cards — so what is already on the order can't be mistaken for the
   list of things you can still add. */
.prodlist { margin-bottom: 10px; }
.prod {
  display: block; width: 100%; text-align: left;
  background: none; border: 1.5px solid var(--edge); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 8px;
  font-family: inherit; font-size: 18px; font-weight: 600; color: var(--ink);
}
.prod.added { opacity: .4; }

.addrow { display: flex; gap: 8px; align-items: stretch; }

.ordercontrols {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card); border-radius: 14px; padding: 12px 14px;
  margin-top: 22px; box-shadow: var(--shadow);
}

/* ---- manage ---- */

.managelist { margin-top: 10px; }
.mrow {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border-radius: 14px; padding: 10px 8px 10px 14px;
  margin-bottom: 8px; box-shadow: var(--shadow);
}
.mrow .nm { flex: 1; font-size: 18px; }
.star {
  background: none; border: 0; padding: 8px 10px;
  font-family: inherit; font-size: 22px; line-height: 1; color: var(--edge);
}
.star.on { color: var(--amber); }
.del {
  background: none; border: 0; padding: 8px 12px;
  font-family: inherit; font-size: 20px; color: var(--red);
}

.note { color: var(--ink-soft); font-size: 15px; margin-top: 16px; }
.stamp { color: #B5A99B; font-size: 13px; margin: 24px 0 40px; }

/* ---- toast ---- */

.toast {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  background: var(--band); color: #fff;
  border-radius: 14px; padding: 14px 16px;
  font-size: 16px; font-weight: 600; text-align: center;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
