/* Pethfull Partner and Pethfull Meals. One design system with the customer app (eat.css):
   Plus Jakarta Sans, the green of the Pethfull logo with saffron, warm ivory, line icons (icons.js). */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --brand: #3f7316;
  --brand-strong: #335e11;
  --brand-soft: #eef5e3;
  --leaf: #8cc63f; /* the logo's green */
  --on-brand: #ffffff;
  --accent: #c8711c;
  --accent-soft: #fbeedd;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --text: #1c1a17;
  --muted: #6b655d;
  --line: #e7e2d9;
  --amber: #93560a;
  --amber-soft: #fdf1df;
  --red: #b42318;
  --red-soft: #fcebe9;
  --blue: #1d5fa8;
  --blue-soft: #e9f0fa;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(28, 26, 23, .04), 0 6px 20px rgba(28, 26, 23, .05);
  --shadow-lift: 0 2px 4px rgba(28, 26, 23, .05), 0 14px 36px rgba(28, 26, 23, .1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8cc63f;
    --brand-strong: #a8d86b;
    --brand-soft: #1f2e12;
    --on-brand: #10200a;
    --accent: #f0a95b;
    --accent-soft: #33240f;
    --bg: #11100e;
    --surface: #1a1916;
    --surface-2: #211f1c;
    --text: #f3f0ea;
    --muted: #a59e93;
    --line: #2d2a26;
    --amber: #f2b45c;
    --amber-soft: #33240f;
    --red: #f1877e;
    --red-soft: #361a17;
    --blue: #8ab6ee;
    --blue-soft: #172436;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02);
    --shadow-lift: 0 14px 36px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15.5px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 750; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75rem; }
a { color: var(--brand); font-weight: 650; text-underline-offset: 3px; }
small, .muted { color: var(--muted); }
strong { font-weight: 750; }
.num, td, .kv dd, .pill, .badge { font-variant-numeric: tabular-nums; }

/* Icons (icons.js) */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.dot-status { display: inline-block; width: .6em; height: .6em; margin-inline-end: .2em; border-radius: 50%; background: var(--muted); vertical-align: .08em; flex: none; }
.dot-status.ok { background: #22a35a; box-shadow: 0 0 0 4px color-mix(in srgb, #22a35a 20%, transparent); }
.dot-status.bad { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent); }
.dot-status.warn { background: var(--accent); }

/* Layout */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem; padding-top: calc(.7rem + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.topbar .who { margin-left: auto; color: var(--muted); font-size: .85rem; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45vw; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.1rem 1rem 6.5rem; }
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  display: flex; padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: .4rem .2rem; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 650; border-radius: 14px;
}
.tabs a .ico { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .15s; }
.tabs a .ico .i { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--brand); }
.tabs a[aria-current="page"] .ico { background: var(--brand-soft); }
.tabs .badge { position: relative; top: -2px; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 236px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; padding-left: 1.4rem; }
  .tabs { position: sticky; top: 61px; bottom: auto; flex-direction: column; align-self: start; border-top: 0; border-right: 1px solid var(--line); min-height: calc(100vh - 61px); padding: 1rem .75rem; gap: .2rem; background: transparent; backdrop-filter: none; }
  .tabs a { flex: none; flex-direction: row; gap: .65rem; padding: .55rem .75rem; border-radius: 12px; font-size: .93rem; }
  .tabs a .ico { width: auto; height: auto; background: none !important; }
  .tabs a .ico .i { width: 20px; height: 20px; }
  .tabs a[aria-current="page"] { background: var(--brand-soft); }
  .tabs a:not([aria-current="page"]):hover { background: var(--surface-2); color: var(--text); }
  main { padding: 1.6rem 1.6rem 2.5rem; }
}

