/* ==========================================================================
   HospoMenus Design System
   Hospitality / editorial visual identity.
   Plain CSS with custom-property design tokens for light & dark themes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --shell-bg: #063253;
  --header-bg: #063253;
  --shell-line: #ffffff35;
  --nav-active: #2eaa36;
  --attention-bg: #fff8ef;
  --attention-line: #f6e4cc;
  --ready-bg: #f0fbf3;
  --ready-line: #d6efdd;
  --status-accent: #31b842;

  /* Brand / base palette — HospoMenu navy on light (see visual_concept/brand-preview) */
  --brand: #073457;            /* primary navy */
  --brand-deep: #052a48;
  --brand-soft: #e7f0fa;       /* navy-tinted well / active */
  --brand-focus: #fbaa1c;      /* amber focus ring / accent */

  --c-cream: #f7f9fc;          /* light blue-grey page background */
  --c-cream-raised: #ffffff;   /* white working surface / raised */
  --c-cream-deep: #eef1f5;     /* subtle bordered / wells */

  --ink: #092d50;              /* near-black navy text */
  --ink-soft: #263f5c;         /* primary body */
  --ink-muted: #536d8c;        /* secondary text */
  --ink-faint: #8a97a8;        /* tertiary / placeholder */

  --forest: #073457;           /* primary action (navy) */
  --forest-deep: #052a48;
  --forest-soft: #e7f0fa;

  --rust: #e87800;             /* attention / coral-red */
  --rust-soft: #fff2e3;

  --amber: #bc6500;            /* warning */
  --amber-soft: #fff3e4;

  --green: #168127;            /* success */
  --green-soft: #dcf4df;

  --bluegrey: #5c6b74;         /* in-progress muted blue-grey */
  --bluegrey-soft: #e5eaec;

  --grey: #8a97a8;             /* neutral / draft */

  --line: #e2e7ef;             /* fine border */
  --line-soft: #eaeef3;

  --shadow-sm: 0 1px 2px rgba(34, 69, 126, 0.06);
  --shadow-md: 0 8px 24px rgba(34, 69, 126, 0.10);

  /* Typography */
  --font-serif: "Barlow Semi Condensed", "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Radii (kept modest — not 20px-everywhere) */
  --radius-sm: 6px;
  --radius-md: 8px;

  --trans-fast: 160ms;
  --trans-med: 240ms;

  color-scheme: light;
}

[data-theme="dark"] {
  --shell-bg: #071725;
  --header-bg: #0c2236;
  --shell-line: #304758;
  --nav-active: #216e32;
  --attention-bg: #28271f;
  --attention-line: #514126;
  --ready-bg: #102c27;
  --ready-line: #235338;
  --status-accent: #43df50;

  --brand: #2581ed;
  --brand-deep: #1266c8;
  --brand-soft: #12375b;
  --brand-focus: #fbaa1c;

  --c-cream: #0c1b28;          /* deep navy-black main background */
  --c-cream-raised: #142431;    /* raised */
  --c-cream-deep: #1d3040;      /* wells */

  --ink: #e9eef6;               /* off-white */
  --ink-soft: #cdd6e4;
  --ink-muted: #acc3db;
  --ink-faint: #707b8c;

  --forest: #2581ed;
  --forest-deep: #1266c8;
  --forest-soft: #12375b;

  --rust: #ff9b20;
  --rust-soft: #30271b;

  --amber: #ffb044;
  --amber-soft: #30291c;

  --green: #83ec8b;
  --green-soft: #1c4932;

  --bluegrey: #8ba0aa;
  --bluegrey-soft: #2a3236;

  --grey: #707b8c;

  --line: #2b4053;
  --line-soft: #23384a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --shell-bg: #071725;
    --header-bg: #0c2236;
    --shell-line: #304758;
    --nav-active: #216e32;
    --attention-bg: #28271f;
    --attention-line: #514126;
    --ready-bg: #102c27;
    --ready-line: #235338;
    --status-accent: #43df50;

    --brand: #2581ed;
    --brand-deep: #1266c8;
    --brand-soft: #12375b;
    --brand-focus: #fbaa1c;
    --c-cream: #0c1b28;
    --c-cream-raised: #142431;
    --c-cream-deep: #1d3040;
    --ink: #e9eef6;
    --ink-soft: #cdd6e4;
    --ink-muted: #acc3db;
    --ink-faint: #707b8c;
    --forest: #2581ed;
    --forest-deep: #1266c8;
    --forest-soft: #12375b;
    --rust: #ff9b20;
    --rust-soft: #30271b;
    --amber: #ffb044;
    --amber-soft: #30291c;
    --green: #83ec8b;
    --green-soft: #1c4932;
    --bluegrey: #8ba0aa;
    --bluegrey-soft: #2a3236;
    --grey: #707b8c;
    --line: #2b4053;
    --line-soft: #23384a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .serif { font-family: var(--font-serif); font-weight: 400; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--brand-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background var(--trans-fast), border-color var(--trans-fast), color var(--trans-fast);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-deep); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--c-cream-deep); }
.btn-ghost { background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { color: var(--ink); background: var(--c-cream-deep); }
.btn-danger { background: transparent; color: var(--rust); border-color: var(--rust); }
.btn-danger:hover { background: var(--rust); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { background: inherit; color: inherit; border-color: inherit; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13.5px;
}
.form-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  margin: 0;
  color: var(--ink-muted);
}
.form-options label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--forest); }
.form-options a { font-size: 13.5px; }
.form-control {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--c-cream-raised);
  color: var(--ink);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.form-control::placeholder { color: var(--ink-faint); }
.form-control:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--forest-soft);
}
.form-error { color: var(--rust); font-size: 13px; margin-top: 5px; }
.help-text { color: var(--ink-muted); font-size: 13px; margin-top: 5px; }
.form-control.is-invalid { border-color: var(--rust); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px var(--rust-soft); }
.form-control:disabled, .form-control[readonly] { opacity: 0.6; cursor: not-allowed; background: var(--c-cream-deep); }
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6b7b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  padding-right: 38px;
  cursor: pointer;
}
select.form-control option { color: var(--ink); background: var(--c-cream-raised); }
.form-alert { margin-bottom: 18px; }

/* File upload drop zone (keeps the native input accessible) */
.file-drop-input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.file-drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 26px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: var(--radius-md);
  background: var(--c-cream); color: var(--ink-muted);
  transition: border-color var(--trans-fast), background var(--trans-fast);
}
.file-drop-zone:hover, .file-drop-zone:focus-visible { border-color: var(--forest); background: var(--c-cream-raised); }
.file-drop-text { font-size: 14px; color: var(--ink-soft); }
.file-drop-text strong { color: var(--forest); }
.file-drop-hint { font-size: 12.5px; color: var(--ink-faint); }
.file-drop-selected {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--c-cream-raised); color: var(--forest); font-size: 13.5px;
}
.file-drop-selected[hidden] { display: none; }

/* Narrow screens: stack the bulk-text tool panels so they never overflow. */
@media (max-width: 900px) {
  .tools-grid { grid-template-columns: 1fr !important; }
}
.file-drop-name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Flash / status messages
   -------------------------------------------------------------------------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.alert-error { background: var(--rust-soft); color: var(--rust); border: 1px solid var(--rust-soft); }
.alert-success { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-soft); }
.alert-info { background: var(--bluegrey-soft); color: var(--bluegrey); border: 1px solid var(--bluegrey-soft); }

/* --------------------------------------------------------------------------
   Status badges (restrained — not neon bubbles)
   -------------------------------------------------------------------------- */
.status { padding: 4px 10px; border-radius: 999px; background: var(--c-cream-deep); line-height: 1.4; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; column-gap: 6px; }
.status::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.status-draft { background: var(--c-cream-deep); color: var(--grey); }
.status-progress { background: var(--bluegrey-soft); color: var(--bluegrey); }
.status-needs-review { background: var(--amber-soft); color: var(--rust); }
.status-changes-requested { background: var(--amber-soft); color: var(--amber); }
.status-awaiting { background: var(--amber-soft); color: var(--amber); }
.status-approved { background: var(--green-soft); color: var(--green); }
.status-published { background: var(--green-soft); color: var(--forest); }
.status-archived { color: var(--grey); }
.status-workflow { color: var(--forest); }

/* Home workflow step count */
.step-count { font-family: var(--font-serif); font-size: 38px; line-height: 1; min-width: 54px; text-align: center; }
.color-needs-review { color: var(--rust); }
.color-awaiting { color: var(--amber); }
.color-active { color: var(--forest); }
.color-progress { color: var(--bluegrey); }
.color-changes-requested { color: var(--amber); }
.color-approved { color: var(--green); }
.color-draft { color: var(--grey); }

