/* Ordr — app styles.
   Identity: a paper receipt. Warm near-black, receipt cream, one hot accent.
   Mono type carries the "printed ticket" feel; dashed rules are the motif. */

:root{
  --ink:#15120E;          /* warm near-black */
  --ink-2:#1E1A15;        /* raised surface */
  --ink-3:#2A241D;        /* card border / input */
  --paper:#F6F1E4;        /* receipt cream */
  --paper-soft:#CFC6B4;
  --muted:#8E8677;
  --accent:#FD4110;       /* order-up red */
  --amber:#E8A33D;
  --green:#5C9E6B;
  --line:rgba(246,241,228,.12);
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --display:"Archivo","Inter",sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --field-h:46px;         /* inputs AND selects share one height */
  --safe-b:env(safe-area-inset-bottom,0px);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--ink); color:var(--paper);
  font-family:var(--sans); font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
  padding-bottom:calc(72px + var(--safe-b));
}
img{max-width:100%;display:block;height:auto}
button{font-family:inherit}
a{color:inherit}

.wrap{max-width:720px;margin:0 auto;padding:0 18px}
.hidden{display:none !important}

/* ---------- type ---------- */
h1,h2,h3{font-family:var(--display);font-weight:700;letter-spacing:-.015em;line-height:1.1;margin:0}
h1{font-size:1.75rem}
h2{font-size:1.3rem}
h3{font-size:1.05rem}
.eyebrow{
  font-family:var(--mono);font-size:11px;font-weight:600;
  letter-spacing:.2em;text-transform:uppercase;color:var(--accent);
}
.muted{color:var(--muted)}
.small{font-size:14px}

/* ---------- app bar ---------- */
.appbar{
  position:sticky;top:0;z-index:40;background:rgba(21,18,14,.9);
  backdrop-filter:blur(12px);border-bottom:1px solid var(--line);
}
.appbar .row{display:flex;align-items:center;gap:11px;height:58px}
.appbar-mark{width:32px;height:32px;border-radius:9px;flex:none}
.appbar h1{font-size:1.25rem;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iconbtn{
  width:38px;height:38px;flex:none;display:grid;place-items:center;
  background:transparent;border:1px solid var(--line);border-radius:11px;
  color:var(--paper);cursor:pointer;transition:.15s ease;
}
.iconbtn:hover{border-color:var(--accent);color:var(--accent)}
.iconbtn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.back{background:none;border:0;color:var(--muted);font-size:14px;display:inline-flex;align-items:center;gap:6px;cursor:pointer;padding:0}
.back svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:var(--field-h);padding:0 20px;border-radius:12px;border:1px solid transparent;
  font-weight:600;font-size:15px;cursor:pointer;transition:.15s ease;white-space:nowrap;
}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{filter:brightness(1.08)}
.btn-ghost{background:transparent;border-color:var(--ink-3);color:var(--paper)}
.btn-ghost:hover{border-color:var(--accent);color:var(--accent)}
.btn-block{width:100%}
.btn-danger{background:transparent;border-color:rgba(253,65,16,.5);color:var(--accent)}
.btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.linkbtn{background:none;border:0;color:var(--muted);text-decoration:underline;text-underline-offset:3px;cursor:pointer;font-size:14px;padding:0}
.linkbtn:hover{color:var(--paper)}

