:root {
  color-scheme: light;
  --ink: #1e211d;
  --muted: #70756d;
  --faint: #9b9f98;
  --line: #e7e8e2;
  --surface: #ffffff;
  --canvas: #f5f6f2;
  --accent: #21623f;
  --accent-deep: #174a2e;
  --lime: #d9f441;
  --lime-soft: #eff8bb;
  --orange: #f19645;
  --blue: #5d83e7;
  --purple: #8d6adb;
  --red: #d85d59;
  --shadow: 0 18px 55px rgb(25 37 28 / 8%);
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

[hidden] { display: none !important; }

svg {
  display: block;
  width: 1.25em;
  height: 1.25em;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--lime);
  color: #1e371e;
}

.brand-mark svg { width: 23px; height: 23px; stroke-width: 1.9; }

.brand-mark--large { width: 52px; height: 52px; border-radius: 16px; }
.brand-mark--large svg { width: 30px; height: 30px; }

/* Neutral session check shown before either protected screen is revealed. */
.admin-boot,
.noscript-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 40%, rgb(217 244 65 / 12%), transparent 32%),
    var(--canvas);
}

.admin-boot__content,
.noscript-screen__content {
  width: min(100%, 360px);
  display: grid;
  justify-items: center;
  color: var(--ink);
  text-align: center;
}

.admin-boot__spinner {
  width: 34px;
  height: 34px;
  margin: 28px 0 20px;
  border: 3px solid #dfe2da;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: admin-boot-spin .8s linear infinite;
}

.admin-boot__content strong {
  font-size: 19px;
  letter-spacing: -.025em;
}

.admin-boot__content > span:last-child {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.noscript-screen { z-index: 1001; }
.noscript-screen__content h1 { margin: 28px 0 10px; font-size: 28px; letter-spacing: -.045em; }
.noscript-screen__content p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

@keyframes admin-boot-spin { to { transform: rotate(360deg); } }

/* Authentication */
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(480px, 1.08fr);
  background: var(--surface);
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 42px clamp(36px, 5vw, 78px) 64px;
  color: white;
  background:
    radial-gradient(circle at 88% 18%, rgb(217 244 65 / 22%), transparent 24%),
    linear-gradient(145deg, #0e3a24 0%, #185335 56%, #246542 100%);
}

.auth-visual__grain {
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 23px;
  font-weight: 830;
  letter-spacing: -.04em;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: auto 0 0;
}

.auth-copy .eyebrow { color: var(--lime); }

.auth-copy h1 {
  margin: 18px 0 24px;
  font-size: clamp(44px, 5vw, 78px);
  line-height: .98;
  letter-spacing: -.065em;
}

.auth-copy p {
  max-width: 510px;
  margin: 0;
  color: rgb(255 255 255 / 70%);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
}

.auth-orbit {
  position: absolute;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 999px;
  pointer-events: none;
}

.auth-orbit--one { width: 440px; height: 440px; top: -220px; right: -170px; }
.auth-orbit--two { width: 680px; height: 680px; top: -345px; right: -290px; }

.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #fbfbf8;
}

.auth-form { width: min(100%, 430px); }
.auth-form__mobile-brand { display: none; }

.auth-form h2 {
  margin: 13px 0 12px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.055em;
}

.auth-form__hint {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 720;
}

.credential-stack { display: grid; gap: 17px; }
.password-field { position: relative; }

.credential-input,
.password-field input {
  width: 100%;
  height: 55px;
  padding: 0 16px;
  border: 1px solid #d9dcd4;
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: border-color .18s, box-shadow .18s;
}

.password-field input { padding-right: 54px; }

.credential-input:focus,
.password-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(33 98 63 / 10%);
}

.credential-input::placeholder,
.password-field input::placeholder { color: #a5aaa1; }

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.icon-button--inside {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 43px;
  height: 43px;
  border-radius: 10px;
  color: var(--muted);
}

.icon-button--inside:hover { color: var(--ink); background: var(--canvas); }

.form-error {
  min-height: 28px;
  padding-top: 8px;
  color: #b43e3a;
  font-size: 13px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  color: white;
  background: var(--accent);
  font-weight: 750;
  transition: transform .15s, background .15s, opacity .15s;
}

.primary-button:hover { background: var(--accent-deep); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.primary-button svg { width: 19px; }

.primary-button--large { width: 100%; height: 55px; }

.auth-form__footnote {
  margin: 22px 0 0;
  color: var(--faint);
  text-align: center;
  font-size: 12px;
}

.auth-form__footnote code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--muted);
  background: #eeefe9;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 27px 18px 20px;
  color: #f6faf6;
  background: #173e29;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: white;
  text-decoration: none;
  font-size: 21px;
  font-weight: 820;
  letter-spacing: -.04em;
}

