/* ==========================================================================
   Adams Fairacre Farms — Turkey Reservations
   Heritage farmstand aesthetic: parchment & charcoal, barn red & forest
   green, a warm wood accent for a few "signature" panels, soft tactile
   shadows, and no sharp tech-startup edges.
   ========================================================================== */

/* Filmotype Modern -- Adams's standard brand display font, used across
   their existing properties. Self-hosted (not a Google Fonts / CDN
   import like Zilla Slab and Inter below) since it's a commercial font,
   not a freely-licensed one -- the file itself lives in this repo
   because Adams already holds the rights to use it. Applied directly to
   the shared `.masthead h1` rule below, so every page using that same
   masthead structure (the reservation form, the store dashboard, admin)
   gets the same brand heading treatment, rather than one page looking
   different from the rest. */
@font-face {
  font-family: 'Filmotype Modern';
  src: url('/fonts/filmotype-modern.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Core palette */
  --bg: #FAF8F5;           /* page background: warm parchment, not pure white */
  --paper: #FFFEFC;        /* card/panel surface: a touch whiter than the page so cards read as resting on top */
  --text: #2C2A29;         /* body text: rich charcoal, not pure black */
  --text-muted: #6E6860;   /* secondary text: warm gray, not cold tech-gray */
  --text-faint: #948C81;   /* tertiary text: hints, placeholders */
  --line: #E0DCD3;         /* borders: warm taupe */
  --line-soft: #EBE7E0;    /* lighter divider variant */

  /* Accents */
  --forest: #2E472D;       /* headings, key accents, positive state */
  --forest-tint: #E7ECE3;  /* soft sage wash for selected/positive cards */
  --forest-tint-border: #C9D6C2;
  --barn-red: #8B3A3A;     /* primary buttons, CTAs */
  --barn-red-hover: #7A3333;
  --barn-red-tint: #F3E7E5; /* soft wash for negative/attention states */
  --barn-red-tint-border: #DCBAB6;

  /* A genuinely new accent, distinct from both forest (save/submit
     actions elsewhere) and barn-red (which, despite its own comment
     saying "primary buttons, CTAs," reads as the same red family used
     for cancel/attention states -- exactly the ambiguity this exists to
     avoid). Reserved for "fetch/generate a report" actions specifically
     (Reservation Activity's Generate button), not a wholesale re-theme
     of every existing Save/Submit button elsewhere in the app.  */
  --amber: #B8863B;
  --amber-hover: #A3752F;
  --amber-tint: #F5EDE0;
  --amber-tint-border: #E3CDA0;

  /* Signature warm-wood accent, reserved for a few decorative "this is a
     farmstand, not an app" touches: the reservation tally, the confirmation
     code, the closed-notice icon. Used sparingly on purpose. */
  --wood: #5C4433;
  --wood-dark: #43301F;
  --wood-tint: #F0E9E1;
  --wood-tint-border: #DCCAB8;

  /* Bird vs. parts batch identity -- lets a manager tell the two kinds
     of pull batch apart at a glance (button, active/completed batch
     cards) without reading the label text. Bird reuses the wood accent
     (whole birds/roasting already reads as a warm-wood association);
     parts gets its own dusty slate-blue since nothing else in the
     palette was carrying a distinct "parts" meaning yet. */
  --bird-accent: var(--wood);
  --bird-accent-dark: var(--wood-dark);
  --bird-tint: var(--wood-tint);
  --bird-tint-border: var(--wood-tint-border);
  --parts-accent: #3E5C6B;
  --parts-accent-dark: #2C4048;
  --parts-tint: #E7EEF0;
  --parts-tint-border: #C3D6DC;

  /* Fulfillment-status colors for the Demand Dashboard -- deliberately
     distinct hues from bird/parts-accent above (which mean "category",
     not "status") so the two kinds of color-coding never read as the
     same signal when they show up on the same row. */
  --status-pending: #A6752C;
  --status-pending-tint: #F3E8D2;
  --status-batched: #4F5FA0;
  --status-batched-tint: #E4E6F2;
  --status-fulfilled: var(--forest);
  --status-fulfilled-tint: var(--forest-tint);
  --status-available: var(--wood);
  --status-available-tint: var(--wood-tint);
  /* Reserved/Unreserved -- Demand Overview's "Reserved Levels" chart.
     Unreserved reuses the same wood tone --status-available already
     used (identical concept, renamed -- what used to be shown as
     "Available" is exactly "not yet reserved"). Reserved is forest, a
     genuinely distinct color, since Pending/Batched/Fulfilled no
     longer have any real meaning to display alongside it (see
     services/order_management.py -- nothing sets bird_status beyond
     Pending anymore now that the batch/fulfill workflow is gone). */
  --status-reserved: var(--forest);
  --status-reserved-tint: var(--forest-tint);

  /* Radii -- soft throughout, nothing sharp, nothing bubbly */
  --radius-sm: 4px;
  --radius-md: 5px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  /* Warm, subtle shadows -- charcoal at low opacity, never pure black, so
     cards read as paper resting on a counter rather than UI floating on glass */
  --shadow-sm: 0 1px 2px rgba(44, 42, 41, 0.07);
  --shadow-md: 0 2px 6px rgba(44, 42, 41, 0.08), 0 1px 2px rgba(44, 42, 41, 0.05);
  --shadow-lift: 0 4px 12px rgba(44, 42, 41, 0.11);
  --shadow-inset: inset 0 1px 2px rgba(44, 42, 41, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Zilla Slab', serif; }

/* ---------- Masthead ---------- */
.masthead {
  background: linear-gradient(135deg, var(--forest) 0%, #1A2E16 100%);
  color: #fff;
  padding: 28px 24px 22px;
  position: relative;
  overflow: hidden;
}
.masthead-illustration {
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  width: 280px;
  height: auto;
  opacity: 0.14;
  pointer-events: none;
  /* The illustration's own warm brown linework already reads like a
     woodcut against dark green -- low opacity keeps it a background
     texture (the one deliberate decorative flourish on the page)
     rather than something competing with the actual headline. */
}
.masthead-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.masthead-logo { height: 30px; width: auto; display: block; margin-bottom: 14px; }
.masthead-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #B9CCB3;
  margin-bottom: 6px;
}
.masthead h1 {
  margin: 0;
  font-size: 42px;
  /* Filmotype Modern's @font-face only registers ONE weight (normal --
     see the @font-face rule above). Requesting 700 here, like the
     fallback fonts want, forces the browser to synthesize a fake bold
     by artificially thickening the real glyphs -- which is exactly what
     was reading as "off." Filmotype Modern is a script-style display
     face; it doesn't need an artificial bold to read as prominent, its
     own letterforms already carry that weight. */
  font-weight: normal;
  line-height: 1.15;
  font-family: 'Filmotype Modern', 'Zilla Slab', serif;
}
.masthead-sub { margin-top: 4px; font-size: 14px; color: rgba(255,255,255,0.82); max-width: 460px; }
.masthead-session {
  align-self: flex-end;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  white-space: nowrap;
}
.masthead-session a { padding: 0; border: none; font-weight: 700; color: #fff; text-decoration: underline; cursor: pointer; }
@media (max-width: 700px) {
  /* Narrow screens wrap the headline onto more lines, which would run
     straight into the illustration rather than sitting cleanly beside
     it -- simplest fix is to just not compete for the space there. */
  .masthead-illustration { display: none; }
}

/* ---------- Nav ---------- */
/* Shared by index.html, admin.html, and manage-reservation.html -- a
   small strip of tabs between separate PAGES, each with an "active"
   state for whichever one you're on. */
.topnav {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 16px 24px 0;
  /* A shared baseline for the whole tab strip -- this is what the active
     tab's own underline overlaps (see the -1px margin below), so it
     reads as sitting ON the nav bar's actual structural edge rather than
     floating in the middle of empty padding above it. */
  border-bottom: 1px solid var(--line);
}
.topnav a {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 16px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  /* Pulls this tab's own border-bottom down by exactly the topnav's own
     1px baseline, so the two lines sit flush on the same pixel instead
     of the tab's underline hovering just above the container's edge
     with a visible gap between them. */
  margin-bottom: -1px;
}
.topnav a.active { color: var(--forest); border-bottom-color: var(--barn-red); }
.topnav a:hover { color: var(--forest); }
.topnav-spacer { flex: 1; }
.topnav-session {
  align-self: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
}
.topnav-session a { padding: 0; border: none; font-weight: 600; color: var(--barn-red); text-decoration: underline; cursor: pointer; }

/* Dashboard-only: a row of small jump-to-section buttons for this one
   long page, not a strip of tabs between separate pages -- kept as its
   own class so it doesn't touch the shared .topnav rules above, which
   the other three pages still rely on. Minimal by design (no border/
   background pill) so it reads as quiet labels, not loud buttons taking
   up real width -- two-word labels stack onto two lines with a hard
   break instead of stretching wide. */
.dash-jumpnav {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--status-pending-tint);
  border-bottom: 1px solid var(--wood-tint-border);
  box-shadow: 0 1px 4px rgba(67, 48, 31, 0.07);
}
/* Toggled by a small scroll listener (see dashboard.js) once the bar is
   actually pinned to the top edge, not just sitting at its normal
   in-flow position -- CSS alone has no way to detect that on its own,
   so this is a JS-driven state, not a pure :hover-style pseudo-class.
   Deliberately no transition on THIS rule -- animating padding/border
   while the underlying scroll-driven class can toggle again mid-
   animation is exactly what caused the stutter right at the sticky
   threshold; an instant snap reads as a cleaner, more solid-feeling
   change than an animation that can get retriggered before it finishes.
   (A transition on :hover below is a different, safe story -- hover
   doesn't fire repeatedly during a scroll the way this class does.) */
.dash-jumpnav.is-stuck {
  padding: 6px 24px;
  box-shadow: 0 2px 8px rgba(67, 48, 31, 0.14);
}
.dash-jumpnav.is-stuck a { padding: 4px 10px; font-size: 11px; }
.dash-jumpnav a {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-decoration: none;
  text-align: center;
  line-height: 1.25;
  padding: 6px 14px;
  color: var(--wood-dark);
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
  /* A flex item that's also its own flex container -- the parent row
     stretches every link to match the height of its tallest (two-line)
     sibling by default, and without this, a short one-line label like
     "Demand" just sits at the TOP of that taller box instead of centered
     in it. */
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-jumpnav a:hover { background: var(--wood-tint-border); }

/* Anchor targets for the jump-nav above -- without this, the browser
   scrolls a target's top edge to y=0, which is exactly where the sticky
   nav bar sits, so it would cover the section's own heading right after
   jumping to it. This offsets the scroll position by enough room for
   the nav bar (generous enough to cover both its normal and compact
   "stuck" heights) plus a little breathing room, so the section's own
   top is always visible below it. */
#reservation-activity,
#pickup-lists,
#manualOrderCard,
#search-reservations,
#demand-overview,
#inventory-allocation,
#order-switch,
#turkey-catalog,
#store-pricing,
#reset-password {
  scroll-margin-top: 70px;
}

main { max-width: 1040px; margin: 0 auto; padding: 24px 24px 80px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

/* ---------- Order form ---------- */
.order-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
@media (max-width: 760px) { .order-grid { grid-template-columns: 1fr; } }

.field-group { margin-bottom: 20px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 8px;
}
.field-sublabel {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
select, input[type="text"], input[type="tel"], input[type="date"], input[type="password"], input[type="number"] {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 11px 12px;
  min-height: 44px; /* comfortable tap target on a tablet during the rush */
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--text);
  box-shadow: var(--shadow-inset);
}
select:focus, input:focus { outline: none; border-color: var(--forest); box-shadow: var(--shadow-inset), 0 0 0 3px var(--forest-tint); }

/* Textareas didn't have ANY rule of their own before this -- they were
   rendering with the browser's default serif font and no width/border
   styling at all, which is why Special Instructions looked out of place
   next to every other field. Same treatment as the text inputs above,
   just with room to actually write a sentence or two. */
textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 11px 12px;
  min-height: 88px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--text);
  box-shadow: var(--shadow-inset);
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--forest); box-shadow: var(--shadow-inset), 0 0 0 3px var(--forest-tint); }

/* First/Last Name side by side -- these classes were already used in the
   markup but had no CSS at all, which is why Last Name used to sit with
   zero gap directly under First Name's input (two plain stacked blocks).
   Stacks back to a single column on narrow screens rather than
   squeezing two inputs into a cramped row. */
.field-row { display: flex; gap: 16px; }
.field-col { flex: 1; min-width: 0; }
@media (max-width: 480px) { .field-row { flex-direction: column; gap: 20px; } }

/* The white .card itself, not just its contents -- for the
   manage-reservation page's lookup step and post-cancel confirmation,
   both of which only ever hold a couple short fields/lines of text, not
   the full two-column edit layout the rest of that page uses. Toggled
   via JS (manage-reservation.js) alongside which stage is visible. */
.card.is-compact { max-width: 480px; margin-left: auto; margin-right: auto; }

.required-mark { color: var(--barn-red); }

.type-options { display: flex; flex-direction: column; gap: 8px; }
.type-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  cursor: pointer;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.type-option:hover { border-color: var(--forest); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.type-option.selected { border-color: var(--forest); background: var(--forest-tint); box-shadow: var(--shadow-sm); }
.type-option .type-name { font-family: 'Zilla Slab', serif; font-weight: 600; font-size: 15px; }
.type-option .type-price { font-weight: 700; color: var(--forest); font-size: 14px; }
.type-option.sold-out { cursor: not-allowed; opacity: 0.6; background: var(--line-soft); box-shadow: none; pointer-events: none; }
.type-option.sold-out .type-price { display: none; }
.sold-out-badge {
  display: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: var(--barn-red);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}
.type-option.sold-out .sold-out-badge { display: inline-block; }

/* Nested info panel -- appears only under the currently-selected type,
   indented and connected via a colored left border + matching tint so
   it visually reads as "this belongs to the row above," not a separate
   floating card. Negative top margin snugs it against that row instead
   of sitting a full gap away like a sibling option would. A real <ul>
   now (bulleted product copy, not one description sentence), so the
   browser's default list styling needs resetting and re-applying on
   our own terms rather than just left as plain body text.
   */
/* Nested info panel -- appears only under the currently-selected type.
   Deliberately no border/connecting device to the row above -- the soft
   tint background alone is enough to read as "belongs to that row,"
   without the heavier bordered-callout look. Checkmarks instead of a
   dash or the browser's default bullet: these genuinely are confirmed
   qualities (all natural, no antibiotics, etc.), not just an arbitrary
   list, so the marker itself carries real meaning instead of being a
   generic placeholder shape. */
.type-info-nested {
  margin: 6px 0 4px 22px;
  padding: 12px 16px;
  background: var(--forest-tint);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  list-style: none;
}
.type-info-nested li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 7px;
}
.type-info-nested li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--forest);
  font-weight: 700;
}
.type-info-nested li:last-child { margin-bottom: 0; }