/* ---------- fields. Selects match input height exactly. ---------- */
label.field{display:block;margin:0 0 14px}
label.field > span{display:block;font-size:13px;color:var(--muted);margin:0 0 6px}
input[type=text],input[type=email],input[type=password],input[type=tel],select,textarea{
  width:100%;background:var(--ink-2);border:1px solid var(--ink-3);border-radius:12px;
  color:var(--paper);font-family:inherit;font-size:15px;padding:0 14px;
  height:var(--field-h);   /* shared by inputs AND selects */
  appearance:none;-webkit-appearance:none;
}
textarea{height:auto;min-height:104px;padding:12px 14px;line-height:1.5;resize:vertical}
select{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8677' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat:no-repeat;background-position:right 12px center;background-size:18px;padding-right:38px;
}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent)}
::placeholder{color:#6B6355}

/* ---------- cards / list rows ---------- */
.card{background:var(--ink-2);border:1px solid var(--ink-3);border-radius:16px;padding:16px}
.rows{display:flex;flex-direction:column;gap:10px;margin:16px 0}
.row-item{
  display:flex;align-items:center;gap:14px;width:100%;text-align:left;
  background:var(--ink-2);border:1px solid var(--ink-3);border-radius:16px;
  padding:14px 16px;color:var(--paper);cursor:pointer;transition:.15s ease;
}
.row-item:hover{border-color:var(--accent);transform:translateY(-1px)}
.row-item .grow{flex:1;min-width:0}
.row-item .name{font-weight:600;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-item .sub{font-size:13.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-item .chev{color:var(--muted);flex:none}
.row-item .chev svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* the person dot, colored per member, or their photo once they have one */
.dot{width:34px;height:34px;border-radius:11px;flex:none;display:grid;place-items:center;
  font-family:var(--mono);font-size:13px;font-weight:600;color:#fff;overflow:hidden}
.dot img{width:100%;height:100%;object-fit:cover;display:block}
/* A photo brings its own colors, so the member color becomes a thin ring
   instead of a fill and the person stays identifiable at a glance. */
.dot.has-photo{background:transparent !important;box-shadow:inset 0 0 0 2px currentColor}
.avatar-lg{box-shadow:0 14px 34px -14px rgba(0,0,0,.8)}
.avatar-lg:not(.has-photo){font-size:30px;letter-spacing:.02em}

/* ---------- empty state ---------- */
.empty{text-align:center;padding:56px 20px;color:var(--muted)}
.empty svg{width:44px;height:44px;stroke:var(--ink-3);fill:none;stroke-width:1.4;margin:0 auto 16px}
.empty h3{color:var(--paper);margin-bottom:8px}
.empty p{margin:0 auto 20px;max-width:34ch;font-size:15px}

/* ---------- the receipt (Order Mode) ---------- */
.receipt{
  background:var(--paper);color:var(--ink);border-radius:8px;
  padding:26px 22px 30px;font-family:var(--mono);position:relative;
  box-shadow:0 24px 60px -22px rgba(0,0,0,.7);
}
/* torn top and bottom edge, the identity motif */
.receipt::before,.receipt::after{
  content:"";position:absolute;left:0;right:0;height:10px;
  background:radial-gradient(circle at 6px 0, transparent 6px, var(--paper) 6.5px);
  background-size:12px 10px;background-repeat:repeat-x;
}
.receipt::before{top:-9px;transform:rotate(180deg)}
.receipt::after{bottom:-9px}
.receipt .r-head{text-align:center;border-bottom:1px dashed rgba(21,18,14,.3);padding-bottom:14px;margin-bottom:16px}
.receipt .r-head .r-place{font-family:var(--display);font-size:1.3rem;font-weight:700;letter-spacing:-.01em}
.receipt .r-head .r-meta{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:#6B6355;margin-top:6px}
.r-line{padding:14px 0;border-bottom:1px dashed rgba(21,18,14,.22)}
.r-line:last-child{border-bottom:0}
.r-who{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#8A7F6C;margin-bottom:5px}
.r-what{font-size:1.12rem;line-height:1.45;font-weight:500;white-space:pre-wrap;word-break:break-word}
.r-foot{margin-top:18px;padding-top:14px;border-top:1px dashed rgba(21,18,14,.3);
  text-align:center;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:#8A7F6C}

/* who's eating chips */
.chips{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0 22px}
.chip{
  display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 15px;
  border-radius:999px;border:1px solid var(--ink-3);background:var(--ink-2);
  color:var(--muted);font-size:14.5px;font-weight:600;cursor:pointer;transition:.15s ease;
}
.chip .pip{width:9px;height:9px;border-radius:50%;background:currentColor;opacity:.5}
.chip.on{color:var(--paper);border-color:var(--paper-soft)}
.chip.on .pip{opacity:1}
.chip.off{opacity:.55}

/* ---------- tab bar ---------- */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:45;
  background:rgba(21,18,14,.95);backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  padding-bottom:var(--safe-b);
  display:flex;
}
.tabbar button{
  flex:1;background:none;border:0;color:var(--muted);cursor:pointer;
  padding:9px 0 10px;display:flex;flex-direction:column;align-items:center;gap:4px;
  font-size:11px;font-weight:600;letter-spacing:.02em;transition:.15s ease;
}
.tabbar button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tabbar button.on{color:var(--accent)}

/* ---------- sheet ---------- */
.sheet-back{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.6);display:grid;align-items:end}
.sheet{
  background:var(--ink-2);border-top-left-radius:22px;border-top-right-radius:22px;
  border-top:1px solid var(--ink-3);padding:10px 18px calc(24px + var(--safe-b));
  max-height:88vh;overflow-y:auto;
}
.sheet .grab{width:38px;height:4px;border-radius:2px;background:var(--ink-3);margin:0 auto 16px}
.sheet h2{margin-bottom:16px}
.sheet-actions{display:flex;gap:10px;margin-top:20px}
.sheet-actions .btn{flex:1}
@media(min-width:640px){
  .sheet-back{align-items:center;justify-items:center}
  .sheet{border-radius:22px;border:1px solid var(--ink-3);width:min(520px,92vw);padding-bottom:24px}
}

/* ---------- auth ---------- */
.auth{max-width:400px;margin:0 auto;padding:56px 0 40px}
.auth .brand{display:flex;align-items:center;justify-content:center;margin-bottom:14px}
/* The mark carries the wordmark itself, so it stands alone and runs larger. */
.auth .brand-mark{width:78px;height:78px;border-radius:19px}
.auth h1{text-align:center;font-size:2rem}
.auth .lede{text-align:center;color:var(--muted);margin:10px 0 30px;font-size:15px}
.social{display:flex;flex-direction:column;gap:10px;margin-bottom:6px}
.divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12.5px;
  letter-spacing:.14em;text-transform:uppercase;font-family:var(--mono);margin:20px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--ink-3)}
#apple-btn{
  height:44px;width:100%;border-radius:12px;border:0;background:#fff;color:#000;
  font-weight:600;font-size:15px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;
}
#google-btn{min-height:44px;display:flex;justify-content:center}
.authswap{text-align:center;margin-top:18px;font-size:14.5px;color:var(--muted)}
.authswap button{background:none;border:0;color:var(--accent);font-weight:600;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;font-size:inherit;padding:0}

.err{background:rgba(253,65,16,.12);border:1px solid rgba(253,65,16,.4);color:#F5A692;
  border-radius:12px;padding:11px 14px;font-size:14px;margin-bottom:14px}
.ok{background:rgba(92,158,107,.12);border:1px solid rgba(92,158,107,.4);color:#A8D8B3;
  border-radius:12px;padding:11px 14px;font-size:14px;margin-bottom:14px}

.toast{
  position:fixed;left:50%;bottom:calc(86px + var(--safe-b));transform:translateX(-50%);
  background:var(--paper);color:var(--ink);border-radius:999px;padding:10px 20px;
  font-size:14px;font-weight:600;z-index:80;box-shadow:0 12px 30px -10px rgba(0,0,0,.6);
}

:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:8px}
@media (prefers-reduced-motion:reduce){*{transition:none !important}}