/* Cards and lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.stack > * + * { margin-top: .8rem; }
.grid { display: grid; gap: .8rem; }
@media (min-width: 700px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.grid.four { grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
.grid.four > .card { padding: .9rem 1rem; }
.grid.four > .card .muted, .grid.four > .card > div:first-child { font-size: .78rem; font-weight: 650; letter-spacing: .02em; color: var(--muted); }
.grid.four > .card strong, .grid.four > .card > div:last-child { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 650; }
.kv .total { font-weight: 800; border-top: 1px solid var(--line); padding-top: .5rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }

/* Status */
.banner { display: flex; gap: .8rem; align-items: center; border-radius: var(--radius-sm); padding: .8rem .95rem; font-weight: 550; border: 1px solid transparent; }
.banner.ok { background: var(--brand-soft); color: var(--brand-strong); border-color: color-mix(in srgb, var(--brand) 18%, transparent); }
.banner.warn { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 18%, transparent); }
.banner.bad { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 18%, transparent); }
.banner.info { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 18%, transparent); }
.banner .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, currentColor 12%, transparent); flex: none; }
.banner .ico .i { width: 19px; height: 19px; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.pill .i { width: 13px; height: 13px; }
.pill.ok { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); }
.pill.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.pill.bad { background: var(--red-soft); border-color: transparent; color: var(--red); }
.pill.info { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.badge { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; }

/* Orders */
.order.new { border: 2px solid var(--brand); box-shadow: 0 0 0 5px var(--brand-soft), var(--shadow-lift); }
.order .items { list-style: none; padding: .55rem .75rem; margin: .6rem 0; background: var(--surface-2); border-radius: var(--radius-sm); }
.order .items li { display: flex; gap: .55rem; padding: .25rem 0; font-weight: 600; }
.order .items .qty { font-weight: 800; min-width: 2.2rem; color: var(--brand); }
.order .meta { color: var(--muted); font-size: .88rem; }
.order h3 { letter-spacing: -.01em; }
.delivery { margin-top: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); display: grid; gap: .3rem; background: var(--surface-2); }
.delivery .meta { color: var(--muted); font-size: .88rem; }
.steps { display: flex; gap: .3rem; margin: .65rem 0; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps span.done { background: var(--leaf); }

/* Buttons and forms */
button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .55rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
button:hover, .btn:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); }
button:active, .btn:active { transform: scale(.985); }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
button.primary:hover, .btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
button.big { width: 100%; }
button.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: transparent; }
button.danger:hover { background: var(--red-soft); }
button.link { border: 0; background: none; color: var(--brand); padding: .25rem; min-height: 0; box-shadow: none; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

form .field { display: flex; flex-direction: column; gap: .35rem; }
label { font-weight: 700; font-size: .9rem; }
.hint { color: var(--muted); font-size: .82rem; font-weight: 500; }
input, select, textarea {
  font: inherit; font-weight: 550; color: var(--text); background: var(--surface);
  min-height: 50px; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); font-weight: 500; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.field.error input, .field.error select, .field.error textarea { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.field .err { color: var(--red); font-size: .84rem; font-weight: 600; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 550; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 1px; flex: none; accent-color: var(--brand); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 750; font-size: 1.05rem; margin-bottom: .5rem; padding: 0; }
.progress { display: flex; gap: .4rem; margin-bottom: 1.1rem; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--brand); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 700; font-size: .76rem; letter-spacing: .03em; text-transform: uppercase; background: var(--surface-2); }
td.r, th.r { text-align: right; }

/* Login and signup */
.auth {
  min-height: 100vh; display: grid; place-items: center;
  padding: calc(1.5rem + env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(40rem 22rem at 50% -8rem, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    var(--bg);
}
.auth .card { width: 100%; max-width: 420px; padding: 1.6rem 1.4rem; box-shadow: var(--shadow-lift); }
.auth.wide .card { max-width: 640px; }
.auth .brand { justify-content: center; flex-direction: column; gap: .7rem; font-size: 1.5rem; margin-bottom: .2rem; }
.auth .brand img { width: 84px; height: 84px; }
.auth .tagline { text-align: center; color: var(--muted); margin-bottom: 1.3rem; }

/* Dialog */
dialog { border: 1px solid var(--line); border-radius: 22px; padding: 0; width: min(520px, calc(100vw - 2rem)); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
dialog::backdrop { background: rgba(20, 18, 15, .5); backdrop-filter: blur(3px); }
dialog .body { padding: 1.3rem; }
dialog .body > .row:last-child { gap: .6rem; }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; background: var(--text); color: var(--bg); padding: .75rem 1.1rem; border-radius: 14px; font-weight: 650; max-width: calc(100vw - 2rem); box-shadow: var(--shadow-lift); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.empty { text-align: center; color: var(--muted); padding: 2.4rem 1rem; display: grid; justify-items: center; gap: .7rem; }
.empty .ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.empty .ico .i { width: 30px; height: 30px; }
.menu-item { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; background: var(--line); flex: none; }
.dot { width: 13px; height: 13px; border: 1.5px solid #1f8a4c; border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.dot::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #1f8a4c; }
.dot.nonveg { border-color: var(--red); }
.dot.nonveg::after { background: var(--red); }
@media (prefers-reduced-motion: no-preference) { .order.new { animation: pulse 1.6s ease-out 2; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px transparent, var(--shadow-lift); } }

/* Online switch and order tabs */
.online { transition: background .2s, border-color .2s; }
.online.is-on { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); }
.online.is-off { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); background: linear-gradient(135deg, var(--red-soft), var(--surface) 70%); }
.switch { position: relative; width: 60px; min-width: 60px; height: 34px; min-height: 34px; padding: 0; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--muted) 55%, var(--line)); flex: none; box-shadow: none; }
.switch span { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: left .18s cubic-bezier(.3, .7, .4, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.switch.on { background: var(--brand); }
.switch.on span { left: 30px; }
.switch:hover { border: 0; }
.segments { display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 1px; scrollbar-width: none; }
.segments::-webkit-scrollbar { display: none; }
.segments button { flex: none; border-radius: 999px; min-height: 40px; padding: .35rem .95rem; font-size: .9rem; }
.segments button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.segments .count { font-size: .78rem; opacity: .7; }

/* Simple for everyone: the PIN shown big, "say it again", and large main buttons. */
.pin { font-size: 2.5rem; font-weight: 800; letter-spacing: .35em; text-align: center; padding: .7rem 0 .7rem .35em; border-radius: 16px; background: var(--brand-soft); color: var(--brand-strong); font-variant-numeric: tabular-nums; border: 1px dashed color-mix(in srgb, var(--brand) 40%, transparent); }
.say { min-height: 48px; min-width: 48px; padding: 0; border-radius: 999px; color: var(--brand); }
.say .i { width: 22px; height: 22px; }
button.big, .btn.big { min-height: 62px; font-size: 1.15rem; font-weight: 800; border-radius: 16px; }
button.big .i, .btn.big .i { width: 24px; height: 24px; }
label .hint { display: block; margin-top: .1rem; }
.order > .row + .meta, .order > .meta + .row, .order > .meta + .meta { margin-top: .5rem; }
.order > .row:not(:first-child) { margin-top: .7rem; }