.size-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 480px) { .size-options { grid-template-columns: repeat(2, 1fr); } }
.size-btn {
  text-align: center;
  padding: 12px 6px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.size-btn:hover { border-color: var(--forest); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.size-btn.selected { border-color: var(--forest); background: var(--forest-tint); color: var(--forest); box-shadow: var(--shadow-sm); }
.size-btn.sold-out { cursor: not-allowed; opacity: 0.55; background: var(--line-soft); box-shadow: none; pointer-events: none; text-decoration: line-through; }

.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; margin-bottom: 10px; }

.day-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 480px) { .day-options { grid-template-columns: repeat(2, 1fr); } }
.day-btn {
  text-align: center;
  padding: 10px 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.day-btn:hover { border-color: var(--forest); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.day-btn.selected { border-color: var(--forest); background: var(--forest-tint); color: var(--forest); box-shadow: var(--shadow-sm); }
.day-btn-name { display: block; }
.day-btn-date { display: block; font-weight: 500; font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.day-btn.selected .day-btn-date { color: var(--forest); opacity: 0.8; }

.form-section {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.form-section-title {
  font-family: 'Zilla Slab', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--forest);
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.form-section-sub { font-size: 12px; color: var(--text-muted); margin: 8px 0 16px; }

#fg-combo { margin-bottom: 0; }
#fg-combo:not(.has-error) { display: none; }
#fg-combo .field-error-msg { margin-top: 0; margin-bottom: 20px; }

.part-line-row {
  display: grid;
  grid-template-columns: 1.3fr 0.6fr 0.9fr auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
}
@media (max-width: 600px) { .part-line-row { grid-template-columns: 1fr 1fr; } }
.part-line-row select, .part-line-row input {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 9px 10px;
  min-height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-inset);
  width: 100%;
}
.part-line-notes {
  grid-column: 1 / -1;
  margin-top: -4px;
}
.part-line-error {
  grid-column: 1 / -1;
  color: var(--barn-red);
  font-size: 12px;
  font-weight: 600;
  margin-top: -2px;
}
.remove-part-btn {
  background: none;
  border: 1.5px solid var(--line);
  color: var(--barn-red);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.remove-part-btn:hover { border-color: var(--barn-red); background: var(--barn-red-tint); }

/* A confirmed row swaps to a compact 2-column layout (content + actions)
   instead of the 4-column editing grid above -- it's a different kind
   of row, not just a styled version of the same one. */
.part-line-row.is-confirmed {
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--forest-tint);
  border: 1.5px solid var(--forest-tint-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.part-confirmed-summary { display: flex; align-items: baseline; gap: 8px; }
.part-confirmed-check {
  color: var(--forest);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.part-confirmed-text { font-size: 13px; font-weight: 600; color: var(--text); }
.part-confirmed-actions { display: flex; gap: 6px; flex-shrink: 0; }
.edit-part-btn {
  background: none;
  border: 1.5px solid var(--forest-tint-border);
  color: var(--forest);
  border-radius: var(--radius-md);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.edit-part-btn:hover { background: var(--forest-tint-border); }
.part-line-row.is-confirmed .remove-part-btn { padding: 7px 10px; font-size: 12px; }

/* Groups a row's action buttons (Add/Clear for a part or a turkey) side
   by side, sized to their own content instead of each stacking
   full-width -- a smaller, compact cluster reads as "pick one of these
   related actions," not a sequence of separate steps. Parts' confirm
   button deliberately uses .add-part-btn (the exact same class as
   Turkey's "Add to My Reservation") rather than its own separate style,
   so the two are identical by construction, not just two rules that
   happen to look similar and could drift apart later. */
.button-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.button-row .add-part-btn,
.button-row .secondary-btn,
.button-row .remove-part-btn {
  width: auto;
  flex: 0 1 auto;
  margin-top: 0;
}
/* .part-line-row (the draft part row) is a CSS grid -- .button-row is
   its direct child here and needs to span the full row width, the same
   way its own buttons used to individually before being grouped. */
.part-line-row .button-row { grid-column: 1 / -1; }

.add-part-btn {
  background: none;
  border: 1.5px solid var(--forest-tint-border);
  color: var(--forest);
  border-radius: var(--radius-lg);
  padding: 10px;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.add-part-btn:hover { border-color: var(--forest); background: var(--forest-tint); }
.add-part-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.add-part-btn:disabled:hover { background: none; }

.secondary-btn {
  background: none;
  border: 1.5px solid var(--line);
  color: var(--text-faint);
  border-radius: var(--radius-lg);
  padding: 9px 14px;
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
/* Nothing selected yet -- stays faint/muted, matching its own default
   look, and isn't clickable at all (there's nothing to clear). */
.secondary-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Report/fetch actions specifically (Reservation Activity's Generate
   button) -- deliberately NOT submit-btn's red, so "generate a report"
   never reads as the same action-family as Save/Create/Cancel
   elsewhere. Amber, not a neutral cream/slate/black -- a genuinely
   distinct accent from forest (save/submit) and barn-red (cancel), but
   one that still belongs in this app's own warm palette, not a cold
   corporate one bolted onto the side of it. */
.action-btn {
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  cursor: pointer;
}
.action-btn:hover { background: var(--amber-hover); box-shadow: var(--shadow-md); }
.action-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* A two-way view toggle (Summary/Detail on Reservation Activity) --
   deliberately NOT styled like submit-btn, on purpose: this switches
   which already-fetched data is showing, it never talks to the server
   the way the Generate button next to it does, and giving both the
   same prominent treatment was exactly what made them read as doing
   the same thing. Forest for the active state -- the same "this is
   selected" color already used everywhere else on this dashboard
   (Inventory Allocation's available figure, save-confirmation notes),
   not a separate, unrelated color invented just for this one toggle. */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.view-toggle-btn {
  background: none;
  border: none;
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-faint);
  cursor: pointer;
}
.view-toggle-btn + .view-toggle-btn { border-left: 1.5px solid var(--line); }
.view-toggle-btn.active { background: var(--forest-tint); color: var(--forest); }

/* Reservation Activity's Summary view -- a real 2-column grid, not a
   flex row per item. A flex row with justify-content:space-between
   stretches the number to the far right edge of the whole card
   regardless of how short the label is (reading as "too far away"),
   AND its gap varies per row depending on that row's own label length
   (reading as "misaligned" once there's more than one product). A grid
   fixes both at once: column 1 sizes itself to the widest label across
   ALL rows, column 2 sits right after it with one small, constant gap
   -- so the numbers land in one consistent vertical column no matter
   how many products end up listed. */
.activity-summary-grid {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 20px;
  row-gap: 10px;
  align-items: baseline;
}

/* Pickup Lists' column picker -- a wrapped row of plain checkbox labels,
   not a styled multi-select, so it's obvious every option is
   independently toggleable rather than looking like one control. */
/* Report filter dropdowns (createCheckboxFilter in common.js): a button
   showing what's chosen, opening a list of checkboxes. */
.report-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-filter { position: relative; }
.checkbox-filter-btn {
  font: inherit; font-size: 13px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper); color: var(--text); cursor: pointer; text-align: left; max-width: 340px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.checkbox-filter-btn.is-active { border-color: var(--forest); background: var(--forest-tint); font-weight: 700; }
.checkbox-filter-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 260px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.checkbox-filter-panel label { display: flex; align-items: center; gap: 8px; padding: 5px 6px; font-size: 13px; cursor: pointer; }
.checkbox-filter-panel label:hover { background: var(--forest-tint); border-radius: 4px; }
/* Select all (gold: "other") · Clear all (red: "stop") at the top; the
   options scroll between them and Done (green: "go"), which stays in view. */
.checkbox-filter-panel { padding: 0; display: flex; flex-direction: column; max-height: 320px; overflow: hidden; }
/* display:flex above would override the [hidden] attribute's display:none. */
.checkbox-filter-panel[hidden] { display: none; }
.checkbox-filter-actions { display: flex; gap: 14px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.checkbox-filter-actions button { font: inherit; font-size: 12px; font-weight: 700; padding: 0; border: none; background: none; cursor: pointer; }
.checkbox-filter-all { color: #7A5A1E; }
.checkbox-filter-none { color: var(--barn-red); }
.checkbox-filter-actions button:hover { text-decoration: underline; }
.checkbox-filter-options { overflow-y: auto; padding: 4px 6px; }
.checkbox-filter-done {
  margin: 0; font: inherit; font-size: 13px; font-weight: 700; padding: 8px; border: none; border-top: 1px solid var(--line);
  background: var(--forest); color: #fff; cursor: pointer; border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.checkbox-filter-done:hover { background: #24391f; }
.pickup-column-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.pickup-column-picker label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

/* flatpickr theming -- forest/amber, the SAME palette as this app's
   Generate button above and everything else here, not a separate
   neutral palette bolted onto just the calendar. Selector specificity
   bumped (repeating .flatpickr-calendar) so these reliably win over
   flatpickr's own base stylesheet rather than silently losing and
   falling back to its default blue in some states. The month-name
   dropdown is disabled entirely at the JS level (monthSelectorType:
   "static" -- see dashboard.js) rather than themed here: it's a real
   native <select>, and a native option list is OS/browser-rendered UI
   that CSS can never fully reach, regardless of which colors are
   chosen -- removing it avoids that whole class of bug rather than
   trying to theme around it. */
.flatpickr-calendar {
  border-radius: var(--radius-lg);
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-md);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-months,
.flatpickr-calendar.flatpickr-calendar .flatpickr-current-month,
.flatpickr-calendar.flatpickr-calendar .flatpickr-weekdays {
  background: var(--forest);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-current-month .cur-month,
.flatpickr-calendar.flatpickr-calendar .flatpickr-current-month input.cur-year {
  color: #fff;
  background: transparent;
  font-weight: 600;
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-weekday {
  background: var(--forest);
  color: rgba(255, 255, 255, 0.85);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  color: #fff;
  fill: #fff;
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-calendar.flatpickr-calendar .flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--amber);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.selected:hover,
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.selected:focus {
  background: var(--forest);
  border-color: var(--forest);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.today {
  border-color: var(--amber);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-day.today:hover {
  background: var(--amber-tint);
  border-color: var(--amber);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-day:hover {
  background: var(--forest-tint);
}
.flatpickr-calendar.flatpickr-calendar .flatpickr-time input:hover,
.flatpickr-calendar.flatpickr-calendar .flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-calendar.flatpickr-calendar .flatpickr-time input:focus,
.flatpickr-calendar.flatpickr-calendar .flatpickr-time .flatpickr-am-pm:focus {
  background: var(--forest-tint);
}
/* This app's own global `select, input[type="text"], ...` rule
   (further down this file) applies site-wide, including to flatpickr's
   hour/minute <input type="number"> fields -- forcing them into a
   full-width, 44px-tall, bordered box they were never designed to
   hold, which is what broke the time row's layout in an earlier
   attempt. Resets flatpickr's own inputs back to compact so only the
   color theming above actually changes anything visually. */
.flatpickr-calendar.flatpickr-calendar input {
  width: auto;
  min-height: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.flatpickr-calendar.flatpickr-calendar input:focus {
  box-shadow: none;
  outline: revert;
}
.flatpickr-calendar.flatpickr-calendar input::selection {
  background: var(--forest);
  color: #fff;
}
.flatpickr-calendar.flatpickr-calendar input::-moz-selection {
  background: var(--forest);
  color: #fff;
}
/* Explicit "I'm done" affordance -- see the onReady hook in
   dashboard.js for why this exists (enableTime otherwise leaves no
   visible way to close the picker besides clicking away or hitting
   Enter, which isn't obvious on first use). Amber, matching Generate --
   both read as "the action that finishes this step." */
.flatpickr-calendar .flatpickr-done-btn {
  display: block;
  width: calc(100% - 20px);
  margin: 8px 10px 10px;
  padding: 9px;
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.flatpickr-calendar .flatpickr-done-btn:hover { background: var(--amber-hover); }

/* Something IS selected -- visibly present in the same red color family
   this button's own hover state already uses (a lighter shade, same
   pattern as the Add button using a lighter green than its own hover),
   rather than a neutral gray that doesn't visually connect "this button
   clears/removes something" to its actual color. */
.secondary-btn:not(:disabled) { border-color: var(--barn-red-tint-border); color: var(--barn-red); }
.secondary-btn:hover:not(:disabled) { border-color: var(--barn-red); color: var(--barn-red); background: var(--barn-red-tint); }

.parts-summary-item {
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--forest-tint-border);
  color: var(--text);
}
.parts-summary-item:last-child { border-bottom: none; }

.field-group.has-error .field-label { color: var(--barn-red); }
.field-group.has-error select,
.field-group.has-error input[type="text"],
.field-group.has-error input[type="tel"] { border-color: var(--barn-red); }
.field-error-msg { display: none; font-size: 12px; color: var(--barn-red); margin-top: 6px; font-weight: 600; }
.field-group.has-error .field-error-msg { display: block; }

.estimate-panel {
  background: var(--forest-tint);
  border: 1.5px solid var(--forest-tint-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 20px;
  box-shadow: var(--shadow-sm);
}
.estimate-panel h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--forest); font-family: 'Inter', sans-serif; font-weight: 700; }
.estimate-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--forest-tint-border); color: var(--text); }
.estimate-row > span:first-child { flex-shrink: 0; }
.estimate-row > span:last-child { text-align: right; }
.estimate-row:last-of-type { border-bottom: none; }
.estimate-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--forest); }
.estimate-total .label { font-size: 13px; font-weight: 600; color: var(--forest); }
.estimate-total .amount { font-family: 'Zilla Slab', serif; font-weight: 700; font-size: 26px; color: var(--forest); }
.estimate-note { font-size: 11px; color: #5C7256; margin-top: 8px; line-height: 1.5; white-space: pre-line; }
/* Off-white/quiet, not a bordered colored alert box like the
   weight-ack notice below -- deliberately de-emphasized. This is
   helpful, nice-to-know advice (no required action, no checkbox), and
   giving it the same "read this carefully" visual weight as the
   weight-ack box would blur the actual priority between the two: the
   red box below is the one that's genuinely required reading. */
.estimate-note--large-bird {
  background: var(--paper);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  /* Overrides .estimate-note's own white-space:pre-line (intended for
     #estNote's JS-built, deliberately multi-line text) -- without this,
     line breaks in this file purely for source-code readability were
     rendering as actual line breaks on the page, in the middle of a
     sentence, wherever this HTML happened to wrap in the editor. */
  white-space: normal;
}
.estimate-note--large-bird strong { font-weight: 700; color: var(--wood-dark); }
/* Weight-variance acknowledgment -- genuinely the LOUDEST note in this
   panel, on purpose: this is the one with a required action gating
   Submit (the checkbox below), not a purely informational advisory
   like the large-bird notice above it. Distinct class from
   .estimate-note--large-bird rather than reusing it -- different
   concept, different visual weight, and giving it its own name keeps
   the two from reading as interchangeable to a future reader of this
   file. Only ever shown when there's an actual whole bird in the
   order (see updateEstimate in order.js) -- the size-range disclaimer
   has nothing to do with a parts-only order. */
/* Barn-red, not amber -- this is the ONE box with a required action
   gating Submit (the checkbox below), not a purely informational
   advisory like the large-bird notice further down. Reusing this app's
   existing "this genuinely needs your attention" color family gives
   the two boxes real visual hierarchy instead of reading as the same
   type of message twice in a row. */
.estimate-note--weight-ack {
  background: var(--barn-red-tint);
  color: #6B2B2B;
  border: 1.5px solid var(--barn-red);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  /* Overrides .estimate-note's own white-space:pre-line -- see the
     identical comment on .estimate-note--large-bird above for why. */
  white-space: normal;
}
.estimate-note--weight-ack strong { font-weight: 800; }
.weight-ack-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-weight: 700;
  cursor: pointer;
}
.weight-ack-checkbox-row input { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; }
.estimate-error { font-size: 12px; color: var(--barn-red); margin-top: 10px; font-weight: 600; display: none; }
.save-confirmation-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--forest-tint);
  border: 1.5px solid var(--forest-tint-border);
  border-radius: var(--radius-md);
  color: var(--forest);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

button.submit-btn {
  margin-top: 8px;
  width: 100%;
  background: var(--forest);
  color: #fff;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  min-height: 48px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
/* Button colours follow one rule (Marketing, 2026-10-02): green = go (save,
   submit, add, sign in), red = stop (cancel, clear, remove), gold = everything
   else (print, export, view, edit, quick picks, navigation). .submit-btn is
   every page's main "go" button, so it's green; red is kept for
   .outline-danger, .secondary-btn and the remove/cancel buttons. */
button.submit-btn:hover { background: #24391f; box-shadow: var(--shadow-md); }
/* The customer reservation form's own Submit button, specifically --
   scoped by ID, not by changing .submit-btn's own base color, since
   that shared class is also used for Login, Save, and Reset Password
   elsewhere, none of which this was about. Forest green, not barn-red:
   this button is the very last thing before completing an order, right
   below a disclaimer someone's meant to read carefully -- barn-red's
   own "stop/attention" connotation (the same family used for Cancel
   buttons throughout this app) worked against that calm, confident
   final step, in the same way it did for the disabled state fixed
   earlier. Same darker-on-hover shade already used for Save Quota/Save
   All Changes elsewhere, not a new one invented just for this button. */
#submitBtn { background: var(--forest); }
#submitBtn:hover { background: #24391f; }
/* Without this, #submitBtn's own ID-level specificity beats
   button.submit-btn:disabled's class+pseudo-class specificity
   regardless of which rule comes later in this file -- ID selectors
   always win that comparison first, before class/pseudo-class counts
   are even considered. Without this override, the button would show
   green even while genuinely disabled, undoing the neutral-gray
   disabled fix elsewhere in this file. */
#submitBtn:disabled { background: var(--line); color: var(--text-faint); }
/* Both referenced in manage-reservation.html's Cancel button but never
   actually given a rule before -- it was silently falling back to the
   full solid-red, full-width treatment above, meant for a page's
   PRIMARY action (like Save Changes), making a secondary/cautionary
   action look just as visually dominant as the main one. */
button.submit-btn.outline-danger {
  background: none;
  color: var(--barn-red);
  border: 1.5px solid var(--barn-red);
  box-shadow: none;
}
button.submit-btn.outline-danger:hover { background: var(--barn-red-tint); box-shadow: none; }
button.submit-btn.half-width {
  width: 50%;
  min-width: 220px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
button.submit-btn:disabled {
  /* A genuine neutral -- --line/--text-faint, the same muted gray
     tokens secondary-btn already uses for "de-emphasized, not the
     primary action right now." NOT a faded version of the button's own
     red: even paled down, red still reads as "something's wrong," which
     is exactly backwards for "just not ready yet, no judgment." */
  background: var(--line);
  color: var(--text-faint);
  cursor: not-allowed;
  box-shadow: none;
}

/* Bird/parts batch-type color coding -- see --bird-accent/--parts-accent
   above. Overrides the default barn-red .submit-btn background only;
   everything else (padding, radius, disabled state) stays shared. */
button.submit-btn.batch-btn-bird { background: var(--bird-accent); }
button.submit-btn.batch-btn-bird:hover { background: var(--bird-accent-dark); }
button.submit-btn.batch-btn-parts { background: var(--parts-accent); }
button.submit-btn.batch-btn-parts:hover { background: var(--parts-accent-dark); }

.closed-notice { text-align: center; padding: 48px 20px; }
.closed-notice .icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--wood);
  color: #FBF3E4;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  box-shadow: var(--shadow-md);
}
.closed-notice h2 { margin: 0 0 8px; color: var(--forest); }
.closed-notice p { color: var(--text-muted); font-size: 14px; max-width: 420px; margin: 0 auto; }
.closed-notice .open-date {
  display: inline-block;
  margin-top: 16px;
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  background: var(--wood);
  color: #FBF3E4;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.confirmation { text-align: center; padding: 40px 20px; }
.confirmation .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  box-shadow: var(--shadow-md);
}
.confirmation h2 { margin: 0 0 6px; color: var(--forest); }
.confirm-details {
  text-align: left;
  max-width: 420px;
  margin: 22px auto 0;
  background: var(--forest-tint);
  border: 1.5px solid var(--forest-tint-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.confirm-group + .confirm-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--forest-tint-border);
}
.confirm-group h3 {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--forest);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}
.confirm-group p { margin: 0; font-size: 14px; color: var(--text); line-height: 1.5; }
.confirm-group p + p { margin-top: 6px; }
.confirm-items { margin: 0; padding-left: 20px; font-size: 14px; color: var(--text); line-height: 1.6; }
.confirm-items li { margin-bottom: 2px; }
.confirm-items li:last-child { margin-bottom: 0; }
.confirm-group--note p {
  font-size: 12.5px;
  color: var(--text-muted);
}
.confirmation-code-label {
  margin-top: 36px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--forest);
}
.confirmation .code {
  display: inline-block;
  margin-top: 4px;
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--wood);
  color: #FBF3E4;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.edit-scope-note {
  max-width: 420px;
  width: 100%;
  margin: 16px auto 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
/* Gold: "Make another reservation", "Make more changes" and "Close and
   return" are navigation -- neither a commit (green) nor a stop (red), per
   the button colour rule (Marketing, 2026-10-02). */
.confirmation .again {
  margin-top: 26px;
  background: none;
  border: 1.5px solid var(--amber);
  color: #7A5A1E;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.confirmation .again:hover { border-color: var(--amber-hover); background: var(--amber-tint); color: #6A4D17; }
/* Two buttons side by side on Manage Reservation's "changes saved" screen
   (staff get "Close and return to dashboard" next to "Make more changes"). */
.confirmation .confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.confirmation .close-tab-note { margin-top: 26px; font-size: 13px; color: var(--text-muted); }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.dash-card h3 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--forest); font-family: 'Inter', sans-serif; font-weight: 700; }

/* Collapsible dashboard sections -- native <details>/<summary> rather
   than a custom JS accordion: keyboard/screen-reader support for free,
   and each section opens/closes independently instead of forcing an
   all-or-nothing accordion where opening one closes another. The
   dashboard grew to genuinely need this by tonight -- ten-plus full
   sections stacked unconditionally made it feel far longer than the
   handful a manager actually needs open at any one moment. */
.dash-card.collapsible { padding: 0; overflow: hidden; }
.dash-card.collapsible summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  margin: 0 0 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--forest);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.dash-card.collapsible summary::-webkit-details-marker { display: none; }
.dash-card.collapsible summary::after {
  content: "\25BE Show"; /* ▾ Show / ▴ Hide, not just a tiny bare arrow --
    the arrow alone at 13px in the far corner was too easy to miss
    entirely as a real control. A colored chip with a word on it reads
    unmistakably as "click me" at a glance. */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: #fff;
  background: var(--forest);
  padding: 5px 12px;
  border-radius: 999px;
  transition: background 0.15s ease;
  flex-shrink: 0;
  margin-left: 12px;
  white-space: nowrap;
}
.dash-card.collapsible[open] summary::after { content: "\25B4 Hide"; }
.dash-card.collapsible summary:hover::after { background: var(--forest-tint-border); color: var(--forest); }
.dash-card.collapsible summary:hover { background: var(--bg); }
.dash-card.collapsible .collapsible-body { padding: 0 20px 20px; margin-top: -14px; }

/* A lighter-weight stand-in for a nested .dash-card, used for chart/
   toggle groups bundled inside one collapsible section (Demand
   Overview, Sold-Out Toggles) -- a full nested .dash-card would double
   up the border/shadow/padding of the collapsible wrapping it. */
.dash-subsection + .dash-subsection,
.dash-grid + .dash-subsection { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.dash-subsection h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--forest); font-family: 'Inter', sans-serif; font-weight: 700; }

/* The dashboard's own content column is much wider than the customer
   reservation page's, so a plain width:100% field here stretched far
   longer than the same field looks on that page for the exact same
   kind of input (a name, a phone number, one line of text). Scoped to
   just the single-value fields -- the Turkey/Parts rows already have
   their own multi-field layout and stay as they are. */
#manualOrderCard #fg-manual-name,
#manualOrderCard #fg-manual-phone,
#manualOrderCard #fg-manual-email,
#manualOrderCard #fg-manual-day,
#manualOrderCard #fg-manual-instructions {
  max-width: 460px;
}
.demand-chart-block {
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.demand-chart-block h5 {
  margin: 0 0 10px;
  font-family: 'Zilla Slab', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.demand-chart-title {
  font-family: 'Zilla Slab', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 10px;
}

/* ---------- Demand Overview: visual charts ---------- */
.demand-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.demand-filters select { width: 240px; max-width: 100%; }
/* Longest option text of any select in this section (full product
   names, e.g. "Adams Antibiotic-Free Whole Turkey") -- needs real room
   of its own, since some browsers size the OPEN dropdown list to match
   the closed control's own width rather than auto-fitting the longest
   option, which is what was actually truncating names here. */
#stockTypeFilter { width: 320px; }
.demand-reset-btn { width: auto; margin-top: 0; }

.demand-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.demand-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.demand-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.demand-dot--pending { background: var(--status-pending); }
.demand-dot--batched { background: var(--status-batched); }
.demand-dot--fulfilled { background: var(--status-fulfilled); }
.demand-dot--reserved { background: var(--status-reserved); }
/* One definition only. There used to be a second --available rule above
   these, left over from the removed Pending/Batched/Fulfilled batch
   workflow; now that Reserved Levels has a real "available" bucket, two
   rules with this selector and different colours would be a coin flip
   decided by source order. */
.demand-dot--available { background: var(--amber); }

/* Bars are plain stacked divs (column-reverse, height in px computed in
   JS relative to the tallest bar currently shown) rather than a charting
   library -- this app has no chart dependency loaded anywhere else, and
   a handful of colored rectangles doesn't need one. */
.demand-chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 4px;
  min-height: 270px;
}
.demand-bar-col { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; min-width: 68px; }
.demand-bar-total { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* Reserved Levels shows Available and Reserved as two SEPARATE bars
   side by side, not one stack. Those two numbers no longer sum to
   anything real (see renderStockChart in dashboard.js), so nothing here
   may visually imply a total: no shared stack, no combined height, no
   number printed above the pair. Each bar carries its own value label
   instead. */
.demand-bar-pair { display: flex; align-items: flex-end; gap: 5px; }
.demand-bar-pair-item { display: flex; flex-direction: column; align-items: center; }
.demand-bar-value { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.demand-bar-single { width: 26px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.demand-bar-stack {
  width: 56px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
}
.demand-bar-segment { width: 100%; }
.demand-bar-segment--pending { background: var(--status-pending); }
.demand-bar-segment--batched { background: var(--status-batched); }
.demand-bar-segment--fulfilled { background: var(--status-fulfilled); }
.demand-bar-segment--reserved { background: var(--status-reserved); }
/* Same story as .demand-dot--available above: one definition only. */
.demand-bar-segment--available { background: var(--amber); }
/* Deliberately grey, not amber -- amber already means "still available
   to sell" in the Reserved Levels chart directly above this
   one. Reusing it here would make the same color mean two unrelated
   things depending on which chart you're looking at, since this chart
   isn't about available/reserved at all, just a plain daily total. */
.demand-bar-segment--total { background: var(--text-faint); }
.demand-bar-label { font-size: 11.5px; color: var(--text-muted); text-align: center; margin-top: 8px; max-width: 96px; line-height: 1.3; }

.demand-numbers-context { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.demand-numbers-context strong { color: var(--text); }
/* Uses the same blue-gray "parts" color already used for the parts pull-
   batch button elsewhere in this dashboard, so this section reads as
   visually tied to "parts" at a glance, not just labeled that way. */
.demand-parts-columns { display: flex; gap: 24px; flex-wrap: wrap; }
.demand-parts-column {
  flex: 1 1 220px;
  max-width: 260px;
  border: 1.5px solid var(--parts-tint-border);
  border-radius: var(--radius-lg);
  background: var(--parts-tint);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 14px;
}
.demand-parts-column h5 {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  font-family: 'Zilla Slab', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--parts-accent-dark);
}
/* display:contents removes the row's own box entirely, so its two
   children (name, total) become direct grid items of the shared column
   grid above -- that's what actually lines every number up under a
   common edge, rather than each row placing its number wherever the
   name text next to it happens to end. */
.demand-part-row { display: contents; }
.demand-part-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px dashed var(--parts-tint-border);
  align-self: center;
}
.demand-part-total {
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--parts-accent-dark);
  padding: 8px 0;
  border-bottom: 1px dashed var(--parts-tint-border);
  text-align: right;
  white-space: nowrap;
  align-self: center;
}
.demand-part-name:last-of-type, .demand-part-total:last-of-type { border-bottom: none; }

/* Cross-store cards get a visibly different treatment -- a manager who
   doesn't read the fine print should still be able to tell at a glance
   that this card is a different kind of information than the plain
   store-scoped cards around it. Reuses the same wood tone the site
   already uses for other "this is different / pay attention" moments
   (tally board, confirmation code, closed-notice icon). */
.cross-store-card {
  background: #FBF3E4;
  border: 1.5px solid var(--wood);
}
.cross-store-card h3, .cross-store-card summary { color: var(--wood); }
/* Turkey Catalog reuses the SAME wood palette so it doesn't stick out as
   the one oddly-colored section on the page, but deliberately WITHOUT
   the "ALL STORES" badge below -- that badge specifically means "pick
   which of the 5 stores," and the catalog isn't per-store at all, it's
   one shared list every store's own pricing/allocation gets built on
   top of. Giving it that badge would actively misdescribe what this
   section is. */
.universal-card {
  background: #FBF3E4;
  border: 1.5px solid var(--wood);
}
.universal-card h3, .universal-card summary { color: var(--wood); }
.cross-store-card h3::before, .cross-store-card summary::before {
  content: "ALL STORES";
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.5px;
  background: var(--wood);
  color: #FBF3E4;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  margin-right: 8px;
  vertical-align: middle;
}

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.bar-row .bar-label { width: 90px; flex-shrink: 0; color: var(--text-muted); font-weight: 500; }
.bar-track { flex: 1; background: var(--line-soft); border-radius: var(--radius-sm); height: 16px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--forest); border-radius: var(--radius-sm); transition: width 0.4s ease; }
.bar-count { width: 24px; text-align: right; font-weight: 700; color: var(--forest); }

.empty-note { font-size: 13px; color: var(--text-faint); padding: 6px 0; }

table.orders-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.orders-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--forest);
  border-bottom: 2px solid var(--forest);
  padding: 8px 10px;
  /* Sticky header row -- this table can now scroll internally (see
     .orders-table-scroll below), so the column headers (and their sort
     state) need to stay visible while scrolling a long result list,
     not just at the top before it's scrolled at all. */
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 1;
}
table.orders-table th.sortable-th { cursor: pointer; user-select: none; }
table.orders-table th.sortable-th:hover { color: var(--barn-red); }
.sort-hint { color: var(--text-faint); font-size: 10px; }
.sort-hint--active { color: var(--forest); font-size: 11px; }
/* A long cross-store search (e.g. searching just a store name) could
   return far more rows than comfortably fits on screen -- this caps the
   table's own height and scrolls WITHIN it (headers staying pinned via
   the sticky rule above) instead of the whole page growing endlessly.
   Background is deliberately --bg (the same warm parchment used for
   form-section cards elsewhere), not --paper -- the table sits inside a
   --paper card, so without this the grid was the exact same color as
   its own container and the rows never visually separated from it. */
.orders-table-scroll { max-height: 560px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
table.orders-table td { padding: 9px 10px; border-bottom: none; color: var(--text); }
/* Each reservation is now TWO rows -- a compact summary row plus an
   indented detail row underneath it (see renderOrdersTable) -- so the
   visible horizontal rule that separates one customer's whole record
   from the next belongs on the detail row (the true end of that
   record), not on the main row, which would otherwise draw a second,
   redundant line between a reservation's own two rows. */
table.orders-table tr.order-detail-row td { border-bottom: 2px solid var(--line); border-left: 3px solid var(--forest-tint-border); padding: 6px 10px 14px 22px; background: var(--paper); }
table.orders-table tr.order-main-row.no-detail td { border-bottom: 2px solid var(--line); }
table.orders-table tbody tr:last-child td { border-bottom: none; }
.order-detail-line { font-size: 13.5px; color: var(--text); padding: 4px 0; display: flex; align-items: baseline; gap: 8px; }
.order-detail-line::before { content: "•"; color: var(--forest); font-weight: 700; flex-shrink: 0; }
.order-detail-weight { color: var(--text-muted); font-weight: 400; }
table.orders-table tr.is-cancelled td { color: var(--text-faint); text-decoration: line-through; }
table.orders-table tr.is-cancelled td.no-strike { text-decoration: none; }
.action-cell-buttons { display: flex; align-items: center; gap: 8px; }
.view-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--parts-accent-dark);
  background: none;
  border: 1px solid var(--parts-accent);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  cursor: pointer;
}
.view-btn:hover { background: var(--parts-tint); }
.edit-link-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  background: none;
  border: 1px solid var(--forest);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.edit-link-btn:hover { background: var(--forest-tint); }

/* Reservation detail modal (the "View" action) -- reuses the existing
   .modal-overlay/.modal-card pattern the reconcile modal already
   established, just with its own content sections. */
.detail-section { margin-bottom: 16px; }
.detail-section h4 {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--forest);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}
.detail-section p, .detail-section ul { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.detail-section ul { padding-left: 18px; }
.detail-section--instructions { background: var(--barn-red-tint); border: 1px solid var(--barn-red-tint-border); border-radius: var(--radius-md); padding: 10px 14px; }
.cancel-btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--barn-red);
  background: none;
  border: 1px solid var(--barn-red);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  cursor: pointer;
}
.cancel-btn:hover { background: var(--barn-red-tint); }
.cancel-btn:disabled { border-color: var(--line); color: var(--text-faint); cursor: not-allowed; background: none; }
.cancelled-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.search-input {
  max-width: 320px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 9px 12px;
  min-height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-inset);
  width: 100%;
}

.toggle-switch { position: relative; width: 38px; height: 22px; display: inline-block; }
.toggle-switch input { display: none; }
/* The switch track keeps a fully-rounded pill shape -- it's a functional
   mechanical control (reads as "a switch"), not a decorative badge, so
   it's the deliberate exception to the softer 4-6px radius used elsewhere. */
.toggle-switch .track { position: absolute; inset: 0; background: var(--forest); border-radius: 20px; cursor: pointer; }
.toggle-switch .knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff; border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(44, 42, 41, 0.35);
  pointer-events: none;
}
.toggle-switch input:checked ~ .track { background: var(--barn-red); }
.toggle-switch input:checked ~ .track .knob { transform: translateX(16px); }

/* Positive variant: for switches where "on" is the good state (e.g. orders
   open), rather than the sold-out toggle's default where "on" means bad. */
.toggle-switch.positive .track { background: var(--wood); }
.toggle-switch.positive input:checked ~ .track { background: var(--forest); }

.order-window-row { display: flex; align-items: center; gap: 12px; }
.order-window-row .secondary-btn { margin-top: 0; }
.order-window-status { font-weight: 600; color: var(--wood); }
.order-window-status.is-open { color: var(--forest); }

/* Availability, grouped by type */
.avail-type-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.avail-type-block:last-child { border-bottom: none; }
.avail-type-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.avail-type-name { font-family: 'Zilla Slab', serif; font-weight: 600; font-size: 15px; }
.avail-type-price { font-size: 12px; color: var(--text-faint); }
.avail-size-list { display: flex; flex-wrap: wrap; gap: 10px; }
/* Parts Availability (dashboard.js) renders its toggle chips straight
   into this div with no wrapping class of its own -- without this, each
   .avail-size-chip (a flex container itself, but block-level as an
   ELEMENT since nothing constrains its own width) stretches to the full
   width of the card, leaving one wide, mostly-empty bar per part
   instead of a compact wrapped row of chips. Same flex-wrap treatment
   as .avail-size-list above, just scoped to this specific container. */
#partsAvailabilityWrap { display: flex; flex-wrap: wrap; gap: 10px; }
.avail-size-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  font-size: 12px;
  background: var(--paper);
}
.avail-size-chip.is-sold-out { border-color: var(--barn-red-tint-border); background: var(--barn-red-tint); }
.avail-size-chip .chip-label { font-weight: 600; min-width: 62px; }

