/* Volt: the final visual design (#118), from docs/design/volt-visual-design.html.
   Part 1 is the design's own CSS, copied as it is so the colours, sizes and components match the design:
   only the prototype's own controls (the page switcher, the demo toasts and notes) are left out.
   Part 2, at the end, applies the design to what Django renders (form fields, error lists, messages, tables). */

/* ---- Part 1: the design ---- */
:root{
  --ground:#F3F4F0;--surface:#FFFFFF;--raised:#EBEDE7;--border:#E1E4DC;--control:#D2D6CD;
  --ink:#0C0F0D;--ink2:#3B413D;--muted:#69706B;
  --volt:#D5F23C;--volt-deep:#BEDA1A;--volt-soft:#F1FAC8;
  --pos:#1E7B3F;--pos-soft:#DDF5E4;--neg:#C2362D;--neg-soft:#FDE7E4;--warn:#8A5300;--warn-soft:#FFF0D2;
  --map-bg:#E9EDE4;--map-park:#D9E7D0;--map-water:#CFE0E8;
  --r-card:24px;--r-inner:16px;--r-control:14px;
  --font:"Geist",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --ease:cubic-bezier(.2,.8,.2,1);--spring:cubic-bezier(.3,1.25,.4,1);
  --gutter:32px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--ground);color:var(--ink);font:400 15px/24px var(--font);letter-spacing:-.1px;-webkit-font-smoothing:antialiased;overflow-x:hidden;min-height:100vh}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:60;background:var(--ground)}
