:root {
  --bg: #f4f1e9;
  --bg-deep: #ece6da;
  --surface: #fffdf9;
  --surface-soft: #faf7f0;
  --ink: #16251e;
  --ink-2: #42564b;
  --muted: #79877e;
  --line: #e5dfd2;
  --line-strong: #d7cfbf;
  --brand: #14553f;
  --brand-deep: #0c3728;
  --brand-bright: #1e7a58;
  --brand-soft: #e6f1ea;
  --brand-tint: #f0f7f2;
  --accent: #e8a63c;
  --accent-deep: #c98318;
  --accent-soft: #fdf2dc;
  --danger: #b24a39;
  --danger-soft: #fbebe7;
  --info: #396b8a;
  --shadow-sm: 0 2px 8px rgba(30, 48, 38, .05);
  --shadow-md: 0 14px 38px rgba(30, 48, 38, .09);
  --shadow-lg: 0 28px 70px rgba(20, 48, 35, .16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --font-body: "Plus Jakarta Sans", "Noto Sans Sinhala", "Nirmala UI", "Iskoola Pota", sans-serif;
  --font-display: "Fraunces", "Noto Sans Sinhala", Georgia, serif;
  --font-si: "Noto Sans Sinhala", "Iskoola Pota", "Nirmala UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(232, 166, 60, .13), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(20, 85, 63, .07), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

:focus-visible {
  outline: 3px solid rgba(232, 166, 60, .75);
  outline-offset: 2px;
}

::selection { background: #f3d79e; color: var(--brand-deep); }

.app-shell {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 20px 22px;
  background:
    radial-gradient(420px 280px at 10% 0%, rgba(232, 166, 60, .18), transparent 65%),
    radial-gradient(360px 320px at 100% 75%, rgba(30, 122, 88, .35), transparent 70%),
    linear-gradient(175deg, #123f2f 0%, #0a2d21 100%);
  color: #eef5ef;
  overflow-y: auto;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 2px 4px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .18);
  color: #f4d28d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.brand-mark svg { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15.5px; letter-spacing: -.2px; font-weight: 800; }
.brand-text small { font-size: 10.5px; color: rgba(238, 245, 239, .6); letter-spacing: .04em; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(238, 245, 239, .42);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: rgba(238, 245, 239, .72);
  text-align: left;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.nav-item .icon { width: 19px; height: 19px; opacity: .8; }
.nav-item span { display: flex; flex-direction: column; line-height: 1.2; }
.nav-item b { font-size: 13px; font-weight: 600; }
.nav-item small { font-family: var(--font-si); font-size: 10px; color: rgba(238, 245, 239, .45); margin-top: 3px; }

.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(100deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  border-color: rgba(232, 166, 60, .3);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}
.nav-item.active .icon { color: #f4c777; opacity: 1; }
.nav-item.active small { color: rgba(244, 199, 119, .72); }

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(6px);
}

.sidebar-card-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #f4c777;
  margin-bottom: 13px;
}

.sidebar-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-stat span { font-size: 11px; color: rgba(238, 245, 239, .55); }
.sidebar-stat strong { font-size: 12.5px; font-weight: 700; color: #fdf9ef; }

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 2px;
  color: #f4c777;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}
.sidebar-link .icon { width: 15px; height: 15px; transform: rotate(-90deg); }
.sidebar-link:hover { color: #ffe4aa; }

.logout-item {
  margin-top: -12px;
  border-color: rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .12);
  color: rgba(238, 245, 239, .6);
}

.logout-item .icon { color: #e5b3a9; opacity: .9; }

.logout-item:hover {
  background: rgba(178, 74, 57, .17);
  border-color: rgba(229, 179, 169, .22);
  color: #ffe0d9;
}

.logout-item small { color: rgba(238, 245, 239, .34); }
.logout-item:hover small { color: rgba(255, 224, 217, .55); }
.logout-item:disabled { opacity: .55; cursor: wait; }

.sidebar-foot {
  font-size: 9.5px;
  color: rgba(238, 245, 239, .35);
  line-height: 1.6;
  padding: 0 4px;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 26, 19, .55);
  backdrop-filter: blur(2px);
  z-index: 35;
}

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 12px 32px;
  background: rgba(244, 241, 233, .82);
  border-bottom: 1px solid rgba(215, 207, 191, .6);
  backdrop-filter: blur(18px);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-titles { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.topbar-titles span {
  font-size: 9.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.topbar-titles h1 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-right { display: flex; align-items: center; gap: 9px; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: .18s ease;
}
.icon-btn:hover { border-color: var(--line-strong); background: #fff; }

.menu-btn { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.1px;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(160deg, #1a6349, #0f4534);
  color: #fff;
  box-shadow: 0 8px 20px rgba(20, 85, 63, .22);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(20, 85, 63, .3); }

.btn-accent {
  background: linear-gradient(160deg, #f2b653, #e29b2b);
  color: #3a2707;
  box-shadow: 0 9px 22px rgba(201, 131, 24, .24);
}
.btn-accent:hover { box-shadow: 0 12px 28px rgba(201, 131, 24, .32); }

.btn-quiet {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.btn-quiet:hover { border-color: var(--line-strong); background: #fff; }

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, .25);
  color: #f6f2e9;
}
.btn-outline:hover { background: rgba(255, 255, 255, .08); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  min-height: 34px;
  padding: 0 10px;
}
.btn-ghost:hover { background: var(--surface-soft); }

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f0cfc7;
}
.btn-danger:hover { background: #f7ddd6; }

.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.headcount-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.headcount-chip .icon { width: 15px; height: 15px; color: var(--brand); }
.headcount-chip b { color: var(--ink); font-weight: 700; }

.content {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 32px 64px;
}

.view[hidden] { display: none !important; }
.view { animation: viewIn .35s ease both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 9px;
}
.eyebrow .icon { width: 14px; height: 14px; color: var(--accent-deep); }

.page-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  letter-spacing: -.7px;
  line-height: 1.1;
  color: var(--ink);
}
.page-intro p { margin-top: 8px; max-width: 620px; color: var(--muted); font-size: 13px; }
.intro-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.control-bar {
  display: grid;
  grid-template-columns: minmax(165px, 1fr) minmax(165px, 1fr) minmax(180px, 1.1fr) minmax(170px, .9fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.control {
  background: var(--surface);
  padding: 15px 19px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.control label:not(.switch), .control-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.si-inline { font-family: var(--font-si); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #9aa69d; }

.big-input {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.big-input:focus-within { border-color: var(--brand-bright); background: #fff; box-shadow: 0 0 0 3px rgba(30, 122, 88, .1); }
.big-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--ink);
  padding: 0;
  outline: 0;
}
.big-input input::-webkit-outer-spin-button, .big-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.big-input input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.big-input span { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }

.control-toggle { justify-content: space-between; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d9d4c7;
  transition: background .2s ease;
  flex: none;
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.switch input:checked + .switch-track { background: var(--brand-bright); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(232, 166, 60, .7); outline-offset: 2px; }
.switch-text { font-size: 12px; font-weight: 600; color: var(--ink-2); }

.segmented {
  display: flex;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  transition: .16s ease;
}
.segmented button:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 26px;
  align-items: start;
}

.dash-main { min-width: 0; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-heading h3 { font-size: 16px; font-weight: 800; letter-spacing: -.2px; display: flex; align-items: center; gap: 9px; }
.section-heading p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.count-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf4ec;
  border: 1px solid #d5e8db;
  color: #2d6b48;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.live-badge.soft { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }
.live-badge.dark { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .16); color: #f6ead2; }
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d9367;
  box-shadow: 0 0 0 3px rgba(61, 147, 103, .16);
  animation: pulse 2.4s infinite;
}
.pulse-dot.light { background: #f4c777; box-shadow: 0 0 0 3px rgba(244, 199, 119, .15); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.dish-list { display: flex; flex-direction: column; gap: 10px; }

.dish-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
  overflow: hidden;
}
.dish-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.dish-card.selected {
  border-color: rgba(30, 122, 88, .38);
  background: linear-gradient(180deg, #fffdf9, #fbfdf9);
  box-shadow: 0 10px 26px rgba(20, 85, 63, .08);
}
.dish-card.selected::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-bright), #52a97d, var(--accent));
}

.dish-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
}

.dish-check {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1.6px solid #cbc6b8;
  background: #fff;
  color: transparent;
  display: grid;
  place-items: center;
  transition: .18s ease;
  flex: none;
  padding: 0;
}
.dish-check .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.dish-check:hover { border-color: var(--brand-bright); background: var(--brand-tint); }
.dish-check[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 5px 12px rgba(20, 85, 63, .25); }

.dish-identity { min-width: 0; }
.dish-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.code-chip {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}
.dish-card.selected .code-chip { background: var(--brand-soft); border-color: #d3e7da; color: var(--brand); }
.dish-status { font-size: 9.5px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.dish-card.selected .dish-status { color: var(--brand-bright); }

.dish-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dish-title .si { font-family: var(--font-si); font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.dish-title .en { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.dish-sub { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.dish-sub .dot { color: #c9c3b5; }

.dish-cost { text-align: right; min-width: 100px; }
.dish-cost strong { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; color: var(--ink); font-variant-numeric: tabular-nums; }
.dish-cost span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.dish-card:not(.selected) .dish-cost strong { color: #8b978f; }
.dish-card:not(.selected) .dish-cost span { color: #a9b2ab; }

.dish-expand {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: .18s ease;
  padding: 0;
}
.dish-expand:hover { background: var(--surface-soft); border-color: var(--line); color: var(--ink); }
.dish-expand .icon { width: 16px; height: 16px; transition: transform .22s ease; }
.dish-card.open .dish-expand .icon { transform: rotate(180deg); }

.dish-recipe { display: none; border-top: 1px dashed var(--line); padding: 4px 16px 12px; }
.dish-card.open .dish-recipe { display: block; }

.recipe-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.recipe-table th {
  padding: 8px 6px 7px;
  text-align: left;
  font-size: 8.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #98a39b;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.recipe-table th small { display: block; font-size: 8px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #b1bab3; }
.recipe-table th.num, .recipe-table td.num { text-align: right; }
.recipe-table td { padding: 8px 6px; border-bottom: 1px solid #f0ece3; vertical-align: middle; }
.recipe-table tr:last-child td { border-bottom: 0; }
.recipe-table tbody tr:hover { background: #fdfbf6; }
.recipe-table .ing-name { display: flex; flex-direction: column; gap: 1px; min-width: 140px; }
.recipe-table .ing-name b { font-family: var(--font-si); font-size: 11px; font-weight: 600; color: var(--ink-2); line-height: 1.5; }
.recipe-table .ing-name span { font-size: 9.5px; color: #9aa59d; }
.recipe-table .num { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.recipe-table .cost-cell { font-weight: 700; color: var(--ink); }
.main-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: 1px;
}
.basis-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-family: var(--font-si);
  font-size: 9px;
  color: var(--ink-2);
  white-space: nowrap;
  line-height: 1.5;
}
.basis-pill small { font-family: var(--font-body); font-size: 8px; color: var(--muted); margin-left: 4px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.ops-panel { margin-top: 24px; padding: 22px; }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-heading.compact { margin-bottom: 14px; }
.panel-heading > div:nth-child(2) { flex: 1; min-width: 0; }
.panel-heading h3 { font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; }
.panel-heading p { font-size: 10.5px; color: var(--muted); margin-top: 2px; font-family: var(--font-si); }
.panel-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}
.panel-icon .icon { width: 18px; height: 18px; }

.ops-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.expense-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px;
  transition: border-color .18s ease, background .18s ease;
}
.expense-card:focus-within { border-color: rgba(30, 122, 88, .4); background: #fdfcf7; }
.expense-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.expense-head h4 { font-family: var(--font-si); font-size: 11px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.expense-head span { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.expense-head > strong { font-size: 12.5px; font-weight: 800; color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.expense-title { display: flex; align-items: flex-start; gap: 8px; }
.tiny-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent-deep);
  flex: none;
}
.tiny-icon .icon { width: 14px; height: 14px; }

.expense-inputs { display: grid; grid-template-columns: 1fr 1.35fr; gap: 7px; }
.expense-inputs.single { grid-template-columns: 1fr; }
.expense-inputs label { font-size: 8.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #98a39b; display: flex; flex-direction: column; gap: 4px; }
.expense-inputs input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: 0;
  transition: .16s ease;
}
.expense-inputs input:focus { border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(30, 122, 88, .09); }
.expense-inputs input[readonly] { background: #f1eee6; color: var(--muted); cursor: not-allowed; }
.expense-inputs input::-webkit-outer-spin-button, .expense-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.expense-inputs input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.ops-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 14px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.ops-footer > div { background: var(--brand-tint); padding: 12px 15px; display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; align-items: center; }
.ops-footer span { font-family: var(--font-si); font-size: 10px; color: var(--ink-2); grid-column: 1; line-height: 1.5; }
.ops-footer small { font-size: 8.5px; color: var(--muted); grid-column: 1; text-transform: uppercase; letter-spacing: .05em; }
.ops-footer strong { grid-column: 2; grid-row: 1 / span 2; font-size: 14px; color: var(--brand); font-variant-numeric: tabular-nums; }

.calc-note { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 253, 249, .6); }
.calc-note summary { display: flex; align-items: center; gap: 8px; padding: 11px 15px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none; }
.calc-note summary::-webkit-details-marker { display: none; }
.calc-note summary .icon { width: 15px; height: 15px; }
.calc-note[open] summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.calc-note-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.calc-note-body p { font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.calc-note-body b { color: var(--ink-2); }

.summary-col { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.summary-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  background: linear-gradient(160deg, #155741 0%, #0d3b2b 55%, #0a2f22 100%);
  color: #f4f1e7;
  box-shadow: 0 26px 60px rgba(13, 55, 40, .28);
}
.summary-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  right: -110px;
  top: -150px;
  background: radial-gradient(circle, rgba(232, 166, 60, .24), transparent 65%);
  pointer-events: none;
}
.summary-top { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.summary-eyebrow { font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(244, 241, 231, .55); }
.summary-live { display: inline-flex; align-items: center; gap: 6px; font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #f4c777; }

.summary-hero { position: relative; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.summary-hero > span { display: block; font-size: 10px; color: rgba(244, 241, 231, .58); letter-spacing: .03em; }
.summary-hero strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: #f8e7bf;
  margin: 3px 0 4px;
  font-variant-numeric: tabular-nums;
}
.summary-hero small { font-size: 10px; color: rgba(244, 241, 231, .5); }

.summary-rows { position: relative; padding: 8px 0 2px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { font-family: var(--font-si); font-size: 10.5px; color: rgba(244, 241, 231, .76); line-height: 1.4; }
.summary-row span small { display: block; font-family: var(--font-body); font-size: 8.5px; color: rgba(244, 241, 231, .4); margin-top: 1px; letter-spacing: .02em; }
.summary-row strong { font-size: 12.5px; font-weight: 700; color: #fbf7ec; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cost-share { display: flex; height: 5px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 9px 0 14px; background: rgba(255, 255, 255, .08); }
.cost-share span { display: block; height: 100%; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.share-food { background: #f0b654; }
.share-staff { background: #6fbd94; }
.share-ops { background: rgba(255, 255, 255, .35); }

.summary-grand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.summary-grand span { font-family: var(--font-si); font-size: 11px; color: rgba(244, 241, 231, .8); }
.summary-grand span small { display: block; font-family: var(--font-body); font-size: 8.5px; color: rgba(244, 241, 231, .4); text-transform: uppercase; letter-spacing: .06em; }
.summary-grand strong { font-size: 18px; font-weight: 800; letter-spacing: -.3px; color: #fff; font-variant-numeric: tabular-nums; }

.summary-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.summary-tiles > div { background: rgba(255, 255, 255, .065); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 11px 12px; }
.summary-tiles span { display: block; font-size: 8.5px; letter-spacing: .04em; color: rgba(244, 241, 231, .5); }
.summary-tiles strong { display: block; font-size: 14px; font-weight: 800; margin: 4px 0 2px; color: #fbf7ec; font-variant-numeric: tabular-nums; }
.summary-tiles small { display: block; font-family: var(--font-si); font-size: 8px; color: rgba(244, 241, 231, .38); line-height: 1.4; }

.summary-card .btn-accent { color: #352204; }
.summary-foot { margin-top: 10px; font-size: 8.5px; line-height: 1.5; color: rgba(244, 241, 231, .4); text-align: center; }

.mini-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.mini-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mini-panel-head h3 { font-size: 12.5px; font-weight: 800; }
.mini-panel-head p { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.mini-panel-stats { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mini-panel-stats div { display: flex; flex-direction: column; gap: 2px; }
.mini-panel-stats span { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mini-panel-stats strong { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-progress { height: 5px; border-radius: 99px; background: #eee9df; overflow: hidden; margin-bottom: 12px; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-bright), #6cbd91); transition: width .5s ease; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
}
.text-link .icon { width: 14px; height: 14px; transform: rotate(-90deg); }
.text-link:hover { color: var(--brand-bright); }

.price-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 15px;
  background: linear-gradient(110deg, #eef6f0, #fdf7e8);
  border: 1px solid #dfe9dd;
  margin-bottom: 20px;
}
.callout-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--accent-deep); border: 1px solid #ecdcc0; flex: none; }
.price-callout > div { flex: 1; }
.price-callout strong { font-size: 12.5px; font-weight: 800; }
.price-callout p { font-size: 11px; color: var(--muted); margin-top: 2px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 16px 17px; box-shadow: var(--shadow-sm); }
.stat-card span { display: block; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-card strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin: 4px 0 1px; color: var(--ink); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { display: block; font-size: 9.5px; color: #9aa59d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-panel { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); width: min(360px, 100%); transition: .16s ease; }
.search-field:focus-within { border-color: var(--brand-bright); background: #fff; box-shadow: 0 0 0 3px rgba(30, 122, 88, .08); }
.search-field .icon { width: 15px; height: 15px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 12px; }
.table-hint { font-size: 9.5px; color: #9aa59d; white-space: nowrap; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.data-table thead th {
  padding: 11px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8b978f;
  white-space: nowrap;
}
.data-table thead th span { display: block; font-size: 8px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #aab2ab; margin-top: 1px; }
.data-table thead th.num, .data-table td.num { text-align: right; }
.data-table tbody td { padding: 10px 14px; border-bottom: 1px solid #f0ece3; vertical-align: middle; }
.data-table tbody tr:hover { background: #fdfbf6; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .col-code { width: 80px; }
.data-table .col-note { min-width: 160px; }
.data-table .col-actions { width: 48px; }

.price-table .ing-cell { display: flex; flex-direction: column; gap: 1px; }
.price-table .ing-cell b { font-family: var(--font-si); font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.price-table .ing-cell span { font-size: 10px; color: #9aa59d; }
.price-input-wrap { display: inline-flex; align-items: center; gap: 5px; justify-content: flex-end; }
.price-input-wrap span { font-size: 10px; color: var(--muted); }
.price-input {
  width: 108px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 9px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: 0;
  transition: .16s ease;
}
.price-input:hover { border-color: var(--line-strong); }
.price-input:focus { border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(30, 122, 88, .09); }
.price-input.saving { background: #fff9ea; border-color: #e7c37c; }
.price-input.saved { background: #ecf7ef; border-color: #9cd0b1; }
.price-input.error { background: var(--danger-soft); border-color: #e0a99f; }
.price-input::-webkit-outer-spin-button, .price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.usage-badge { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.usage-badge.none { background: transparent; border-style: dashed; color: #b2bab3; }
.note-text { font-size: 9.5px; color: #9aa59d; display: block; max-width: 240px; line-height: 1.5; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.mini-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); display: grid; place-items: center; transition: .16s ease; }
.mini-btn .icon { width: 15px; height: 15px; }
.mini-btn:hover { background: var(--surface-soft); border-color: var(--line); color: var(--ink); }
.mini-btn.danger:hover { background: var(--danger-soft); border-color: #efcdc5; color: var(--danger); }

.empty-state { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.empty-state .icon { width: 34px; height: 34px; color: #c4cabf; margin-bottom: 4px; }
.empty-state h3 { font-size: 14px; font-weight: 800; }
.empty-state p { font-size: 11px; color: var(--muted); max-width: 320px; }
.empty-state.small { padding: 22px 12px; }
.empty-state.small p { font-size: 10.5px; }
.empty-state .btn { margin-top: 8px; }

.recipe-summary-bar {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 15px 20px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.recipe-summary-bar > div:not(.recipe-summary-note) { display: flex; flex-direction: column; gap: 1px; }
.recipe-summary-bar span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.recipe-summary-bar strong { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.recipe-summary-bar strong b { font-weight: inherit; }
.recipe-summary-note { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); }
.recipe-summary-note .icon { width: 15px; height: 15px; color: var(--accent-deep); }

.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.recipe-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: .2s ease;
}
.recipe-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.recipe-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recipe-card h3 { font-family: var(--font-si); font-size: 14px; font-weight: 700; line-height: 1.5; }
.recipe-card h3 + span { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.recipe-card .code-chip { flex: none; }
.recipe-ingredients { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.recipe-ingredient-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9.5px; color: var(--muted); }
.recipe-ingredient-line span { font-family: var(--font-si); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-ingredient-line b { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.recipe-more { font-size: 9px; color: var(--brand); font-weight: 700; }
.recipe-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.recipe-card-foot span { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.recipe-card-foot strong { display: block; font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 1px; }
.recipe-card-foot small { display: block; font-size: 9px; color: #9aa59d; margin-top: 1px; }
.recipe-add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 210px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 253, 249, .5);
  color: var(--muted);
  transition: .2s ease;
}
.recipe-add-card:hover { border-color: var(--brand-bright); color: var(--brand); background: var(--brand-tint); }
.recipe-add-card .icon { width: 24px; height: 24px; }
.recipe-add-card b { font-size: 12px; }
.recipe-add-card span { font-size: 9.5px; }

.shopping-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 15px 20px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.shopping-meta-block { display: flex; flex-direction: column; gap: 3px; }
.shopping-meta-block > span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.shopping-meta-block > strong { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.menu-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.menu-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--brand-soft); border: 1px solid #d5e7db; color: var(--brand); font-size: 9px; font-weight: 700; }
.menu-chip b { font-weight: 800; letter-spacing: .04em; }
.shopping-meta > .text-link { margin-left: auto; }

.shopping-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.shopping-panel { padding: 18px; }
.shopping-panel .table-scroll { margin: 0 -18px -18px; }
.shopping-panel .data-table tbody td { padding: 11px 18px; }
.shopping-panel .data-table thead th { padding-left: 18px; padding-right: 18px; }
.shopping-table .col-no { width: 48px; }
.shopping-table td.num { font-variant-numeric: tabular-nums; }
.shopping-table tfoot td { padding: 14px 18px; background: var(--brand-tint); border-top: 1px solid #dbe7dd; font-size: 11.5px; }
.shopping-table tfoot td b { font-size: 11px; color: var(--ink); display: block; }
.shopping-table tfoot td span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.shopping-table tfoot td.num { font-size: 14px; font-weight: 800; color: var(--brand); }
.shopping-table tfoot td:last-child { font-size: 15px; }
.ing-code { font-size: 9.5px; font-weight: 800; color: var(--muted); letter-spacing: .05em; }
.shopping-table .ing-cell b { font-family: var(--font-si); font-size: 11.5px; font-weight: 600; color: var(--ink); }
.shopping-table .ing-cell span { display: block; font-size: 9.5px; color: #9aa59d; }

.quote-col { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.quote-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  background: linear-gradient(165deg, #155741, #0c392a 75%);
  color: #f5f1e7;
  box-shadow: 0 24px 54px rgba(13, 55, 40, .24);
}
.quote-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.quote-card .eyebrow { color: #f0bd63; margin-bottom: 4px; }
.quote-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.quote-name { display: flex; flex-direction: column; gap: 5px; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(245, 241, 231, .5); }
.quote-name input { height: 38px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); color: #fff; padding: 0 11px; font-size: 12px; outline: 0; transition: .16s ease; }
.quote-name input::placeholder { color: rgba(245, 241, 231, .3); }
.quote-name input:focus { border-color: rgba(240, 189, 99, .6); background: rgba(255, 255, 255, .11); box-shadow: 0 0 0 3px rgba(232, 166, 60, .12); }
.quote-price { padding: 18px 0 14px; }
.quote-price > span { font-size: 9.5px; color: rgba(245, 241, 231, .52); }
.quote-price strong { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -1px; color: #f8e7bf; line-height: 1.1; margin: 2px 0 2px; font-variant-numeric: tabular-nums; }
.quote-price small { font-size: 9.5px; color: rgba(245, 241, 231, .42); }
.quote-rows { border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 6px 0; }
.quote-rows div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.quote-rows span { font-size: 10px; color: rgba(245, 241, 231, .55); }
.quote-rows strong { font-size: 12px; font-weight: 700; color: #fbf7ec; font-variant-numeric: tabular-nums; }
.quote-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; }
.quote-actions .btn-primary { background: linear-gradient(160deg, #f2b653, #e29b2b); color: #352204; box-shadow: 0 9px 20px rgba(0, 0, 0, .2); }
.quote-note { font-size: 8.5px; line-height: 1.5; color: rgba(245, 241, 231, .32); text-align: center; margin-top: 10px; }

.quotes-panel { padding: 18px; }
.quotes-list { display: flex; flex-direction: column; gap: 8px; }
.quote-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-soft); transition: .16s ease; }
.quote-item:hover { border-color: var(--line-strong); background: #fdfbf6; }
.quote-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.quote-no { font-size: 9.5px; font-weight: 800; color: var(--brand); letter-spacing: .04em; }
.quote-item-customer { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.quote-item-meta { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.quote-item-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.quote-item-price div { display: flex; flex-direction: column; gap: 1px; }
.quote-item-price span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.quote-item-price strong { font-size: 13px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.quote-item-price small { font-size: 8.5px; color: var(--muted); }
.quote-item-actions { display: flex; gap: 4px; }
.reprice-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); border: 1px solid #f0ddb7; color: #9a6715; font-size: 8.5px; font-weight: 700; }
.reprice-badge .icon { width: 11px; height: 11px; }
.quote-item.missing { opacity: .75; }

body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 29, 22, .55);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .2s ease;
}
.modal-backdrop.open { opacity: 1; }
.modal {
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(14px) scale(.985);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.modal-head p { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); display: grid; place-items: center; flex: none; }
.modal-close:hover { background: #fff; color: var(--ink); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.modal-foot-right { display: flex; gap: 8px; margin-left: auto; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.field label .si-inline { font-size: 9px; }
.field input, .field select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  outline: 0;
  transition: .16s ease;
  width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(30, 122, 88, .09); }
.field input::placeholder { color: #b0b8b1; }
.field-row-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-hint { font-size: 10px; color: var(--muted); line-height: 1.6; padding: 9px 12px; border-radius: 9px; background: var(--brand-tint); border: 1px solid #dfeae1; display: flex; gap: 7px; align-items: flex-start; }
.modal-hint .icon { width: 14px; height: 14px; color: var(--brand); margin-top: 1px; }
.code-preview { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--brand-soft); border: 1px solid #d5e7db; color: var(--brand); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; }

.dish-form-items { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
.dish-form-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 0; }
.dish-form-head h3 { font-size: 12px; font-weight: 800; }
.dish-form-head p { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.recipe-row {
  display: grid;
  grid-template-columns: 28px minmax(150px, 1.6fr) minmax(128px, 1fr) 92px minmax(110px, .9fr) 76px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.recipe-row:focus-within { border-color: rgba(30, 122, 88, .38); background: #fdfcf7; }
.recipe-row .row-index { font-size: 9px; font-weight: 800; color: #a6afa7; text-align: center; }
.recipe-row select, .recipe-row input {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 0 8px;
  font-size: 11px;
  outline: 0;
  min-width: 0;
  width: 100%;
}
.recipe-row select:focus, .recipe-row input:focus { border-color: var(--brand-bright); box-shadow: 0 0 0 2px rgba(30, 122, 88, .08); }
.recipe-row .row-preview { font-size: 9px; color: var(--muted); line-height: 1.35; min-width: 0; }
.recipe-row .row-preview b { display: block; font-size: 10px; color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.recipe-row .row-buttons { display: flex; gap: 2px; justify-content: flex-end; }
.row-btn { width: 24px; height: 20px; border: 0; border-radius: 5px; background: transparent; color: #9aa59d; display: grid; place-items: center; padding: 0; }
.row-btn .icon { width: 12px; height: 12px; }
.row-btn:hover { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.row-btn.remove:hover { background: var(--danger-soft); color: var(--danger); border-color: #efcdc5; }
.row-btn:disabled { opacity: .3; cursor: default; }
.recipe-row.first { border-color: #d9c79f; background: #fdf9ee; }
.recipe-row .main-star { color: var(--accent-deep); }
.add-row-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; width: 100%; margin-top: 8px; border: 1px dashed var(--line-strong); border-radius: 9px; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 600; transition: .16s ease; }
.add-row-btn:hover { border-color: var(--brand-bright); color: var(--brand); background: var(--brand-tint); }
.add-row-btn:disabled { opacity: .45; cursor: not-allowed; }
.add-row-btn .icon { width: 14px; height: 14px; }
.form-error { display: none; margin-top: 12px; padding: 9px 12px; border-radius: 8px; background: var(--danger-soft); border: 1px solid #efcfc7; color: var(--danger); font-size: 10.5px; }
.form-error.show { display: block; }

.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 380px;
  padding: 11px 15px;
  border-radius: 11px;
  background: #103e2e;
  color: #f6f2e8;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 14px 36px rgba(13, 48, 35, .28);
  border: 1px solid rgba(255, 255, 255, .1);
  animation: toastIn .24s ease both;
  pointer-events: auto;
}
.toast .icon { width: 16px; height: 16px; color: #8fd2ae; flex: none; }
.toast.error { background: #5c241b; border-color: rgba(255, 255, 255, .1); }
.toast.error .icon { color: #f2a698; }
.toast.leaving { animation: toastOut .2s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.skeleton { position: relative; overflow: hidden; background: #eee9df; border-radius: 8px; color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.loading-screen { display: grid; place-items: center; min-height: 60vh; }
.loading-card { text-align: center; color: var(--muted); font-size: 12px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #ddd6c7; border-top-color: var(--brand); margin: 0 auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1240px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
  .ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shopping-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .summary-col { position: static; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); align-items: start; }
  .shopping-grid { grid-template-columns: 1fr; }
  .quote-col { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .topbar-right .btn-quiet { display: none; }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: grid; }
  .content { padding: 24px 20px 60px; }
  .topbar { padding: 10px 20px; }
  .control-bar { grid-template-columns: 1fr 1fr; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 14px; }
  .intro-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .topbar-titles h1 { font-size: 17px; }
  .topbar-right .headcount-chip { display: none; }
  .page-intro h2 { font-size: 27px; }
  .control-bar { grid-template-columns: 1fr; }
  .control { padding: 13px 16px; }
  .summary-col { grid-template-columns: 1fr; }
  .quote-col { grid-template-columns: 1fr; }
  .dish-top { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 13px 14px; }
  .dish-expand { display: none; }
  .dish-cost { grid-column: 2 / 4; text-align: left; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .dish-cost strong { font-size: 13px; }
  .dish-cost span { margin-top: 0; }
  .dish-recipe { padding: 0 14px 12px; }
  .recipe-table .hide-mobile { display: none; }
  .ops-grid { grid-template-columns: 1fr; }
  .ops-footer { grid-template-columns: 1fr; }
  .recipe-grid { grid-template-columns: 1fr; }
  .shopping-meta { gap: 16px; }
  .shopping-meta > .text-link { margin-left: 0; }
  .recipe-summary-bar { gap: 16px; }
  .recipe-summary-note { margin-left: 0; flex-basis: 100%; }
  .table-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-field { width: 100%; }
  .table-hint { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot-right { margin-left: 0; width: 100%; justify-content: flex-end; }
  .recipe-row { grid-template-columns: 22px minmax(0, 1fr) 92px 26px; grid-template-areas: "idx ing ratio del" "idx basis preview del"; row-gap: 6px; }
  .recipe-row .row-index { grid-area: idx; }
  .recipe-row .row-ing { grid-area: ing; }
  .recipe-row .row-basis { grid-area: basis; }
  .recipe-row .row-ratio { grid-area: ratio; }
  .recipe-row .row-preview { grid-area: preview; text-align: right; }
  .recipe-row .row-buttons { grid-area: del; }
  .recipe-row .row-buttons .row-btn:nth-child(-n+2) { display: none; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
  .toast { max-width: none; }
}

@media (max-width: 480px) {
  .content { padding: 20px 14px 50px; }
  .topbar { padding: 9px 14px; gap: 10px; }
  .topbar-right .btn-primary span { display: none; }
  .topbar-right { gap: 6px; }
  .btn { padding: 0 12px; }
  .page-intro h2 { font-size: 24px; }
  .summary-card { padding: 20px; }
  .summary-hero strong { font-size: 32px; }
  .stat-strip { grid-template-columns: 1fr; }
  .dish-title .en { flex-basis: 100%; }
  .dish-sub { gap: 4px; }
  .summary-tiles { grid-template-columns: 1fr; }
  .quote-price strong { font-size: 30px; }
  .price-callout { align-items: flex-start; }
  .price-callout .live-badge { display: none; }
}

/* ---------- Financial overview strip ---------- */

.accounts-strip {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid #dfe7dc;
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(232, 166, 60, .12), transparent 70%),
    linear-gradient(120deg, #fffdf9, #f5f8f2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.accounts-strip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.accounts-strip-head h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; }
.accounts-strip-head p { font-size: 11px; color: var(--muted); margin-top: 3px; max-width: 560px; }
.accounts-strip-head .eyebrow { margin-bottom: 5px; }
.pl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pl-card { padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.pl-card > span { display: block; font-family: var(--font-si); font-size: 9.5px; font-weight: 700; color: var(--muted); line-height: 1.45; }
.pl-card > span small { display: block; font-family: var(--font-body); font-size: 8.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #a3aea6; margin-top: 1px; }
.pl-card strong { display: block; font-family: var(--font-display); font-size: clamp(17px, 1.7vw, 22px); letter-spacing: -.5px; color: var(--ink); margin-top: 5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card em { display: block; font-style: normal; font-size: 9px; color: #9aa59d; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card.revenue { border-color: #cfe3d5; background: #f4faf6; }
.pl-card.revenue strong { color: var(--brand); }
.pl-card.cost { border-color: #ecdcc0; background: #fdf8ee; }
.pl-card.cost strong { color: #a8741b; }
.pl-card.ops { border-color: #d7e2ea; background: #f4f8fb; }
.pl-card.ops strong { color: #396b8a; }
.pl-card.profit { background: linear-gradient(150deg, #155741, #0c392a); border-color: #0c392a; }
.pl-card.profit > span { color: rgba(244, 199, 119, .8); }
.pl-card.profit > span small { color: rgba(244, 199, 119, .5); }
.pl-card.profit strong { color: #f8e7bf; }
.pl-card.profit em { color: rgba(245, 241, 231, .45); }
.pl-card.profit.negative { background: linear-gradient(150deg, #8b3a2c, #5f2519); border-color: #5f2519; }
.pl-card.profit.negative strong { color: #ffe0d6; }
.accounts-strip-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.accounts-strip-foot > span { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.period-filter { display: flex; align-items: center; gap: 6px; }
.period-filter select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  outline: 0;
  transition: .16s ease;
}
.period-filter select:focus { border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(30, 122, 88, .09); }

/* ---------- Shopping list ---------- */

.shop-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 130px minmax(0, 1.15fr) minmax(0, 1.5fr);
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.shop-controls .field span { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.shop-controls .field span .si-inline { font-size: 9px; }
.shop-control-menu { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shop-control-menu .control-label { font-size: 9.5px; }
.shop-control-menu .menu-chips { max-height: 60px; overflow-y: auto; }

.shopping-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 18px 12px; flex-wrap: wrap; }
.shopping-panel-head .panel-heading { margin-bottom: 0; }
.shop-check-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-check-actions > span { font-size: 9.5px; font-weight: 700; color: var(--muted); }
.segmented-mini {
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 700;
  transition: .16s ease;
}
.segmented-mini:hover { border-color: var(--brand-bright); color: var(--brand); background: var(--brand-tint); }

.shopping-panel .table-scroll { margin: 0; }
.shopping-panel .data-table tbody td { padding: 10px 14px; }
.shopping-panel .data-table thead th { padding-left: 14px; padding-right: 14px; }
.shopping-table .col-tick { width: 48px; text-align: center; }
.shopping-table .col-no { width: 44px; }
.shopping-table .tick-cell { text-align: center; }
.shop-check { display: inline-grid; place-items: center; cursor: pointer; }
.shop-check input { position: absolute; opacity: 0; pointer-events: none; }
.shop-check span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.6px solid #cbc6b8;
  background: #fff;
  color: transparent;
  display: grid;
  place-items: center;
  transition: .18s ease;
}
.shop-check span .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.shop-check input:focus-visible + span { outline: 3px solid rgba(232, 166, 60, .7); outline-offset: 2px; }
.shop-check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(20, 85, 63, .22); }
.shopping-table tbody tr.checked-row td { background: #f4f8f3; }
.shopping-table tbody tr.checked-row td b { text-decoration: line-through; color: #7c8a81; }
.shopping-table tbody tr.checked-row .ing-cell b { text-decoration: line-through; color: #7c8a81; }

.shop-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; min-width: 0; }
.shop-summary-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #155741, #0c392a 78%);
  color: #f5f1e7;
  box-shadow: 0 24px 54px rgba(13, 55, 40, .24);
}
.summary-eyebrow { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #f0bd63; }
.shop-summary-card > strong { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -1px; color: #f8e7bf; line-height: 1.1; margin: 4px 0 14px; font-variant-numeric: tabular-nums; }
.shop-summary-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.shop-summary-meta span { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .07em; color: rgba(245, 241, 231, .45); }
.shop-summary-meta b { display: block; font-size: 11px; font-weight: 700; color: #fbf7ec; margin-top: 2px; }
.shop-progress { padding: 13px 0 15px; }
.shop-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.shop-progress span { font-size: 9.5px; color: rgba(245, 241, 231, .55); }
.shop-progress b { font-size: 10.5px; color: #f4c777; }
.shop-progress-track { display: block; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.shop-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f2b653, #f7d28d); transition: width .35s ease; }
.summary-foot { font-size: 8.5px; line-height: 1.55; color: rgba(245, 241, 231, .35); text-align: center; margin-top: 9px; }

.menu-picker-panel { padding: 18px; }
.menu-picker { display: flex; flex-direction: column; gap: 6px; max-height: 430px; overflow-y: auto; padding-right: 2px; }
.menu-pick-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: .16s ease;
}
.menu-pick-row:hover { border-color: var(--line-strong); background: #fff; }
.menu-pick-row.selected { border-color: #cfe2d5; background: var(--brand-tint); }
.menu-pick-row input, .quote-menu-item input { position: absolute; opacity: 0; pointer-events: none; }
.menu-pick-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #cbc6b8;
  background: #fff;
  color: transparent;
  display: grid;
  place-items: center;
  flex: none;
  transition: .16s ease;
}
.menu-pick-box .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.menu-pick-row input:checked + .menu-pick-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.menu-pick-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.menu-pick-copy b { font-family: var(--font-si); font-size: 10.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pick-copy small { font-size: 8.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pick-cost { font-size: 10px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-link { margin-top: 13px; }

/* ---------- Quotation builder ---------- */

.quote-builder-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.quote-builder { padding: 22px; }
.quote-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quote-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 0 10px; padding-top: 18px; border-top: 1px dashed var(--line); }
.quote-section-head h3 { font-size: 13.5px; font-weight: 800; }
.quote-section-head p { font-size: 10px; color: var(--muted); margin-top: 2px; }
.quote-menu-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.quote-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: .16s ease;
}
.quote-menu-item:hover { border-color: var(--line-strong); background: #fff; }
.quote-menu-item.selected { border-color: #cfe2d5; background: var(--brand-tint); }
.quote-menu-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #cbc6b8; background: #fff; color: transparent; display: grid; place-items: center; flex: none; transition: .16s ease; }
.quote-menu-box .icon { width: 12px; height: 12px; stroke-width: 2.6; }
.quote-menu-item input:checked + .quote-menu-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.quote-menu-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.quote-menu-copy b { font-family: var(--font-si); font-size: 10.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-menu-copy small { font-size: 8.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-menu-cost { text-align: right; white-space: nowrap; }
.quote-menu-cost strong { display: block; font-size: 10.5px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.quote-menu-cost small { display: block; font-size: 8px; color: #9aa59d; }
.quote-extra-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.quote-summary-wrap { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.quote-summary-card { padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(165deg, #155741, #0c392a 78%); color: #f5f1e7; box-shadow: 0 24px 54px rgba(13, 55, 40, .24); }
.quote-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.quote-summary-card .eyebrow { color: #f0bd63; margin-bottom: 3px; }
.quote-summary-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.live-badge.dark { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #d9ecdf; }
.quote-price { padding: 15px 0 13px; }
.quote-price > span { font-size: 9.5px; color: rgba(245, 241, 231, .52); }
.quote-price strong { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -1px; color: #f8e7bf; line-height: 1.1; margin: 2px 0; font-variant-numeric: tabular-nums; }
.quote-price small { font-size: 9.5px; color: rgba(245, 241, 231, .42); }
.quote-rows { border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 5px 0; }
.quote-rows div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5.5px 0; }
.quote-rows span { font-size: 10px; color: rgba(245, 241, 231, .55); }
.quote-rows strong { font-size: 12px; font-weight: 700; color: #fbf7ec; font-variant-numeric: tabular-nums; }
.quote-grand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 4px; }
.quote-grand span { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 241, 231, .55); }
.quote-grand span small { display: block; font-size: 8px; color: rgba(245, 241, 231, .32); letter-spacing: .04em; }
.quote-grand strong { font-family: var(--font-display); font-size: 25px; font-weight: 700; letter-spacing: -.5px; color: #f4c777; font-variant-numeric: tabular-nums; }
.quote-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.quote-actions .btn-accent { box-shadow: 0 9px 20px rgba(0, 0, 0, .2); }
.quote-note { font-size: 8.5px; line-height: 1.5; color: rgba(245, 241, 231, .34); text-align: center; margin-top: 10px; }
.quote-validity { display: flex; align-items: flex-start; gap: 7px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid #f0ddb7; color: #8b6218; font-size: 9.5px; line-height: 1.55; }
.quote-validity .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }

.saved-quotes-panel { padding: 18px; margin-top: 22px; }
.quotes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quote-doc-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: var(--surface-soft); transition: .16s ease; }
.quote-doc-card:hover { border-color: var(--line-strong); background: #fff; box-shadow: var(--shadow-sm); }
.quote-doc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.quote-doc-top h4 { font-size: 13px; font-weight: 800; margin-top: 2px; }
.quote-doc-top p { font-size: 9.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.quote-doc-menu { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.quote-doc-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-top: 10px; border-top: 1px dashed var(--line); }
.quote-doc-totals div { min-width: 0; }
.quote-doc-totals span { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.quote-doc-totals strong { display: block; font-size: 12px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-doc-totals .grand strong { color: var(--brand); font-size: 13.5px; }
.quote-doc-extras { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.quote-doc-extras span { font-size: 8.5px; font-weight: 600; color: #8b6218; background: var(--accent-soft); border: 1px solid #f0ddb7; border-radius: 5px; padding: 1px 6px; }
.quote-doc-card.missing { opacity: .78; }

/* ---------- Accounts & accounts ---------- */

.accounts-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.accounts-stat-strip { margin-bottom: 20px; }
.stat-card.revenue-card { border-color: #cfe3d5; background: linear-gradient(150deg, #f4faf6, #fff); }
.stat-card.revenue-card strong { color: var(--brand); }
.stat-card.profit-card { background: linear-gradient(150deg, #155741, #0c392a); border-color: #0c392a; }
.stat-card.profit-card span { color: rgba(244, 199, 119, .8); }
.stat-card.profit-card small { color: rgba(245, 241, 231, .45); }
.stat-card.profit-card strong { color: #f8e7bf; }
.stat-card.profit-card.negative { background: linear-gradient(150deg, #8b3a2c, #5f2519); border-color: #5f2519; }
.stat-card.profit-card.negative strong { color: #ffe0d6; }

.expenses-panel { padding: 18px; }
.expenses-panel .table-scroll { margin: 0 -18px -18px; }
.expenses-table tbody td { padding: 11px 18px; }
.expenses-table thead th { padding-left: 18px; padding-right: 18px; }
.expenses-table tfoot td { padding: 14px 18px; background: var(--brand-tint); border-top: 1px solid #dbe7dd; font-size: 12px; }
.expenses-table tfoot td b { font-size: 11px; color: var(--ink); display: block; }
.expenses-table tfoot td span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.expenses-table tfoot td.num { font-size: 15px; font-weight: 800; color: var(--brand); }
.expenses-table .expense-desc { font-size: 10.5px; color: var(--ink-2); display: block; max-width: 300px; }
.expense-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.expense-cat .icon { width: 12px; height: 12px; }
.expense-cat.raw_material { background: #eef7f0; border-color: #d4e7da; color: #2d6b48; }
.expense-cat.staff_salary { background: #eef3fa; border-color: #d6e2ef; color: #396b8a; }
.expense-cat.transport { background: #fdf5e6; border-color: #f0ddb7; color: #9a6715; }
.expense-cat.utilities { background: #f3effa; border-color: #e0d7f0; color: #69559a; }
.expense-cat.other { background: #f7f3ee; border-color: #e8ded1; color: #7c6a55; }

.expense-breakdown { padding: 18px; }
.expense-breakdown .panel-heading { margin-bottom: 16px; }
.breakdown-row { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.breakdown-label b { font-size: 12px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown-track { display: block; height: 6px; border-radius: 99px; background: #eee9df; overflow: hidden; }
.breakdown-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-bright), #6cbd91); }
.breakdown-track i.staff_salary { background: linear-gradient(90deg, #4d7fa3, #7fb1d0); }
.breakdown-track i.transport { background: linear-gradient(90deg, #d9a23c, #f2c878); }
.breakdown-track i.utilities { background: linear-gradient(90deg, #7a63a8, #b3a0d4); }
.breakdown-track i.other { background: linear-gradient(90deg, #9c8568, #c6b7a0); }
.breakdown-row small { display: block; font-size: 8.5px; color: #9aa59d; margin-top: 4px; }
.expense-breakdown-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; margin-top: 6px; border-top: 1px solid var(--line); }
.expense-breakdown-foot span { font-size: 10px; color: var(--muted); }
.expense-breakdown-foot strong { font-size: 15px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.expense-breakdown > .btn { margin-top: 4px; }

/* ---------- Mobile navigation & install ---------- */

.sidebar-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 12px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(244, 199, 119, .35);
  background: rgba(244, 199, 119, .12);
  color: #f4c777;
  font-size: 10.5px;
  font-weight: 700;
  transition: .16s ease;
}
.sidebar-install .icon { width: 14px; height: 14px; }
.sidebar-install:hover { background: rgba(244, 199, 119, .2); }

.mobile-nav { display: none; }

@media (max-width: 1240px) {
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-controls { grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); }
  .shop-control-menu { grid-column: 1 / -1; }
  .quotes-grid { grid-template-columns: 1fr; }
  .quote-menu-picker { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .shop-side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .quote-builder-grid { grid-template-columns: 1fr; }
  .quote-summary-wrap { position: static; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; }
  .accounts-grid { grid-template-columns: 1fr; }
  .quote-menu-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10, 41, 30, .97);
    border-top: 1px solid rgba(244, 199, 119, .18);
    box-shadow: 0 -10px 30px rgba(8, 26, 19, .22);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: rgba(238, 245, 239, .55);
    font-size: 9px;
    font-weight: 600;
    position: relative;
    transition: color .16s ease;
  }
  .mobile-nav-item .icon { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: #f4c777; }
  .mobile-nav-item.active::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: #f4c777; }
  .content { padding-bottom: 90px; }
  .toast-root { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .period-filter { flex-wrap: wrap; }
  .shop-controls { grid-template-columns: 1fr; }
  .shop-control-menu { grid-column: auto; }
  .shop-check-actions { width: 100%; }
  .shop-side { grid-template-columns: 1fr; }
  .pl-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .accounts-strip { padding: 16px; }
  .accounts-strip-head { flex-direction: column; }
  .pl-grid { grid-template-columns: 1fr; }
  .pl-card strong { font-size: 21px; }
  .quotes-grid { grid-template-columns: 1fr; }
  .quote-form-grid, .quote-extra-grid, .quote-menu-picker { grid-template-columns: 1fr; }
  .quote-summary-wrap { grid-template-columns: 1fr; }
  .saved-quotes-panel, .quote-builder, .expenses-panel, .expense-breakdown { padding: 16px; }
  .expenses-panel .table-scroll { margin: 0 -16px -16px; }
  .shop-summary-card > strong { font-size: 30px; }
  .quote-doc-totals { grid-template-columns: 1fr 1fr; }
  .quote-doc-totals .grand { grid-column: 1 / -1; }
  .quote-doc-top { flex-direction: column; }
  .quote-doc-top .quote-item-actions { align-self: flex-end; }
  .menu-picker { max-height: 340px; }
  .period-filter select { flex: 1; min-width: 0; }
  .accounts-grid { gap: 14px; }

  .responsive-table { min-width: 0; }
  .responsive-table thead { display: none; }
  .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tbody { padding: 0 12px; }
  .responsive-table tbody tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    padding: 3px 0;
  }
  .responsive-table tbody tr:hover { background: #fff; }
  .responsive-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 12px;
    border-bottom: 1px dashed #f0ece3;
    text-align: right;
  }
  .responsive-table tbody td:last-child { border-bottom: 0; }
  .responsive-table tbody td::before {
    content: attr(data-label);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    flex: none;
  }
  .responsive-table tbody td.num { text-align: right; }
  .responsive-table td.col-no { display: none; }
  .responsive-table .tick-cell { justify-content: space-between; }
  .responsive-table tfoot { display: none; }
  .responsive-table .ing-cell { text-align: right; align-items: flex-end; }
  .responsive-table .expense-desc { max-width: 190px; }
  .shopping-panel .table-scroll, .expenses-panel .table-scroll { margin: 0; overflow: visible; }
  .shopping-panel .data-table tbody td, .expenses-table tbody td { padding: 8px 12px; }
  .shopping-panel { padding: 16px; }
  .shop-check-actions > span { width: 100%; }
}

@media (max-width: 480px) {
  .pl-grid { grid-template-columns: 1fr; }
  .mobile-nav-item span { font-size: 8.5px; }
  .shop-summary-meta { grid-template-columns: 1fr 1fr; }
  .quote-grand strong { font-size: 22px; }
  .quote-menu-copy b, .menu-pick-copy b { font-size: 10px; }
  .quote-doc-totals { grid-template-columns: 1fr; }
  .period-filter { width: 100%; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
