:root {
  --bg: #eef5ea;
  --bg-2: #e5efe0;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --panel-soft: rgba(102, 130, 84, 0.08);
  --line: rgba(96, 126, 86, 0.14);
  --line-strong: rgba(96, 126, 86, 0.24);
  --text: #183022;
  --muted: #5f7360;
  --muted-2: #7f8f7e;
  --accent: #76a65f;
  --accent-2: #9aba73;
  --green: #4ca86b;
  --green-2: #3f8e5a;
  --amber: #d9a84f;
  --red: #d46d6d;
  --cyan: #76b9a0;
  --shadow-1: 0 18px 48px rgba(79, 105, 70, 0.14);
  --shadow-2: 0 10px 24px rgba(79, 105, 70, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --top-safe: max(env(safe-area-inset-top), 14px);
  --bottom-safe: max(env(safe-area-inset-bottom), 14px);
}

* { box-sizing: border-box; }
html, body { height: 100%; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f3f8ef 0%, #e8f1e1 100%);
  overflow: hidden;
  position: relative;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background-image: var(--app-bg-image, none);
  background-size: cover;
  background-position: center center;
  opacity: .72;
  transform: scale(1.04);
  filter: saturate(1.28) brightness(1.02) contrast(1.06);
}

body::after {
  z-index: 1;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(118,166,95,.10), transparent 30%),
    linear-gradient(180deg, rgba(243,248,239,.30) 0%, rgba(232,241,225,.40) 100%);
}

body[data-bg-phase="day"] {
  --app-bg-image: url('./assets/bg-tree-day.jpg');
}

body[data-bg-phase="evening"] {
  --app-bg-image: url('./assets/bg-tree-evening.jpg');
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .12;
  background-image: radial-gradient(rgba(255,255,255,.08) .8px, transparent .8px);
  background-size: 18px 18px;
  mix-blend-mode: soft-light;
}

.glass {
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.app-shell {
  position: relative;
  z-index: 3;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
body.preboot .app-shell,
body.preboot .director-entry-link,
body.preboot .sheet-root,
body.preboot .toast-root {
  opacity: 0;
  pointer-events: none;
}
body.preboot .loading-overlay { display: none !important; }
body.app-ready .app-shell,
body.app-ready .director-entry-link,
body.app-ready .sheet-root,
body.app-ready .toast-root {
  opacity: 1;
  transition: opacity .22s ease;
}

.topbar {
  display: none !important;
}

.topbar__title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar__eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.topbar__name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.topbar__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.screen {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px calc(110px + var(--bottom-safe));
  scroll-behavior: smooth;
}
.screen::-webkit-scrollbar { width: 0; height: 0; }

.bottom-nav {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--bottom-safe) + 8px);
  border-radius: 24px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  z-index: 20;
}

.nav-btn {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--muted);
  border-radius: 18px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.nav-btn svg {
  width: 22px;
  height: 22px;
}
.nav-btn.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(91,140,255,.22), rgba(122,92,255,.14));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 24px rgba(31, 50, 110, .32);
}

.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.card,
.panel,
.hero,
.section {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 27, 51, .92), rgba(10, 17, 33, .88));
  box-shadow: var(--shadow-2);
}

.card { padding: 16px; }
.panel { padding: 18px; }
.hero {
  overflow: hidden;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,247,237,.96));
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(153,196,120,.26), transparent 70%);
  filter: blur(20px);
}

.kicker {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 800;
}
.title-xl { font-size: clamp(24px, 5vw, 34px); font-weight: 900; line-height: 1.06; }
.title-lg { font-size: 22px; font-weight: 800; line-height: 1.12; }
.title-md { font-size: 17px; font-weight: 800; line-height: 1.18; }
.title-sm { font-size: 15px; font-weight: 800; line-height: 1.2; }
.body-sm, .muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
.body-xs { color: var(--muted); font-size: 12px; line-height: 1.4; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }

.badge,
.chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.chip.active,
.pill.active {
  background: linear-gradient(180deg, rgba(91,140,255,.24), rgba(122,92,255,.2));
  border-color: rgba(122, 160, 255, .44);
}
.badge.green { color: #183022; background: rgba(61,214,155,.18); border-color: rgba(61,214,155,.30); }
.badge.amber { color: #4b3511; background: rgba(255,188,88,.28); border-color: rgba(255,188,88,.42); }
.badge.red { color: #5f1f27; background: rgba(255,109,122,.22); border-color: rgba(255,109,122,.32); }
.badge.cyan { color: #153640; background: rgba(87,212,255,.22); border-color: rgba(87,212,255,.36); }
.badge.gray { color: #44515b; background: rgba(125, 140, 155, .16); border-color: rgba(125, 140, 155, .26); }

.btn {
  appearance: none;
  border: 0;
  outline: none;
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 28px rgba(79, 90, 220, .34);
}
.btn.secondary {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
}
.btn.ghost {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line-strong);
}
.btn.green { background: linear-gradient(135deg, var(--green), var(--green-2)); box-shadow: 0 14px 28px rgba(19, 183, 126, .26); }
.btn.red { background: linear-gradient(135deg, #ff6d7a, #ff4a66); box-shadow: 0 14px 28px rgba(255, 74, 102, .24); }
.btn.amber { background: linear-gradient(135deg, #ffbc58, #ff9455); box-shadow: 0 14px 28px rgba(255, 148, 85, .24); }
.btn.small { padding: 9px 12px; font-size: 12px; border-radius: 14px; }
.btn.icon-only { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.btn.full { width: 100%; justify-content: center; }

.input,
.search,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(255,255,255,.045);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.input:focus,
.search:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(91,140,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 4px rgba(91,140,255,.14);
}
.textarea { min-height: 96px; resize: vertical; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.action-tile {
  border-radius: 22px;
  padding: 14px;
  min-height: 112px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.action-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(91,140,255,.24), rgba(122,92,255,.18));
  border: 1px solid rgba(255,255,255,.08);
}
.action-tile__title { font-size: 14px; font-weight: 800; }
.action-tile__meta { font-size: 12px; color: var(--muted); }

.metric {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.metric__label { color: var(--muted); font-size: 12px; }
.metric__value { margin-top: 6px; font-size: 22px; font-weight: 900; line-height: 1.05; }
.metric__hint { margin-top: 6px; color: var(--muted); font-size: 12px; }
.metric--clickable { cursor: pointer; }
.metric--button {
  appearance: none;
  text-align: left;
  color: inherit;
  font: inherit;
}
.card--button {
  appearance: none;
  text-align: left;
  color: inherit;
  font: inherit;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  cursor: pointer;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 999px;
}
.segmented button.active {
  background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(122,92,255,.12));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(91,140,255,.12);
}

.store-strip {
  display: flex;
  gap: 10px;
  overflow: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
}
.store-strip::-webkit-scrollbar { display: none; }
.store-chip {
  min-width: 170px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(106, 133, 96, .22);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,243,.94));
  box-shadow: 0 10px 24px rgba(74, 98, 70, .08);
  scroll-snap-align: start;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.store-chip.active {
  background: linear-gradient(135deg, rgba(217, 227, 255, .98), rgba(230, 236, 255, .96));
  border-color: rgba(122,160,255,.42);
  box-shadow: 0 14px 28px rgba(91, 140, 255, .14);
}
.store-chip__title { font-size: 14px; font-weight: 800; color: var(--text); }
.store-chip__meta { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.store-strip--bonuses {
  flex-wrap: wrap;
  overflow: visible;
  gap: 12px;
}
.store-chip--bonus {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
}

.bonuses-summary-grid .bonuses-metric {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,250,243,.82));
  border-color: rgba(106, 133, 96, .18);
  box-shadow: 0 10px 24px rgba(74, 98, 70, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bonuses-summary-grid .bonuses-metric--accent {
  background: linear-gradient(180deg, rgba(232, 255, 219, .94), rgba(246, 252, 236, .9));
  border-color: rgba(84, 166, 92, .26);
}
.bonus-day-card {
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(244,249,239,.78));
  border: 1px solid rgba(106, 133, 96, .16);
  box-shadow: 0 10px 22px rgba(74, 98, 70, .07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bonuses-timeline {
  gap: 12px;
}

.supplier-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,242,.96));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(68vh, 840px);
}
.supplier-card__head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,244,.97));
  border-bottom: 1px solid rgba(96,126,86,.08);
}
.supplier-card__body {
  padding: 12px 16px 16px;
  display: grid;
  gap: 10px;
  overflow: auto;
}
.supplier-card.collapsed .supplier-card__body { display: none; }

.supplier-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.scope-strip {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
}
.scope-strip::-webkit-scrollbar { display: none; }
.scope-chip {
  min-width: 148px;
  max-width: 188px;
  width: clamp(148px, 42vw, 188px);
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  color: var(--text);
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
  overflow: hidden;
}
.scope-chip--today {
  background: linear-gradient(180deg, rgba(108, 214, 94, .46), rgba(220, 246, 209, .92));
  border-color: rgba(58, 148, 47, .42);
  box-shadow: 0 10px 24px rgba(89, 160, 66, .18);
}
.scope-chip--next {
  background: linear-gradient(180deg, rgba(255, 205, 120, .28), rgba(255, 236, 196, .66));
  border-color: rgba(196, 133, 25, .28);
}
.scope-chip__title {
  display: block;
  max-width: 100%;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scope-chip__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.empty-state.compact {
  padding: 16px;
  min-height: auto;
  border-radius: 16px;
}

.product-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
}
.product-media {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(91,140,255,.12), rgba(122,92,255,.12));
  border: 1px solid var(--line);
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-media__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.72);
  font-size: 22px;
  font-weight: 900;
}
.product-media__fab {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(9, 15, 28, .76);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.product-head { min-width: 0; }
.product-name { font-size: 15px; font-weight: 800; line-height: 1.22; }
.product-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.product-actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; margin-top: 8px; }
.product-actions--compact { align-items: stretch; }
.product-actions--order { flex-direction: column; align-items: stretch; gap: 8px; }
.qty-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.qty-box--stable {
  width: 100%;
  justify-content: space-between;
}
.qty-box--order { max-width: 216px; }
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  border: 0;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}
.qty-input {
  width: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}
.reco-btn {
  background: linear-gradient(135deg, rgba(235,244,232,.94), rgba(220,234,215,.92));
  border: 1px solid rgba(101,145,88,.22);
  color: #244226;
}
.reco-btn--ready {
  background: linear-gradient(135deg, rgba(110,219,101,.96), rgba(80,188,82,.94));
  border-color: rgba(55,146,57,.44);
  color: #fff;
  box-shadow: 0 10px 22px rgba(71, 154, 66, .24);
}
.reco-btn--order { width: 100%; justify-content: center; min-height: 38px; }

.cart-dock {
  position: fixed;
  right: 14px;
  bottom: calc(92px + var(--bottom-safe));
  z-index: 22;
}
.cart-dock.hidden { display: none; }
.cart-fab {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 23, 43, .95), rgba(10, 16, 29, .93));
  box-shadow: var(--shadow-1);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-fab__icon { width: 24px; height: 24px; display: inline-flex; }