h1,h2,h3,h4,p{margin:0}
h1,h2,h3{text-wrap:balance;font-weight:600}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit;color:inherit;letter-spacing:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:12px}
svg{display:block}
.wrap{max-width:1240px;margin-inline:auto;padding-left:max(var(--gutter),env(safe-area-inset-left,0px));padding-right:max(var(--gutter),env(safe-area-inset-right,0px))}
.page{padding-block:40px 140px;display:grid;gap:32px;align-content:start}
.grow{flex:1}
.muted{color:var(--muted)}
.ink2{color:var(--ink2)}
.t-xl{font-size:clamp(46px,7.4vw,76px);line-height:.98;letter-spacing:-.052em;font-weight:600}
.t-l{font-size:clamp(34px,4.6vw,52px);line-height:1.04;letter-spacing:-.042em;font-weight:600}
.t-title{font-size:clamp(28px,3.6vw,38px);line-height:1.1;letter-spacing:-.036em;font-weight:600}
.t-head{font-size:22px;line-height:28px;letter-spacing:-.022em;font-weight:600}
.t-sub{font-size:17px;line-height:24px;letter-spacing:-.012em;font-weight:600}
.lead{font-size:19px;line-height:28px;letter-spacing:-.015em}
.small{font-size:13px;line-height:18px}
.caption{font-size:12px;line-height:16px;font-weight:500;letter-spacing:.004em}
.mono{font-family:var(--mono);font-weight:500;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.num{font-variant-numeric:tabular-nums}

/* entrance: starts visible-ish, never waits on a script */
.rise{animation:rise .75s var(--ease) both;animation-delay:calc(var(--i,0)*55ms)}
@keyframes rise{from{opacity:.4;transform:translateY(18px)}to{opacity:1;transform:none}}

/* navigation: translucent bar, segmented links */
.nav{position:sticky;top:env(safe-area-inset-top,0px);z-index:50;background:rgba(243,244,240,.74);-webkit-backdrop-filter:blur(22px) saturate(180%);backdrop-filter:blur(22px) saturate(180%)}
.nav__in{display:flex;align-items:center;gap:20px;min-height:76px;flex-wrap:wrap;padding-block:12px}
.logo{display:flex;align-items:center;gap:10px;font-weight:600;font-size:23px;letter-spacing:-.045em;line-height:1}
.logo__mark{width:34px;height:34px;border-radius:50%;background:var(--ink);display:grid;place-items:center;flex:none;transition:transform .5s var(--spring)}
.logo:hover .logo__mark{transform:rotate(-12deg) scale(1.06)}
.logo__mark svg{width:19px;height:19px;fill:var(--volt)}
.logo--dark{color:#fff}.logo--dark .logo__mark{background:var(--volt)}.logo--dark .logo__mark svg{fill:var(--ink)}
.seg{display:inline-flex;gap:2px;padding:4px;background:var(--raised);border-radius:999px;max-width:100%;overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg a,.seg button{padding:8px 16px;border-radius:999px;color:var(--muted);font-weight:500;font-size:14px;line-height:20px;white-space:nowrap;transition:background .3s var(--ease),color .2s}
.seg a:hover,.seg button:hover{color:var(--ink)}
.seg .is-on{background:var(--surface);color:var(--ink)}
.seg--lg a,.seg--lg button{padding:12px 22px;font-size:15px;line-height:24px}
.nav__right{display:flex;align-items:center;gap:10px}
.who{display:flex;align-items:center;gap:10px;font-weight:500;font-size:14px}
.av{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:600;font-size:14px;background:#DCE8D2;color:var(--ink)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 24px;border-radius:999px;font-weight:500;font-size:15px;letter-spacing:-.01em;white-space:nowrap;transition:transform .12s ease-out,background .2s,color .2s}
.btn:active{transform:scale(.97)}
.btn--ink{background:var(--ink);color:#fff}.btn--ink:hover{background:#1f2521}
.btn--volt{background:var(--volt);color:var(--ink)}.btn--volt:hover{background:var(--volt-deep)}
.btn--soft{background:var(--raised);color:var(--ink)}.btn--soft:hover{background:#E0E3DA}
.btn--danger{background:var(--neg-soft);color:var(--neg)}.btn--danger:hover{background:#F9D6D2}
.btn--quiet{background:transparent;color:var(--ink)}.btn--quiet:hover{background:var(--raised)}
.btn--glass{background:rgba(255,255,255,.14);color:#fff}.btn--glass:hover{background:rgba(255,255,255,.22)}
.btn[disabled],.btn.is-off{background:var(--raised);color:var(--muted);cursor:not-allowed;transform:none}
.btn--sm{height:40px;padding:0 18px;font-size:14px}
.btn--lg{height:58px;padding:0 32px;font-size:16px}
.btn--block{width:100%}
.btn svg{width:18px;height:18px}

/* surfaces */
.card{background:var(--surface);border-radius:var(--r-card);padding:28px}
.card--tight{padding:20px 24px}
.dark{background:var(--ink);color:#fff}
.stack{display:grid;gap:16px}.stack--lg{gap:24px}.stack--sm{gap:8px}
.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.between{justify-content:space-between}
.hd{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}

/* forms */
.field{display:grid;gap:8px;min-width:0}
.field>label,.label{font-size:13px;font-weight:500;color:var(--muted)}
.input{height:52px;width:100%;padding:0 16px;border-radius:var(--r-control);border:1.5px solid transparent;background:var(--ground);font-size:15px;transition:border-color .2s,background .2s;min-width:0}
.input::placeholder{color:#9AA094}
.input:focus{outline:none;border-color:var(--ink);background:#fff}
.input.is-err{border-color:var(--neg)}
.input--sm{height:44px;border-radius:12px}
.input-wrap{position:relative}
.input-wrap .suffix{position:absolute;right:16px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:14px;pointer-events:none}
.hint{font-size:13px;line-height:18px;color:var(--muted)}
.err{font-size:13px;line-height:18px;color:var(--neg);display:none;font-weight:500}
body.errors .err.show-err,.err.on{display:block}
.err-chip{display:none;background:var(--neg-soft);color:var(--neg);border-radius:14px;padding:10px 14px;font-size:13px;line-height:18px;font-weight:500}
body.errors .err-chip.show-err,.err-chip.on{display:block}
body.errors .input.demo-err{border-color:var(--neg)}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.sw{width:48px;height:28px;border-radius:999px;background:var(--control);position:relative;flex:none;transition:background .25s}
.sw::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .45s var(--spring)}
.sw[aria-checked=true]{background:var(--ink)}
.sw[aria-checked=true]::after{transform:translateX(20px)}
.chip{display:inline-flex;align-items:center;height:40px;padding:0 18px;border-radius:999px;background:var(--surface);color:var(--ink2);font-weight:500;font-size:14px;transition:background .25s var(--ease),color .2s,transform .12s}
.chip:hover{background:#fff;color:var(--ink)}
.chip:active{transform:scale(.96)}
.chip.is-on{background:var(--ink);color:#fff}
.card .chip{background:var(--ground)}.card .chip.is-on{background:var(--ink)}
.chip--tag{height:30px;padding:0 12px;font-size:13px;background:var(--raised)}
.pill{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border-radius:999px;font-size:13px;font-weight:500;white-space:nowrap}
.pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.pill--open{background:var(--pos-soft);color:var(--pos)}
.pill--closed{background:var(--raised);color:var(--muted)}
.pill--live{background:var(--volt);color:var(--ink)}
.pill--warn{background:var(--warn-soft);color:var(--warn)}
.pill--bad{background:var(--neg-soft);color:var(--neg)}
.step{display:inline-flex;align-items:center;gap:4px;padding:4px;background:var(--raised);border-radius:999px}
.step button{width:36px;height:36px;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:19px;line-height:1;transition:transform .15s var(--spring),background .2s}
.step button:hover{background:var(--volt)}
.step button:active{transform:scale(.88)}
.step b{min-width:30px;text-align:center;font-weight:500}
.lvl{letter-spacing:.06em;font-weight:500}.lvl s{text-decoration:none;color:#C3C8BF}
.money{font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.01em}

/* art tiles */
.tile{position:relative;overflow:hidden;background:var(--t,#E6EBDD);flex:none}
.tile svg{position:absolute}
.tile--thumb{width:84px;height:84px;border-radius:20px}.tile--thumb svg{width:68px;height:68px;left:8px;top:8px}
.t1{--t:#E4EAD9}.t2{--t:#E1E8EE}.t3{--t:#F1FAC8}.t4{--t:#E8E8E1}.t5{--t:#DAE8E2}

/* restaurant cards */
.rgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.rcard{display:flex;flex-direction:column;background:#fff;border-radius:var(--r-card);overflow:hidden;transition:transform .5s var(--spring)}
.rcard:hover{transform:translateY(-5px)}
.rcard__cover{height:176px}
.rcard__cover svg{width:200px;height:200px;right:-36px;bottom:-56px;transition:transform .7s var(--spring)}
.rcard:hover .rcard__cover svg{transform:scale(1.07) rotate(-5deg)}
.rcard__cover .pill{position:absolute;left:16px;top:16px;background:rgba(255,255,255,.86)}
.rcard__cover .pill--open{color:var(--pos)}
.rcard__body{padding:20px 22px 22px;display:grid;gap:12px}
.rcard.is-closed .rcard__cover{filter:saturate(.2)}
.rcard.is-closed .rcard__body{opacity:.78}
.meta{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:14px;flex-wrap:wrap}
.meta .dot{width:3px;height:3px;border-radius:50%;background:var(--control);display:inline-block}

/* restaurant page */
.banner{position:relative;overflow:hidden;border-radius:32px;min-height:300px;padding:36px;display:flex;flex-direction:column;justify-content:flex-end;gap:14px}
.banner svg{width:420px;height:420px;right:-60px;bottom:-130px;transition:transform 1.2s var(--ease)}
.banner:hover svg{transform:rotate(8deg) scale(1.03)}
.split{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:start}
.sticky{position:sticky;top:calc(96px + env(safe-area-inset-top,0px))}
.mitem{display:flex;align-items:center;gap:18px;background:#fff;border-radius:24px;padding:14px 20px 14px 14px}
.mitem__t{flex:1;min-width:0}
.line{display:flex;justify-content:space-between;gap:12px;font-size:15px}
.line b{font-weight:500}
.sum{display:grid;gap:12px}
.sum hr{border:0;height:1px;background:var(--border);margin:4px 0;width:100%}
.dark .sum hr{background:rgba(255,255,255,.14)}

/* map */
.map{position:relative;border-radius:32px;overflow:hidden;height:clamp(460px,66vh,660px);background:var(--map-bg)}
.map>svg{position:absolute;inset:0;width:100%;height:100%}
.ring{position:absolute;width:56%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);border:1.5px dashed rgba(12,15,13,.28);background:rgba(213,242,60,.1)}
.me{position:absolute;width:20px;height:20px;border-radius:50%;background:var(--ink);transform:translate(-50%,-50%);box-shadow:0 0 0 6px rgba(213,242,60,.7)}
.me::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--volt-deep);animation:pulse 2.4s var(--ease) infinite}
@keyframes pulse{from{transform:scale(1);opacity:.9}to{transform:scale(2.4);opacity:0}}
.mk{position:absolute;transform:translate(-50%,-100%);z-index:2}
.mk__pin{display:flex;align-items:center;gap:8px;background:#fff;border-radius:999px;padding:5px 14px 5px 5px;font-weight:500;font-size:13px;white-space:nowrap;transition:transform .45s var(--spring),background .2s,color .2s}
.mk__pin .tile{width:30px;height:30px;border-radius:50%}.mk__pin .tile svg{width:40px;height:40px;right:-8px;bottom:-9px}
.mk:hover .mk__pin{transform:scale(1.06)}
.mk.is-on .mk__pin{background:var(--ink);color:#fff;transform:scale(1.08)}
.mk.is-closed .mk__pin{opacity:.75}
.mk::after{content:"";position:absolute;left:50%;bottom:-6px;width:12px;height:12px;background:#fff;transform:translateX(-50%) rotate(45deg);border-radius:3px;z-index:-1}
.mk.is-on::after{background:var(--ink)}
.pop{position:absolute;z-index:5;width:min(300px,calc(100% - 24px));background:#fff;border-radius:24px;padding:18px 20px;display:grid;gap:10px;transform:translate(-50%,18px);animation:popin .4s var(--ease) both}
@keyframes popin{from{opacity:0}to{opacity:1}}
.glass{background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(22px) saturate(180%);backdrop-filter:blur(22px) saturate(180%)}
.msearch{position:absolute;left:20px;top:20px;z-index:6;width:min(460px,calc(100% - 40px));border-radius:26px;padding:16px;display:grid;gap:12px}
.maplegend{position:absolute;left:20px;bottom:20px;z-index:6;border-radius:999px;padding:8px 16px;font-size:13px;color:var(--ink2);max-width:calc(100% - 40px)}

/* order status */
.track{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tstep{display:grid;gap:10px}
.tstep__bar{height:8px;border-radius:999px;background:var(--raised);overflow:hidden}
.tstep__bar i{display:block;height:100%;width:0;border-radius:999px;background:var(--volt-deep);transition:width 1.2s var(--ease)}
.tstep.is-done .tstep__bar i{width:100%;background:var(--ink)}
.tstep.is-now .tstep__bar i{width:62%}
.tstep__l{display:flex;align-items:center;gap:8px;font-weight:500;color:var(--muted)}
.tstep.is-done .tstep__l,.tstep.is-now .tstep__l{color:var(--ink)}
.bigtimer{font-family:var(--mono);font-weight:500;letter-spacing:-.05em;font-size:clamp(76px,12vw,136px);line-height:1;font-variant-numeric:tabular-nums}
.dcard{position:relative;overflow:hidden}
.dcard>svg{position:absolute;right:-70px;bottom:-110px;width:420px;height:420px;opacity:.95}
.kv{display:grid;grid-template-columns:150px 1fr;gap:10px 20px;font-size:15px}
.kv dt{color:var(--muted)}.kv dd{margin:0;font-weight:500}

/* kanban and history */
.cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:start}
.col{background:var(--raised);border-radius:30px;padding:16px;display:grid;gap:12px;min-height:160px}
.col__h{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 2px}
.count{min-width:28px;height:28px;border-radius:999px;background:#fff;display:grid;place-items:center;font-weight:600;font-size:13px}
.ocard{background:#fff;border-radius:22px;padding:20px;display:grid;gap:12px}
.ocard .row{gap:8px;flex-wrap:nowrap}
.ocard .input{height:46px;border-radius:12px}
.empty{padding:18px;color:var(--muted);text-align:center;font-size:14px}
.hcard{background:#fff;border-radius:26px;padding:26px 30px;display:grid;gap:14px}
.tl{display:flex;gap:10px 28px;flex-wrap:wrap}
.tl div{display:grid;gap:2px}
.tl .caption{color:var(--muted)}
.hrow{display:grid;grid-template-columns:minmax(120px,1fr) auto auto auto auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border)}
.hrow:last-of-type{border-bottom:0}
.hrow .input{width:112px;text-align:center;height:46px}
.hrow.is-closed .input{opacity:.4;pointer-events:none}
.hrow.is-closed .to{opacity:.4}
.who-row{display:flex;align-items:center;gap:14px}

/* auth + landing */
.auth{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:0;border-radius:36px;overflow:hidden;background:#fff;min-height:560px}
.auth__art{background:var(--ink);color:#fff;padding:44px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth__art svg.bg{position:absolute;right:-46px;top:-34px;width:300px;height:300px}
.auth__form{padding:44px;display:grid;gap:20px;align-content:center}
.formcard{max-width:640px;margin-inline:auto;width:100%;background:#fff;border-radius:36px;padding:40px;display:grid;gap:20px}
.formcard--wide{max-width:760px}
.hero{background:var(--ink);color:#fff;border-radius:44px;padding:64px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:40px;align-items:center;overflow:hidden;position:relative;min-height:560px}
.hero__vis{position:relative;min-height:420px}
.hero__vis>svg{position:absolute;right:-40px;top:-10px;width:420px;height:420px;animation:float 7s ease-in-out infinite}
@keyframes float{50%{transform:translateY(-12px) rotate(3deg)}}
.hero__card{position:absolute;left:0;bottom:6px;width:min(330px,100%);border-radius:28px;padding:20px 22px;background:#1A201C;display:grid;gap:12px}
.pbar{height:8px;border-radius:999px;background:rgba(255,255,255,.16);overflow:hidden}
.pbar i{display:block;height:100%;width:62%;background:var(--volt);border-radius:999px}
.roles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.role{background:#fff;border-radius:30px;padding:32px;display:grid;gap:18px;align-content:space-between;min-height:260px;transition:transform .5s var(--spring)}
.role:hover{transform:translateY(-5px)}
.role__go{width:48px;height:48px;border-radius:50%;background:var(--ground);display:grid;place-items:center;transition:background .25s,transform .5s var(--spring)}
.role:hover .role__go{background:var(--volt);transform:translateX(4px)}

@media (max-width:1000px){
  .rgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .split{grid-template-columns:1fr}.sticky{position:static}
  .cols{grid-template-columns:minmax(0,1fr)}
  .hero{grid-template-columns:1fr;padding:44px 32px}
  .hero__vis{min-height:340px}.hero__vis>svg{width:320px;height:320px}
  .roles{grid-template-columns:1fr}
  .auth{grid-template-columns:1fr}.auth__art{min-height:260px}
}
@media (max-width:640px){
  :root{--gutter:16px}
  .hide-sm{display:none}
  .rgrid{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .page{padding-block:24px 150px}
  .card{padding:22px}.formcard{padding:26px;border-radius:30px}
  .auth__art,.auth__form{padding:28px}
  .banner{padding:24px;min-height:260px}.banner svg{width:190px;height:190px;right:-44px;top:-44px;bottom:auto}
  .hero{padding:32px 22px;border-radius:32px}
  .kv{grid-template-columns:1fr;gap:2px 0}.kv dd{margin-bottom:10px}
  .hrow{grid-template-columns:1fr auto auto;gap:10px}.hrow .to{display:none}.hrow .input{width:92px}
  .nav__right{margin-left:auto}
  .nav .seg{order:3;width:100%}
  .mitem{flex-wrap:wrap}
  .hcard{padding:22px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media (prefers-reduced-transparency:reduce){
  .nav,.glass,.hero__card{-webkit-backdrop-filter:none;backdrop-filter:none}
  .nav{background:var(--ground)}.glass{background:#fff}.hero__card{background:#1b211e}
}

/* ---- Part 2: the design applied to what Django renders ---- */

/* The hidden attribute always hides, whatever the display of the element's classes (.row and .seg are flex boxes).
   Found in the review of !77: the map's "Show" toggle stayed visible for a customer without a location. */
[hidden]{display:none !important}

/* The header of every page: the design's .nav. Log out is a POST form (CSRF), so its button looks like the link. */
.nav form{margin:0}
.nav__right .pill{text-decoration:none}

/* Messages after an action (Django messages): the design's soft chips. */
.messages{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.messages li{background:var(--volt-soft);color:var(--ink);border-radius:var(--r-control);padding:12px 16px;font-weight:500}
.messages li.success{background:var(--pos-soft);color:var(--pos)}
.messages li.error{background:var(--neg-soft);color:var(--neg)}
.messages li.warning{background:var(--warn-soft);color:var(--warn)}

/* Fields as Django renders them: the label, the widget, the help text and the errors. */
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea,.hrow input[type=time]{height:52px;width:100%;padding:0 16px;border-radius:var(--r-control);border:1.5px solid transparent;background:var(--ground);font-size:15px;min-width:0;transition:border-color .2s,background .2s}
.field textarea{height:auto;min-height:96px;padding:12px 16px}
.field input:focus,.field select:focus,.field textarea:focus,.hrow input:focus{outline:none;border-color:var(--ink);background:#fff}
.field input[aria-invalid=true]{border-color:var(--neg)}
.help{font-size:13px;line-height:18px;color:var(--muted)}
.help ul{margin:4px 0 0;padding-left:18px}
.errors,.errorlist{color:var(--neg);font-size:13px;line-height:18px;font-weight:500}
.errorlist{list-style:none;margin:0;padding:0}
div.errors[role=alert]{background:var(--neg-soft);border-radius:14px;padding:10px 14px}
input[type=checkbox]{width:20px;height:20px;accent-color:var(--ink)}

/* Tags to choose (a list of checkboxes): the design's chips. */
.chips div,.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips label{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:999px;background:var(--ground);font-weight:500;font-size:14px;cursor:pointer}
.chips label:has(input:checked){background:var(--ink);color:#fff}

/* Opening hours in the registration: one row per day (the design's .hrow). */
.hrow b{font-weight:500}
.hrow .closed{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--ink2)}

/* Restaurant list: the whole card is the link to the restaurant. */
.restaurant-list{list-style:none;margin:0;padding:0}
.rcard{position:relative}
.restaurant-name a::after{content:"";position:absolute;inset:0;border-radius:var(--r-card)}
.rcard__cover .initial{position:absolute;right:20px;bottom:-18px;font-size:120px;line-height:1;font-weight:600;letter-spacing:-.06em;color:rgba(12,15,13,.08)}
.tags{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.tags li{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:999px;background:var(--raised);font-size:13px;font-weight:500;color:var(--ink2)}

/* Restaurant page: opening hours table and menu. */
.banner .tags li{background:rgba(255,255,255,.7)}
.hours{width:100%;border-collapse:collapse;font-size:15px}
.hours th{text-align:left;font-weight:500;padding:8px 0;color:var(--muted)}
.hours td{text-align:right;padding:8px 0;font-variant-numeric:tabular-nums}
.hours tr+tr{border-top:1px solid var(--border)}
.menu{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.menu-item{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-radius:24px;padding:18px 22px}
.menu-item-name{font-weight:600;font-size:17px;letter-spacing:-.012em}
.menu-item-price{font-weight:600;font-variant-numeric:tabular-nums}
.status-open{color:var(--pos)}.status-closed{color:var(--muted)}

/* Text links inside the content stay visible as links. */
.textlink{color:var(--ink);font-weight:500;text-decoration:underline;text-underline-offset:3px}

/* Phones: the browsers' time pickers are wider than the design's text boxes, so the day takes its own line and the
   two times share the next one (found at 360 px in Chromium and Firefox). Nothing inside a card may widen it. */
.formcard>*,.hrow>*{min-width:0}
@media (max-width:640px){
  .hrow{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .hrow b,.hrow .closed{grid-column:1/-1}
  .hrow input[type=time]{width:100%}
}

/* The switch between the three registrations shares the card's width, so "Courier" is never hidden on a phone. */
.formcard .seg{display:flex;width:100%}
.formcard .seg a{flex:1;text-align:center;padding-inline:8px}

/* Phones: the links of the header share its whole width, and a long label wraps instead of being hidden
   (the courier has three: "Orders to deliver", "My delivery", "Delivery history"). */
@media (max-width:640px){
  .nav .seg{display:flex}
  .nav .seg a{flex:1;text-align:center;white-space:normal;padding:8px 6px;line-height:16px;display:grid;place-items:center}
}

/* The design's reset (part 1) takes the look off every button. The pages that are not restyled yet have plain
   buttons (Accept, Decline, Mark as prepared, Review order...), so a button without a class looks like the design's
   small ink button. */
button:not([class]),input[type=submit]:not([class]){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;background:var(--ink);color:#fff;padding:0 18px;border-radius:999px;font-weight:500;font-size:14px;transition:background .2s}
button:not([class]):hover,input[type=submit]:not([class]):hover{background:#1f2521}

/* Restaurant list: the results (sent alone when the location changes) keep the spacing of the page. */
#restaurant-results{display:grid;gap:24px}

/* FR-30: the owner's Edit and Remove go under the name and price when the row is narrow (NFR-14, 360 px). */
.menu-item{flex-wrap:wrap}
.menu-item-actions{margin-left:auto}
.menu-item-remove-form{margin:0}

/* NFR-14, the pages not restyled yet: plain buttons keep 8 px between them, side by side or stacked (Accept and
   Decline were touching), and two actions in a list item sit side by side. */
button:not([class]),input[type=submit]:not([class]){margin:4px 8px 4px 0}
main li>form{display:inline-block}

/* NFR-14: tables read like the rest of the design, and a heading lines up with its column (browsers centre it). */
th{text-align:left}
main table:not(.hours){width:100%;border-collapse:collapse;font-size:15px}
main table:not(.hours) th{font-size:13px;font-weight:500;color:var(--muted);padding:8px 12px 8px 0}
main table:not(.hours) td{padding:10px 12px 10px 0;border-top:1px solid var(--border);font-variant-numeric:tabular-nums}

/* NFR-14, the pages not restyled yet: a field on the page's own background gets a white fill and a border, so it
   stands out (on the checkout the quantities looked like plain text). Inside a white card it keeps the design's
   grey fill. */
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{background:var(--surface);border-color:var(--control)}
:is(.card,.formcard,.auth__form) .field :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--ground);border-color:transparent}

/* NFR-14: a link in the text is underlined (the design's reset removes it from every link). */
main a:not([class]){text-decoration:underline;text-underline-offset:3px;font-weight:500}
/* Not in cards and switches of the design, which already look clickable (same weight, so these come last). */
main .restaurant-name a:not([class]),main .seg a:not([class]){text-decoration:none;font-weight:inherit}

/* NFR-14, found in the full trial (every page and state, Chromium and Firefox, 360 and 1280 px). */
/* F2: time fields need room for "09:00 AM" and the clock icon the browser draws inside. */
.hrow input[type=time]{min-width:136px;padding:0 10px}
/* F3: plain pages: lines of text closer together (the page puts 32 px between its parts), and room above the
   headings inside a form. */
main.page > :is(p, ul, ol):not([class]){margin-top:-20px}
main form :is(h2, h3):not([class]){margin:20px 0 6px}
/* F4: a price never wraps ("27.09" and "€" on two lines). */
main table:not(.hours) td:last-child{white-space:nowrap}
/* F5: the orders to deliver are apart. */
.order-list > li + li{margin-top:20px}
/* F6: a text area sits under its label, and the restaurant's orders are separated. */
main textarea:not([class]){display:block;width:100%;max-width:28rem;margin:4px 0 8px}
main article:not([class]){padding:12px 0;border-top:1px solid var(--border)}
/* F7: the errors of a field are in a red box, as in the customer registration. */
.field .errors{display:block;background:var(--neg-soft);border-radius:14px;padding:10px 14px}
@media (max-width:640px){
  /* F1: on a phone the bolt of the log-in page sits in the corner, away from the tagline (white on lime). */
  .auth__art svg.bg{width:120px;height:120px;right:-10px;top:-10px}
  .auth__art{min-height:200px}
  /* F2: two time fields share the phone's width: less padding instead of a wider field. */
  .hrow input[type=time]{min-width:0;padding:0 8px}
}

/* FR-12: the map (Leaflet). isolation keeps Leaflet's layers (z-index 400+) under the header. */
.map--live{isolation:isolate;z-index:0}
.map--live .leaflet-control-attribution{font-size:11px}
.map-radius{stroke:rgba(12,15,13,.35);stroke-width:1.5;stroke-dasharray:6 6;fill:rgba(213,242,60,.18);fill-opacity:1}
.map-me{border-radius:50%;background:var(--ink);box-shadow:0 0 0 6px rgba(213,242,60,.7)}
.map-pin{background:none;border:0}
.map-pin__label{position:absolute;left:0;top:0;transform:translate(-50%,calc(-100% - 8px));white-space:nowrap;background:#fff;color:var(--ink);border-radius:999px;padding:6px 12px;font-size:13px;font-weight:500;box-shadow:0 4px 14px rgba(12,15,13,.16)}
.map-pin__label::after{content:"";position:absolute;left:50%;bottom:-5px;width:10px;height:10px;background:#fff;transform:translateX(-50%) rotate(45deg)}
.map-pin.is-closed .map-pin__label{opacity:.7;color:var(--muted)}
.map-search{flex-wrap:nowrap;align-items:stretch;max-width:calc(100% - 2px)}
.map-search .input{flex:1;min-width:0;border-color:var(--border);background:var(--surface)}
.map-search .btn{flex:none}
/* FR-15: the pop-up shown when a marker is clicked. */
.map-popup{display:grid;gap:8px;min-width:190px;max-width:260px}
.map-popup .t-head{margin:0}
.map-popup__details{margin:0;color:var(--ink2);font-size:14px;line-height:1.5}
.map-popup .btn{justify-self:start}
.map-popup a.btn--ink{color:#fff}
.map-popup-wrapper .leaflet-popup-content-wrapper{border-radius:20px}
.map-popup-wrapper .leaflet-popup-content{margin:16px 18px}
.map-note{background:var(--volt-soft);color:var(--ink);border-radius:var(--r-control);padding:12px 16px;margin:0}
.map-note--warn{background:var(--warn-soft);color:var(--warn)}
.map-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.map-restaurant{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.map-restaurant a{font-weight:500}
/* FR-42: the average rating in a restaurant card or in the map. */
.rating{font-weight:500;color:var(--ink)}
.rating--empty{font-weight:400;color:var(--muted)}

/* FR-41: the rating form, five stars for the restaurant and five for the courier. */
.stars{border:0;margin:0;padding:0;display:grid;gap:8px}
.stars legend{font-weight:500;padding:0;margin-bottom:8px}
.stars__row{display:flex;flex-wrap:wrap;gap:8px}
.star{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px;border-radius:999px;background:var(--surface);border:1.5px solid var(--border);cursor:pointer;font-weight:500}
.star input{margin:0;accent-color:var(--ink)}
.star:has(input:checked){background:var(--ink);color:#fff}
.star:has(input:focus-visible){border-color:var(--ink)}
