/* src/styles/global.css */
:root {
  --font-sans:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --font-serif:
    "Source Serif 4",
    Georgia,
    "Times New Roman",
    serif;
  --bg: #faf9f5;
  --bg-sidebar: #f2f0e9;
  --surface: #ffffff;
  --surface-2: #f4f2ec;
  --surface-3: #eae7dd;
  --border: #e7e4da;
  --border-strong: #d8d4c8;
  --text: #29261b;
  --text-2: #6b675c;
  --text-3: #9c978a;
  --accent: #d97757;
  --accent-strong: #c15f3c;
  --accent-text: #b5502f;
  --accent-soft: #f8e7df;
  --ok-solid: #4f7d4b;
  --ok-text: #3d6b3a;
  --ok-soft: #e3eddf;
  --warn-solid: #b98a2f;
  --warn-text: #8a6116;
  --warn-soft: #f5ebd1;
  --danger-solid: #c24e42;
  --danger-text: #a93e32;
  --danger-soft: #f8e2dd;
  --chart-bar: var(--accent);
  --fl-blue: #2a78d6;
  --fl-aqua: #1baf7a;
  --fl-yellow: #eda100;
  --fl-green: #008300;
  --fl-violet: #4a3aa7;
  --fl-red: #e34948;
  --fl-magenta: #e87ba4;
  --fl-orange: #eb6834;
  --radius: 14px;
  --shadow-pop: 0 16px 50px rgba(30, 26, 16, 0.22);
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #262624;
  --bg-sidebar: #1e1d1b;
  --surface: #30302e;
  --surface-2: #3a3936;
  --surface-3: #454440;
  --border: #3e3d39;
  --border-strong: #4d4b44;
  --text: #edeae1;
  --text-2: #b3afa2;
  --text-3: #8c8879;
  --accent: #d97757;
  --accent-strong: #e08663;
  --accent-text: #e8977b;
  --accent-soft: rgba(217, 119, 87, 0.16);
  --ok-solid: #7faf7a;
  --ok-text: #a5cda0;
  --ok-soft: rgba(122, 170, 110, 0.16);
  --warn-solid: #d9b25f;
  --warn-text: #e2c382;
  --warn-soft: rgba(200, 160, 70, 0.15);
  --danger-solid: #e07a6c;
  --danger-text: #f0a093;
  --danger-soft: rgba(210, 90, 74, 0.16);
  --fl-blue: #3987e5;
  --fl-aqua: #199e70;
  --fl-yellow: #c98500;
  --fl-green: #008300;
  --fl-violet: #9085e9;
  --fl-red: #e66767;
  --fl-magenta: #d55181;
  --fl-orange: #d95926;
  --shadow-pop: 0 16px 50px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
  margin: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.serif {
  font-family: var(--font-serif);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.muted {
  color: var(--text-3);
}
.neg {
  color: var(--danger-text);
  font-weight: 600;
}
.link {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 238px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 14px 16px;
  transition: background-color 0.2s ease, transform 0.22s ease;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 2px 8px 20px;
}
.brand-icon {
  font-size: 21px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.brand-name {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.nav-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13.5px;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.nav-item:hover {
  background: var(--surface-3);
  color: var(--text);
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}
.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 8px 0;
  border-top: 1px solid var(--border);
}
.sidebar-note {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
}
.sidebar-overlay {
  display: none;
}
.main {
  flex: 1;
  min-width: 0;
}
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}
.topbar-brand {
  font-weight: 600;
  font-size: 15px;
}
.page-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.page-h h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.page-sub {
  color: var(--text-2);
  font-size: 13.5px;
  margin-top: 3px;
}
.page-h-icon {
  color: var(--text-3);
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.page-actions.wrap {
  flex-wrap: wrap;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  min-width: 0;
}
.card-h {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-b {
  padding: 18px 20px;
}
.card-b.flush {
  padding: 0;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-value {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-ok {
  color: var(--ok-text);
}
.stat-warn {
  color: var(--warn-text);
}
.stat-danger {
  color: var(--danger-text);
}
.stat-sub {
  font-size: 12px;
  color: var(--text-3);
}
.grid-main {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 16px;
  align-items: start;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.btn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 10px;
  padding: 9px 15px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition:
    background-color 0.13s ease,
    border-color 0.13s ease,
    color 0.13s ease;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
}
.btn-subtle {
  background: var(--surface-2);
  color: var(--text);
}
.btn-subtle:hover:not(:disabled) {
  background: var(--surface-3);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.btn-danger:hover:not(:disabled) {
  border-color: var(--danger-solid);
}
.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}
.icon-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.row-actions {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
  flex: 1;
  min-width: 0;
}
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  display: block;
  margin-bottom: 2px;
}
.field-hint {
  font-size: 11.5px;
  color: var(--text-3);
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row.wrap {
  flex-wrap: wrap;
}
.input {
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 12px;
  width: 100%;
  transition: border-color 0.13s ease, box-shadow 0.13s ease;
}
.input::placeholder {
  color: var(--text-3);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input:disabled {
  background: var(--surface-2);
  color: var(--text-3);
}
select.input {
  cursor: pointer;
}
.textarea {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  font-size: 12px;
  resize: vertical;
  line-height: 1.5;
}
.count-input {
  width: 92px;
  text-align: right;
  margin-left: auto;
}
.stepper {
  display: flex;
  gap: 6px;
  align-items: center;
}
.stepper-input {
  width: 72px;
  text-align: center;
}
.stepper .icon-btn {
  background: var(--surface-2);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  width: fit-content;
}
.badge-ok {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.badge-warn {
  background: var(--warn-soft);
  color: var(--warn-text);
}
.badge-danger {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.badge-neutral {
  background: var(--surface-2);
  color: var(--text-2);
}
.badge-accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.fl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.fl-dot.fl-blue,
.fl-bg-blue {
  background: var(--fl-blue);
}
.fl-dot.fl-aqua,
.fl-bg-aqua {
  background: var(--fl-aqua);
}
.fl-dot.fl-yellow,
.fl-bg-yellow {
  background: var(--fl-yellow);
}
.fl-dot.fl-green,
.fl-bg-green {
  background: var(--fl-green);
}
.fl-dot.fl-violet,
.fl-bg-violet {
  background: var(--fl-violet);
}
.fl-dot.fl-red,
.fl-bg-red {
  background: var(--fl-red);
}
.fl-dot.fl-magenta,
.fl-bg-magenta {
  background: var(--fl-magenta);
}
.fl-dot.fl-orange,
.fl-bg-orange {
  background: var(--fl-orange);
}
.progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.progress-ok {
  background: var(--ok-solid);
}
.progress-warn {
  background: var(--warn-solid);
}
.progress-danger {
  background: var(--danger-solid);
}
.progress-accent {
  background: var(--accent);
}
.progress-neutral {
  background: var(--text-3);
}
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.tab {
  padding: 7px 14px;
  border-radius: 9px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.13s ease, color 0.13s ease;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.09);
}
.segmented {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 10px;
  width: fit-content;
}
.segmented-btn {
  padding: 6px 11px;
  border-radius: 7px;
  border: none;
  background: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.13s ease, color 0.13s ease;
}
.segmented-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 16, 8, 0.09);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table th:first-child,
.table td:first-child {
  padding-left: 20px;
}
.table th:last-child,
.table td:last-child {
  padding-right: 20px;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover td {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table.compact th,
.table.compact td {
  padding: 8px 12px;
  white-space: nowrap;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ellipsis {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-flavor {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}
.qty-adjust {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}
.qty-adjust .icon-btn {
  width: 24px;
  height: 24px;
  background: var(--surface-2);
}
.qty-value {
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 14px;
}
.stock-list {
  display: flex;
  flex-direction: column;
}
.stock-row {
  display: grid;
  grid-template-columns: 140px 1fr 52px 108px;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.stock-row:last-child {
  border-bottom: none;
}
.stock-name {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
  min-width: 0;
}
.stock-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.stock-detail {
  font-size: 11px;
  color: var(--text-3);
}
.stock-value {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stock-row .badge {
  justify-self: end;
}
.shop-list {
  display: flex;
  flex-direction: column;
}
.shop-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  row-gap: 5px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.shop-row:last-child {
  border-bottom: none;
}
.shop-main {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}
.shop-name {
  font-weight: 600;
}
.shop-qty {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
}
.shop-meta {
  grid-column: 1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
}
.shop-row > .btn {
  grid-column: 2;
  grid-row: 1 / 3;
}
.shop-missing {
  padding: 13px 20px;
  display: flex;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  align-items: flex-start;
  border-top: 1px dashed var(--border-strong);
}
.shop-missing svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.b2b-list {
  display: flex;
  flex-direction: column;
}
.b2b-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.b2b-row:last-child {
  border-bottom: none;
}
.b2b-client {
  font-weight: 600;
}
.b2b-boules {
  font-family: var(--font-serif);
  font-weight: 600;
  white-space: nowrap;
}
.daybars {
  display: flex;
  gap: 4px;
  align-items: stretch;
  height: 150px;
  padding-top: 6px;
}
.daybar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  min-width: 0;
}
.daybar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.daybar-fill {
  width: 68%;
  max-width: 26px;
  background: var(--chart-bar);
  border-radius: 4px 4px 2px 2px;
  transition: height 0.25s ease, background-color 0.13s ease;
}
.daybar-label {
  font-size: 10.5px;
  color: var(--text-3);
  height: 14px;
  font-variant-numeric: tabular-nums;
}
.daybar-tip {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 5;
}
.daybar-col:hover .daybar-tip {
  opacity: 1;
}
.daybar-col:hover .daybar-fill {
  background: var(--accent-strong);
}
.chart-sub {
  margin: 18px 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.flavorbars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flavorbar-row {
  display: grid;
  grid-template-columns: 128px 1fr 92px;
  gap: 10px;
  align-items: center;
}
.flavorbar-name {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flavorbar-track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 5px;
  overflow: hidden;
}
.flavorbar-fill {
  height: 100%;
  border-radius: 5px;
  min-width: 2px;
  transition: width 0.3s ease;
}
.flavorbar-value {
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sales-totals {
  display: flex;
  gap: 22px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.sales-totals strong {
  color: var(--text);
}
.help {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 14px;
}
.help.warn {
  color: var(--warn-text);
  margin: 10px 0 0;
}
.import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wizard-step {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 14px;
}
.wizard-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.mapping-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mapping-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
  transition: opacity 0.15s ease;
}
.mapping-row.ignored {
  opacity: 0.55;
}
.mapping-head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.mapping-label {
  font-weight: 600;
  flex: 1;
  min-width: 140px;
}
.mapping-ignore {
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}
.mapping-parts {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.mapping-part {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}
.mapping-part select {
  flex: 1;
  min-width: 0;
}
.mapping-qty {
  width: 86px;
  flex-shrink: 0;
  text-align: right;
}
.mapping-part .muted {
  font-size: 12px;
  white-space: nowrap;
}
.import-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.summary-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
  white-space: nowrap;
}
.inline-create {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.inline-create .input {
  width: 200px;
}
.order-list {
  display: flex;
  flex-direction: column;
}
.order-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}
.order-row:last-child {
  border-bottom: none;
}
.order-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.order-client {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.order-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.order-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.order-total {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}
.collapse-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px;
  width: fit-content;
}
.collapse-toggle:hover {
  color: var(--text);
}
.impact-list {
  margin: 8px 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.recipe-yield {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.recipe-lines {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.recipe-lines li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}
.per-boule {
  font-size: 11px;
}
.recipe-notes {
  font-size: 12.5px;
  color: var(--text-3);
  font-style: italic;
  margin: -6px 0 14px;
}
.produce-top {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.produce-yield {
  font-size: 13.5px;
  color: var(--text-2);
}
.callout {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  margin-top: 14px;
  line-height: 1.5;
}
.callout svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.callout-warn {
  background: var(--warn-soft);
  color: var(--warn-text);
}
.swatches {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.swatch:hover {
  transform: scale(1.12);
}
.swatch.active {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.empty {
  text-align: center;
  padding: 44px 24px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-3);
  margin-bottom: 6px;
}
.empty-title {
  font-weight: 600;
  color: var(--text);
}
.empty-hint {
  font-size: 13px;
  max-width: 380px;
  line-height: 1.5;
}
.empty-action {
  margin-top: 12px;
}
.welcome {
  max-width: 620px;
  margin: 48px auto 0;
  padding: 44px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.welcome-emoji {
  font-size: 46px;
}
.welcome h2 {
  font-size: 27px;
  letter-spacing: -0.015em;
}
.welcome p {
  color: var(--text-2);
  line-height: 1.6;
  font-size: 14.5px;
}
.welcome-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 24, 16, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 20px 40px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  box-shadow: var(--shadow-pop);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 0;
}
.modal-h h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
}
.modal-b {
  padding: 16px 22px 18px;
}
.modal-f {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 22px 20px;
}
.confirm-message {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}
.toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  max-width: min(380px, calc(100vw - 40px));
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 15px;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(20, 16, 8, 0.16);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.toast-icon {
  flex-shrink: 0;
}
.toast-ok .toast-icon {
  color: var(--ok-solid);
}
.toast-err .toast-icon {
  color: var(--danger-solid);
}
.toast-info .toast-icon {
  color: var(--accent);
}
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-boot {
  font-size: 40px;
  animation: auth-pulse 1.2s ease infinite;
}
@keyframes auth-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.auth-logo {
  font-size: 42px;
  margin-bottom: 10px;
}
.auth-card h1 {
  font-size: 24px;
  letter-spacing: -0.015em;
}
.auth-sub {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 8px 0 20px;
}
.auth-card .field {
  text-align: left;
}
.auth-note {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 16px;
}
.form-error {
  color: var(--danger-text);
  font-size: 13px;
  margin-bottom: 12px;
}
.sync-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  width: fit-content;
}
.sync-chip:hover {
  background: var(--surface-2);
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
}
.sync-sync .sync-dot {
  background: var(--ok-solid);
}
.sync-saving .sync-dot {
  background: var(--warn-solid);
  animation: auth-pulse 1s ease infinite;
}
.sync-offline .sync-dot {
  background: var(--danger-solid);
}
.sync-boot .sync-dot {
  animation: auth-pulse 1s ease infinite;
}
.user-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--surface-2);
  border-radius: 9px;
  font-size: 13.5px;
}
@media (max-width: 1060px) {
  .grid-main {
    grid-template-columns: 1fr;
  }
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .topbar {
    display: flex;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    z-index: 70;
    transform: translateX(-105%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  }
  .sidebar.open {
    transform: none;
  }
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 65;
  }
  .page {
    padding: 72px 16px 70px;
  }
  .stock-row {
    grid-template-columns: 1fr auto;
    row-gap: 8px;
  }
  .stock-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .stock-row .badge {
    grid-row: 3;
    justify-self: start;
  }
  .stock-value {
    grid-column: 2;
    grid-row: 1;
  }
  .flavorbar-row {
    grid-template-columns: 100px 1fr 80px;
  }
  .order-row {
    flex-direction: column;
  }
  .order-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .grid-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-value {
    font-size: 24px;
  }
}