.cart-fab__icon svg { width: 24px; height: 24px; }
.cart-fab__badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #5f9f45;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-fab__qty {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -18px;
  min-width: 46px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.sheet-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 14, .6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .2s ease;
}
.sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  max-height: min(82vh, 760px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 24, 44, .98), rgba(8, 13, 24, .98));
  box-shadow: var(--shadow-1);
  transform: translateY(24px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}
.sheet-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}
.sheet-overlay.open { pointer-events: auto; }
.sheet-overlay.open .sheet-backdrop { opacity: 1; }
.sheet-overlay.open .sheet { transform: translateY(0); opacity: 1; }
.sheet__head { padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.sheet__body { min-height: 0; overflow: auto; padding: 16px; display: grid; gap: 14px; }
.sheet__foot { padding: 14px 16px calc(14px + var(--bottom-safe)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sheet-overlay--fullscreen {
  inset: 0;
}
.sheet--fullscreen {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
}
.sheet__head--fullscreen {
  position: sticky;
  top: 0;
  z-index: 2;
  background: inherit;
}
.sheet__body--fullscreen {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: 22px;
}

.handle {
  width: 46px;
  height: 5px;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  margin: 8px auto 2px;
}

.kv-list { display: grid; gap: 10px; }
.kv {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.kv__label { color: var(--muted); font-size: 13px; }
.kv__value { text-align: right; font-size: 14px; font-weight: 700; }

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(96,126,86,.12);
}
.cart-line:last-child { border-bottom: 0; }
.cart-line__main { min-width: 0; flex: 1; }

.timeline { display: grid; gap: 10px; }
.timeline-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.history-sheet-body {
  display: grid;
  gap: 12px;
}

.history-group {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246, 251, 247, .96));
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.history-group__head {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.history-group__title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.history-group__emoji {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(123, 208, 108, .14);
  font-size: 18px;
  flex: 0 0 auto;
}

.history-group__title {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.history-group__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.history-group__arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform .18s ease;
}

.history-group__body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  align-content: start;
  scroll-margin-top: 14px;
}

.history-group.is-collapsed .history-group__body {
  display: none;
}

.history-group.is-collapsed .history-group__arrow {
  transform: rotate(-90deg);
}

.history-order-card {
  background: rgba(255,255,255,.84);
}

.history-order-card__comment {
  margin-top: 10px;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.weekday {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-bottom: 4px;
}
.day-cell-wrap { min-width: 0; }
.day-cell {
  min-height: 84px;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.68);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.day-cell.today { border-color: rgba(91,140,255,.4); box-shadow: inset 0 0 0 1px rgba(91,140,255,.12); }
.day-cell.working { background: linear-gradient(180deg, rgba(209,238,204,.74), rgba(242,250,238,.96)); }
.day-cell.offday { background: rgba(255,255,255,.56); }
.day-num { font-size: 13px; font-weight: 800; }
.day-meta { font-size: 11px; color: var(--muted); line-height: 1.2; word-break: break-word; }
.day-shift-pill { display: inline-flex; align-self: flex-start; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: rgba(82, 150, 69, .16); color: #24451d; font-size: 10px; font-weight: 800; white-space: normal; line-height: 1.2; }
.day-off-label { font-size: 11px; color: var(--muted); }

.empty-state {
  padding: 26px 18px;
  text-align: center;
  border-radius: 24px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.setup-screen {
  max-width: 560px;
  margin: 0 auto;
  padding-top: 8vh;
}
.setup-card {
  padding: 24px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 27, 50, .96), rgba(10, 17, 33, .92));
  box-shadow: var(--shadow-1);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 8, 16, .56);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
}
.loading-overlay.hidden { display: none; }
.loading-card {
  width: min(88vw, 320px);
  padding: 24px;
  border-radius: 28px;
  text-align: center;
}
.spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--accent);
  margin: 0 auto 14px;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-root {
  position: fixed;
  left: 14px;
  right: 14px;
  top: calc(var(--top-safe) + 92px);
  z-index: 45;
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(142, 181, 117, .26);
  background: linear-gradient(180deg, rgba(248,255,244,.98), rgba(239,248,233,.96));
  box-shadow: 0 16px 34px rgba(40, 56, 36, .14);
}
.toast.success { border-color: rgba(76, 176, 115, .34); }
.toast.error { border-color: rgba(226, 110, 122, .32); background: linear-gradient(180deg, rgba(255,248,248,.98), rgba(253,238,240,.96)); }
.toast__title { font-size: 13px; font-weight: 800; color: #173222; }
.toast__text { margin-top: 4px; color: #516658; font-size: 12px; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 170px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.qr-box img { max-width: 100%; max-height: 180px; display: block; }
.qr-fallback {
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.list-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(245,249,241,.92));
  box-shadow: 0 10px 24px rgba(50,76,46,.06);
  cursor: pointer;
}
.list-tile__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(91,140,255,.22), rgba(122,92,255,.18));
  display: flex;
  align-items: center;
  justify-content: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .grid.two,
  .quick-actions { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 8px 10px; }
  .product-media { width: 56px; height: 56px; border-radius: 14px; }
  .supplier-card { max-height: none; }
  .supplier-card__head { position: static; padding: 12px 14px; }
  .supplier-card__body { overflow: visible; padding: 10px 12px 14px; }
  .screen.with-cart-dock { padding-bottom: 124px; }
}