/* --------------------------------------------------------------------------
   Auth layout (login / register / forgot / reset)
   -------------------------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  background-color: #2c2f26;
  background-image:
    linear-gradient(180deg, rgba(28, 30, 24, 0.55) 0%, rgba(28, 30, 24, 0.75) 100%),
    var(--auth-bg, none);
  background-size: cover;
  background-position: center;
  color: var(--c-cream-raised);
  display: flex;
  flex-direction: column;
  padding: 40px 44px 44px;
  min-height: 100vh;
}
.auth-visual .brand-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.auth-visual .brand-lockup .brand-logo-img { width: 96px; height: auto; }
.auth-visual .brand-tagline {
  font-family: var(--font-serif); font-size: 12.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(245,241,232,0.85);
  margin-top: 0; line-height: 1.5; max-width: 300px;
}
.auth-visual .hero-copy { margin-top: auto; max-width: 430px; }
.auth-visual .hero-copy h2 { font-size: 32px; line-height: 1.18; margin: 0 0 16px; }
.auth-visual .hero-copy p { font-family: var(--font-sans); font-size: 15px; color: rgba(245,241,232,0.85); line-height: 1.6; max-width: 400px; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--c-cream);
}
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand-inline { margin-bottom: 36px; }
.auth-card .brand-inline .brand-logo-img { width: 128px; height: auto; }
.auth-card h1 { font-size: 30px; margin: 0 0 6px; color: var(--ink); }
.auth-card .subtitle { color: var(--ink-muted); margin: 0 0 30px; font-size: 15px; }
.auth-card .form-footer { margin-top: 26px; text-align: center; color: var(--ink-muted); font-size: 14px; }
.auth-card .form-footer a { font-weight: 500; }
.auth-card .legal-fine { margin-top: 22px; text-align: center; color: var(--ink-faint); font-size: 12.5px; }

/* --------------------------------------------------------------------------
   Application shell
   -------------------------------------------------------------------------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: auto 1fr; }

/* Sidebar */
.sidebar {
  background: var(--shell-bg);
  border-right: 1px solid var(--shell-line);
  display: flex;
  flex-direction: column;
  padding: 24px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  align-self: start;
  overflow-y: auto;
}
.sidebar-brand { display: none; align-items: center; justify-content: center; padding: 6px 0 20px; }
.brand-logo { display: block; line-height: 0; }
.brand-logo-img { width: 74px; height: auto; display: block; }
.sidebar-brand .brand-logo-img { width: 168px; }
/* Light/dark logo swap */
.brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .brand-logo-light { display: none; }
  :root:not([data-theme]) .brand-logo-dark { display: block; }
}
.sidebar-brand .brand-mark {
  width: 34px; height: 34px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--ink);
}
.sidebar-brand .brand-wordmark { font-family: var(--font-serif); font-size: 22px; color: var(--ink); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em;
  color: #b7cee5; padding: 18px 12px 10px; margin-top: 12px; border-top: 1px solid var(--shell-line);
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--ink-muted); font-size: 14px; text-decoration: none; line-height: 1.2;
  transition: background var(--trans-fast), color var(--trans-fast);
}
.nav-item:hover { background: var(--c-cream-deep); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--forest-soft); color: var(--forest); font-weight: 500; }
.nav-item.disabled { color: var(--ink-faint); cursor: default; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; min-height: 48px; border-radius: var(--radius-sm);
  color: #f1f6ff; font-size: 16px; text-decoration: none; line-height: 1.2;
  transition: background var(--trans-fast), color var(--trans-fast);
}
.sidebar .nav-item:hover { background: #ffffff14; color: #fff; text-decoration: none; }
.sidebar .nav-item.active { background: var(--nav-active); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px #ffffff08; }
.sidebar .nav-item.disabled { color: var(--ink-faint); cursor: default; }
.sidebar .nav-item .nav-ico { width: 28px; height: 28px; flex: 0 0 auto; }
.sidebar .nav-item .nav-count {
  margin-left: auto; font-size: 13px; font-weight: 600; color: #fff;
  background: #fa3c47; border: 1px solid #ff5962;
  border-radius: 999px; padding: 1px 7px; line-height: 1.4;
}
.sidebar-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--shell-line); display: flex; flex-direction: column; gap: 2px; }

/* Main column */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 20px;
  grid-column: 1 / -1; min-height: 78px; padding: 12px 28px; border-bottom: 1px solid var(--shell-line);
  background: var(--header-bg); color: #fff;
}
.context-switcher { position: relative; font-size: 14.5px; }
.context-switcher summary {
  display: flex; align-items: center; gap: 4px; cursor: pointer;
  list-style: none; color: var(--ink); font-weight: 500;
}
.context-switcher summary::-webkit-details-marker { display: none; }
.context-switcher summary:hover { color: var(--forest); }
.context-switcher .ctx-group { color: var(--ink); font-weight: 600; }
.context-switcher .ctx-sep { color: var(--ink-faint); font-weight: 400; }
.context-switcher .ctx-venue { color: var(--ink-muted); font-weight: 400; }
.context-switcher[open] .ctx-form {
  position: absolute; top: 100%; left: 0; z-index: 20; margin-top: 8px;
  width: 300px; padding: 16px; background: var(--c-cream-raised);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.context-switcher .ctx-form .form-control { margin-top: 4px; }
.context-switcher .ctx-form label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-muted); margin-bottom: 4px; }
.topbar-spacer { flex: 1; }
.global-search {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--c-cream); padding: 8px 13px; color: var(--ink-faint);
  width: 260px; transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.global-search:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-soft); }
.global-search input { border: 0; background: transparent; color: var(--ink); width: 100%; outline: none; }
.global-search input::placeholder { color: var(--ink-faint); }
.user-menu { display: flex; align-items: center; gap: 13px; }
.user-menu .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.profile-menu { position: relative; display: inline-block; }
.profile-menu > summary { list-style: none; cursor: pointer; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-pop {
  position: absolute; right: 0; top: 100%; z-index: 30; margin-top: 8px;
  min-width: 220px; background: var(--c-cream-raised);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 12px; text-align: left;
}
.profile-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.profile-email { color: var(--ink-muted); font-size: 12.5px; margin: 2px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-link { display: block; padding: 9px 0; font-size: 13.5px; color: var(--ink-soft); border-bottom: 1px solid var(--line-soft); }
.profile-link:hover { color: var(--ink); }
.icon-btn.search-toggle { display: none; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--ink-muted);
  background: transparent; border: 0; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--c-cream-deep); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--rust); }

.content { padding: 26px 38px 60px; flex: 1; max-width: 1600px; width: 100%; margin: 0 auto; }

/* Page structure (heading -> toolbar -> list, not a wall of cards) */
.page-head { margin-bottom: 24px; padding: 24px 28px; background: var(--c-cream-raised); border: 1px solid var(--line); border-left: 5px solid var(--status-accent); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.page-head-attention { border-left-color: #ff9000; }
.surface-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--c-cream-raised); box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.surface-panel > :first-child { margin-top: 0; }
.activity-list { max-width: 960px; }
.activity-row { display: flex; gap: 18px; align-items: flex-start; padding: 20px; margin-bottom: 12px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-md); background: var(--c-cream-raised); box-shadow: var(--shadow-sm); }
.activity-row .avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.activity-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.queue-list { display: grid; gap: 16px; margin-bottom: 32px; }
.queue-card { display: flex; align-items: center; gap: 24px; padding: 24px; border: 1px solid var(--attention-line); border-left: 5px solid #ff9000; border-radius: var(--radius-md); background: var(--attention-bg); box-shadow: var(--shadow-sm); }
.queue-symbol { display: grid; place-items: center; width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%; background: var(--amber-soft); color: var(--amber); }
.queue-symbol svg { width: 34px; height: 34px; }
.queue-card-body { flex: 1; min-width: 0; }
.queue-card h3 { font-size: 26px; line-height: 1.3; margin: 0 0 5px; }
.queue-card h3 a { color: var(--ink); }
.queue-card .row-sub { color: var(--ink-muted); }
.queue-card .btn { min-height: 46px; padding-inline: 26px; }
.btn-attention { background: #ed8100; color: #fff; border-color: #df7800; }
.btn-attention:hover { background: #cf7100; }
.review-section { padding: 12px 20px; border: 1px solid var(--line); border-left: 4px solid #ff9000; border-radius: var(--radius-md); background: var(--c-cream-raised); box-shadow: var(--shadow-sm); }
.proof-toolbar { padding: 20px; border: 1px solid var(--ready-line); border-left: 4px solid var(--status-accent); border-radius: var(--radius-md); background: var(--ready-bg); }
.version-card { border-top: 4px solid var(--status-accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.page-head h1 { font-family: var(--font-serif); font-size: 36px; margin: 0 0 6px; color: var(--ink); }
.page-head .sub { color: var(--ink-muted); margin: 0; font-size: 16px; max-width: 800px; }
.page-head .page-actions { display: flex; gap: 10px; align-items: center; }

/* Persistent, restrained workflow rail */
.workflow-rail {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin: -8px 0 22px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--c-cream-raised);
}
.workflow-steps { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.workflow-step { display: flex; align-items: center; gap: 8px; color: var(--ink-faint); font-size: 13px; font-weight: 500; }
.workflow-step:not(:last-child)::after { content: "→"; margin: 0 12px; color: var(--line); }
.workflow-dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); font-size: 12px; font-weight: 600; flex: none;
}
.workflow-step.active { color: var(--ink); }
.workflow-step.active .workflow-dot { background: var(--green); border-color: var(--green); color: var(--c-cream-raised); }
.workflow-step.done { color: var(--ink-muted); }
.workflow-step.done .workflow-dot { background: var(--forest-soft); border-color: var(--forest); color: var(--forest); }
.workflow-next { margin-left: auto; color: var(--ink-soft); font-size: 13.5px; max-width: 380px; }
.workflow-next strong { color: var(--forest); font-weight: 600; }
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--c-cream-raised); margin-bottom: 16px;
}
.toolbar .search {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--c-cream-raised); padding: 9px 12px; color: var(--ink-faint);
}
.toolbar .search:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-soft); }
.toolbar .search input { border: 0; background: transparent; color: var(--ink); flex: 1; outline: none; }
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tab { padding: 7px 12px; border-radius: var(--radius-sm); color: var(--ink-muted); font-size: 13.5px; }
.filter-tab:hover { color: var(--ink); background: var(--c-cream-deep); }
.filter-tab.active { background: var(--green-soft); color: var(--green); font-weight: 500; }

