/* Redd's Eats crew console: bright, clean, sidebar layout. Built for quick taps with greasy thumbs. */
@font-face { font-family: "Bowlby One"; src: url("../fonts/bowlbyone.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat Brush"; src: url("../fonts/caveatbrush.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #f5f3ee; --card: #ffffff; --line: #e8e3d9; --line-2: #d8d1c3;
  --text: #241d18; --muted: #7b7168; --faint: #a89f94;
  --red: #e63b2e; --red-d: #c5301f; --red-t: #fdeae7;
  --gold: #f6b51c; --gold-t: #fff4d6;
  --teal: #12a08e; --teal-d: #0c7a6c; --teal-t: #dff4ef;
  --green: #2f9e57; --green-t: #e2f5e8;
  --display: "Bowlby One", "Arial Black", sans-serif;
  --hand: "Caveat Brush", cursive;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px; --shadow: 0 1px 2px rgba(36, 29, 24, .06), 0 6px 18px -8px rgba(36, 29, 24, .14);
  --side: 248px;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100vh; }
img { max-width: 100%; display: block; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 .8rem; }
a { color: var(--red-d); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .center { text-align: center; }
.hint { color: var(--muted); font-weight: 500; font-size: .85em; }
.kicker { font: 800 .75rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--red); margin: 0 0 .5rem; }
.poster { font-family: var(--display); font-weight: 400; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: 800 .95rem/1 var(--sans); padding: .85rem 1.3rem; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-fire { background: var(--red); color: #fff; box-shadow: 0 6px 14px -6px rgba(230, 59, 46, .6); }
.btn-fire:hover { background: var(--red-d); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-sm { padding: .65rem 1rem; font-size: .88rem; } .btn-xs { padding: .5rem .8rem; font-size: .8rem; } .wide { width: 100%; }
.mini { font: 800 .8rem/1 var(--sans); padding: .5rem .75rem; border-radius: 9px; border: 1.5px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.mini:hover { border-color: var(--text); }
.mini.hot { background: var(--teal-t); border-color: var(--teal); color: var(--teal-d); }
.mini.danger { color: var(--red-d); border-color: #f1c4be; background: #fff; }
.mini.danger:hover { background: var(--red-t); border-color: var(--red); }
.mini.arm, .btn.arm { background: var(--red) !important; color: #fff !important; border-color: var(--red) !important; }
.mini[aria-pressed="true"] { background: var(--gold-t); border-color: var(--gold); }
.actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
label { display: grid; gap: .3rem; font: 800 .82rem/1.2 var(--sans); color: var(--text); margin-bottom: .85rem; }
input, select, textarea { font: 500 1rem var(--sans); color: var(--text); background: #fff; border: 1.5px solid var(--line-2); border-radius: 10px; padding: .7rem .85rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-t); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio], input[type=range] { width: auto; padding: 0; accent-color: var(--red); }
input[type=file] { padding: .5rem; }
.inline-check { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; } .form-grid .full { grid-column: 1 / -1; }
.form-error { background: var(--red-t); color: var(--red-d); border: 1px solid #f1c4be; border-radius: 10px; padding: .6rem .8rem; font-weight: 700; font-size: .92rem; }
.pw { position: relative; display: block; } .pw input { padding-right: 4.2rem; }
.pw button { position: absolute; right: .4rem; top: 50%; translate: 0 -50%; border: 0; background: var(--bg); color: var(--text); border-radius: 7px; font: 800 .75rem var(--sans); padding: .4rem .6rem; cursor: pointer; }
.seg { display: inline-flex; background: var(--bg); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { font: 800 .85rem/1 var(--sans); padding: .6rem .95rem; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(36, 29, 24, .18); }
.seg.big button { padding: .8rem 1.5rem; font-size: 1rem; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art { background: var(--red); color: #fff; display: grid; align-content: center; justify-items: start; gap: .5rem; padding: 3rem clamp(2rem, 6vw, 5rem); position: relative; overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1.6px, transparent 2px); background-size: 22px 22px; }
.login-art img { width: min(320px, 70%); filter: drop-shadow(0 14px 0 rgba(0, 0, 0, .14)); rotate: -4deg; }
.login-hand { font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--hand); margin: 1rem 0 0; }
.login-sub { font-size: 1.1rem; max-width: 24rem; font-weight: 600; opacity: .95; }
.login-card { align-self: center; justify-self: center; width: min(400px, 100% - 2rem); padding: 2rem 0; }
.login-card h1 { font-size: 2rem; margin-bottom: .3rem; }
.login-card .btn { margin-top: .4rem; }
.back { display: block; text-align: center; margin-top: 1.1rem; font-weight: 700; font-size: .92rem; color: var(--muted); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.2rem .9rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); padding: .2rem .4rem .8rem; border-bottom: 1px solid var(--line); }
.brand img { width: 46px; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font: 400 1.15rem/1 var(--display); color: var(--red); }
.brand-text small { font: 400 1.1rem/1 var(--hand); color: var(--teal-d); margin-top: .2rem; }
.s-tabs { display: grid; gap: 3px; align-content: start; flex: 1; overflow-y: auto; }
.s-tabs button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; text-align: left; font: 700 .96rem/1 var(--sans); color: var(--muted); background: transparent; border: 0; border-radius: 10px; padding: .8rem .85rem; cursor: pointer; position: relative; }
.s-tabs button:hover { background: var(--bg); color: var(--text); }
.s-tabs button.on { background: var(--red-t); color: var(--red-d); }
.s-tabs button.on::before { content: ""; position: absolute; left: -.9rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; background: var(--red); color: #fff; font: 800 .74rem/1 var(--sans); }
.side-foot { display: grid; gap: .6rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .9rem; }
.main-col { min-width: 0; }
.demo-banner { background: var(--gold-t); border-bottom: 1px solid #f2d78a; color: #6b4d00; padding: .7rem clamp(1rem, 3vw, 2.2rem); font-weight: 700; font-size: .93rem; }
.demo-banner b { color: var(--text); }
.s-top { display: flex; justify-content: flex-end; align-items: center; padding: .9rem clamp(1rem, 3vw, 2.2rem) 0; }
.s-panel { padding: 1rem clamp(1rem, 3vw, 2.2rem) 3rem; max-width: 1240px; }
.live-chip { display: inline-flex; align-items: center; gap: .5rem; font: 800 .85rem/1 var(--sans); padding: .55rem .9rem; border-radius: 999px; background: #fff; border: 1.5px solid var(--line-2); color: var(--muted); }
.live-chip.on { background: var(--green-t); border-color: #b4e0c3; color: #1c6e3a; }
.live-chip.paused { background: var(--gold-t); border-color: #f2d78a; color: #8a6200; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: ping 1.6s infinite; display: inline-block; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(47, 158, 87, 0); } 0% { box-shadow: 0 0 0 0 rgba(47, 158, 87, .6); } }

/* ---------- panels ---------- */
.p-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: .4rem 0 1.4rem; }
.p-head h1 { font: 400 clamp(1.7rem, 3vw, 2.3rem)/1.1 var(--display); }
.p-head p { color: var(--muted); margin: .4rem 0 0; max-width: 46rem; }
.live-line b { color: var(--text); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; }
.box h2 { font-size: 1.15rem; margin: 1.2rem 0 .6rem; } .box h2:first-child { margin-top: 0; }
.group-title { font: 800 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.8rem 0 .8rem; }
.empty-s { text-align: center; color: var(--muted); padding: 3rem 1rem; background: #fff; border: 2px dashed var(--line-2); border-radius: var(--r); font-weight: 700; }
.warn { background: var(--gold-t); border: 1px solid #f2d78a; border-radius: 12px; padding: .9rem 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.row-line { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.row-line:last-child { border-bottom: 0; }
.pill { display: inline-block; font: 800 .72rem/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: .38rem .6rem; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill.new, .pill.tentative { background: var(--gold-t); color: #8a6200; }
.pill.contacted, .pill.cooking { background: #e3edff; color: #2b55b0; }
.pill.booked, .pill.on, .pill.live, .pill.picked_up, .pill.staff { background: var(--green-t); color: #1c6e3a; }
.pill.manager { background: var(--red-t); color: var(--red-d); }
.pill.closed, .pill.off, .pill.cancelled { background: var(--bg); color: var(--muted); }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; }

/* ---------- tonight ---------- */
.orders-ctl { border-left: 5px solid var(--green); }
.orders-ctl.is-paused { border-left-color: var(--gold); } .orders-ctl.is-off { border-left-color: var(--faint); }
.oc-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.oc-k { font-size: 1.05rem; } .oc-state { margin: .2rem 0 0; font-weight: 800; color: var(--teal-d); }
.is-paused .oc-state { color: #8a6200; } .is-off .oc-state { color: var(--muted); }
.oc-pause { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0 .6rem; font-weight: 700; }
.controls { display: flex; gap: 1.2rem 2rem; flex-wrap: wrap; align-items: center; }
.ctl { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-weight: 800; }
.ctl-inline { display: flex; align-items: center; gap: .6rem; margin: 0; } .ctl-inline select { width: auto; padding: .5rem .7rem; }

.board-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1.4rem; }
.col { border-radius: var(--r); padding: .9rem; min-height: 140px; display: grid; gap: .8rem; align-content: start; }
.col h2 { font: 800 .85rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; display: flex; justify-content: space-between; align-items: center; margin: 0; padding: .1rem .2rem; }
.col .n { background: #fff; color: var(--text); }
.col-new { background: var(--gold-t); } .col-new h2 { color: #8a6200; }
.col-cooking { background: var(--red-t); } .col-cooking h2 { color: var(--red-d); }
.col-ready { background: var(--teal-t); } .col-ready h2 { color: var(--teal-d); }
.col-empty { text-align: center; color: var(--faint); margin: 1rem 0; font-weight: 800; }
.tk { background: #fff; border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); display: grid; gap: .55rem; border: 1px solid var(--line); }
.tk.is-demo { border-style: dashed; }
.tk-top { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.tk-code { font: 400 1.6rem/1 var(--display); color: var(--red); }
.tk-name { font-weight: 800; font-size: 1.05rem; flex: 1; min-width: 0; }
.tk-age { color: var(--muted); font-size: .8rem; font-weight: 700; }
.demo-tag { justify-self: start; font: 800 .68rem/1 var(--sans); letter-spacing: .1em; background: var(--gold); color: var(--text); padding: .3rem .5rem; border-radius: 6px; }
.tk ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-weight: 600; }
.tk li b { color: var(--red-d); }
.tk-note { background: var(--gold-t); border-radius: 8px; padding: .5rem .65rem; margin: 0; font-weight: 700; font-size: .92rem; }
.tk-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pay-tag { display: block; font: 800 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .2rem; }
.pay-tag.paid { color: var(--green); }
.tk .next { padding: .8rem; }

/* ---------- sold out switches ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.tog { display: flex; justify-content: space-between; align-items: center; gap: .8rem; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .9rem 1rem; margin: 0; cursor: pointer; font-size: 1rem; font-weight: 800; box-shadow: var(--shadow); }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.sw { flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--green); position: relative; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 23px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .2s; }
.tog.out { background: #fbf0ee; border-color: #f1c4be; } .tog.out > span:first-child { text-decoration: line-through; color: var(--muted); }
.tog.out .sw { background: #cfc7bb; } .tog.out .sw::after { left: 3px; }
.tog input:focus-visible + .sw { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---------- bookings ---------- */
.inq { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; margin-bottom: 1rem; box-shadow: var(--shadow); display: grid; gap: .8rem; }
.inq.is-new { border-left: 5px solid var(--gold); }
.inq-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.inq-name { font-weight: 800; font-size: 1.2rem; }
.facts { display: flex; gap: .4rem; flex-wrap: wrap; }
.fact { background: var(--bg); border-radius: 999px; padding: .35rem .7rem; font-weight: 700; font-size: .88rem; }
.msg { background: var(--bg); border-radius: 10px; padding: .8rem 1rem; white-space: pre-wrap; }
.status-pick { display: flex; gap: .4rem; flex-wrap: wrap; }
.status-pick button { font: 800 .8rem/1 var(--sans); text-transform: capitalize; padding: .55rem .9rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; }
.status-pick button.on { background: var(--text); border-color: var(--text); color: #fff; }
.notes-in { min-height: 70px; }

/* ---------- tables ---------- */
.t-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow-x: auto; }
.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font: 800 .74rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: .95rem 1rem; background: #faf8f4; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #fcfaf6; }
.t.log .when { color: var(--muted); white-space: nowrap; font-size: .9rem; }

/* ---------- photos ---------- */
.upload { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.upload input { width: auto; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.photo { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pbody { padding: .8rem; display: grid; gap: .6rem; }

/* ---------- modal + toast ---------- */
.s-modal-shade { position: fixed; inset: 0; background: rgba(36, 29, 24, .5); backdrop-filter: blur(2px); z-index: 90; }
.s-modal { position: fixed; z-index: 100; left: 50%; top: 50%; translate: -50% -50%; width: min(620px, 100% - 1.6rem); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 1.6rem; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.s-modal h2 { font: 400 1.5rem/1.1 var(--display); margin-bottom: 1.1rem; }
.s-modal .close { position: absolute; right: 1rem; top: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: .6rem; }
.vrow { display: grid; grid-template-columns: 1fr 110px auto; gap: .5rem; margin-bottom: .5rem; }
.sliders { display: grid; gap: .2rem; } .sliders label { display: grid; grid-template-columns: 70px 30px 1fr; align-items: center; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 1.4rem; translate: -50% 30px; opacity: 0; pointer-events: none; z-index: 120; background: var(--text); color: #fff; font-weight: 800; padding: .8rem 1.2rem; border-radius: 12px; transition: .25s; max-width: calc(100% - 2rem); }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .board-cols { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 1.6rem; grid-auto-flow: column; justify-content: start; align-items: center; gap: 1rem; }
  .login-art img { width: 90px; } .login-hand { font-size: 2rem; margin: 0; } .login-sub { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; }
  .side { position: sticky; z-index: 50; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .6rem .8rem 0; gap: .4rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { border: 0; padding: 0; margin-right: auto; } .brand img { width: 38px; }
  .side-foot { order: 2; border: 0; padding: 0; display: flex; align-items: center; gap: .5rem; } .who { display: none; }
  .s-tabs { order: 3; flex: 1 1 100%; display: flex; overflow-x: auto; gap: .3rem; padding: .3rem 0 .6rem; scrollbar-width: none; }
  .s-tabs button { flex: none; white-space: nowrap; padding: .65rem .85rem; } .s-tabs button.on::before { display: none; }
  .s-top { padding-top: .8rem; justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; } .vrow { grid-template-columns: 1fr 90px auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