@media (max-width: 560px) {
  .topbar__title.compact .topbar__name { font-size: 15px; }
  .topbar__title.compact .topbar__meta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90vw; }
  .calendar-grid { gap: 4px; }
  .weekday { font-size: 9px; letter-spacing: .02em; }
  .day-cell { min-height: 68px; padding: 6px 4px; gap: 4px; border-radius: 14px; }
  .day-num { font-size: 12px; }
  .day-shift-pill { display: block; width: 100%; padding: 2px 6px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .day-meta, .day-off-label { font-size: 10px; }
  .product-name { font-size: 14px; }
  .product-sub { font-size: 11px; }
  .product-tags { gap: 6px; margin-top: 8px; }
  .product-actions--compact { gap: 4px; }
  .qty-box--tight { padding: 3px; gap: 3px; }
  .qty-box--tight .qty-btn { width: 26px; height: 26px; }
  .qty-box--tight .qty-input { width: 42px; font-size: 12px; }
  .reco-btn--compact { min-width: 58px; padding: 7px 8px; font-size: 11px; }
  .chip, .badge { max-width: 100%; }
  .store-pill { max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cart-dock { right: 12px; bottom: calc(82px + var(--bottom-safe)); }
  .cart-fab { width: 56px; height: 56px; }
}

@media (min-width: 920px) {
  .screen {
    padding-left: max(24px, calc((100vw - 980px) / 2));
    padding-right: max(24px, calc((100vw - 980px) / 2));
  }
  .topbar {
    margin-left: max(24px, calc((100vw - 980px) / 2));
    margin-right: max(24px, calc((100vw - 980px) / 2));
  }
  .bottom-nav {
    left: max(24px, calc((100vw - 980px) / 2));
    right: max(24px, calc((100vw - 980px) / 2));
  }
  .cart-dock {
    left: auto;
    right: max(24px, calc((100vw - 980px) / 2));
  }
}


html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body.keyboard-open .bottom-nav { transform: translateY(140%); opacity: 0; pointer-events: none; }
.app-shell.auth-mode { grid-template-rows: auto 1fr; }
.setup-screen { min-height: 100%; display: grid; place-items: center; padding-top: 24px; }
.setup-card { width: min(560px, 100%); }
.auth-code-preview { color: var(--amber); font-weight: 800; letter-spacing: .08em; }
.auth-grid { display: grid; gap: 12px; }
.auth-hint { color: var(--muted); font-size: 12px; line-height: 1.45; }
.debug-box { border: 1px dashed var(--line-strong); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.03); }
.supplier-card__head { cursor: pointer; }
.btn[disabled], .nav-btn[disabled], .action-tile[disabled] { opacity: .55; pointer-events: none; }
.product-media img { display:block; width:100%; height:100%; object-fit:cover; }


.director-entry-link { position: fixed; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 60; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(18, 27, 51, .92), rgba(10, 17, 33, .88)); box-shadow: 0 10px 24px rgba(0,0,0,.24); color: #f7f9ff; text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.director-entry-link.hidden { display: none !important; }


.detail-box{border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;background:rgba(255,255,255,.03)}
.detail-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:12px}
.detail-row{font-size:13px;line-height:1.45;padding:8px 0;border-bottom:1px dashed rgba(255,255,255,.08)}
.empty-state.compact{padding:10px 12px;font-size:13px}
.timeline-item--clickable{cursor:pointer}

.store-strip.compact { gap: 8px; flex-wrap: wrap; overflow: visible; }
.store-pill { border:1px solid var(--line); background: rgba(255,255,255,.7); color: var(--text); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
.store-pill.active { background: linear-gradient(135deg, rgba(118,166,95,.18), rgba(154,186,115,.18)); border-color: rgba(118,166,95,.35); }
.control-wrap { align-items: center; gap: 10px; }
.revision-card { grid-template-columns: 1fr; }
.revision-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px; align-items:center; }
.qty-box.compact .qty-input { width: 64px; }
.qty-btn.zero { font-size: 14px; width: 38px; }
.day-cell { min-height: 92px; background: rgba(255,255,255,.68); }
.day-cell.today { border-color: rgba(118,166,95,.4); background: rgba(118,166,95,.12); }
.weekday { color: var(--muted-2); }
.cart-fab { cursor:pointer; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,247,237,.96)); color: var(--text); }
.card, .panel, .hero, .section, .supplier-card, .sheet { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(245,249,241,.94)); }
.quick-actions { display:none; }