/* Lists / tables */
.list {
  width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 0; background: var(--c-cream-raised); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.list th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-muted); font-weight: 600; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--brand-soft);
}
.list td {
  padding: 20px; font-size: 14.5px; color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
.list tbody tr { transition: background var(--trans-fast); }
.list tbody tr:hover { background: var(--c-cream-deep); }
.list tbody tr:last-child td { border-bottom: 0; }
.list .row-main { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.list .row-sub { color: var(--ink-muted); font-size: 13px; }
.list .row-link { color: var(--ink); text-decoration: none; display: block; }
.list .row-link:hover { color: var(--forest); }
.list td.actions { text-align: right; white-space: nowrap; }
.list td.actions .btn { padding: 10px 16px; font-size: 14px; }
.list th:first-child { border-top-left-radius: var(--radius-md); }
.list th:last-child { border-top-right-radius: var(--radius-md); }

/* Horizontally scrollable table container (keeps columns readable on small screens) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 0; }
.table-scroll > .list { min-width: 620px; }

/* Dashboard / list: desktop table vs mobile stacked cards */
.menu-list-cards { display: none; }
.menu-card {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--c-cream-raised); padding: 16px; margin-bottom: 14px;
}
.menu-card-main { display: block; text-decoration: none; }
.menu-card-name { font-weight: 600; color: var(--ink); font-size: 16px; }
.menu-card-venue { color: var(--ink-muted); font-size: 13.5px; margin-top: 2px; }
.menu-card-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.menu-card-action { margin-top: 6px; }

/* Venue-difference list: desktop table vs mobile cards */
.differences-cards { display: none; }
.diff-card {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--c-cream-raised); padding: 16px; margin-bottom: 14px;
}
.diff-card-main { display: block; text-decoration: none; }
.diff-card-name { font-weight: 600; color: var(--ink); font-size: 16px; }
.diff-card-sub { color: var(--ink-muted); font-size: 13.5px; margin-top: 2px; }
.diff-card-stats { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 12px 0; }
.diff-stat { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.diff-stat-label { width: 74px; color: var(--ink-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.diff-card-action { margin-top: 6px; }

/* Venue-difference detail: desktop table vs mobile per-venue stacked cards */
.differences-item-cards { display: none; }
.diff-venue-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--c-cream-raised); padding: 16px; margin-bottom: 14px; }
.dv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.dv-venue { font-weight: 600; color: var(--ink); font-size: 16px; }
.dv-field { margin-top: 10px; }
.dv-field-label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-faint); font-weight: 600; margin-bottom: 3px; }
.dv-field-value { font-size: 14px; color: var(--ink-soft); }
.dv-line { margin-bottom: 2px; }

/* User list: desktop table vs mobile cards */
.user-cards { display: none; }
.user-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--c-cream-raised); padding: 16px; margin-bottom: 14px; }
.user-card-head { margin-bottom: 10px; }
.user-card-name { font-weight: 600; color: var(--ink); font-size: 16px; }
.user-card-email { color: var(--ink-muted); font-size: 13.5px; margin-top: 2px; }
.user-card-fields { display: grid; gap: 8px; margin-bottom: 12px; }
.user-card-field { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.uc-label { width: 64px; color: var(--ink-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; flex: none; }

/* Row overflow menu */
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; cursor: pointer; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-pop {
  position: absolute; right: 0; top: 100%; z-index: 30; margin-top: 4px;
  min-width: 210px; background: var(--c-cream-raised);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 6px; text-align: left;
}
.row-menu-pop .menu-item {
  display: block; width: 100%; text-align: left; padding: 9px 11px;
  border: 0; background: transparent; color: var(--ink-soft);
  font-size: 13.5px; cursor: pointer; border-radius: var(--radius-sm); white-space: nowrap;
}
.row-menu-pop .menu-item:hover { background: var(--c-cream-deep); color: var(--ink); text-decoration: none; }
.row-menu-pop form { margin: 0; }
.row-menu-pop .menu-item.danger { color: var(--rust); }
.row-menu-pop .menu-item.danger:hover { background: var(--rust-soft); color: var(--rust); }

/* Danger button variant */
.btn-outline.danger { color: var(--rust); border-color: var(--line); }
.btn-outline.danger:hover { background: var(--rust-soft); border-color: var(--rust-soft); color: var(--rust); }

/* Impersonation banner */
.impersonate-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 20px; background: var(--amber-soft); color: #7a5b1e;
  border-bottom: 1px solid var(--amber); font-size: 14px;
}
.impersonate-banner strong { font-weight: 600; }

/* Appearance picker */
.theme-option {
  cursor: pointer; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--c-cream-raised);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.theme-option.selected { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-soft); }
.theme-preview {
  height: 76px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.preview-light { background: #f7f9fc; }
.preview-dark { background: #0c1b28; }
.preview-system { background: linear-gradient(45deg, #f7f9fc 50%, #0c1b28 50%); }

/* Empty state */
.empty {
  text-align: center; padding: 64px 24px; margin-bottom: 24px;
  border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius-md);
  background: var(--c-cream-raised); box-shadow: var(--shadow-sm); color: var(--ink-muted);
}
.empty .empty-title { font-family: var(--font-serif); font-size: 22px; color: var(--ink); margin: 0 0 6px; }
.empty .empty-sub { margin: 0 0 20px; font-size: 14.5px; max-width: 420px; margin-left: auto; margin-right: auto; }

/* Venue workspace */
.venue-hero {
  border-radius: var(--radius-md); overflow: hidden; position: relative;
  min-height: 180px; display: flex; align-items: flex-end;
  background-color: #2c2f26;
  background-image: linear-gradient(180deg, rgba(28,30,24,0.30) 0%, rgba(28,30,24,0.80) 100%),
    var(--venue-bg, none);
  background-size: cover; background-position: center; margin-bottom: 26px;
}
.venue-hero .hero-inner { padding: 26px 28px; color: #fff; width: 100%; }
.venue-hero h1 { font-size: 36px; margin: 0 0 6px; color: #fff; }
.venue-hero .hero-meta { font-family: var(--font-sans); font-size: 14px; color: rgba(245,241,232,0.9); display: flex; align-items: center; gap: 14px; }
.tabs { display: flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--c-cream-raised); margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 11px 16px; font-size: 14px; color: var(--ink-muted); position: relative; text-decoration: none; }
button.tab { background: none; border: none; cursor: pointer; font-family: inherit; }
button.tab:hover { color: var(--ink); }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--green); background: var(--green-soft); border-radius: var(--radius-sm); font-weight: 600; }
.tab.active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; background: var(--status-accent); }

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 40px; }
.detail-item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.detail-item .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 4px; }
.detail-item .v { font-size: 15px; color: var(--ink); }

/* --------------------------------------------------------------------------
   Menu workspace: items list + focused item editor
   -------------------------------------------------------------------------- */
.menu-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
/* The item details editor is a modal overlay that slides in from the right,
   so the items list keeps its full width behind it. */
.menu-workspace.editor-open { grid-template-columns: minmax(0, 1fr); }
.items-pane { min-width: 0; }
.items-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.items-toolbar-hint { font-size: 13px; color: var(--ink-muted); }
#reorder-toggle.active { background: var(--forest); color: var(--c-cream-raised); }
.section-actions-menu { display: none; }
.items-pane.reorder-mode .item-row-actions .item-action[data-edit-item],
.items-pane.reorder-mode .item-row-actions .item-action[data-duplicate-item],
.items-pane.reorder-mode .item-row-actions .item-action[data-delete-item] { display: none; }
.items-pane.reorder-mode .item-row-actions .item-action[data-move-item] { border-color: var(--forest); color: var(--forest); }

.menu-section { margin-bottom: 34px; }
.sub-section {
  margin: 0 0 20px 24px; padding: 16px;
  border: 1px solid var(--line); border-left: 4px solid var(--status-accent);
  border-radius: var(--radius-md); background: var(--c-cream-deep);
}
.sub-section-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line);
}
.sub-section-title { flex: 1 1 160px; min-width: 0; font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.sub-section-head > .row-sub { flex-basis: 100%; order: 1; }
.sub-section-head .btn { white-space: nowrap; }
.sub-section > .item-row:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .sub-section { margin-left: 0; padding: 8px; }
  .sub-section > .item-row { padding: 10px; }
  .sub-section .item-row-actions { gap: 4px; }
}

