/* Food Good portal — same palette and type as the other Food Good apps (TPM). */
:root {
  --brand: #FFC416; --brand-ink: #000;
  --bg: #F2F0EB; --surface: #FFFFFF; --surface-2: #ECE9E2; --line: #DDD8CE;
  --ink: #111111; --muted: #6B6259; --focus: #111111;
  --ok: #3E7A4C; --ok-soft: #E1EEDF; --bad: #BE3226; --bad-soft: #F8DDD8;
  --shadow: 0 1px 2px rgba(17,17,17,.06), 0 8px 24px rgba(17,17,17,.06);
  --f-display: "Bowlby One SC", "Noto Sans Georgian", "Arial Black", Impact, sans-serif;
  --f-body: "Helvetica Neue", Helvetica, Arial, "Noto Sans Georgian", "Sylfaen", sans-serif;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0D0B; --surface: #191815; --surface-2: #24221E; --line: #34312B;
    --ink: #F3F0E8; --muted: #B3A99D; --focus: #FFC416;
    --ok: #7CC48C; --ok-soft: #1C2E20; --bad: #F07B6E; --bad-soft: #3D1C18;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.splash { min-height: 100vh; display: grid; place-items: center; background: var(--brand); }
.splash b { font-family: var(--f-display); font-weight: 400; font-size: 40px; color: #000; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: #000; color: #fff; position: sticky; top: 0; z-index: 5; }
.brand b { font-family: var(--f-display); font-weight: 400; font-size: 22px; color: var(--brand); letter-spacing: .01em; }
.top-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.top .ghost { color: #fff; border-color: #3a3a3a; }

/* Buttons and fields */
button { font: inherit; cursor: pointer; border-radius: 10px; padding: 10px 14px; border: 1px solid transparent; }
button:disabled { opacity: .6; cursor: default; }
.primary { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.secondary { background: var(--ink); color: var(--bg); font-weight: 700; }
.danger { background: var(--bad-soft); color: var(--bad); font-weight: 700; border-color: var(--bad); }
.ghost { background: transparent; color: var(--ink); border-color: var(--line); padding: 7px 11px; }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form label input, .form label select { font-size: 15px; }
.form label.check, label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.check input { width: 18px; height: 18px; min-height: 0; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 0; }
legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.error { color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 8px 12px; margin: 0; font-size: 14px; }

/* Sign-in */
.login { min-height: 100vh; }
.login-card { max-width: 420px; margin: 24px auto; padding: 0 16px 32px; display: grid; gap: 20px; }
.band { background: var(--brand); color: #000; border-radius: var(--r); padding: 28px 22px; display: grid; gap: 6px; }
.band b { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: 1; }
.band span { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.login .form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.setup h2 { margin: 0; font-size: 17px; }
.setup p { margin: 0; font-size: 14px; }

/* Home */
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 48px; }
.hello { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 6vw, 36px); line-height: 1.05; margin: 8px 0 18px; }
.section { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 4px; align-content: start; min-height: 132px; padding: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease; }
.tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.tile-icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.tile-name { font-weight: 700; font-size: 16px; }
.tile-desc { color: var(--muted); font-size: 13px; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 24px; color: var(--muted); }

/* Admin */
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-head h1 { margin: 0; font-size: 22px; }
.admin-tools { display: flex; gap: 8px; flex: 1 1 280px; max-width: 460px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.people { display: grid; gap: 6px; }
.person { text-align: left; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 10px 12px; }
.person.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.person.off { opacity: .55; }
.p-name { font-weight: 700; }
.p-meta, .p-status { font-size: 13px; color: var(--muted); }
.pill { background: var(--brand); color: #000; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; vertical-align: middle; }
.editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: sticky; top: 76px; }
.editor h2 { margin: 0 0 12px; font-size: 18px; }
.editor h3 { margin: 22px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.access { display: grid; gap: 6px; }
.acc { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 8px; font-size: 14px; }
.acc select { min-height: 38px; padding: 6px 8px; }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 20; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 760px) {
  .admin-grid { grid-template-columns: 1fr; }
  .editor { position: static; }
  .acc { grid-template-columns: 1fr 130px; }
}