.scope-strip--cards { scroll-snap-type: x proximity; }
.scope-chip--summary { min-width: 220px; scroll-snap-align: start; }
.scope-chip__meta { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.product-card { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
.product-media { width: 64px; height: 64px; border-radius: 16px; }
.product-actions--compact { gap: 6px; align-items: center; }
.qty-box--tight { padding: 4px; gap: 4px; }
.qty-box--tight .qty-btn { width: 30px; height: 30px; border-radius: 10px; }
.qty-box--tight .qty-input { width: 54px; font-size: 13px; }
.reco-btn--compact { flex: 1 1 auto; min-width: 0; padding: 10px 12px; color: inherit; font-size: 12px; text-align: center; white-space: normal; overflow: visible; text-overflow: unset; line-height: 1.25; min-height: 42px; }
.revision-card { padding: 10px 12px; }
.revision-actions--compact { gap: 8px; align-items: center; }
.topbar__title.compact .topbar__name { font-size: 16px; }
.topbar__title.compact .topbar__meta { margin-top: 1px; }
.topbar__eyebrow { display:none; }
.search, .input, .select, .textarea { background: rgba(255,255,255,.88); color: var(--text); }
.card, .panel, .hero, .section, .supplier-card, .sheet, .list-tile, .timeline-item, .empty-state, .qr-box, .setup-card, .toast { color: var(--text); }
.store-strip.compact { gap: 8px; overflow: auto; flex-wrap: nowrap; }
.store-pill { background: rgba(255,255,255,.9); }

.qty-box--tight .qty-btn { width: 28px; height: 28px; }
.qty-box--tight .qty-input { width: 46px; }
.reco-btn--compact { justify-content: center; }
.reco-btn.is-disabled{opacity:.82;background:rgba(241,228,192,.72);border-color:rgba(177,138,58,.22);color:rgba(74,61,28,.86);box-shadow:none}
.reco-btn.is-disabled:hover{transform:none}

.screen.with-cart-dock { padding-bottom: 124px; }

.product-footnote { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.is-busy, .btn.is-busy, .qty-btn.is-busy { opacity: .7; pointer-events: none; }

.screen,
.screen > .stack,
.screen .panel,
.screen .supplier-card,
.screen .product-card,
.revision-card,
.revision-card .product-head,
.revision-supplier-toolbar,
.revision-supplier-footer-actions,
.revision-product-tags,
.revision-actions,
.revision-qty-box,
.revision-scope-row,
.revision-scope-list {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.revision-toolbar-hint {
  border-radius: 16px;
}

.revision-toolbar-hint--button {
  appearance: none;
  border: 1px solid rgba(222, 98, 112, .26);
  background: rgba(255, 242, 244, .96);
  color: #b83342;
  cursor: pointer;
  text-align: left;
  width: 100%;
  justify-content: flex-start;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.revision-toolbar-hint--button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(184, 51, 66, .10);
}

.revision-toolbar-hint--button:active {
  transform: scale(.99);
}

.revision-toolbar-hint--button::after {
  content: '↘';
  margin-left: auto;
  font-size: 13px;
}

.revision-card .product-sub,
.revision-finish-all-hint,
.history-group__meta,
.history-order-card__comment {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.chip--danger { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.34); color: #fecaca; }
.product-media { cursor: pointer; }
.supplier-card.collapsed .supplier-card__body { display: none; }
.day-cell.expanded { min-height: 110px; }


.auth-subtitle { color: rgba(255,255,255,.88); }
.auth-hint { color: rgba(255,255,255,.72); }
.auth-pill { display:inline-flex; align-items:center; min-height:32px; padding:0 12px; border-radius:999px; background:rgba(255,255,255,.12); color:#fff; font-size:12px; font-weight:700; }
.auth-card .input { color: var(--text); }


.topbar.hidden,
.bottom-nav.hidden { display: none !important; }
body.auth-screen-open {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(159, 196, 122, 0.26), transparent 34%),
    radial-gradient(circle at top right, rgba(109, 140, 255, 0.10), transparent 28%),
    linear-gradient(180deg, #eff6eb 0%, #e8f1e1 100%);
}
body.auth-screen-open .screen {
  padding: max(18px, calc(var(--top-safe) + 10px)) 14px 18px;
}
body.auth-screen-open .director-entry-link {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
  box-shadow: 0 12px 28px rgba(14, 24, 48, 0.22);
}
.setup-screen--auth {
  align-content: center;
  min-height: calc(100vh - var(--top-safe) - var(--bottom-safe));
  animation: authFadeIn .38s ease;
}
.setup-card.auth-card {
  position: relative;
  overflow: hidden;
  max-width: 460px;
  padding: 24px;
  border-radius: 32px;
  border: 1px solid rgba(110, 218, 180, 0.18);
  background:
    radial-gradient(circle at top right, rgba(135, 182, 98, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(18, 30, 56, 0.98), rgba(10, 17, 33, 0.96));
  box-shadow: 0 28px 60px rgba(20, 30, 46, 0.26);
}
.auth-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(24px);
  pointer-events: none;
  opacity: .9;
}
.auth-orb--one {
  width: 180px;
  height: 180px;
  right: -52px;
  top: -48px;
  background: radial-gradient(circle, rgba(111, 178, 93, 0.34), rgba(111, 178, 93, 0.02) 70%);
}
.auth-orb--two {
  width: 150px;
  height: 150px;
  left: -56px;
  bottom: -70px;
  background: radial-gradient(circle, rgba(94, 136, 255, 0.20), rgba(94, 136, 255, 0.03) 72%);
}
.auth-hero,
.auth-grid { position: relative; z-index: 1; }
.auth-hero {
  display: grid;
  gap: 12px;
}
.auth-hero__top {
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}
.auth-status-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.auth-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 204, 146, 0.30);
  background: rgba(11, 18, 34, 0.72);
  color: #f2fbf0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  backdrop-filter: blur(10px);
}
.auth-status-badge--highlight {
  background: linear-gradient(180deg, rgba(26, 45, 34, 0.92), rgba(12, 24, 18, 0.88));
  border-color: rgba(112, 198, 132, 0.42);
  color: #eaf8ea;
}
.auth-title {
  color: #eef7ec;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.auth-subtitle {
  color: rgba(236, 243, 247, 0.94);
  font-size: 15px;
  line-height: 1.52;
  max-width: 34ch;
}
.auth-badges {
  gap: 8px;
}
.auth-pill {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.06);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.auth-pill--accent {
  background: rgba(118, 166, 95, 0.18);
  border-color: rgba(137, 210, 144, 0.24);
  color: #e8f7ea;
}
.auth-pill--user {
  background: rgba(255,255,255,.10);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-grid {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}
.field-block {
  display: grid;
  gap: 8px;
}
.field-label {
  color: rgba(230, 240, 238, 0.76);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.auth-card .input.auth-input {
  min-height: 56px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(250, 251, 252, 0.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 18px;
  padding: 0 18px;
}
.auth-card .input.auth-input:focus {
  outline: none;
  border-color: rgba(133, 199, 132, 0.62);
  box-shadow: 0 0 0 4px rgba(128, 201, 126, 0.15);
}
.auth-actions--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.btn.btn-lg {
  min-height: 52px;
  border-radius: 18px;
  font-size: 16px;
}
.auth-hint {
  color: rgba(236, 243, 247, 0.88);
  font-size: 13px;
  line-height: 1.55;
}
.loading-card {
  width: min(320px, calc(100vw - 40px));
  border-radius: 28px;
  padding: 26px 22px;
  background: linear-gradient(180deg, rgba(22, 32, 57, 0.94), rgba(15, 22, 42, 0.92));
  border: 1px solid rgba(133, 199, 132, 0.18);
  box-shadow: 0 26px 60px rgba(16, 25, 42, 0.26);
}
.loading-title {
  color: #edf5f0;
  font-weight: 800;
  margin-top: 12px;
}
.loading-subtitle {
  color: rgba(232, 240, 244, 0.76);
  line-height: 1.5;
}
.startup-splash {
  background:
    radial-gradient(circle at top center, rgba(131, 186, 95, 0.22), transparent 25%),
    linear-gradient(180deg, #f1f7ee 0%, #e8f1e1 100%);
}
.startup-splash__logo {
  box-shadow: 0 20px 44px rgba(28, 40, 60, 0.14);
}
.startup-splash__meta {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.startup-splash__line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 36, 69, 0.10);
}
.startup-splash__line--lg { width: 148px; }
.startup-splash__line--sm { width: 108px; justify-self: center; }
@media (min-width: 560px) {
  .auth-actions--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .setup-card.auth-card {
    padding: 22px 18px;
    border-radius: 28px;
  }
  .auth-title { font-size: 34px; }
  .auth-subtitle { font-size: 14px; }
}
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes authPulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: .88; }
  50% { transform: translateY(-2px) scale(1.08); opacity: 1; }
}


/* stage31 frontend master merge */
.screen {
  overscroll-behavior-x: none;
  touch-action: pan-y manipulation;
}

.story-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.story-strip::-webkit-scrollbar { display: none; }
.story-chip {
  appearance: none;
  min-width: 210px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,241,.96));
  box-shadow: var(--shadow-1);
  scroll-snap-align: start;
  cursor: pointer;
}
.story-chip--orders {
  background: linear-gradient(180deg, rgba(196,255,184,.98), rgba(236,251,230,.97));
  border-color: rgba(73, 163, 62, .34);
}
.story-chip--audits {
  background: linear-gradient(180deg, rgba(178,246,190,.99), rgba(231,251,235,.97));
  border-color: rgba(58, 164, 82, .34);
}

.card--audit-attention {
  background: linear-gradient(180deg, rgba(255, 229, 233, .99), rgba(255, 242, 244, .98));
  border-color: rgba(226, 91, 111, .34);
  box-shadow: 0 14px 32px rgba(214, 80, 96, .10);
}

.card--audit-active {
  background: linear-gradient(180deg, rgba(230, 255, 235, .99), rgba(241, 250, 243, .98));
  border-color: rgba(72, 170, 92, .28);
}
.story-chip__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.story-chip__title {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}
.story-chip__meta {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.home-hero {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,249,239,.96));
}

.metric--success {
  background: linear-gradient(180deg, rgba(216,255,229,.95), rgba(237,250,240,.95));
  border-color: rgba(61,214,155,.35);
}
.metric--danger {
  background: linear-gradient(180deg, rgba(255,238,240,.96), rgba(255,247,248,.96));
  border-color: rgba(255,109,122,.34);
}

.home-today-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(242,248,238,.96));
}
.home-today-panel__head {
  align-items: flex-start;
}
.today-supplier-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.today-supplier-strip::-webkit-scrollbar { display: none; }
.today-supplier-chip,
.today-history-chip {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 16px;
  min-width: 210px;
  text-align: left;
  color: var(--text);
  scroll-snap-align: start;
  cursor: pointer;
  box-shadow: var(--shadow-1);
}
.today-supplier-chip--required {
  background: linear-gradient(180deg, rgba(114, 218, 96, .98), rgba(232, 249, 226, .98));
  border-color: rgba(63, 155, 50, .42);
}
.today-supplier-chip--scheduled {
  background: linear-gradient(180deg, rgba(183, 241, 169, .98), rgba(240, 251, 236, .97));
  border-color: rgba(78, 165, 66, .30);
}
.today-supplier-chip--done {
  background: linear-gradient(180deg, rgba(247,248,250,.98), rgba(235,239,242,.96));
  border-color: rgba(134, 146, 160, .24);
}
.today-supplier-chip__title,
.today-history-chip__title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}
.today-supplier-chip__meta,
.today-history-chip__meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.today-history-chip {
  min-width: 170px;
  background: linear-gradient(180deg, rgba(245,246,255,.98), rgba(250,250,255,.96));
  border-color: rgba(122,160,255,.28);
}