.section-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--status-accent); border-radius: var(--radius-md); background: var(--c-cream-raised); margin-bottom: 12px;
}
.section-head > div:first-child { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.section-title { font-family: var(--font-serif); font-size: 22px; color: var(--ink); }
.section-actions { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.section-actions .btn { flex-shrink: 0; white-space: nowrap; }

/* Text blocks: free-standing notes ordered with the sections */
.text-block {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px; border: 1px dashed var(--line); border-left: 4px solid var(--amber);
  border-radius: var(--radius-md); background: var(--c-cream-raised); margin-bottom: 34px;
}
.text-block-inner { flex: 1 1 280px; min-width: 0; }
.text-block-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.text-block-content { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.text-block .section-actions { margin-top: 2px; }


.item-row {
  display: flex; flex-direction: row; align-items: flex-start; gap: 0;
  padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--c-cream-raised); cursor: pointer;
  margin-bottom: 12px;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.item-row:hover { border-color: var(--line-soft); box-shadow: var(--shadow-sm); }
.item-row .item-thumb { width: 62px; height: 62px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.item-row .item-thumb.broken { object-fit: contain; background: var(--c-cream-deep); }
.item-row .item-thumb.broken::-webkit-media-controls-overlay-play-button { display: none; }
.item-row .item-thumb-wrap { flex: none; width: 62px; height: 62px; position: relative; }
.item-row .item-thumb-wrap .item-thumb { width: 100%; height: 100%; }
.item-row .item-thumb-placeholder {
  display: none; position: absolute; inset: 0; place-items: center;
  background: var(--c-cream-deep); color: var(--ink-faint);
  border-radius: var(--radius-sm); border: 1px solid var(--line-soft);
}
.item-row .item-thumb-wrap.thumb-missing .item-thumb-placeholder { display: grid; }
.item-image-edit .img-preview.broken { object-fit: contain; background: var(--c-cream-deep); }
.item-preview-wrap { flex: none; width: 80px; height: 80px; position: relative; }
.item-preview-wrap .item-preview-placeholder {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: var(--c-cream-deep); color: var(--ink-faint); font-size: 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.item-preview-wrap img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.item-row-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1; }
.item-row-text { min-width: 0; flex: 1; }
.item-name { font-weight: 500; color: var(--ink); font-size: 15.5px; }
.item-desc { color: var(--ink-muted); font-size: 13.5px; margin-top: 3px; line-height: 1.5; }

/* Right side: prices, then the item controls beneath them */
.item-row-bottom { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-left: auto; padding-left: 24px; }
.item-row-prices { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--ink-soft); font-size: 14px; }
.item-row-prices .p-line { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.item-row-prices .p-label { color: var(--ink-muted); font-size: 13px; min-width: 88px; }
.item-row-prices .p-amount { color: var(--ink); font-weight: 500; min-width: 40px; }
.item-row-prices .p-cond { color: var(--ink-muted); font-size: 12px; margin-left: 4px; }
.item-row-prices .ce-price { width: 88px; min-width: 88px; font-size: 14px; color: var(--ink); margin-top: 0; }
.price-grid { border-collapse: collapse; border-spacing: 0; font-size: 13px; color: var(--ink-soft); }
.price-grid th, .price-grid td { padding: 2px 10px; text-align: left; white-space: nowrap; }
.price-grid thead th { color: var(--ink-muted); font-weight: 600; font-size: 12px; padding-bottom: 4px; }
.price-grid .row-label { color: var(--ink-muted); font-weight: 500; padding-left: 0; }
.price-grid .pv .p-amount { min-width: 40px; color: var(--ink); font-weight: 500; }
.price-grid .pv .p-empty { color: var(--ink-faint); }
.price-grid .pv .ce-price { width: 72px; min-width: 72px; padding: 2px 6px; font-size: 13px; }
.price-grid-preview { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--c-cream); overflow-x: auto; }
.price-grid-preview .row-sub { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 600; margin-bottom: 8px; }
.item-row-actions { display: flex; align-items: center; gap: 6px; }
.item-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid transparent;
  border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted);
  cursor: pointer; font-size: 13px; font-weight: 500; line-height: 1;
  transition: background var(--trans-fast), color var(--trans-fast), border-color var(--trans-fast);
}
.item-action:hover { background: var(--c-cream-deep); color: var(--ink); }
.item-action-danger:hover { background: var(--rust-soft); color: var(--rust); }
.item-action .act-label { display: none; }

/* Drag handle for reordering items */
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; align-self: center; flex: none;
  color: var(--ink-faint); cursor: grab; border-radius: var(--radius-sm);
  padding: 6px 2px; touch-action: none; user-select: none;
  transition: color var(--trans-fast), background var(--trans-fast);
}
.drag-handle:hover { color: var(--ink); background: var(--c-cream-deep); }
.drag-handle:active { cursor: grabbing; }
.item-row.dragging { opacity: 0.45; }
.item-row.drag-over { box-shadow: 0 -3px 0 0 var(--forest); }
.item-row.drag-over-below { box-shadow: 0 3px 0 0 var(--forest); }
.items-pane.reorder-mode .drag-handle { color: var(--forest); }

.editor-pane {
  /* Modal overlay: a right-side sheet that slides over the items list. */
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw); max-height: 100vh; overflow-y: auto;
  border-left: 1px solid var(--line); border-radius: 0;
  background: var(--c-cream-raised); padding: 22px 24px;
  box-shadow: -16px 0 40px rgba(20, 24, 28, 0.12);
  z-index: 70;
  transform: translateX(100%);
  transition: transform var(--trans-med) ease;
}
.menu-workspace.editor-open .editor-pane { transform: translateX(0); }
.library-editor:not([hidden]) { transform: translateX(0); }
.editor-backdrop {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(16, 20, 18, 0.35); backdrop-filter: blur(2px);
}
.editor-backdrop[hidden] { display: none; }
.editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.editor-title { font-family: var(--font-serif); font-size: 21px; color: var(--ink); }

/* Docked editor: single-column flow so a narrow panel stays a tidy stack. */
.editor-pane #item-form {
  display: grid; grid-template-columns: 1fr; gap: 0; align-items: start;
}
.editor-pane #item-form .field,
.editor-pane #item-form .editor-block { grid-column: span 1; margin-top: 0; }
.editor-pane #item-form .field > label { display: block; margin-bottom: 6px; }
.editor-pane #item-form .editor-block-head { margin-bottom: 8px; }
.editor-pane #item-form .field:has(#item-name),
.editor-pane #item-form .field:has(#item-desc),
.editor-pane #item-form .field:has(#item-image),
.editor-pane #item-form .field:has(#item-image-preview),
.editor-pane #item-form .editor-block:has(#callouts-list) { grid-column: span 1; }
.editor-pane #item-form .editor-foot { grid-column: span 1; }
body.item-editor-open { overflow: hidden; }
.item-editor-modal {
  scroll-padding-block: 24px 120px;
  top: 50%; left: 50%; right: auto; bottom: auto;
  width: min(800px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -48%);
}
.item-editor-modal[hidden] { display: none; }
.menu-workspace.editor-open .item-editor-modal { transform: translate(-50%, -50%); }
.editor-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.editor-tabs [role="tab"] {
  appearance: none; background: transparent; border: 0; border-bottom: 3px solid transparent;
  padding: 12px 18px; color: var(--ink-muted); font: inherit; font-weight: 600; cursor: pointer;
}
.editor-tabs [aria-selected="true"] { color: var(--forest); border-bottom-color: var(--forest); }
.editor-tabs [role="tab"]:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.editor-tab-panel { min-width: 0; }
.editor-tab-panel[hidden] { display: none; }
.editor-pane #item-form .editor-tab-panel .editor-block { margin-top: 22px; }
.item-editor-modal .editor-foot { position: sticky; bottom: -24px; background: var(--c-cream-raised); padding-bottom: 16px; z-index: 1; }
.item-editor-modal .price-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 96px 30px; }
.item-editor-modal .price-row > *,
.item-editor-modal .addon-row > * { min-width: 0; }
@media (max-width: 600px) {
  .item-editor-modal .price-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 12px; }
  .item-editor-modal .price-remove { justify-self: end; grid-column: 2; }
}
@media (max-width: 900px) {
  .editor-pane.item-editor-modal { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid var(--line); }
  .item-editor-modal .editor-foot { bottom: -16px; }
  .editor-tabs [role="tab"] { padding: 12px; }
}
.editor-block { margin-top: 22px; }
.editor-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 600; }
.price-row { display: grid; grid-template-columns: 1fr 1fr 68px 30px; gap: 8px; margin-bottom: 8px; align-items: center; }
.editor-foot { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.item-image-edit { display: flex; align-items: center; gap: 12px; }
.item-image-edit input { flex: 1; }
.add-section-btn { margin-top: 8px; }

/* Review screen: keep the selection toolbar reachable while scrolling through
   the change list, and ensure the changes themselves are not buried below a
   large index. */
.review-toolbar { position: sticky; top: 12px; z-index: 5; box-shadow: var(--shadow-sm); }
.review-progress { position: sticky; top: 12px; z-index: 4; }

/* Add-ons, attribute chips, callouts */
.attr-chip .marker-glyph, .item-badge .marker-glyph { margin-right: 3px; }
.attr-chip {
  border: 1px solid var(--line); background: var(--c-cream-raised);
  color: var(--ink-muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  transition: background var(--trans-fast), color var(--trans-fast), border-color var(--trans-fast);
}
.attr-chip:hover { border-color: var(--forest); color: var(--ink); }
.attr-chip.selected { background: var(--forest); border-color: var(--forest); color: var(--c-cream-raised); }

.addon-row { display: grid; grid-template-columns: 1fr 96px 30px; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-editor-modal .addon-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, .45fr); align-items: start;
  gap: 14px; padding: 16px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--c-cream);
}
.addon-field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.addon-wide { grid-column: 1 / -1; }
.addon-markers fieldset { min-width: 0; border: 0; padding: 0; margin: 0 0 12px; }
.addon-markers legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.addon-marker-options { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.addon-marker-options label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 400; }
.item-editor-modal .addon-remove { justify-self: end; }
.addon-prices { padding: 8px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.addon-field-label { font-weight: 600; }
.addon-price-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.addon-price-row { display: flex; align-items: center; gap: 8px; }
.addon-price-row .addon-price-label { flex: 1 1 auto; }
.addon-price-row .addon-price { width: 130px; flex: 0 0 auto; }
.addon-price-row .addon-price-remove { flex: 0 0 auto; }
@media (max-width: 600px) {
  .item-editor-modal .addon-row { grid-template-columns: minmax(0, 1fr); padding: 12px; }
}

.callout-row { display: grid; grid-template-columns: 1fr 30px; gap: 8px; margin-bottom: 8px; align-items: center; }

/* Item list: add-on chips, allergen badges, callout */
.item-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.item-badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--bluegrey);
  border: 1px solid var(--bluegrey-soft); background: var(--bluegrey-soft); border-radius: 4px; padding: 2px 6px;
}
.item-addons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.item-addon-chip { font-size: 11.5px; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }
.item-addon-group { width: 100%; font-weight: 600; color: var(--ink); font-size: 12px; margin-top: 2px; }
.item-addon-desc { color: var(--ink-faint); font-weight: 400; }
.item-addon-marker { color: var(--rust); margin-left: 3px; }
.item-callout { margin-top: 8px; font-size: 13px; font-style: italic; color: var(--ink-muted); }

