/* ==========================================================================
   The Poachers Inn — website manager (admin CMS)
   Written for a publican, not a developer: big targets, plain layout,
   obvious state. No external fonts, no CDN — system stack only.
   ========================================================================== */

:root {
  /* Ink */
  --ink:        #1d2321;
  --ink-2:      #3f4a46;
  --ink-3:      #5c6862;   /* AA on white (>4.5:1) */

  /* Paper / lines — the ivory of the pub's printed menus (#f7f6f4) */
  --paper:      #f4f2ee;
  --white:      #ffffff;
  --line:       #d9d6ce;
  --line-2:     #eae8e2;

  /* Brand — matched to the public site, which is in turn sampled from the pub's
     own menus: black bands and antique gold. This was a deep green until the
     task-49 rebrand; the names say "brand" now because the colour is free to
     move and the role is not. White on --brand is 17:1. */
  --brand:      #141414;
  --brand-2:    #2e2e2e;   /* hover: lifts off the black rather than deepening */
  --brand-3:    #000000;
  --brand-ink:  #f2f1ee;
  --brass:      #7d5f1f;   /* 5.51:1 on paper — safe for small text */
  --brass-2:    #615431;   /* the "SAVE 50p" medallion fill */

  /* Status */
  --ok:         #1a6340;
  --ok-bg:      #e6f3ec;
  --ok-line:    #b7dcc7;
  --warn:       #7d5100;
  --warn-bg:    #fdf3df;
  --warn-line:  #ecd39a;
  --danger:     #8f2a20;
  --danger-bg:  #fbecea;
  --danger-line:#eebfb9;
  --info:       #1c4f72;
  --info-bg:    #e9f1f7;
  --info-line:  #bcd6e8;

  --radius:     10px;
  --radius-lg:  14px;
  --shadow-sm:  0 1px 2px rgba(29,35,33,.07);
  --shadow:     0 1px 2px rgba(29,35,33,.06), 0 8px 24px rgba(29,35,33,.07);
  --focus:      #0b6bcb;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --sidebar-w: 244px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Focus — always visible, never removed. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Shell
   ========================================================================== */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--brand);
  color: var(--brand-ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  padding: 6px;
  border-radius: var(--radius);
}
.brand:hover { background: rgba(255,255,255,.07); }

/* The pub's own stag, masked so it takes the sidebar's ink. Was a letter "P" in
   a brass disc; the pub has a real mark now, so it may as well use it. Falls
   back to an empty disc if masking is unsupported — the name is right beside it. */
.brand-mark {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brass);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .5px;
}
.brand-mark::before {
  content: "";
  width: 20px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: url("logo-stag.svg") center / contain no-repeat;
  mask: url("logo-stag.svg") center / contain no-repeat;
}

.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt strong { font-size: 15px; }
.brand-txt small { font-size: 12px; color: rgba(233,241,236,.72); }