.qr-card {
  background: linear-gradient(180deg, rgba(251,255,249,.98), rgba(241,248,236,.96));
  border-color: rgba(136, 181, 110, .24);
}
.qr-card__toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}
.qr-card__intro { min-width: 0; }
.qr-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(214,241,255,.96), rgba(232,247,255,.94));
  border: 1px solid rgba(87,212,255,.28);
  font-size: 12px;
  font-weight: 800;
  color: #28526b;
}
.qr-card__body { display:grid; gap:12px; }
.qr-card__code {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px dashed rgba(112,139,102,.28);
  background: rgba(255,255,255,.72);
  color: var(--text);
  font-size: 12px;
  word-break: break-all;
}
.qr-card__buttons { gap: 8px; }
.qr-box--home {
  min-height: 172px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(245,250,241,.9));
}
.qr-box--home img { max-height: 190px; }

.cart-summary-hero {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(122,160,255,.18);
  background: linear-gradient(180deg, rgba(246,248,255,.98), rgba(251,252,255,.96));
}
.cart-summary-hero__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.cart-summary-hero__value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}
.cart-summary-hero__hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.cart-summary-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.cart-summary-chips--compact {
  padding-top: 2px;
}
.cart-summary-chips::-webkit-scrollbar { display:none; }
.cart-summary-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(122,160,255,.24);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.supplier-card__head--cart { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; }
.supplier-card__head--cart .btn.small { white-space: nowrap; }
@media (max-width: 520px) {
  .supplier-card__head--cart { grid-template-columns: minmax(0,1fr); }
  .supplier-card__head-actions { justify-content:flex-start; }
}
.supplier-card__head-main { min-width: 0; }
.supplier-card__head-main .title-sm { word-break: break-word; }
.supplier-card__head-actions { display:flex; flex-wrap:nowrap; justify-content:flex-end; align-items:center; gap:8px; }
.supplier-card__body--cart { display: grid; gap: 12px; min-width: 0; }
.cart-route-card { padding: 12px; margin-bottom: 12px; overflow: hidden; }
.cart-route-card--simple { padding-top: 8px; }
.cart-route-card__head { align-items:flex-start; gap:10px; margin-bottom:10px; }
.cart-route-card__items { display:grid; gap: 4px; }
.cart-comment-box { gap: 8px; margin-top: 10px; }
.cart-comment-actions { justify-content: flex-end; }
.sheet__foot--cart {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,249,241,.96));
}
.cart-submit-note {
  color: var(--muted);
  font-weight: 700;
}
.cart-submit-actions { justify-content: space-between; }
.sheet--cart { background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,249,239,.98)); }
.sheet__body--cart { gap: 14px; }

.cart-groups {
  display: grid;
  gap: 14px;
}
.cart-sheet-card {
  scroll-margin-top: 80px;
  min-width: 0;
  overflow-x: clip;
}
.cart-summary-chip {
  appearance: none;
  cursor: pointer;
}
.cart-summary-chip:active {
  transform: scale(.98);
}
.sheet__body--cart {
  align-content: start;
}

.calendar-mobile { display: grid; gap: 8px; }
.calendar-mobile__weekdays,
.calendar-mobile__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day-cell--mobile {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 6px 4px;
  border-radius: 14px;
  gap: 4px;
}
.day-cell--mobile .day-num { font-size: 12px; }
.day-cell--mobile .day-meta,
.day-cell--mobile .day-off-label { font-size: 10px; }
.day-cell--mobile .day-shift-pill {
  width: 100%;
  justify-content: center;
  padding: 2px 4px;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-cell--mobile.expanded {
  min-height: 94px;
}
.day-cell--mobile.expanded .day-shift-pill {
  white-space: normal;
}

.orders-scope-panel .body-sm { max-width: 36ch; }
.orders-scope-panel { overflow: hidden; }
#orders-scope-section { min-width: 0; width: 100%; }
.scope-strip--cards { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.scope-chip__badges { overflow: hidden; }
.scope-chip__badges .badge { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scope-chip--summary {
  min-width: 148px;
  max-width: 188px;
  width: clamp(148px, 42vw, 188px);
  border-radius: 20px;
}
.supplier-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.product-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,249,242,.94));
}
.product-head { min-width: 0; }
.product-tags { gap: 6px; }
.product-actions--compact {
  flex-wrap: nowrap;
  align-items: center;
}
.product-actions--compact > * {
  flex: 0 0 auto;
}
.product-actions--compact .qty-box--stable {
  width: 100%;
}

.advances-hero {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(242,249,238,.96));
}
.advances-summary-grid .metric,
.advances-request-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,243,.96));
}
.action-tile--advance {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,249,241,.96));
  border: 1px solid var(--line);
}
.advances-metric--primary {
  background: linear-gradient(180deg, rgba(240,245,255,.98), rgba(247,249,255,.96));
  border-color: rgba(122,160,255,.28);
}
.advances-metric--success {
  background: linear-gradient(180deg, rgba(231,255,239,.98), rgba(245,252,247,.96));
  border-color: rgba(61,214,155,.28);
}
.advances-metric--warning {
  background: linear-gradient(180deg, rgba(255,247,224,.98), rgba(255,251,239,.96));
  border-color: rgba(255,188,88,.32);
}
.advances-metric--neutral {
  background: linear-gradient(180deg, rgba(247,247,251,.98), rgba(252,252,254,.96));
  border-color: rgba(171,179,200,.28);
}
.advance-timeline-item {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,244,.96));
}

.scope-strip--cards {
  padding-bottom: 4px;
}
.scope-chip--summary {
  min-width: 148px;
  max-width: 188px;
  width: clamp(148px, 42vw, 188px);
}


.payroll-card__toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.payroll-card__chevron {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(126, 164, 105, .28);
  background: rgba(241, 248, 236, .78);
  color: #274130;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
}
.payroll-card--collapsed {
  gap: 0;
}

.more-screen__tiles {
  gap: 12px;
}


/* === Touch-friendly qty controls === */
.qty-box,
.qty-box--tight,
.qty-box.compact {
  padding: 6px;
  gap: 6px;
  border-radius: 20px;
}

.qty-box--stable {
  gap: 8px;
}