/* Marker glyphs: font characters and SVG icons inside badges/chips */
.marker-chip-svg { width: 14px; height: 14px; vertical-align: middle; display: inline-block; }
.item-chips button.item-badge { font-family: inherit; cursor: pointer; }
.item-chips button.item-badge:hover { border-color: var(--forest); }
.item-chips button.item-badge:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.item-badge-glyph { font-size: 15px; line-height: 1; padding: 4px 7px; }

/* Mobile drawer / hamburger (hidden on desktop) */.menu-toggle { display: none; }
.sidebar-close { display: none; }
.nav-overlay {
  position: fixed; inset: 0; background: rgba(20, 22, 18, 0.45);
  z-index: 40; backdrop-filter: blur(2px);
}

/* Laptop (1024–1200px): use the available width deliberately rather than
   squeezing the desktop two-column menu workspace. With the editor closed the
   items list already fills the column; when open, keep a workable editor width. */
@media (min-width: 901px) and (max-width: 1200px) {
  .shell { grid-template-columns: 220px 1fr; }
  .content { padding: 28px 28px 56px; }
  .page-head h1 { font-size: 27px; }
  .editor-pane { padding: 20px 20px; }
  .item-row { gap: 14px; }
  .section-title { font-size: 20px; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 40px 24px; }

  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 264px;
    z-index: 50; height: 100vh; transform: translateX(-100%);
    transition: transform var(--trans-med) ease;
    box-shadow: none;
  }
  .shell.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-md); }
  .menu-toggle { display: grid; }
  .sidebar-close { display: grid; margin-left: auto; }
  .sidebar-brand { display: flex; }

  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .context-switcher { font-size: 13.5px; }
  .user-menu .user-name { display: none; }
  .icon-btn.search-toggle { display: grid; }
  .global-search { display: none; width: 100%; order: 10; }
  .shell.search-open .global-search { display: flex; }
  .content { padding: 22px 16px 50px; }
  .page-head { margin-bottom: 20px; padding: 20px 18px; }
  .page-head h1 { font-size: 28px; }
  .surface-panel { padding: 18px; }
  .queue-card { flex-wrap: wrap; gap: 16px; padding: 18px; }
  .queue-card-body { flex-basis: calc(100% - 80px); }
  .queue-card h3 { font-size: 23px; }
  .queue-card > .status { margin-right: auto; }
  .home-list-section { padding: 18px; }
  .activity-row { flex-wrap: wrap; padding: 16px; }
  .activity-actions { flex-basis: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .tabs { gap: 4px; }
  .tab { padding: 10px 12px; }
  .review-section { padding: 8px 12px; }

  /* Dashboard / list: swap the desktop table for stacked cards on mobile */
  .menu-list-table { display: none; }
  .menu-list-cards { display: block; }

  /* Venue differences: swap the table for stacked cards on mobile */
  .differences-table { display: none; }
  .differences-cards { display: block; }
  /* Venue-difference detail: swap the comparison table for per-venue cards */
  .differences-item-table { display: none; }
  .differences-item-cards { display: block; }

  /* User list: swap the desktop table for stacked cards on mobile */
  .users-table { display: none; }
  .user-cards { display: block; }

  /* Home workflow stacking */
  .home-nextstep-row { flex-wrap: wrap; gap: 12px; padding: 16px 18px; }
  .home-nextstep-row .step-count { order: 1; font-size: 30px; min-width: 38px; }
  .home-nextstep-row .step-text { order: 2; flex: 1 1 55%; }
  .home-nextstep-row .step-cta { order: 3; flex: 1 1 100%; margin-top: 4px; }
  .tab { padding: 10px 12px; white-space: nowrap; }
  /* No hidden horizontal scroll: wrap the menu tabs on small screens so every
     area (Items/Review/Versions/Production/Import/History/Tools/Differences)
     is visible without the user discovering a scrollbar. */
  .tabs { overflow-x: visible; flex-wrap: wrap; -webkit-overflow-scrolling: touch; }

  /* Scale headings on small screens */
  .page-head h1 { font-size: 24px; }
  .venue-hero h1 { font-size: 24px; }
  .venue-hero .hero-inner { padding: 20px 20px; }
  .venue-hero { min-height: 140px; }

  /* Menu workspace: single column; editor slides in as a full-screen overlay */
  .menu-workspace { grid-template-columns: 1fr; }
  .menu-workspace.editor-open { grid-template-columns: 1fr; }
  .editor-pane {
    width: 100vw; border-left: 0; padding: 20px;
  }
  .editor-pane #item-form { grid-template-columns: 1fr; gap: 0; }
  .editor-pane #item-form .field,
  .editor-pane #item-form .editor-block,
  .editor-pane #item-form .field:has(#item-name),
  .editor-pane #item-form .field:has(#item-desc),
  .editor-pane #item-form .field:has(#item-image),
  .editor-pane #item-form .editor-block:has(#callouts-list),
  .editor-pane #item-form .editor-foot { grid-column: span 1; }
  /* Item rows stack on mobile: name, then prices, then the controls row. */
  .item-row { flex-direction: column; padding: 14px; }
  .item-row .item-thumb { width: 52px; height: 52px; }
  .item-row-main { gap: 12px; width: 100%; }
  .items-pane:not(.reorder-mode) .item-row .drag-handle { display: none; }
  .item-row-bottom { align-items: stretch; margin-left: 0; padding-left: 0; width: 100%; gap: 16px; }
  .item-row-prices { align-items: stretch; width: 100%; overflow-x: auto; border-top: 1px solid var(--line); padding-top: 14px; }
  .item-row-prices .price-grid { width: 100%; min-width: 120px; }
  .item-row-prices .price-grid th,
  .item-row-prices .price-grid td { text-align: center; padding-inline: 12px; }
  .item-row-prices .price-grid .row-label:empty { display: none; }
  .item-row-prices .price-grid th:nth-child(n+3),
  .item-row-prices .price-grid td:nth-child(n+3) { border-left: 1px solid var(--line); }
  .item-row-prices .price-grid .ce-price { width: 100%; min-width: 64px; text-align: center; font-size: 17px; font-weight: 600; }
  .item-row-prices .price-grid .p-amount { font-size: 17px; font-weight: 600; }
  .item-row-prices .p-line { flex-direction: column; gap: 4px; text-align: center; }
  .item-row-prices .p-line .ce-price { text-align: center; font-size: 17px; font-weight: 600; }
  .item-row-actions { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 0; overflow-x: auto; }
  .item-row-actions .item-action { flex: 1 0 44px; min-width: 44px; padding: 0; height: 46px; border: 1px solid var(--line); background: var(--c-cream-raised); }
  .item-row-actions .item-action:hover { background: var(--c-cream-deep); }
  .item-row-actions .item-action svg { width: 20px; height: 20px; }
  .item-row-actions .item-action-danger { color: var(--rust); background: var(--rust-soft); border-color: var(--rust); }
  .item-action .act-label { display: none; }
  .section-head > div:first-child { flex-basis: 0; }
  .section-actions-menu { flex: none; }
  .section-actions-inline { display: none; }
  .section-actions-menu { display: inline-block; }
  .section-actions-menu .row-menu-pop { min-width: 200px; }

  /* Signpost horizontal scrolling so overflow content is discoverable */
  .table-scroll {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; box-shadow: inset -18px 0 12px -12px rgba(0,0,0,0.18);
  }
}

/* Click-to-edit editable fields: borderless transparent inputs that look like
   finished menu text but become editable on focus. */
.ce {
  display: block; width: 100%; box-sizing: border-box;
  border: 0; background: transparent; outline: none; box-shadow: none;
  font: inherit; color: var(--ink); padding: 0; margin: 0;
  border-radius: var(--radius-sm);
  transition: background var(--trans-fast), box-shadow var(--trans-fast);
}
.ce:hover { background: var(--c-cream-deep); box-shadow: 0 0 0 1px var(--line-soft); }
.ce:focus { outline: none; box-shadow: 0 0 0 2px var(--forest); background: var(--c-cream-raised); }
textarea.ce { white-space: pre-wrap; overflow-wrap: anywhere; resize: none; overflow: hidden; }
.ce-name { font-weight: 500; font-size: 15.5px; }
.ce-desc { font-size: 13.5px; color: var(--ink-muted); margin-top: 3px; line-height: 1.5; min-height: 1.2em; resize: none; overflow: hidden; }
.ce-desc.ce-empty { color: var(--ink-faint); }
.ce-price { width: 96px; min-width: 96px; text-align: right; font-size: 14px; color: var(--ink-soft); align-self: start; margin-top: 2px; }
.item-row.saved { background: var(--green-soft); }