.sidebar__nav { display: grid; gap: 7px; margin-top: 42px; }

.nav-item {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  color: rgb(255 255 255 / 70%);
  background: transparent;
  font-weight: 690;
  text-align: left;
}

.nav-item svg { width: 21px; }

.nav-item--active { color: #17351f; background: var(--lime); }

.nav-item__badge {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 99px;
  color: white;
  background: var(--accent-deep);
  font-size: 11px;
  font-weight: 800;
}

.sidebar__footer { margin-top: auto; }

.logout-button {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  color: rgb(255 255 255 / 54%);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.logout-button:hover { color: white; background: rgb(255 255 255 / 7%); }
.logout-button svg { width: 18px; }

.workspace {
  min-width: 0;
  padding: 30px clamp(20px, 3vw, 44px) 38px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.topbar__date {
  min-height: 17px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  text-transform: capitalize;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -.055em;
}

.topbar__actions { display: flex; align-items: center; gap: 10px; }

.search-field {
  width: min(35vw, 390px);
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s;
}

.search-field:focus-within {
  border-color: #b8c9bc;
  box-shadow: 0 0 0 4px rgb(33 98 63 / 7%);
}

.search-field svg { flex: 0 0 auto; color: var(--muted); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-field input::placeholder { color: #a4a79f; }

.search-field__key {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--faint);
  background: #fafaf7;
  font-size: 9px;
  font-weight: 700;
}

.icon-button--surface {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface);
}

.icon-button--surface:hover { color: var(--accent); border-color: #cbd5cd; }
.icon-button--surface.is-loading svg { animation: spin .8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Pricing and order limits */
.settings-view {
  width: min(100%, 1320px);
  margin: 0 auto;
}

.settings-topbar { align-items: center; }

.settings-lead {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-layout {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.settings-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 35px rgb(26 40 30 / 3%);
}

.settings-card__heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.settings-card__heading--products { border-bottom: 0; padding-bottom: 17px; }

.settings-card__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: #edf4ed;
}

.settings-card__icon--lime { color: #21351f; background: var(--lime); }
.settings-card__icon svg { width: 21px; height: 21px; }
.settings-card__heading h2 { margin: 1px 0 5px; font-size: 18px; letter-spacing: -.035em; }
.settings-card__heading p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.settings-section {
  display: grid;
  grid-template-columns: minmax(190px, .38fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  padding: 23px 24px;
  border-bottom: 1px solid #eff0eb;
}

.settings-section__intro h3 { margin: 0 0 7px; font-size: 13px; letter-spacing: -.02em; }
.settings-section__intro p { max-width: 360px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.setting-grid { display: grid; gap: 13px; }
.setting-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.setting-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.setting-field {
  min-width: 0;
  display: block;
  padding: 15px;
  border: 1px solid #e5e7df;
  border-radius: 15px;
  background: #fbfcf9;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.setting-field:focus-within {
  border-color: #b8c9bc;
  background: white;
  box-shadow: 0 0 0 4px rgb(33 98 63 / 6%);
}

.setting-field--featured { max-width: 340px; border-color: #cddbcf; background: #f5f9f1; }
.setting-field__label { display: block; margin-bottom: 10px; font-size: 11px; font-weight: 780; }

.setting-field__control {
  height: 43px;
  display: flex;
  align-items: center;
  border: 1px solid #dfe2da;
  border-radius: 11px;
  background: white;
}

.setting-field__control input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 12px;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  font-weight: 740;
}

.setting-field__unit { padding: 0 12px 0 7px; color: var(--muted); font-size: 11px; font-weight: 720; white-space: nowrap; }
.setting-field small { display: block; min-height: 29px; margin-top: 9px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.settings-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 24px;
  background: #fafbf7;
}

.settings-savebar p { margin: 0; color: var(--muted); font-size: 10px; }
.settings-card.is-dirty .settings-savebar p { color: #8d641e; font-weight: 700; }
.settings-card.is-loading { opacity: .72; pointer-events: none; }

.settings-save-button { min-width: 236px; height: 44px; padding: 0 17px; }
.settings-save-button svg { width: 17px; }

.product-toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 24px 16px;
}

.product-search { width: min(100%, 550px); background: #fbfcf9; }

.availability-filter {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #fbfcf9;
  font-size: 10px;
  font-weight: 720;
}

.availability-filter select {
  height: 100%;
  min-width: 132px;
  padding: 0 34px 0 0;
  border: 0;
  outline: 0;
  appearance: none;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 720;
  cursor: pointer;
}

.availability-filter svg { position: absolute; right: 11px; width: 15px; pointer-events: none; }

.product-controls-meta {
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #fafbf7;
  font-size: 10px;
}

.admin-products { background: #f7f8f4; }

.admin-product {
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
  background: white;
  transition: background .18s, opacity .18s;
}

.admin-product:last-child { border-bottom: 0; }
.admin-product.is-dirty { background: #fffdf7; }
.admin-product.is-saving { opacity: .7; pointer-events: none; }

.admin-product__summary {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
}

.admin-product__image {
  width: 70px;
  height: 70px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #eff0ea;
  border-radius: 15px;
  background: white;
}

.admin-product__image img { width: 100%; height: 100%; object-fit: contain; }
.admin-product__image--empty { color: #a1a69e; background: #f3f5f0; }
.admin-product__image--empty svg { width: 27px; height: 27px; }

.admin-product__identity { min-width: 0; }
.admin-product__identity h3 { max-width: 760px; margin: 7px 0 4px; overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.admin-product__identity p { margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-product--unavailable .admin-product__image { opacity: .42; filter: grayscale(.7); }
.admin-product--unavailable .admin-product__identity h3,
.admin-product--unavailable .admin-product__identity p { opacity: .5; }

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2f7655;
  font-size: 9px;
  font-weight: 780;
}

.availability-badge > span { width: 6px; height: 6px; border-radius: 50%; background: #44a877; }
.availability-badge--off { color: #a35651; }
.availability-badge--off > span { background: #d76961; }

.admin-product__prices {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 25px;
  padding-left: 16px;
  text-align: right;
}

.admin-product__prices span { color: var(--muted); font-size: 9px; }
.admin-product__prices strong { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; letter-spacing: -.02em; }
.admin-product__prices span:last-child strong { color: var(--accent); }

.admin-product__rules {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) auto;
  align-items: end;
  gap: 13px;
  margin: 14px 0 0 85px;
  padding: 13px;
  border-radius: 15px;
  background: #f7f8f4;
}

.product-rule-field > span:first-child { display: block; margin-bottom: 7px; color: #575d55; font-size: 10px; font-weight: 750; }
.product-rule-field__control {
  height: 39px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dde0d8;
  border-radius: 10px;
  background: white;
}

.product-rule-field__control:focus-within { border-color: #aebfb1; box-shadow: 0 0 0 3px rgb(33 98 63 / 6%); }
.product-rule-field__control input { min-width: 0; height: 100%; flex: 1; padding: 0 11px; border: 0; outline: 0; background: transparent; font-size: 12px; font-weight: 720; }
.product-rule-field__control input::placeholder { color: #a0a59d; font-weight: 560; }
.product-rule-field__control > span { padding: 0 11px 0 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.product-rule-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; line-height: 1.35; }

.admin-product__actions { display: flex; align-items: center; gap: 8px; padding-bottom: 14px; }

.product-reset-button,
.secondary-button {
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #d9ddd5;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  background: white;
  font-size: 9px;
  font-weight: 750;
}

.product-reset-button:hover,
.secondary-button:hover { border-color: #bdc7bc; color: var(--accent); }
.product-reset-button:disabled { opacity: .4; cursor: default; }
.product-reset-button svg { width: 14px; }

.product-save-button { height: 39px; min-width: 96px; padding: 0 14px; font-size: 10px; }
.product-save-button:disabled { cursor: default; opacity: .42; }

.products-load-more { padding: 16px 24px; border-top: 1px solid var(--line); text-align: center; background: #fafbf7; }
.products-load-more .secondary-button { min-width: 190px; }

.product-controls-empty {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px;
  color: var(--muted);
  text-align: center;
}

.product-controls-empty svg { width: 34px; height: 34px; margin-bottom: 13px; color: #adb3aa; }
.product-controls-empty strong { color: var(--ink); font-size: 13px; }
.product-controls-empty span { margin-top: 6px; font-size: 10px; }
.product-controls-empty--error svg { color: var(--red); }

.admin-product--skeleton { min-height: 105px; }
.admin-product--skeleton .admin-product__summary { grid-template-columns: 70px minmax(0, 1fr); }
.product-skeleton-image { width: 70px; height: 70px; border-radius: 15px; background: #eff0eb; }

.filter-row {
  display: flex;
  gap: 8px;
  margin: 26px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
  color: var(--muted);
  background: rgb(255 255 255 / 65%);
  font-size: 12px;
  font-weight: 680;
}

.filter-chip:hover { border-color: #cdd1c9; color: var(--ink); }
.filter-chip--active { border-color: var(--ink); color: white; background: var(--ink); }

.filter-chip__count {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 99px;
  color: var(--muted);
  background: #eceee7;
  font-size: 9px;
  font-weight: 820;
}

.filter-chip--active .filter-chip__count { color: var(--ink); background: var(--lime); }

.orders-layout {
  height: calc(100vh - 160px);
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(330px, 390px) minmax(500px, 1fr);
  gap: 14px;
}

.order-list-panel,
.order-detail {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 35px rgb(26 40 30 / 3%);
}

.order-list-panel { display: flex; flex-direction: column; overflow: hidden; }

.panel-heading {
  min-height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.025em; }
.panel-heading > div > span { color: var(--muted); font-size: 11px; }

.view-switch {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--accent);
  background: #edf2ec;
}

.view-switch svg { width: 16px; }

.order-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-color: #d9dcd5 transparent;
  scrollbar-width: thin;
}

.order-card {
  width: 100%;
  display: block;
  padding: 17px 18px;
  border: 0;
  border-bottom: 1px solid #efefe9;
  cursor: pointer;
  color: inherit;
  background: white;
  text-align: left;
  transition: background .15s;
}

.order-card:last-child { border-bottom: 0; }
.order-card:hover { background: #fafbf7; }
.order-card--active { background: #f2f6ed; box-shadow: inset 3px 0 0 var(--accent); }
.order-card--active:hover { background: #f2f6ed; }

.order-card__top,
.order-card__customer,
.order-card__bottom { display: flex; align-items: center; }

.order-card__top { justify-content: space-between; gap: 10px; }

.order-card__id { font-size: 12px; font-weight: 830; letter-spacing: .015em; }
.order-card__time { color: var(--faint); font-size: 10px; white-space: nowrap; }

.order-card__customer { justify-content: space-between; gap: 12px; margin-top: 13px; }

.order-card__customer-main { min-width: 0; }
.order-card__customer-main strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.order-card__customer-main span { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.status-badge {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .02em;
  white-space: nowrap;
}

.status-badge::before { width: 5px; height: 5px; content: ""; border-radius: 50%; background: currentColor; }
.status--new { color: #825300; background: #fff0c8; }
.status--confirmed { color: #2c5fae; background: #e5efff; }
.status--collecting { color: #70509d; background: #f0e8fb; }
.status--ready { color: #24715a; background: #dff4eb; }
.status--delivering { color: #9a4c1b; background: #ffeadc; }
.status--done { color: #4d6756; background: #e9f0eb; }
.status--cancelled { color: #9c4541; background: #fbe7e6; }

.image-stack { display: flex; flex: 0 0 auto; padding-left: 8px; }

.image-stack__item {
  width: 29px;
  height: 29px;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-left: -8px;
  border: 2px solid white;
  border-radius: 9px;
  color: #a5aaa1;
  background: #f0f1ec;
  font-size: 10px;
  font-weight: 800;
}

.image-stack__item img { width: 100%; height: 100%; object-fit: contain; background: white; }

.order-card__bottom { justify-content: space-between; gap: 12px; margin-top: 14px; }
.order-card__bottom span { color: var(--muted); font-size: 10px; }
.order-card__bottom strong { font-size: 14px; letter-spacing: -.02em; }

.order-list-more {
  display: grid;
  gap: 7px;
  padding: 14px 18px 18px;
  border-top: 1px solid #efefe9;
  background: #fafbf7;
  text-align: center;
}

.order-list-more__button {
  height: 40px;
  border: 1px solid #d7dcd3;
  border-radius: 11px;
  cursor: pointer;
  color: var(--accent-deep);
  background: white;
  font-size: 11px;
  font-weight: 780;
}

.order-list-more__button:hover { border-color: #bfc8bd; background: #f5f8f1; }
.order-list-more__button:disabled { cursor: wait; opacity: .6; }
.order-list-more span { color: var(--muted); font-size: 9px; }

.order-list-message {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 36px 24px;
  color: var(--muted);
  text-align: center;
}

.order-list-message__inner { max-width: 240px; }
.order-list-message svg { width: 36px; height: 36px; margin: 0 auto 14px; color: #b7bcb4; }
.order-list-message strong { display: block; color: var(--ink); font-size: 14px; }
.order-list-message span { display: block; margin-top: 6px; font-size: 11px; line-height: 1.45; }

.skeleton-card { padding: 18px; border-bottom: 1px solid #efefe9; }
.skeleton-line { height: 10px; border-radius: 8px; background: linear-gradient(90deg, #eff0eb 25%, #f8f8f5 45%, #eff0eb 65%); background-size: 300% 100%; animation: shimmer 1.3s infinite; }
.skeleton-line + .skeleton-line { margin-top: 13px; }
.skeleton-line--short { width: 42%; }
.skeleton-line--medium { width: 67%; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* Order detail */
.order-detail { position: relative; overflow-y: auto; scrollbar-color: #d9dcd5 transparent; scrollbar-width: thin; }

.detail-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.detail-empty__art {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  color: var(--accent);
  background: #eef4ec;
  transform: rotate(-3deg);
}

.detail-empty__art svg { width: 49px; height: 49px; stroke-width: 1.5; }
.detail-empty h2 { margin: 22px 0 7px; color: var(--ink); font-size: 20px; letter-spacing: -.035em; }
.detail-empty p { max-width: 330px; margin: 0; font-size: 13px; line-height: 1.55; }

.detail-loading { padding: 24px; }
.detail-loading .skeleton-line { height: 12px; margin-bottom: 18px; }
.detail-loading__block { height: 150px; margin: 26px 0; border-radius: 18px; background: linear-gradient(90deg, #eff0eb 25%, #f8f8f5 45%, #eff0eb 65%); background-size: 300% 100%; animation: shimmer 1.3s infinite; }

.detail-head {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 25px 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.detail-head__back { display: none; }

.detail-head__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.detail-head h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.detail-head__meta { margin: 6px 0 0; color: var(--muted); font-size: 11px; }

.status-control { position: relative; flex: 0 0 auto; }
.status-control select {
  height: 39px;
  min-width: 174px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  appearance: none;
  color: var(--ink);
  background: #f8f9f5;
  font-size: 11px;
  font-weight: 720;
  cursor: pointer;
}

.status-control svg {
  position: absolute;
  top: 12px;
  right: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.detail-body { padding: 20px 25px 28px; }

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

.info-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #eaebe5;
  border-radius: var(--radius-md);
  background: #fbfcf9;
}

.info-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--muted); }
.info-card__head svg { width: 16px; }
.info-card__head span { font-size: 10px; font-weight: 790; letter-spacing: .08em; text-transform: uppercase; }
.info-card__primary { display: block; overflow-wrap: anywhere; font-size: 14px; font-weight: 750; line-height: 1.35; }
.info-card__secondary { display: block; margin-top: 5px; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.4; }
.info-card__secondary a { color: var(--accent); font-weight: 700; text-decoration: none; }
.info-card__secondary a:hover { text-decoration: underline; }

.detail-section { margin-top: 25px; }

.detail-section__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.detail-section__heading h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.detail-section__heading span { color: var(--muted); font-size: 10px; }

.comment-box {
  margin-top: 11px;
  padding: 14px 16px;
  border-left: 3px solid var(--lime);
  border-radius: 0 13px 13px 0;
  color: #565c54;
  background: #f6f8ef;
  font-size: 12px;
  line-height: 1.5;
}

.comment-box strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }

.product-list { border: 1px solid #eaebe5; border-radius: var(--radius-md); overflow: hidden; }

.product-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-bottom: 1px solid #eff0eb;
}

.product-row:last-child { border-bottom: 0; }

.product-row__image {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  color: #a1a69e;
  background: #f5f6f1;
}

.product-row__image img { width: 100%; height: 100%; object-fit: contain; background: white; }
.product-row__image svg { width: 23px; height: 23px; }

.product-row__body { min-width: 0; }
.product-row__body strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-row__meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.product-row__price { padding-left: 10px; text-align: right; white-space: nowrap; }
.product-row__price strong { display: block; font-size: 13px; }
.product-row__price span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .68fr);
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  color: #f5faf6;
  background: #173e29;
}

.payment-state { display: flex; align-items: flex-start; gap: 11px; }
.payment-state__icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #19341f; background: var(--lime); }
.payment-state__icon svg { width: 18px; }
.payment-state strong { display: block; font-size: 12px; }
.payment-state span { display: block; margin-top: 4px; color: rgb(255 255 255 / 55%); font-size: 10px; line-height: 1.4; }

.summary-lines { display: grid; gap: 8px; }
.summary-line { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; color: rgb(255 255 255 / 64%); font-size: 10px; }
.summary-line strong { color: white; font-size: 11px; }
.summary-line--total { margin-top: 2px; padding-top: 11px; border-top: 1px solid rgb(255 255 255 / 12%); color: white; font-size: 12px; font-weight: 700; }
.summary-line--total strong { color: var(--lime); font-size: 20px; letter-spacing: -.035em; }

.history { display: flex; flex-wrap: wrap; gap: 7px; }

.history-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--muted);
  background: #f1f3ee;
  font-size: 9px;
}

.history-item__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 390px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 13px;
  color: white;
  background: #20251f;
  box-shadow: 0 14px 40px rgb(0 0 0 / 20%);
  font-size: 12px;
  font-weight: 650;
  animation: toast-in .22s ease-out;
}

.toast--error { background: #963f3c; }
.toast svg { width: 17px; flex: 0 0 auto; color: var(--lime); }
.toast--error svg { color: white; }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1100px) {
  .app { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .sidebar__brand { justify-content: center; padding: 0; }
  .sidebar__brand > span:last-child,
  .nav-item > span:not(.nav-item__badge),
  .logout-button span { display: none; }
  .sidebar__nav { margin-top: 38px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item__badge { position: absolute; transform: translate(14px, -13px); }
  .logout-button { justify-content: center; padding: 0; }
  .orders-layout { grid-template-columns: minmax(310px, 350px) minmax(460px, 1fr); }
  .settings-section { grid-template-columns: 1fr; gap: 15px; }
  .settings-section__intro p { max-width: 720px; }
  .admin-product__rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-product__actions { grid-column: 1 / -1; justify-content: flex-end; padding-bottom: 0; }
}

@media (max-width: 860px) {
  .app { display: block; }
  .sidebar {
    position: static;
    width: 100%;
    height: 66px;
    flex-direction: row;
    align-items: center;
    padding: 0 18px;
  }
  .sidebar__brand { justify-content: flex-start; }
  .sidebar__brand > span:last-child { display: inline; }
  .sidebar__nav { display: flex; gap: 5px; margin: 0 0 0 22px; }
  .nav-item { width: auto; height: 40px; justify-content: flex-start; gap: 7px; padding: 0 11px; font-size: 11px; }
  .nav-item > span:not(.nav-item__badge) { display: inline; }
  .nav-item svg { width: 17px; }
  .nav-item__badge { position: static; transform: none; }
  .sidebar__footer { margin: 0 0 0 auto; }
  .logout-button { width: 42px; margin: 0; }
  .workspace { padding: 22px 16px 28px; }
  .topbar { align-items: center; }
  .topbar__date { display: none; }
  .topbar h1 { font-size: 30px; }
  .search-field { width: min(56vw, 380px); }
  .search-field__key { display: none; }
  .filter-row { margin-top: 20px; }
  .orders-layout { height: calc(100vh - 193px); min-height: 520px; display: block; }
  .order-list-panel { height: 100%; }
  .order-detail {
    position: fixed;
    z-index: 20;
    inset: 0;
    border: 0;
    border-radius: 0;
    transform: translateX(102%);
    transition: transform .24s ease-out;
  }
  .order-detail.mobile-open { transform: translateX(0); }
  .detail-head { align-items: center; padding: 14px 16px; }
  .detail-head__left { display: flex; align-items: center; gap: 11px; }
  .detail-head__back { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: white; }
  .detail-head__back svg { width: 18px; }
  .detail-body { padding: 18px 16px 32px; }
  .settings-layout { margin-top: 20px; }
  .settings-topbar .settings-lead { max-width: 570px; }
  .admin-product__summary { grid-template-columns: 64px minmax(0, 1fr); }
  .admin-product__image { width: 64px; height: 64px; }
  .admin-product__prices { grid-column: 2; justify-content: start; padding: 3px 0 0; text-align: left; }
  .admin-product__prices strong { display: inline; margin: 0 0 0 4px; font-size: 12px; }
  .admin-product__rules { margin-left: 79px; }
}

@media (max-width: 760px) {
  .auth-screen { display: block; background: #fbfbf8; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px 22px; }
  .auth-form__mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 64px; font-size: 20px; font-weight: 820; letter-spacing: -.04em; }
}

@media (max-width: 560px) {
  .sidebar { height: 58px; padding-inline: 14px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .sidebar__brand { font-size: 18px; }
  .sidebar__brand > span:last-child { display: none; }
  .sidebar__nav { flex: 1; justify-content: center; margin-left: 7px; }
  .nav-item { height: 36px; padding: 0 9px; }
  .nav-item svg { display: none; }
  .nav-item__badge { display: none; }
  .workspace { padding: 18px 12px 22px; }
  .topbar { align-items: flex-start; }
  .topbar__actions { flex: 1; justify-content: flex-end; }
  .search-field { width: min(100%, 230px); height: 42px; }
  .search-field input { font-size: 12px; }
  .icon-button--surface { width: 42px; height: 42px; }
  .filter-row { margin-block: 16px 12px; }
  .orders-layout { height: calc(100vh - 170px); min-height: 460px; }
  .order-list-panel { border-radius: 18px; }
  .panel-heading { min-height: 67px; padding: 13px 15px; }
  .order-card { padding: 16px 15px; }
  .detail-head { flex-wrap: wrap; }
  .detail-head__left { min-width: calc(100% - 50px); }
  .status-control { width: 100%; }
  .status-control select { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding-inline: 10px; }
  .product-row__image { width: 50px; height: 50px; }
  .summary-card { grid-template-columns: 1fr; }
  .toast-region { right: 12px; bottom: 12px; left: 12px; }
  .toast { width: 100%; min-width: 0; max-width: none; }
  .settings-topbar { align-items: flex-start; }
  .settings-topbar h1 { font-size: 28px; }
  .settings-lead { font-size: 11px; }
  .settings-card { border-radius: 18px; }
  .settings-card__heading { padding: 18px 15px; }
  .settings-card__icon { width: 38px; height: 38px; }
  .settings-section { padding: 19px 15px; }
  .setting-grid--two,
  .setting-grid--three { grid-template-columns: 1fr; }
  .setting-field--featured { max-width: none; }
  .settings-savebar { position: sticky; z-index: 3; bottom: 0; display: grid; gap: 10px; padding: 13px 15px; }
  .settings-save-button { width: 100%; min-width: 0; }
  .product-toolbar { display: grid; padding: 0 15px 14px; }
  .product-search { width: 100%; }
  .availability-filter { width: 100%; }
  .availability-filter select { flex: 1; }
  .product-controls-meta { padding-inline: 15px; }
  .admin-product { padding: 15px; }
  .admin-product__summary { grid-template-columns: 58px minmax(0, 1fr); gap: 11px; }
  .admin-product__image { width: 58px; height: 58px; }
  .admin-product__identity h3 { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .admin-product__prices { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 5px 0 0; }
  .admin-product__rules { grid-template-columns: 1fr; margin: 13px 0 0; }
  .admin-product__actions { grid-column: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .product-reset-button,
  .product-save-button { width: 100%; }
  .product-reset-button span { display: inline; }
}

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