.qty-box--order {
  max-width: 100%;
}

.qty-btn,
.qty-box--tight .qty-btn,
.qty-box.compact .qty-btn {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  font-size: 28px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform .08s ease, background .12s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.qty-btn.zero {
  width: 52px;
  min-width: 52px;
  font-size: 18px;
}

.qty-btn:active,
.qty-btn.is-pressed {
  transform: scale(.94);
  background: rgba(118,166,95,.24);
  box-shadow: 0 0 0 2px rgba(118,166,95,.16);
}

.reco-btn.is-pressed {
  transform: scale(.985);
  box-shadow: 0 0 0 2px rgba(118,166,95,.18), 0 10px 22px rgba(71, 154, 66, .24);
}

.qty-input,
.qty-box--tight .qty-input,
.qty-box.compact .qty-input {
  width: 84px;
  min-width: 84px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(96,126,86,.14);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  padding: 0 8px;
}

.qty-input:focus {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 4px rgba(118,166,95,.14);
}

@media (max-width: 760px) {
  .qty-btn,
  .qty-box--tight .qty-btn,
  .qty-box.compact .qty-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 26px;
  }

  .qty-btn.zero {
    width: 48px;
    min-width: 48px;
    font-size: 17px;
  }

  .qty-input,
  .qty-box--tight .qty-input,
  .qty-box.compact .qty-input {
    width: 76px;
    min-width: 76px;
    height: 48px;
    font-size: 20px;
  }
}


.audit-panel-head { gap: 14px; }

.audit-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.audit-head-actions .store-strip.compact {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: min(100%, 420px);
}

.audit-head-actions .store-pill {
  padding: 7px 11px;
  font-size: 12px;
}

.audit-stars-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-star-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  background: rgba(255,255,255,.96);
}

.audit-star-pill__icon {
  font-size: 18px;
  line-height: 1;
}