@media (max-width: 900px) {
  .ce-price { width: auto; min-width: 72px; text-align: right; }
  .ce-desc { min-height: 0; }
}

/* ==========================================================================
   Item Library
   ========================================================================== */
.lib-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 7px; border-radius: var(--radius-sm);
  border: 1px solid currentColor; vertical-align: middle;
  margin-right: 6px; text-transform: uppercase;
}
.lib-badge-group { color: var(--forest); background: var(--forest-soft); border-color: var(--forest); }
.lib-badge-venue { color: var(--bluegrey); background: var(--bluegrey-soft); border-color: var(--bluegrey); }

.lib-list { display: flex; flex-direction: column; gap: 12px; }
.lib-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--c-cream-raised);
}
.lib-row-text { min-width: 0; }
.lib-row-title { display: flex; align-items: center; flex-wrap: wrap; font-size: 15.5px; font-weight: 500; }
.lib-row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn.ghost.danger, .btn.btn-ghost.danger { color: var(--rust); }
.btn.btn-ghost.danger:hover { background: var(--rust-soft); color: var(--rust); }

/* Group dashboard: box-type navigation buttons */
.group-dash-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.group-dash-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 24px;
  border: 1px solid var(--line); border-top: 4px solid var(--status-accent); box-shadow: var(--shadow-sm); border-radius: var(--radius-md);
  background: var(--c-cream-raised); text-decoration: none; color: var(--ink);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast);
}
.group-dash-box:hover { border-color: var(--forest); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-1px); }
.group-dash-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--forest-soft); color: var(--forest); }
.group-dash-label { font-family: var(--font-serif); font-weight: 400; font-size: 23px; color: var(--ink); }
.group-dash-sub { font-size: 13px; color: var(--ink-muted); }

.library-editor { position: fixed; right: 0; top: 0; bottom: 0; width: 480px; max-width: 100vw; z-index: 45; }

/* Reusable modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  padding: 20px;
}
.modal-backdrop--light {
  background: rgba(0,0,0,0.16); backdrop-filter: none;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  background: var(--c-cream-raised); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 0; box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .lib-row { flex-direction: column; align-items: stretch; }
  .lib-row-actions { justify-content: flex-start; }
  .library-editor { width: 100%; }
  .modal-backdrop { padding: 12px; align-items: flex-end; }
  .modal { max-height: 88vh; }
}

/* ==========================================================================
   Home — HospoMenu brand
   ========================================================================== */
.home-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
}
.home-hero .kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px;
}
.home-hero h1 {
  font-family: var(--font-serif); font-size: clamp(32px, 3vw, 46px); letter-spacing: -1px; line-height: 1.2;
  color: var(--ink); margin: 0 0 6px;
}
.home-hero .sub { color: var(--ink-muted); font-size: 20px; margin: 0; }
.home-hero .date { color: var(--ink-faint); font-size: 13px; }

.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; margin-bottom: 22px; }
.action-card {
  display: flex; align-items: center; gap: 22px; padding: 16px 22px;
  background: var(--attention-bg); border: 1px solid var(--attention-line); border-left: 6px solid #ff9000;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.action-card .symbol {
  width: 60px; height: 60px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--amber-soft); color: #ff9000;
}
.action-card.ready .symbol { background: var(--green-soft); color: var(--green); }
.action-card .kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 5px; }
.action-card h3 { line-height: 1.25; font-family: var(--font-serif); font-size: 24px; margin: 0 0 3px; color: var(--ink); }
.action-card .muted { color: var(--ink-muted); font-size: 15px; }
.action-card .body { flex: 1; min-width: 0; }

.sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
.sectionhead h2 { font-family: var(--font-serif); font-size: 30px; color: var(--ink); margin: 0; }
.sectionhead h2 span { font-size: 13px; color: var(--ink-faint); font-weight: 400; margin-left: 6px; }
.sectionhead .muted { color: var(--ink-faint); font-size: 13px; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 36px; }
.menu-tile {
  background: var(--c-cream-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden; transition: box-shadow var(--trans-fast), border-color var(--trans-fast);
  display: flex; flex-direction: column;
}
.menu-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.tile-cover {
  height: 96px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; color: var(--brand); background: var(--brand-soft);
}
.tile-cover svg { width: 30px; height: 30px; }
.tile-cover.metric-green { background: var(--green-soft); color: var(--green); }
.tile-cover.metric-coral { background: var(--rust-soft); color: var(--rust); }
.tile-cover .pill { align-self: flex-start; margin-top: 14px; }
.tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tile-body h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; }
.tile-body .venue { color: var(--ink-muted); font-size: 13px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.tile-foot .hint { color: var(--ink-faint); font-size: 12.5px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--c-cream-deep); color: var(--ink-muted);
}
.pill.approved { background: var(--green-soft); color: var(--green); }
.pill.review { background: var(--rust-soft); color: var(--rust); }
.pill.awaiting { background: var(--amber-soft); color: var(--amber); }