.navtoggle {
  display: none;
  background: rgba(255,255,255,.1);
  color: var(--brand-ink);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.navlist { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }

.navlist a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(233,241,236,.88);
  text-decoration: none;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.navlist a:hover { background: rgba(255,255,255,.09); color: #fff; }
.navlist a.is-active {
  background: rgba(255,255,255,.14);
  color: #fff;
  font-weight: 650;
  border-left-color: var(--brass);
}

.nav-sep {
  height: 1px;
  background: rgba(255,255,255,.14);
  margin: 10px 4px;
  border: 0;
}

.sidebar-foot { margin-top: auto; padding-top: 12px; }

.whoami {
  font-size: 13px;
  color: rgba(233,241,236,.72);
  padding: 0 6px 8px;
}
.whoami strong { color: #fff; display: block; font-size: 14px; }

.logout { margin: 0; padding: 0 4px; }
.logout button {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  color: var(--brand-ink);
  border-radius: var(--radius);
  padding: 9px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.logout button:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Main column */
.main { min-width: 0; padding: 28px 30px 72px; }

.page-head { margin-bottom: 22px; max-width: 70ch; }
.page-head h1 { font-size: 27px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.page-head .lede { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ==========================================================================
   Cards & panels
   ========================================================================== */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card h2 { font-size: 18px; margin: 0 0 4px; }
.card h3 { font-size: 16px; margin: 0 0 4px; }
.card-note { color: var(--ink-3); font-size: 14px; margin: 0 0 16px; }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head > :first-child { margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Stat tiles */
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 13px; color: var(--ink-3); margin: 0 0 4px; font-weight: 600; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.stat-sub { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }

/* ==========================================================================
   Banners
   ========================================================================== */

.banner {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-3);
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 20px;
  font-size: 15px;
}
.banner > :first-child { margin-top: 0; }
.banner > :last-child { margin-bottom: 0; }
.banner strong { display: block; margin-bottom: 2px; }

.banner-ok     { background: var(--ok-bg);     border-color: var(--ok-line);     border-left-color: var(--ok);     color: #12402a; }
.banner-warn   { background: var(--warn-bg);   border-color: var(--warn-line);   border-left-color: var(--warn);   color: #533700; }
.banner-danger { background: var(--danger-bg); border-color: var(--danger-line); border-left-color: var(--danger); color: #6d2018; }
.banner-info   { background: var(--info-bg);   border-color: var(--info-line);   border-left-color: var(--info);   color: #17415e; }

.banner a { color: inherit; font-weight: 600; }

/* The "these are defaults" / "change your password" shout */
.banner-loud {
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.banner-loud strong { font-size: 16px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

label, .label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 5px;
}

.help {
  font-size: 13px;
  color: var(--ink-3);
  margin: 5px 0 0;
}
.help-above { margin: 0 0 7px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 42px;
}
textarea { min-height: 84px; resize: vertical; }

input:hover, select:hover, textarea:hover { border-color: #bdb7a8; }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

input[aria-invalid="true"], .is-invalid { border-color: var(--danger); background: #fffafa; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6862' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  margin-bottom: 0;
}
.check input[type="checkbox"] {
  width: 20px; height: 20px;
  flex: 0 0 20px;
  margin: 1px 0 0;
  accent-color: var(--brand-2);
}
.check span { font-size: 14px; }
.check .help { margin-top: 2px; }

.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.row .field { flex: 1 1 160px; margin-bottom: 0; }
.row .field-sm { flex: 0 1 120px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.2;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }

.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-3); background: #fbfaf7; }

.btn-danger { background: var(--white); color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); }

.btn-sm { font-size: 13.5px; padding: 7px 12px; min-height: 36px; }

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  color: var(--info);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

/* Sticky save bar (content editor) */
.savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 -2px 18px rgba(29,35,33,.10);
  padding: 14px 18px;
  margin-top: 22px;
}
.savebar .spacer { flex: 1 1 auto; }

.savestate { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.savestate.is-dirty { color: var(--warn); }
.savestate.is-saved { color: var(--ok); }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }

th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th {
  background: #faf9f5;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-weight: 700;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdfcfa; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }

.ref { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

.empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
}

/* Status pills */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
}
.pill-confirmed { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.pill-seated    { background: var(--info-bg);   color: var(--info);   border-color: var(--info-line); }
.pill-cancelled { background: #f1efe9;          color: var(--ink-3);  border-color: var(--line); }
.pill-no_show   { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1efe9;
  color: var(--ink-3);
  border: 1px solid var(--line);
}

/* Inline row forms in tables */
.rowform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
/* The overbook tick box sits on its own line under the row's controls; without
   this it would inherit .rowform's 36px-tall input sizing and stretch. */
.rowform .check { flex: 1 0 100%; font-weight: 400; }
.rowform .check input[type="checkbox"] { min-height: 20px; padding: 0; }
.rowform select, .rowform input { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.rowform select { width: auto; min-width: 130px; padding-right: 30px; }
.rowform input[type="time"] { width: 110px; }
.rowform input[type="number"] { width: 82px; }

/* ==========================================================================
   Content editor (Quill)
   ========================================================================== */

.editor-block { margin-bottom: 22px; }
.editor-block:last-of-type { margin-bottom: 0; }

.editor-block > label,
.editor-block > .label { margin-bottom: 2px; font-size: 15px; }

.editor-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.editor-shell:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(11,107,203,.18); }

/* Quill snow overrides — keep it looking like the rest of the panel */
.ql-toolbar.ql-snow {
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: #faf9f5;
  padding: 7px 8px !important;
}
.ql-container.ql-snow { border: 0 !important; font-family: var(--sans); font-size: 15px; }
.ql-editor { min-height: 150px; line-height: 1.6; color: var(--ink); padding: 14px 16px; }
.ql-editor.ql-blank::before { color: #9aa39e; font-style: normal; left: 16px; right: 16px; }
.ql-editor h2 { font-size: 21px; }
.ql-editor h3 { font-size: 18px; }
.ql-editor blockquote {
  border-left: 3px solid var(--brass);
  padding-left: 12px;
  margin-left: 0;
  color: var(--ink-2);
  font-style: italic;
}
.ql-snow .ql-stroke { stroke: var(--ink-2); }
.ql-snow .ql-fill { fill: var(--ink-2); }
.ql-snow .ql-picker { color: var(--ink-2); }
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--brand); }
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--brand); }
.ql-snow.ql-toolbar button.ql-active { background: rgba(20, 20, 20, .10); border-radius: 4px; }

/* Fallback if JS/Quill is unavailable — plain textarea still works */
.editor-fallback { min-height: 150px; }

/* ==========================================================================
   Images
   ========================================================================== */

.imgcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.imgcard h3 { margin: 0; font-size: 16px; }
.imgcard .card-note { margin: 2px 0 0; }

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #efece4 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23a8a396' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='m4 17 5-5 4 4 3-2 4 3'/%3E%3C/svg%3E") center / 40px no-repeat;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dropzone {
  /* The visually-hidden file input inside is position:absolute. Without a
     positioned ancestor it resolves against the page, so tabbing to it threw
     the focus ring into the top-left corner of the document instead of onto
     the photo box the keyboard user had just reached. */
  position: relative;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.dropzone:hover { border-color: var(--brand-2); background: #f6f8f6; }
.dropzone.is-over { border-color: var(--brand); background: var(--ok-bg); border-style: solid; }
/* The input itself is 1px and transparent, so its own ring is invisible — put a
   real, obvious one on the box the keyboard user can actually see. */
.dropzone:focus-within {
  border-color: var(--focus);
  border-style: solid;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  background: #f4f8fc;
}

.dropzone-title { font-weight: 650; font-size: 14.5px; margin: 0 0 3px; }
.dropzone-sub { font-size: 13px; color: var(--ink-3); margin: 0; }
.dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}
.dropzone-pick { color: var(--info); text-decoration: underline; font-weight: 650; }

.filename {
  font-size: 13px;
  color: var(--ok);
  font-weight: 600;
  margin: 0;
  word-break: break-all;
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(148, 111, 35, .14), transparent 62%),
    var(--paper);
}

.login-card {
  width: 100%;
  max-width: 396px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 30px 30px 26px;
}

.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; text-align: center; }
.login-brand .brand-mark { width: 46px; height: 46px; flex-basis: 46px; font-size: 21px; }
.login-brand h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.login-brand p { margin: 0; font-size: 14px; color: var(--ink-3); }

.login-card .btn { width: 100%; margin-top: 4px; }

.login-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}
.login-foot a { color: var(--info); }

/* ==========================================================================
   Password strength
   ========================================================================== */

.meter {
  height: 7px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
  margin: 9px 0 5px;
}
.meter-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--danger);
  transition: width .18s ease, background .18s ease;
}
.meter-bar.s1 { width: 25%;  background: var(--danger); }
.meter-bar.s2 { width: 50%;  background: #c9761d; }
.meter-bar.s3 { width: 75%;  background: #9a8f1a; }
.meter-bar.s4 { width: 100%; background: var(--ok); }

.meter-note { font-size: 13px; color: var(--ink-3); margin: 0; min-height: 1.4em; }

/* ==========================================================================
   Misc
   ========================================================================== */

.quote-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; background: #fbfaf7; }
.quote-card:last-of-type { margin-bottom: 0; }
.quote-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.quote-order { display: flex; gap: 6px; }
.quote-order button { min-height: 32px; padding: 4px 10px; font-size: 15px; line-height: 1; }

.day-group { margin-bottom: 22px; }
.day-group:last-child { margin-bottom: 0; }
.day-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.day-head h3 { margin: 0; font-size: 15.5px; }

/* Sittings for one day. A list of forms, not a table — see inventory.ejs.
   Wraps to a single column on a phone without any sideways scrolling. */
.sitting-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.sitting { border-bottom: 1px solid var(--line-2); }
.sitting:last-child { border-bottom: 0; }

/* A sitting guests cannot book should look switched off at a glance. */
.sitting.is-off { background: #faf9f5; }
.sitting.is-off .sitting-field label { color: var(--ink-3); }

.sitting-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
}

.sitting-field { display: flex; flex-direction: column; }
.sitting-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}
.sitting-field input,
.sitting-field select { min-height: 40px; font-size: 15px; }
.sitting-field input[type="time"] { width: 120px; }
.sitting-field input[type="number"] { width: 90px; }
.sitting-field-wide select { width: auto; min-width: 190px; }

.sitting-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }

@media (max-width: 560px) {
  /* Behind the bar on a phone: one control per line, full width, thumb-sized. */
  .sitting-form { gap: 10px; }
  .sitting-field { flex: 1 1 100%; }
  .sitting-field input[type="time"],
  .sitting-field input[type="number"],
  .sitting-field-wide select { width: 100%; }
  .sitting-actions { flex: 1 1 100%; margin-left: 0; }
  .sitting-actions .btn { flex: 1 1 auto; min-height: 44px; }
}

.hr { border: 0; border-top: 1px solid var(--line-2); margin: 22px 0; }

.outbox-link { font-weight: 600; }

.smtp-panel .stat-value { font-size: 17px; line-height: 1.35; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px 14px;
  }
  .navtoggle { display: block; }

  .navlist {
    display: none;
    margin-top: 10px;
  }
  .navlist.is-open { display: flex; }

  .sidebar-foot {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.14);
  }
  .sidebar-foot.is-open { display: block; }

  .whoami { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .whoami strong { display: inline; }

  .main { padding: 20px 16px 60px; }
  .page-head h1 { font-size: 23px; }
}

@media (max-width: 560px) {
  .row .field { flex-basis: 100%; }
  .savebar { padding: 12px; }
  .savebar .btn { flex: 1 1 auto; }
}

@media print {
  .sidebar, .savebar, .actions, .navtoggle { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Menus & prices  (/admin/menu)  and  Kitchen hours  (/admin/hours)
   Added in the task-49 release, when the menu became structured data.
   Follows the sittings screen's shape deliberately: one form per row, fields
   with real labels, and everything stacking to full width on a phone — this
   gets used behind the bar, one-handed, on a busy Saturday.
   ========================================================================== */

.menu-list { list-style: none; margin: 0; padding: 0; }

.menu-item { border-top: 1px solid var(--line-2); }
.menu-item:first-child { border-top: 0; }
.menu-item.is-off { background: #faf9f6; }
.menu-item.is-off .menu-field--grow input { color: var(--ink-3); }

.menu-item-form,
.menu-section-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
}

/* The menu-level edit form (name, intro, note, show/hide) sits at the top of each
   menu card, above its parts. The intro is a Quill editor, so it gets its own row. */
.menu-menu-form {
  display: block;
  margin: 0 0 8px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.menu-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.menu-field--intro { margin-bottom: 12px; }
.menu-field--intro .editor-shell { margin-top: 4px; }
.menu-field--intro .ql-editor { min-height: 96px; }
.menu-field--intro .editor-fallback { width: 100%; }
.menu-menu-form--add { border-bottom: 0; padding-bottom: 0; }

/* The "add" forms sit under the list they add to — tinted so they do not read
   as another existing row. */
.menu-item-form--add,
.menu-section-form--add {
  background: var(--paper);
  border-top: 1px dashed var(--line);
}
.menu-section-form--add { border-top: 1px solid var(--line); }

.menu-field { display: flex; flex-direction: column; }
.menu-field > label,
.menu-field > legend {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
  padding: 0;
}
.menu-field .help { text-transform: none; letter-spacing: 0; font-weight: 400; }
.menu-field input[type="text"] { min-height: 40px; font-size: 15px; }
.menu-field--grow { flex: 1 1 14rem; min-width: 0; }
.menu-field--price { flex: 0 0 auto; }

/* Price: the £ lives in the furniture, so the publican types 11.95 and cannot
   accidentally save "££11.95". parsePrice() tolerates a typed £ anyway. */
.price-input {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding-left: 9px;
  min-height: 40px;
}
.price-input > span { color: var(--ink-3); font-weight: 650; }
.price-input input {
  width: 74px;
  border: 0;
  background: none;
  min-height: 38px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  padding-left: 2px;
}
.price-input input:focus { outline: none; }
.price-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(148, 111, 35, .25); }

.menu-field--tags { border: 0; margin: 0; padding: 0; min-width: 0; }
.tagbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  margin-right: 10px;
  white-space: nowrap;
}
.tagbox input { margin: 0; }

.menu-field--check { justify-content: flex-end; }
.menu-field--check label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  font-weight: 400;
  margin: 0;
  min-height: 40px;
}

.menu-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.btn-icon { padding-inline: 10px; font-size: 15px; line-height: 1; }

/* Kitchen hours */
.hours-day { border-top: 1px solid var(--line-2); }
.hours-day:first-child { border-top: 0; }
.hours-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px 14px; }
.hours-day__name {
  flex: 0 0 8rem;
  font-weight: 700;
  font-size: 15px;
  padding-bottom: 10px;
}
.hours-service { display: flex; align-items: flex-end; gap: 8px; }
.hours-service .menu-field input[type="time"] { width: 118px; min-height: 40px; font-size: 15px; }
.hours-dash { padding-bottom: 10px; color: var(--ink-3); }
.hours-day--closed .hours-day__name { color: var(--ink-3); }

@media (max-width: 620px) {
  .menu-item-form,
  .menu-section-form,
  .hours-form { gap: 10px; }
  .menu-field--grow,
  .menu-field--price,
  .menu-field--tags,
  .menu-field--check,
  .hours-day__name { flex: 1 1 100%; }
  .menu-actions { margin-left: 0; width: 100%; }
  .menu-actions .btn { flex: 1 1 auto; }
  .menu-actions .btn-icon { flex: 0 0 44px; }
  .hours-service { flex: 1 1 100%; }
  .hours-service .menu-field { flex: 1 1 0; }
  .hours-service .menu-field input[type="time"] { width: 100%; }
}

/* A fieldset per day on the kitchen-hours screen: it carries a visually-hidden
   legend naming the day, so a screen reader user can tell Tuesday's boxes from
   Saturday's. Strip the browser's default fieldset chrome — the grouping is for
   assistive tech, not decoration. */
fieldset.hours-day { border: 0; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
fieldset.hours-day:first-of-type { border-top: 0; }