.audit-star-pill__value {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.audit-star-pill--gold {
  background: linear-gradient(180deg, rgba(255,244,185,.98), rgba(255,250,228,.98));
  border-color: rgba(215, 170, 34, .36);
}

.audit-star-pill--gold .audit-star-pill__icon {
  color: #d8a300;
}

.audit-star-pill--red {
  background: linear-gradient(180deg, rgba(255,220,220,.98), rgba(255,243,243,.98));
  border-color: rgba(220, 92, 92, .34);
}

.audit-star-pill--red .audit-star-pill__icon {
  color: #d74f4f;
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.audit-summary-chip {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
}

.audit-summary-chip__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.audit-summary-chip__value {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.audit-summary-chip--green {
  background: linear-gradient(180deg, rgba(221,255,226,.98), rgba(243,252,244,.97));
  border-color: rgba(72,170,92,.28);
}

.audit-summary-chip--emerald {
  background: linear-gradient(180deg, rgba(214,255,237,.98), rgba(240,252,247,.97));
  border-color: rgba(55,175,128,.28);
}

.audit-summary-chip--cyan {
  background: linear-gradient(180deg, rgba(227,248,255,.98), rgba(244,252,255,.97));
  border-color: rgba(87,212,255,.26);
}

.audit-summary-chip--red {
  background: linear-gradient(180deg, rgba(255,230,233,.98), rgba(255,244,245,.97));
  border-color: rgba(226,91,111,.26);
}

.audit-run-card--current {
  border: 1px solid rgba(58, 164, 82, .30);
  background: linear-gradient(180deg, rgba(228,255,231,.99), rgba(241,252,243,.97));
  box-shadow: 0 16px 32px rgba(61, 153, 82, .08);
}

.audit-run-card--rework {
  border: 1px solid rgba(223, 89, 89, .30);
  background: linear-gradient(180deg, rgba(255,232,235,.99), rgba(255,244,245,.98));
  box-shadow: 0 16px 34px rgba(213, 85, 104, .08);
}

.audit-run-card--accepted {
  border: 1px solid rgba(127, 140, 151, .20);
  background: linear-gradient(180deg, rgba(247,249,250,.98), rgba(243,246,247,.97));
}

.audit-run-card--submitted {
  border: 1px solid rgba(95, 166, 196, .20);
  background: linear-gradient(180deg, rgba(241,250,253,.98), rgba(245,251,253,.97));
}

.audit-run-footer {
  align-items: center;
}

.audit-run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.audit-run-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(16,24,40,.08);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.audit-item-card {
  border: 1px solid rgba(16,24,40,.08);
}

.audit-item-card--filled {
  background: linear-gradient(180deg, rgba(248,255,248,.98), rgba(240,250,240,.96));
}

.audit-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.audit-option-btn {
  appearance: none;
  border: 1px solid rgba(16,24,40,.12);
  background: rgba(255,255,255,.98);
  border-radius: 16px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.audit-option-btn.active {
  background: linear-gradient(180deg, rgba(195,255,183,.98), rgba(235,251,230,.97));
  border-color: rgba(73,163,62,.34);
}

.audit-photo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audit-photo-thumb {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(16,24,40,.08);
  min-height: 92px;
}

.audit-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 92px;
  object-fit: cover;
}

.audit-note {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(238,246,255,.95);
  border: 1px solid rgba(75, 121, 199, .16);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.audit-note--warning {
  background: rgba(255,248,226,.96);
  border-color: rgba(216, 162, 43, .24);
}

.audit-submit-bar {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

.audit-submit-bar .btn {
  min-width: 210px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}

.empty-state.compact {
  padding: 14px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .audit-option-grid {
    grid-template-columns: 1fr;
  }

  .audit-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-submit-bar .btn {
    width: 100%;
    min-width: 0;
  }
}

.revision-supplier-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.revision-step-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.revision-step-actions .qty-btn.small {
  min-width: 48px;
  height: 34px;
  font-size: 14px;
}

.revision-card--locked {
  opacity: .92;
}

.revision-card--locked .qty-box,
.revision-card--locked .revision-step-actions {
  filter: saturate(.8);
}

/* Revision UI hotfix 2026-03-25 */
.revision-card {
  grid-template-columns: 64px minmax(0, 1fr) !important;
  align-items: start;
}

.revision-card > .product-head {
  min-width: 0;
}

.revision-media {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  flex: 0 0 64px;
}

.revision-media .product-media__placeholder {
  width: 100%;
  height: 100%;
}

@media (max-width: 420px) {
  .revision-card {
    gap: 10px;
  }
}


/* revision UI polish 2026-03-25 */
.revision-card {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
}
.revision-card__topline {
  align-items: flex-start;
  gap: 10px;
}
.revision-product-tags {
  gap: 8px;
}
.revision-fill-badge {
  font-weight: 800;
}
.revision-stock-chip {
  font-weight: 700;
}
.revision-delta-badge {
  font-weight: 800;
  min-width: 68px;
  justify-content: center;
}
.revision-delta-badge--alert {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.48);
  color: #9a5b00;
}
.revision-delta-badge--pending {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.34);
  color: #b91c1c;
}
.revision-step-actions--boxed {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.revision-step-btn {
  min-width: 56px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(33, 66, 44, 0.14);
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  font-weight: 800;
}
.revision-step-btn--zero {
  min-width: 78px;
  background: linear-gradient(180deg, rgba(210,247,223,.98), rgba(181,237,201,.94));
  border-color: rgba(76, 175, 114, 0.34);
  color: #175c31;
}
.revision-qty-box {
  min-height: 58px;
  gap: 10px;
  padding: 6px;
}
.revision-qty-box .qty-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 30px;
  line-height: 1;
}
.revision-qty-box .qty-input {
  width: 92px;
  min-height: 44px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}
.revision-qty-box--empty {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(255, 245, 245, 0.88);
}
.qty-input--fact-empty {
  color: #b91c1c;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(239, 68, 68, 0.22);
}
.qty-input--fact-empty::placeholder {
  color: #dc2626;
  opacity: 1;
}
.revision-item-hint {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}
.revision-item-hint--danger {
  color: #b91c1c;
}
.revision-supplier-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.revision-toolbar-hint {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.20);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 420px) {
  .revision-step-btn { min-width: 52px; }
  .revision-step-btn--zero { min-width: 72px; }
  .revision-qty-box .qty-input { width: 82px; }
}


/* revision scope actions 2026-03-25 */
.revision-scope-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.revision-scope-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.revision-scope-chip {
  flex: 1 1 auto;
  max-width: none;
  width: auto;
}
.revision-scope-action {
  flex: 0 0 auto;
  min-width: 132px;
  border-radius: 18px;
}
.revision-supplier-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.revision-finish-all-btn {
  min-width: 220px;
}
.revision-finish-all-hint {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #7c8a76;
}
@media (max-width: 420px) {
  .revision-scope-row {
    flex-direction: column;
  }
  .revision-scope-action,
  .revision-finish-all-btn {
    width: 100%;
    min-width: 0;
  }
}


.invite-store-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.invite-store-pill { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:16px; border:1px solid rgba(148,163,184,.22); background:rgba(15,23,42,.42); cursor:pointer; }
.invite-store-pill input { accent-color:#22c55e; }
.invite-store-pill.active { border-color: rgba(56,189,248,.42); background: rgba(14,116,144,.18); }
.invite-store-stack { position:relative; z-index:1; }
.invite-store-hint { margin-bottom:4px; }
.unit-switcher{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.unit-switcher--ios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px;border-radius:16px;background:rgba(15,23,42,.82);border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.unit-switcher__btn{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:inherit;border-radius:999px;padding:6px 10px;font:inherit;cursor:pointer}
.unit-switcher--ios .unit-switcher__btn{display:flex;align-items:center;justify-content:center;min-height:42px;padding:10px 12px;border:none;border-radius:12px;background:transparent;color:rgba(226,232,240,.82);font-size:12px;font-weight:700;text-align:center;line-height:1.15;transition:background .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.unit-switcher__btn.is-active{border-color:rgba(56,189,248,.48);background:rgba(56,189,248,.12)}
.unit-switcher--ios .unit-switcher__btn.is-active{background:linear-gradient(180deg,rgba(34,197,94,.95),rgba(22,163,74,.92));color:#f8fafc;box-shadow:0 10px 24px rgba(22,163,74,.22)}
.unit-switcher__summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:-2px 0 10px}
.unit-switcher__selected{display:inline-flex;align-items:center;min-height:34px;padding:0 14px;border-radius:999px;border:1px solid rgba(52,211,153,.26);background:linear-gradient(180deg,rgba(242,252,245,.96),rgba(226,245,232,.94));color:#1d4f31;font-size:12px;font-weight:800;box-shadow:0 8px 18px rgba(67,160,87,.10)}
.chip--accent{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.24);color:#dcfce7}

.loans-hero {
  background: linear-gradient(160deg, rgba(34, 87, 72, 0.96), rgba(58, 128, 94, 0.96));
  color: #fff;
}
.loans-summary-grid .metric,
.loan-request-panel,
.loan-active-panel,
.loans-action-panel,
.loan-info-card {
  border: 1px solid rgba(76, 114, 87, 0.12);
}
.loans-metric--primary {
  background: linear-gradient(180deg, rgba(238, 248, 240, 0.96), rgba(228, 242, 232, 0.92));
}
.loans-metric--success {
  background: linear-gradient(180deg, rgba(235, 250, 242, 0.96), rgba(223, 244, 232, 0.92));
}
.loans-metric--warning {
  background: linear-gradient(180deg, rgba(255, 247, 230, 0.96), rgba(250, 239, 211, 0.92));
}
.loans-metric--neutral {
  background: linear-gradient(180deg, rgba(243, 247, 250, 0.96), rgba(234, 240, 244, 0.92));
}
.card--loan-home {
  background: linear-gradient(180deg, rgba(236, 249, 242, 0.96), rgba(226, 243, 234, 0.92));
  border: 1px solid rgba(66, 133, 95, 0.18);
}
.list-tile--loan {
  background: linear-gradient(180deg, rgba(242, 251, 245, 0.96), rgba(232, 245, 236, 0.92));
}
.loans-helper-banner {
  background: rgba(238, 246, 255, 0.9);
  border: 1px solid rgba(76, 114, 172, 0.18);
}
.loan-action-card {
  border: 1px solid rgba(76, 114, 87, 0.14);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,0.96);
}
.loan-action-card--disabled {
  opacity: 0.68;
}
.loans-actions-grid,
.loans-form-grid,
.loans-active-grid {
  align-items: stretch;
}
.loan-agreement-pill {
  justify-content: flex-start;
}
.loan-installment-item--inactive {
  opacity: 0.7;
}
.loan-request-item,
.loan-installment-item {
  border: 1px solid rgba(76, 114, 87, 0.1);
}
@media (max-width: 720px) {
  .loans-actions-grid,
  .loans-form-grid,
  .loans-active-grid {
    grid-template-columns: 1fr;
  }
}


.loans-hero__hint {
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}
.loan-readable-text,
.loan-info-card .body-sm,
.loan-info-card .body-xs,
.loans-helper-banner,
.loan-action-card .body-xs,
.timeline-item .body-xs {
  color: #24332b;
}
.loan-paid-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(76, 114, 87, 0.12);
  border-radius: 18px;
  background: rgba(244, 250, 245, 0.96);
}
.loan-paid-timeline {
  margin-top: 10px;
}
.loan-history-card--clickable {
  cursor: pointer;
}
.loan-history-card--clickable:hover {
  border-color: rgba(34, 139, 95, 0.22);
  box-shadow: 0 8px 20px rgba(34, 139, 95, 0.08);
}
.loan-preview-meta,
.loan-muted-secondary {
  color: #6f7d77;
}

.loan-request-item .badge.gray {
  background: rgba(120,120,120,0.14);
  color: #4b5563;
}


.orders-screen-shell,
.orders-toolbar-panel,
.orders-scope-panel,
#orders-suppliers-section {
  min-width: 0;
}

.orders-screen-shell {
  overflow-x: clip;
}

.orders-toolbar-panel {
  overflow: clip;
}

.orders-toolbar-panel--compact {
  gap: 12px;
}

.orders-toolbar-panel__top {
  align-items: center;
  gap: 10px;
}

.orders-toolbar-actions {
  gap: 8px;
  align-items: center;
}

.orders-toolbar-actions .btn {
  min-height: 38px;
}

.orders-scope-panel {
  overflow-x: clip;
}

.order-supplier-footer { display:grid; gap: 10px; margin-top: 8px; }
.order-supplier-footer__actions { align-items:center; }
.order-supplier-comment { display:grid; gap: 6px; }
.order-supplier-comment .textarea { min-height: 74px; }
.order-supplier-comment__hint, .cart-comment-note { color: var(--muted); font-size: 12px; }

scope-strip--cards {
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.scope-chip--done {
  background: linear-gradient(180deg, rgba(245, 247, 246, .96), rgba(233, 238, 236, .94));
  border-color: rgba(128, 145, 138, .24);
  color: #52645b;
}

.scope-chip--done .scope-chip__meta,
.scope-chip--done .scope-chip__title {
  color: #52645b;
}

.badge.silver {
  background: linear-gradient(180deg, rgba(247, 248, 250, .98), rgba(234, 238, 242, .96));
  color: #5b6672;
  border: 1px solid rgba(120, 135, 150, .24);
}

.supplier-next-note {
  margin-top: 8px;
}

.qty-input {
  width: 76px;
}

.qty-box--order .qty-input,
.supplier-card__body--cart .qty-input {
  width: 84px;
}

.sheet__body--cart {
  overflow-x: hidden;
}

.cart-sheet-card.is-collapsed .supplier-card__body--cart {
  display: none;
}

.cart-summary-chip.is-collapsed {
  opacity: .68;
}

@media (max-width: 760px) {
  .qty-input {
    width: 72px;
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .orders-toolbar-panel__top {
    align-items: stretch;
  }
  .orders-toolbar-panel__top .segmented,
  .orders-toolbar-actions {
    width: 100%;
  }
  .orders-toolbar-actions {
    justify-content: flex-start;
  }
  .unit-switcher__selected {
    width: 100%;
    justify-content: center;
  }
}

.home-payroll-metric {
  position: relative;
  overflow: hidden;
  border-width: 1px;
  box-shadow: 0 12px 28px rgba(40, 56, 36, .10);
}

.home-payroll-metric::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.home-payroll-metric .metric__label {
  font-weight: 800;
}

.home-payroll-metric .metric__value {
  margin-top: 8px;
}

.home-payroll-metric .metric__hint {
  margin-top: 8px;
  font-weight: 700;
}

.home-payroll-metric--previous {
  background: linear-gradient(180deg, rgba(243, 246, 252, .96), rgba(232, 238, 247, .94));
  border-color: rgba(125, 140, 155, .28);
}

.home-payroll-metric--previous::before {
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 55%);
}

.home-payroll-metric--previous .metric__label {
  color: #64707d;
}

.home-payroll-metric--previous .metric__value {
  color: #334155;
}

.home-payroll-metric--previous .metric__hint {
  color: #6b7280;
}

.home-payroll-metric--current {
  background: linear-gradient(180deg, rgba(232, 255, 236, .98), rgba(219, 247, 224, .95));
  border-color: rgba(76, 168, 107, .34);
  box-shadow: 0 14px 30px rgba(76, 168, 107, .14);
}

.home-payroll-metric--current::before {
  background: linear-gradient(135deg, rgba(255,255,255,.22), transparent 55%);
}

.home-payroll-metric--current .metric__label {
  color: #2f6b45;
}

.home-payroll-metric--current .metric__value {
  color: #1f5132;
}

.home-payroll-metric--current .metric__hint {
  color: #4f6f5a;
}

.cart-line--cart-sheet {
  display: block;
  padding: 10px 0;
}

.cart-line__main--stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cart-line__title {
  line-height: 1.25;
  word-break: break-word;
}

.cart-line__qty-wrap {
  width: fit-content;
  max-width: 100%;
}

.cart-line__meta {
  color: var(--muted);
  line-height: 1.35;
}

.sheet--cart,
.sheet__body--cart,
.cart-groups,
.supplier-card__body--cart,
.cart-route-card {
  min-width: 0;
}

@media (max-width: 760px) {
  .supplier-card__head--cart {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .supplier-card__head-actions {
    justify-content: flex-start;
  }

  .cart-route-card {
    padding: 10px;
  }

  .cart-submit-actions {
    width: 100%;
    gap: 10px;
  }

  .cart-submit-actions .btn {
    flex: 1 1 180px;
  }
}


.startup-splash {
  background:
    radial-gradient(circle at top center, rgba(131, 186, 95, 0.22), transparent 25%),
    linear-gradient(180deg, #f1f7ee 0%, #e8f1e1 100%);
}

.startup-splash__card {
  width: min(92vw, 420px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(108, 138, 94, .18);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,251,245,.84));
  box-shadow: 0 24px 60px rgba(28, 40, 60, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.startup-splash__gif {
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(108, 138, 94, .18);
  aspect-ratio: 1.25 / 1;
  background: rgba(232, 239, 226, .72);
}

.startup-splash__gif img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.startup-splash__text {
  display: grid;
  gap: 4px;
  text-align: center;
}

.startup-splash__greeting {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  color: #173121;
}

.startup-splash__name {
  font-size: 24px;
  line-height: 1.18;
  font-weight: 900;
  color: #102717;
}

.startup-splash__caption {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.sheet-overlay .sheet {
  max-height: min(88dvh, 820px);
  display: flex;
  flex-direction: column;
}

.history-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(24px + var(--bottom-safe));
}

.history-group {
  overflow: visible;
}

.history-group__body {
  display: block;
  overflow: visible;
  max-height: none;
}

.history-group.is-collapsed .history-group__body {
  display: none;
}

.history-order-card {
  overflow: visible;
  scroll-margin-top: 10px;
}
/* kitchen module */
.list-tile--kitchen .list-tile__icon { background: rgba(255,255,255,.16); }
.kitchen-screen { gap: 16px; }
.kitchen-hero { background: linear-gradient(135deg, rgba(48,93,64,.92), rgba(26,52,37,.86)); color: #fff; }
.kitchen-badges { gap: 8px; }
.kitchen-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.kitchen-card { border: 1px solid rgba(255,255,255,.08); box-shadow: 0 14px 30px rgba(10,26,18,.12); }
.kitchen-stock-list, .kitchen-transfer-list, .kitchen-receipt-list, .kitchen-history-list { display: grid; gap: 10px; }
.kitchen-stock-row, .kitchen-history-row, .kitchen-transfer-item-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.06); }
.kitchen-stock-row__qty, .kitchen-history-row__qty { font-weight: 700; white-space: nowrap; }
.kitchen-history-row__qty.plus { color: #76d3a0; }
.kitchen-history-row__qty.minus { color: #ffb0b0; }
.kitchen-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.kitchen-qty-card { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.kitchen-qty-input { max-width: 110px; }
.kitchen-production-controls { display: grid; grid-template-columns: minmax(180px, 1.6fr) 110px auto; gap: 10px; align-items: center; }
.kitchen-transfer-card { display: grid; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.kitchen-transfer-items { display: grid; gap: 8px; }
.kitchen-inline-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
@media (max-width: 720px) {
  .kitchen-production-controls { grid-template-columns: 1fr; }
}


.kitchen-employee-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.kitchen-home-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.kitchen-home-card { border:1px solid rgba(255,255,255,.08); border-radius:18px; padding:14px; background:rgba(255,255,255,.03); }
.kitchen-home-card__value { font-size:28px; font-weight:700; margin:6px 0; }
@media (max-width: 720px) { .kitchen-home-grid { grid-template-columns:1fr; } }


.setup-screen--invite {
  align-content: start;
  padding-bottom: calc(var(--bottom-safe) + 20px);
}

.invite-clean-screen {
  max-width: 560px;
  gap: 14px;
}

.invite-clean-screen .auth-subtitle {
  max-width: 100%;
}

.invite-clean-screen .auth-pill--user {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.invite-meta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invite-meta-card,
.invite-summary-card,
.invite-success-card {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(8, 14, 28, 0.64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  padding: 14px 16px;
}

.invite-meta-card__label {
  color: rgba(226, 232, 240, .68);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.invite-meta-card__value {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.invite-section-title {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.invite-summary-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.invite-selected-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-selected-pill {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.08);
}

.invite-success-card {
  background: linear-gradient(180deg, rgba(22, 101, 52, 0.24), rgba(8, 16, 30, 0.78));
  border-color: rgba(74, 222, 128, 0.22);
}

.invite-close-note {
  margin-top: 8px;
}

.invite-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.invite-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invite-store-pill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(7, 12, 24, 0.72);
  color: #f8fafc;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.invite-store-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.26);
}

.invite-store-pill input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  flex: 0 0 auto;
}

.invite-store-pill span {
  color: #eef6ff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.invite-store-pill.active {
  border-color: rgba(56,189,248,.46);
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.86), rgba(10, 21, 38, 0.78));
  box-shadow: 0 14px 28px rgba(8, 47, 73, 0.18);
}

@media (max-width: 640px) {
  .invite-meta-grid,
  .invite-store-grid {
    grid-template-columns: 1fr;
  }
}
