
:root{--bg:#fbfaf8;--ink:#181b21;--muted:#6b7280;--line:#eceae4;--card:#ffffff;
      --accent:#1a7f5a;--accent-ink:#0f5b40;--radius:.75rem;--maxw:54rem}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;color:var(--ink);background:var(--bg);line-height:1.55;
     font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.container{max-width:var(--maxw);margin:0 auto;padding:2.2rem 1.2rem 4rem}
h1{font-size:1.9rem;line-height:1.15;margin:.2rem 0 .4rem;letter-spacing:-.01em}
h2{font-size:1.15rem;margin:1.6rem 0 .6rem}
h3{font-size:1rem;margin:1.2rem 0 .4rem}
p{margin:.5rem 0}
ul,ol{margin:.5rem 0;padding-left:1.2rem} li{margin:.25rem 0}
.muted{color:var(--muted)}
.lead{font-size:1.15rem;color:#3a3f47}
a{color:var(--accent-ink)}
.btn,button{display:inline-block;background:var(--accent);color:#fff;text-decoration:none;
     border:0;border-radius:var(--radius);padding:.7rem 1.15rem;font-size:1rem;font-weight:600;
     cursor:pointer;font-family:inherit;line-height:1.2}
.btn:hover,button:hover{background:var(--accent-ink)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover{background:#f2f0ec}
.row{display:flex;gap:.7rem;flex-wrap:wrap}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
      padding:1.1rem 1.2rem;margin:1rem 0;box-shadow:0 1px 2px rgba(20,20,20,.03)}
form{margin:0}
label{display:block;font-size:.8rem;color:var(--muted);margin:.6rem 0 .2rem}
input,select,textarea{width:100%;padding:.55rem .65rem;border:1px solid #ddd;
     border-radius:.55rem;font-size:1rem;font-family:inherit;background:#fff;color:inherit}
input[type=checkbox]{width:auto}
input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;
     background:#f2f0ec;border-radius:.3rem;padding:.08rem .3rem}
pre{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.86rem;
    background:#f6f4f1;border:1px solid var(--line);border-radius:.55rem;
    padding:.8rem .9rem;overflow-x:auto;margin:.6rem 0}
pre code{background:none;padding:0}
nav a{text-decoration:none}
table{border-collapse:collapse;width:100%}
td,th{border-bottom:1px solid var(--line);padding:.5rem .55rem;text-align:left;font-size:.92rem}
.pill{background:#eef7f2;color:var(--accent-ink);border-radius:999px;padding:.12rem .6rem;font-size:.74rem;font-weight:600}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem}
.step{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:.9rem}
.step b{display:block;color:var(--accent-ink)}
@media(max-width:640px){.steps{grid-template-columns:1fr}}
/* A row that just arrived, highlighted long enough to notice from across a shop. */
@keyframes freshpulse{from{background:#d8f5e6}to{background:transparent}}
tr.fresh{animation:freshpulse 6s ease}

/* The business switcher, above the title: a login that owns two shops needs to
   know which one it is looking at before it reads anything else. */
.switcher{display:flex;align-items:center;gap:.5rem;margin:0 0 .8rem}
.switcher label{margin:0;white-space:nowrap}
.switcher select{width:auto;max-width:60%;font-weight:600}
@media(max-width:430px){.switcher select{max-width:100%;flex:1}}

/* ---------------------------------------------------------------- the inbox
   A merchant reads this on a phone, standing up, with one hand. So the inbox
   is a list of cards rather than a table: a table on a 390px screen is either
   a horizontal scroll or six columns of two characters each, and neither is
   something you can act on while holding a tray. */
.job{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
     padding:.9rem 1rem;margin:.7rem 0;box-shadow:0 1px 2px rgba(20,20,20,.03)}
.job.now{border-color:var(--accent);border-left-width:4px;box-shadow:0 2px 12px rgba(26,127,90,.12)}
.job .conf{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.8rem;color:var(--muted)}
.job .what{font-size:1.15rem;font-weight:600;margin:.2rem 0 .1rem;line-height:1.3}
.job .when{color:var(--muted);font-size:.9rem}
.job .state{display:inline-block;background:#eef7f2;color:var(--accent-ink);
            border-radius:999px;padding:.15rem .65rem;font-size:.78rem;font-weight:600}
.job .actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.8rem}
/* 48px is the smallest target a thumb hits reliably; the status button is the
   one control that gets pressed with wet hands in a hurry. */
.job .actions button,.job .actions .btn{min-height:48px;flex:1 1 10rem;
     display:inline-flex;align-items:center;justify-content:center;text-align:center}
.job .actions .btn.call{background:#eef7f2;color:var(--accent-ink);border:1px solid var(--line)}
@keyframes freshjob{from{border-color:var(--accent);background:#e9f9f1}to{}}
.job.fresh{animation:freshjob 6s ease}
/* The one being worked on stays on screen while the list scrolls under it. */
.sticky-now{position:sticky;top:0;z-index:5;padding-top:.4rem;
            background:linear-gradient(var(--bg) 70%,rgba(251,250,248,0))}
.sticky-now .job{margin-top:0}

@media(max-width:430px){
  .container{padding:1rem .9rem 5rem}
  h1{font-size:1.45rem}
  h2{font-size:1.05rem}
  .lead{font-size:1rem}
  /* One column, everywhere. Nothing side by side on a phone. */
  .row{flex-direction:column}
  .row>*{width:100%}
  .job .actions button,.job .actions .btn{flex:1 1 100%}
  .card{padding:.9rem}
  /* Any table left on a phone scrolls itself rather than the page. */
  table{display:block;overflow-x:auto;white-space:nowrap}
}
/* Standalone (installed) mode: the status bar area is the app's, not Safari's. */
@media(display-mode:standalone){
  .container{padding-top:max(1rem,env(safe-area-inset-top))}
  body{padding-bottom:env(safe-area-inset-bottom)}
}