/* Quantity stepper -- customer order page, per bird line being staged
   before "Add to My Reservation". Deliberately plain +/- buttons flanking
   a number input rather than a native spinner, since the native up/down
   arrows are small enough to be a real mis-tap risk on mobile. */
.qty-stepper { display: flex; align-items: center; gap: 0; width: fit-content; }
.qty-stepper input {
  width: 56px;
  text-align: center;
  border-radius: 0;
  border-left: none;
  border-right: none;
}
.qty-btn {
  width: 38px;
  height: 40px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--forest);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.qty-btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.qty-btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.qty-btn:hover { background: var(--forest-tint); }

/* Inventory allocation editor -- replaces the old sold-out toggle chips
   (dashboard.js's loadInventory / admin.js's renderInventoryForStore).
   One row per weight class: label, editable allocation number, live
   available count, live committed breakdown, and a Save button that only
   enables once the number actually changes. */
/* Outer card per product FAMILY (e.g. "Adams Antibiotic-Free" covers
   both its Whole Turkey and Turkey Breast products) -- this is the unit
   a manager scrolls past, so keeping it visually self-contained means
   they never have to scroll back up to remember which brand a weight
   band further down belongs to. */
.inventory-family-block {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  margin-bottom: 14px;
  background: var(--paper);
}
.inventory-family-header {
  font-family: 'Zilla Slab', serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--forest);
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
/* One sub-block per actual product within the family (Whole Turkey,
   Turkey Breast). This border is deliberately heavier/darker than the
   family divider above it -- it's the line marking where one PRODUCT
   ends and another begins within the same family card, so it needs to
   read as a stronger break than the family highlight bar itself.
   Omitted entirely when a family has only one product, since there's
   nothing to distinguish it from. */