.home-list-section { width: 100%; margin-bottom: 30px; padding: 22px; background: var(--c-cream-raised); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.home-list-section .list-row {
  display: flex; align-items: center; gap: 18px; padding: 16px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.home-list-section .list-body { flex: 1; min-width: 0; }
.home-list-section .list-title { font-weight: 600; color: var(--ink); font-size: 15px; }
.home-list-section .list-row:last-of-type { border-bottom: 0; }
.home-list-section .list-sub { color: var(--ink-muted); font-size: 13px; margin-top: 2px; }

.header-brand { display: flex; align-items: center; gap: 12px; color: #fff; flex-shrink: 0; font-size: 25px; font-weight: 600; letter-spacing: .5px; }
.account-summary { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; white-space: nowrap; }
.header-brand:hover { text-decoration: none; }
.header-brand img { width: 320px; height: 38px; object-fit: contain; }
.header-brand strong { color: #43c342; }
.topbar .global-search { width: min(400px, 36vw); background: #ffffff12; border-color: #ffffff30; border-radius: 8px; padding: 11px 14px; }
.topbar .global-search input, .topbar .icon-btn, .sidebar .icon-btn { color: #edf5ff; }
.topbar .global-search input::placeholder { color: #c0d2e6; }
.topbar .icon-btn:hover { background: #ffffff18; }
.user-menu .avatar { width: 46px; height: 46px; background: #e9f2fc; color: #082d50; font-size: 18px; border: 2px solid #fff; }
.context-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--c-cream-raised); }
.context-bar time { font-size: 14px; color: var(--ink-muted); margin-left: auto; }
.nav-label:first-of-type { border-top: 0; margin-top: 8px; }
.nav-ico-home { color: #fff; }
.nav-ico-menus, .nav-ico-venues, .nav-ico-help { color: #19bdf7; }
.nav-ico-review { color: #ff9800; }
.nav-ico-awaiting, .nav-ico-designers { color: #ffc000; }
.nav-ico-library, .nav-ico-groups { color: #b66aff; }
.nav-ico-users { color: #56d944; }
.nav-ico-settings { color: #77d9fa; }
.nav-item.active .nav-ico { color: #fff; }
.action-card:hover { text-decoration: none; border-color: #ff9000; }
.action-card .symbol svg { width: 48px; height: 48px; }
.action-card .btn { min-height: 48px; flex-shrink: 0; }
.action-card:not(.ready) .btn { background: #ff8a00; color: #fff; border-color: #ed8100; }
.action-card.ready { background: var(--ready-bg); border-color: var(--ready-line); border-left-color: var(--status-accent); }
.action-card:not(.ready) .kicker { color: var(--amber); }
.action-card.ready .kicker, .action-card.ready .btn { color: var(--green); }
.action-card.ready .btn { border-color: var(--green); }
.sectionhead h2 span { display: inline-block; padding: 1px 12px; border-radius: 20px; background: var(--c-cream-deep); font-family: var(--font-sans); color: var(--ink-soft); font-size: 15px; vertical-align: middle; }
.venue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.venue-card { border: 1px solid var(--line); border-top: 5px solid var(--status-accent); border-radius: var(--radius-md); background: var(--c-cream-raised); padding: 16px 18px 12px; box-shadow: 0 2px 8px #092d5008; }
.venue-card.is-live { border-top-color: var(--status-accent); }
.venue-card.is-working { border-top-color: var(--rust); }
.venue-card.is-inactive { border-top-color: #8296ab; }
.venue-card-heading { display: flex; align-items: center; gap: 16px; min-height: 64px; padding-bottom: 12px; }
.venue-symbol { display: grid; place-items: center; flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%; background: var(--brand-soft); color: var(--ink); }
.venue-symbol svg { width: 30px; height: 30px; }
.venue-card h3 { flex: 1; min-width: 0; font-size: 18px; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.venue-card h3 a { color: inherit; }
.venue-card .pill { font-size: 11px; padding: 5px 12px; flex-shrink: 0; }
.venue-card-stats { display: flex; justify-content: space-around; border-block: 1px solid var(--line-soft); padding: 10px 0; color: var(--ink-muted); font-size: 13px; line-height: 1.2; }
.venue-card-stats span { flex: 1; text-align: center; }
.venue-card-stats span + span { border-left: 1px solid var(--line); }
.venue-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; color: var(--ink-muted); font-size: 13px; }
.venue-card-foot .btn { min-height: 44px; flex-shrink: 0; }
@media (min-width: 901px) and (max-width: 1250px) {
  .venue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-hero h1 { font-size: 30px; }
  .home-hero .sub { font-size: 16px; }
  .header-brand { font-size: 20px; gap: 8px; }
  .header-brand img { height: 32px; width: 128px; }
  .topbar { min-height: 64px; }
  .topbar .menu-toggle { order: -1; }
  .topbar .global-search { width: 100%; }
  .context-bar { padding: 12px 16px; min-height: 54px; }
  .context-bar time { display: none; }
  .context-switcher[open] .ctx-form { width: min(300px, calc(100vw - 32px)); }
  .sidebar { height: 100dvh; }
  .action-card { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .action-card .body { flex-basis: calc(100% - 76px); }
  .action-card .btn { margin-left: 72px; }
  .venue-card-heading { gap: 10px; }
  .venue-card h3 { font-size: 18px; }
  .venue-symbol { width: 46px; height: 46px; }
  .user-menu .avatar { width: 34px; height: 34px; font-size: 14px; }
  .action-grid { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .header-brand { font-size: 16px; }
  .topbar { gap: 3px; padding-inline: 8px; }
  .topbar-spacer { min-width: 0; }
  .menu-grid { grid-template-columns: 1fr; }
}

/* ---- Toast feedback (non-blocking) ---- */
.hm-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  background: var(--ink, #1a1a1a);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}
.hm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.hm-toast-error { background: var(--rust, #e87800); }

/* Search & Replace change navigator */
.hm-changes-nav {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--c-cream-raised, #fff);
  border: 1px solid var(--line, #e2e7ef);
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(34, 69, 126, 0.10));
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink, #092d50);
  z-index: 900;
  max-width: calc(100vw - 24px);
  white-space: nowrap;
}
.hm-changes-nav[hidden] { display: none; }
.hm-changes-count { color: var(--ink-soft, #263f5c); }
.hm-changes-nav .btn { font-size: 13px; padding: 4px 10px; }
.hm-changes-nav .btn:disabled { opacity: 0.45; cursor: default; }

/* Tasteful highlight for the field that just changed */
.hm-change-highlight {
  animation: hm-change-pulse 1.6s ease;
}
@keyframes hm-change-pulse {
  0%   { background: var(--green-soft, #dcf4df); box-shadow: 0 0 0 2px var(--green, #168127); }
  30%  { background: var(--green-soft, #dcf4df); box-shadow: 0 0 0 2px var(--green, #168127); }
  100% { background: transparent; box-shadow: 0 0 0 0 transparent; }
}

/* Active unknown-marker occurrence during "review all": keep a persistent
 * outline on the item so the user can see which item they are confirming. */
.review-occurrence-active {
  outline: 2px solid var(--accent, #c8572a);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent, #c8572a) 6%, transparent);
  border-radius: 4px;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .hm-change-highlight { animation: none; box-shadow: none; }
  .hm-changes-nav, .hm-changes-nav .btn { transition: none; }
}


/* Recipe Costing v1 (standalone module) */
.rc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 820px; }
.rc-tile {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px; border: 1px solid var(--line, #e4e9f0);
  border-radius: var(--radius-md, 12px); background: var(--c-cream-raised, #f6f4ee);
  text-decoration: none; color: var(--ink, #1a2332);
  transition: transform .12s ease, box-shadow .12s ease;
}
.rc-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.rc-tile-icon { color: var(--forest, #1f6f43); }
.rc-tile-title { font-size: 17px; font-weight: 600; color: var(--ink, #1a2332); }
.rc-tile-sub { font-size: 13px; color: var(--ink-soft, #263f5c); line-height: 1.45; }

/* --------------------------------------------------------------------------
   Recipe Card workspace (editor + ingredient browser + setup cards)
   -------------------------------------------------------------------------- */
.rc-page-head { margin-bottom: 14px; }
.rc-page-head .nav-item { font-size: 13.5px; color: var(--ink-muted); }
.rc-page-head .nav-item:hover { color: var(--ink); }

.rc-card-form { max-width: 1040px; }
.rc-editor {
  background: var(--c-cream-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.rc-editor-head {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--c-cream-raised);
}
.rc-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rc-title {
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 400; color: var(--ink);
  border: none; border-bottom: 2px solid transparent; background: transparent;
  padding: 0 0 4px; min-width: 0; flex: 1 1 280px; outline: none;
  transition: border-color var(--trans-fast);
}
.rc-title:focus { border-bottom-color: var(--forest); }
.rc-title::placeholder { color: var(--ink-faint); }
.rc-head-actions { display: flex; gap: 8px; flex-shrink: 0; }

.rc-segmented {
  display: inline-flex; gap: 6px; margin-top: 16px;
  background: var(--c-cream-deep); padding: 4px; border-radius: 999px;
}
.rc-seg { position: relative; }
.rc-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rc-seg-label {
  display: inline-block; padding: 8px 18px; font-size: 14px; font-weight: 600;
  color: var(--ink-muted); border-radius: 999px; white-space: nowrap;
  user-select: none; transition: background var(--trans-fast), color var(--trans-fast);
}
.rc-seg input:checked + .rc-seg-label { background: var(--c-cream-raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.rc-seg input:focus-visible + .rc-seg-label { outline: 2px solid var(--forest); outline-offset: 1px; }

.rc-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; align-items: flex-end; }
.rc-meta { display: flex; flex-direction: column; gap: 4px; }
.rc-meta-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--ink-muted); }
.rc-meta-cat .form-control { width: 240px; }
.rc-yield { display: flex; gap: 8px; }
.rc-yield-qty { width: 110px; text-align: center; }
.rc-yield-unit { width: 130px; }

.rc-editor-body { padding: 20px 24px 26px; display: flex; flex-direction: column; gap: 22px; }
.rc-block-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700; color: var(--ink); margin-bottom: 10px;
}
.rc-block-hint { text-transform: none; letter-spacing: normal; font-weight: 500; font-size: 12px; color: var(--ink-faint); }

.rc-ing-section { margin-bottom: 20px; }
.rc-ing-section:last-child { margin-bottom: 0; }
.rc-ing-section-head {
  font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--ink);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--c-cream-deep);
}
.rc-ing-rows { display: flex; flex-direction: column; gap: 8px; }

.rc-ing-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--c-cream);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.rc-ing-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rc-ing-name { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.rc-ing-context { font-size: 12.5px; color: var(--ink-muted); }
.rc-qty { width: 82px; text-align: center; flex-shrink: 0; }
.rc-unit { width: 96px; flex-shrink: 0; }
.rc-linecost-wrap { width: 110px; text-align: right; flex-shrink: 0; font-size: 14px; }
.rc-linecost { color: var(--forest); font-weight: 600; }
.rc-linecost-muted { color: var(--ink-faint); font-weight: 400; font-size: 12.5px; }
.rc-row-remove { color: var(--ink-faint); flex-shrink: 0; }
.rc-row-remove:hover { color: var(--rust); }
.rc-row-remove-space { width: 28px; flex-shrink: 0; }

.rc-ing-empty { background: var(--c-cream-raised); border-style: dashed; }
.rc-searchcell {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: none; cursor: pointer; padding: 2px 0;
  color: var(--ink-faint); text-align: left; font-size: 14.5px;
}
.rc-searchcell-ico { font-size: 16px; opacity: .7; }
.rc-searchcell:hover .rc-searchcell-ph { color: var(--ink-muted); }
.rc-ing-add {
  margin-top: 10px; background: transparent; border: none; cursor: pointer;
  color: var(--forest); font-size: 13.5px; font-weight: 600; padding: 4px 0; text-align: left;
}
.rc-ing-add:hover { text-decoration: underline; }

.rc-badge {
  display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700;
  letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
  background: var(--forest-soft); color: var(--forest); border: 1px solid var(--forest);
  text-transform: none;
}

.rc-grid { display: grid; gap: 18px; }
.rc-grid-pricing { grid-template-columns: 1fr 1fr; }
.rc-grid-text { grid-template-columns: 1fr 1fr; }
.rc-block { min-width: 0; }

.rc-price-rows { display: flex; flex-direction: column; gap: 8px; }
.rc-price-row { display: flex; align-items: center; gap: 8px; }
.rc-price-row .form-control:first-child { flex: 1 1 140px; }
.rc-price-currency { color: var(--ink-muted); font-weight: 600; font-size: 14px; }
.rc-price-row .form-control:nth-of-type(2) { width: 120px; }

.rc-foodcost { background: var(--c-cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.rc-foodcost .rc-block-label { margin-bottom: 12px; }
.rc-foodcost-body { display: flex; flex-direction: column; gap: 8px; }
.rc-foodcost-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.rc-foodcost-row span { color: var(--ink-soft); }
.rc-foodcost-row strong { color: var(--ink); font-weight: 700; }

.rc-editor-foot { border-top: 1px solid var(--line); padding-top: 16px; }

/* --- Ingredient browser modal --- */
.rc-modal-open { overflow: hidden; }
.rc-browser-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(9,28,44,.55); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 2vw;
}
.rc-browser {
  width: 100%; max-width: 1060px; height: 92vh; max-height: 92vh;
  background: var(--c-cream-raised); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  display: flex; flex-direction: column; overflow: hidden;
}
.rc-browser-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--c-cream-raised);
}
.rc-browser-search { position: relative; flex: 1 1 auto; }
.rc-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-size: 18px; pointer-events: none; }
.rc-browser-input {
  width: 100%; padding: 12px 40px 12px 42px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--c-cream); color: var(--ink); font-size: 15px;
}
.rc-browser-input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-soft); }
.rc-browser-close { flex-shrink: 0; }

.rc-browser-body { display: flex; flex: 1 1 auto; min-height: 0; }
.rc-browser-cats {
  width: 240px; flex-shrink: 0; overflow-y: auto;
  border-right: 1px solid var(--line); padding: 14px 14px 20px;
}
.rc-browser-col-head {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--ink-muted); margin: 4px 2px 8px;
}
.rc-browser-catlist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.rc-browser-sublist { display: flex; flex-direction: column; gap: 2px; }
.rc-browselink {
  text-align: left; background: transparent; border: none; cursor: pointer;
  padding: 7px 10px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-soft);
}
.rc-browselink:hover { background: var(--c-cream-deep); color: var(--ink); }
.rc-browselink.active { background: var(--forest-soft); color: var(--forest); font-weight: 600; }
.rc-browsemuted { color: var(--ink-faint); font-size: 13.5px; padding: 6px 10px; }

.rc-browser-results { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.rc-browser-results-head { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.rc-browser-count { font-size: 13px; color: var(--ink-muted); }
.rc-browser-create { padding: 10px 18px 4px; }
.rc-createbtn {
  cursor: pointer; border: 1px dashed var(--forest); background: var(--forest-soft);
  color: var(--forest); font-size: 14px; padding: 9px 14px; border-radius: var(--radius-sm);
}
.rc-createbtn:hover { background: var(--forest); color: #fff; }

.rc-browser-grid { flex: 1 1 auto; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.rc-result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--c-cream); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px;
}
.rc-result-recipe { border-left: 3px solid var(--forest); }
.rc-result-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rc-result-name { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-result-meta { font-size: 12.5px; color: var(--ink-muted); }
.rc-result-add { flex-shrink: 0; min-height: 36px; padding-inline: 18px; }

.rc-browser-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.rc-pagebtn { cursor: pointer; border: 1px solid var(--line); background: var(--c-cream-raised); color: var(--ink); font-size: 13.5px; padding: 7px 14px; border-radius: var(--radius-sm); }
.rc-pagebtn:hover:not(:disabled) { border-color: var(--forest); color: var(--forest); }
.rc-pagebtn:disabled { opacity: .45; cursor: default; }
.rc-pagenum { font-size: 13px; color: var(--ink-muted); }

/* --- Responsive: recipe card workspace --- */
@media (max-width: 900px) {
  .rc-editor-head, .rc-editor-body { padding-left: 16px; padding-right: 16px; }
  .rc-title { font-size: 24px; }
  .rc-grid-pricing, .rc-grid-text { grid-template-columns: 1fr; }
  .rc-browser-cats { width: 200px; }
}

@media (max-width: 760px) {
  .rc-title-row { flex-direction: column; align-items: stretch; }
  .rc-head-actions { justify-content: flex-end; }
  .rc-segmented { width: 100%; }
  .rc-seg { flex: 1 1 auto; }
  .rc-seg-label { display: block; text-align: center; }
  .rc-meta-cat .form-control { width: 100%; }
  .rc-yield { width: 100%; }
  .rc-yield-qty { flex: 1 1 auto; width: auto; }
  .rc-yield-unit { flex: 1 1 auto; width: auto; }
  .rc-ing-row { flex-wrap: wrap; }
  .rc-ing-main { flex: 1 1 100%; }
  .rc-qty { width: 74px; }
  .rc-linecost-wrap { width: auto; flex: 1 1 auto; text-align: right; }
  .rc-row-remove { position: static; }

  /* Ingredient browser becomes full-screen, progressive navigation. */
  .rc-browser-backdrop { padding: 0; }
  .rc-browser { max-width: none; width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; border: none; }
  .rc-browser-body { flex-direction: column; }
  .rc-browser-cats { width: 100%; border-right: none; border-bottom: 1px solid var(--line); max-height: 38vh; }
  .rc-browser-catlist, .rc-browser-sublist { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .rc-browser-col-head { display: none; }
  .rc-browselink { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; }
  .rc-browselink.active { border-color: var(--forest); }
  .rc-result { align-items: stretch; flex-direction: column; gap: 8px; }
  .rc-result-add { align-self: flex-end; }
}

/* --- Setup screen: toggle switches + reorderable rows --- */
.rc-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.rc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.rc-toggle-track {
  position: relative; width: 40px; height: 22px; border-radius: 999px; flex-shrink: 0;
  background: var(--c-cream-deep); border: 1px solid var(--line); transition: background var(--trans-fast);
}
.rc-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--c-cream-raised); box-shadow: var(--shadow-sm); transition: transform var(--trans-fast);
}
.rc-toggle input:checked + .rc-toggle-track { background: var(--forest); border-color: var(--forest); }
.rc-toggle input:checked + .rc-toggle-track::after { transform: translateX(18px); }
.rc-toggle input:focus-visible + .rc-toggle-track { outline: 2px solid var(--forest); outline-offset: 1px; }
.rc-toggle-label { font-size: 14.5px; color: var(--ink-soft); font-weight: 500; }

.rc-setup-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 1080px; }
.rc-setup-card {
  background: var(--c-cream-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 22px;
}
.rc-setup-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rc-setup-card-title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: var(--ink); }
.rc-setup-card-sub { font-size: 13px; color: var(--ink-muted); margin: -8px 0 14px; }

.rc-reorder-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.rc-reorder-row .form-control { flex: 1 1 auto; }
.rc-move { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.rc-move button { background: transparent; border: none; cursor: pointer; color: var(--ink-muted); line-height: 1; padding: 2px 4px; }
.rc-move button:hover { color: var(--ink); }
.rc-move button:disabled { opacity: .3; cursor: default; }
.rc-opt-list { display: flex; flex-direction: column; gap: 10px; }
.rc-cat-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--c-cream-deep); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; color: var(--ink-soft); }
.rc-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 640px) {
  .rc-setup-card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* --- Recipe cards list --- */
.rc-type-pill {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; text-transform: none;
}
.rc-type-sellable { background: var(--green-soft); color: var(--forest); }
.rc-type-component { background: var(--c-cream-deep); color: var(--ink-muted); }
.rc-card-list { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.rc-card-list-item {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--c-cream-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 18px; text-decoration: none; color: var(--ink); transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.rc-card-list-item:hover { border-color: var(--forest); box-shadow: var(--shadow-sm); }
.rc-card-list-main { flex: 1 1 220px; min-width: 0; }
.rc-card-list-name { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-card-list-meta { font-size: 13px; color: var(--ink-muted); margin-top: 3px; }
.rc-card-list-cost { font-size: 15px; font-weight: 700; color: var(--forest); white-space: nowrap; }

/* Kitchen hub — large icon cards linking Wastage, Stocktake, Recipe Costing */
.kitchen-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; max-width: 760px; margin-top: 8px;
}
.kitchen-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 28px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--c-cream); color: var(--ink); text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.kitchen-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); border-color: var(--forest); }
.kitchen-ico { width: 52px; height: 52px; color: var(--forest); }
.kitchen-ico svg { width: 100%; height: 100%; }
.kitchen-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; }
.kitchen-desc { font-size: 13px; color: var(--ink-muted); line-height: 1.4; }

@media (max-width: 640px) {
  .kitchen-grid { grid-template-columns: 1fr; max-width: 480px; }
  .kitchen-card { padding: 24px 18px; }
  .kitchen-ico { width: 60px; height: 60px; }
  .kitchen-name { font-size: 22px; }
}

/* --------------------------------------------------------------------------
   Kitchen Ops — Wastage + Stocktake
   -------------------------------------------------------------------------- */
.sk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.sk-row-name { font-size: 16px; font-weight: 600; color: var(--ink); flex: 1 1 140px; min-width: 0; }
.sk-row-unit { display: block; font-size: 12.5px; color: var(--ink-muted); font-weight: 400; margin-top: 2px; }
.sk-inputs { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.sk-field { display: flex; flex-direction: column; gap: 3px; min-width: 84px; }
.sk-field span { font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.sk-field .form-control { width: 100%; text-align: center; font-size: 17px; font-weight: 600; padding: 12px 10px; }
.sk-field-full { flex: 1 1 100%; }
.sk-count { font-size: 17px; font-weight: 600; }

@media (max-width: 640px) {
  .sk-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .sk-inputs { width: 100%; }
  .sk-field { flex: 1 1 42%; }
  .sk-field-full { flex: 1 1 100%; }
  .sk-field .form-control { font-size: 19px; padding: 13px 10px; }
}

/* --------------------------------------------------------------------------
   Layout Studio (online menu layout prototype) — feature-flagged route.
   -------------------------------------------------------------------------- */
.panel {
  background: var(--c-cream-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-head {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center;
}
.panel-body { padding: 14px 16px; color: var(--ink-soft); }
.ls-section-card {
  background: var(--c-cream-raised); cursor: default;
}
.ls-section-card[draggable="true"] { cursor: grab; }
.ls-section-card:hover { background: var(--c-cream-deep); }