.inventory-subproduct + .inventory-subproduct {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 3px solid var(--line);
}
.inventory-subproduct-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
/* Condensed grid of weight-band chips instead of one full-width row per
   band. Widened (from an earlier, tighter pass) so a 4-digit allocation
   number and fully spelled-out "available"/"pending"/"batched"/
   "fulfilled" labels never get cut off -- more vertical space overall
   is the correct tradeoff here, not truncated text. */
.inventory-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.inventory-size-row {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--bg);
  font-size: 12.5px;
}
.inventory-size-row.is-unconfigured { border-color: var(--barn-red-tint-border); background: var(--barn-red-tint); }
.inventory-chip-label { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.inventory-chip-inputs { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.inventory-chip-inputs .inventory-qty-input { max-width: 80px; min-width: 0; }
.inventory-chip-inputs .save-quota-btn { padding: 6px 10px; font-size: 12px; flex: 1; }
.inventory-chip-meta { display: flex; flex-direction: column; gap: 3px; line-height: 1.4; }
.inventory-available { font-weight: 700; color: var(--forest); }
.inventory-available.is-zero { color: var(--barn-red); }
.inventory-reserved { font-weight: 600; color: var(--text-faint); }
.inventory-committed { color: var(--text-faint); }
.inventory-unconfigured-badge {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  color: var(--barn-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 9px;
}
.inventory-row-error { color: var(--barn-red); font-size: 10.5px; margin-top: 6px; line-height: 1.3; }
.save-quota-btn {
  border: 1.5px solid var(--forest);
  background: var(--forest);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.save-quota-btn:hover:not(:disabled) { background: #24391f; }
.save-quota-btn:disabled { opacity: 0.4; cursor: not-allowed; background: var(--text-faint); border-color: var(--text-faint); }

.save-all-row { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.save-all-inventory-btn {
  border: 1.5px solid var(--forest);
  background: var(--forest);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.save-all-inventory-btn:hover:not(:disabled) { background: #24391f; }
.save-all-inventory-btn:disabled { opacity: 0.4; cursor: not-allowed; background: var(--text-faint); border-color: var(--text-faint); }

/* ---------- Login (dashboard) ---------- */
#loginStage .card h3 { color: var(--forest); }

/* ---------- Banners ---------- */
.error-banner {
  background: var(--barn-red-tint);
  border: 1px solid var(--barn-red-tint-border);
  color: #6B2B2B;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
  display: none;
}

.password-field-wrap { position: relative; }
.password-field-wrap input { padding-right: 56px; width: 100%; }
.toggle-password-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
}
.toggle-password-btn:hover { color: var(--forest); }

.reveal-once-box {
  background: var(--barn-red-tint);
  border: 1.5px solid var(--barn-red-tint-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.reveal-once-box .label { font-size: 12px; font-weight: 600; color: #6B2B2B; margin-bottom: 8px; }
.reveal-once-box .value {
  display: inline-block;
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 18px;
  background: var(--wood);
  color: #FBF3E4;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}
.reveal-once-box .warning { font-size: 12px; color: #6B2B2B; margin-top: 10px; }

/* ---------- WMS: Fulfillment & Pull Lists ---------- */
.fulfillment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 620px) { .fulfillment-grid { grid-template-columns: 1fr; } }
.fulfillment-action {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--paper);
}
.fulfillment-action-title {
  font-family: 'Zilla Slab', serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--forest);
  margin-bottom: 10px;
}
.fulfillment-action select {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--paper);
}

/* ---------- WMS: Active batches list ---------- */
.batch-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--paper);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.batch-card .batch-card-main { display: flex; flex-direction: column; gap: 2px; }
.batch-card .batch-card-type { font-family: 'Zilla Slab', serif; font-weight: 600; font-size: 14px; color: var(--forest); text-transform: capitalize; }
.batch-card .batch-card-meta { font-size: 12px; color: var(--text-faint); }
.batch-card .batch-card-count {
  font-family: 'Zilla Slab', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--wood);
  flex-shrink: 0;
}
.batch-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Bird/parts color coding on the cards themselves -- a colored left
   stripe plus a matching-tinted type label, so a manager scanning a
   list of several batches can tell bird from parts at a glance rather
   than having to read "bird pull" / "parts pull" on each one. */
.batch-card--bird { border-left: 4px solid var(--bird-accent); }
.batch-card--bird .batch-card-type { color: var(--bird-accent-dark); }
.batch-card--parts { border-left: 4px solid var(--parts-accent); }
.batch-card--parts .batch-card-type { color: var(--parts-accent-dark); }

.batch-print-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  background: var(--forest-tint);
  border: 1.5px solid var(--forest-tint-border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.batch-print-btn:hover { background: var(--forest-tint-border); }

.batch-reconcile-btn {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--forest);
  border: 1.5px solid var(--forest);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.batch-reconcile-btn:hover { background: #24391f; }

/* ---------- WMS: Completed batches (archive) ---------- */
/* A season's worth of reconciled batches accumulates here with nothing
   removing them (unlike Active Batches, which naturally stays small --
   items leave that list the moment they're reconciled). Left unbounded,
   this section would grow to fill the whole page by December. Fixed
   height + its own scrollbar keeps the rest of the dashboard reachable
   regardless of how many batches pile up. An expanded batch's item list
   (and its Return-to-Queue buttons) scrolls within this same region
   rather than pushing the container taller. */
.scroll-panel {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px; /* keeps content off the scrollbar itself */
  /* Without this, dragging past the end of this inner scroll area lets
     the gesture "chain" into the outer page's own rubber-band bounce --
     which looks exactly like the whole panel is being dragged and
     snapping back, when really it's the page underneath doing that,
     not this box. This stops the gesture at this container's edge. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Touch devices (iPad/iPhone Safari in particular) only ever show a
   scrollbar as a thin overlay that fades in during an active scroll and
   disappears at rest -- there's no persistent bar to see while sitting
   still, which is what actually prompted this. These rules make the bar
   permanently visible instead of relying on that fade-in-only default,
   on the browsers that support styling it (desktop Chrome/Edge/Safari
   via -webkit-scrollbar, Firefox via scrollbar-width/color). iOS Safari
   itself doesn't support custom scrollbar styling even with these rules
   -- its overlay-during-scroll behavior is a platform-level default that
   can't be overridden, so the fix there is really the fixed height +
   overscroll-behavior above, not the bar's visibility. */
.scroll-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--bg);
}
.scroll-panel::-webkit-scrollbar { width: 10px; }
.scroll-panel::-webkit-scrollbar-track { background: var(--bg); border-radius: var(--radius-md); }
.scroll-panel::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: var(--radius-md);
  border: 2px solid var(--bg);
}
.scroll-panel::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
.completed-batch-card { margin-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.completed-batch-detail {
  border: 1.5px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 4px 16px;
  margin-bottom: 10px;
  background: var(--bg);
}
.completed-batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.completed-batch-item:last-child { border-bottom: none; }
.return-to-queue-btn {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--barn-red);
  background: var(--barn-red-tint);
  border: 1.5px solid var(--barn-red-tint-border);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.return-to-queue-btn:hover { background: var(--barn-red-tint-border); }
.return-to-queue-btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- WMS: Reconciliation modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 42, 41, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-card h3 { margin: 0 0 6px; }
.reconcile-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.reconcile-item:last-child { border-bottom: none; }
.reconcile-item input[type="checkbox"] { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.reconcile-item .reconcile-item-main { display: flex; flex-direction: column; gap: 2px; }
.reconcile-item .reconcile-item-name { font-weight: 600; font-size: 14px; }
.reconcile-item .reconcile-item-detail { font-size: 12px; color: var(--text-muted); }
.reconcile-item.is-unchecked .reconcile-item-name,
.reconcile-item.is-unchecked .reconcile-item-detail { color: var(--barn-red); }
.reconcile-note-toggle {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
}
.reconcile-note-toggle:hover { color: var(--forest); }
.reconcile-note-input {
  width: 100%;
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  padding: 6px 8px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  resize: vertical;
}

/* ---------- Pending-order count badges ---------- */
/* The actual answer to "how do I know a new order came in": a live
   count right on the button that starts the workflow, not a separate
   section to remember to go check. Deliberately loud (solid fill, white
   bold text, a small bounce-in) since the whole point is catching a
   manager's eye during a quick glance at the dashboard, not blending in
   as one more quiet label. */
.fulfillment-action-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  animation: pending-badge-in 0.2s ease-out;
}
.pending-badge--bird { background: var(--bird-accent-dark); }
.pending-badge--parts { background: var(--parts-accent-dark); }
@keyframes pending-badge-in {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- Footer ---------- */
/* Bookends the masthead -- same dark green, same logo -- so the page
   reads as framed rather than just trailing off after the last card.
   Kept to real, known facts (the five actual store towns) rather than
   inventing marketing copy that doesn't belong in an internal tool. */
.site-footer {
  background: var(--forest);
  color: rgba(255,255,255,0.75);
  margin-top: 40px;
  padding: 28px 24px;
}
.site-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-logo { height: 22px; width: auto; opacity: 0.92; }
.footer-locations { font-size: 12.5px; letter-spacing: 0.2px; }

/* Gold = "other": not a commit (green) and not a stop (red) -- print and
   export, quick picks, view/edit, navigation. Outlined, so the solid green
   main action stays the strongest thing on the page. Element + class +
   :not() so it outranks the base styles of the buttons it's added to. */
button.btn-gold:not(:disabled) { background: none; border: 1.5px solid var(--amber); color: #7A5A1E; }
button.btn-gold:hover:not(:disabled) { background: var(--amber-tint); border-color: var(--amber-hover); color: #6A4D17; }
