:root {
  --bg: var(--tg-theme-bg-color, #f3f5f8);
  --text: var(--tg-theme-text-color, #14181f);
  --hint: var(--tg-theme-hint-color, #6b7280);
  --brand-blue: #1a3a6e;
  --brand-orange: #f97316;
  --accent: var(--tg-theme-button-color, var(--brand-blue));
  --accent-text: var(--tg-theme-button-text-color, #fff);
  --accent-secondary: var(--brand-orange);
  --card: var(--tg-theme-secondary-bg-color, #fff);
  --border: rgba(15, 23, 42, 0.08);
  --danger: #dc2626;
  --ok: #15803d;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
  --nav-h: 64px;
  --header-h: 56px;
  --header-search-gap: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overflow-x: clip;
}
html, body {
  background: var(--bg);
}
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  overflow-x: clip;
}
.header-stack {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
}
.header-stack.hidden { display: none; }
.header-stack.has-search {
  padding-bottom: 0;
}
.header-stack .header {
  position: static;
  top: auto;
  z-index: auto;
}
.header-stack.has-search .header {
  border-bottom: none;
  box-shadow: none;
}
.header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header .title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 32px;
}
.header h1 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header .sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.header .sub:empty,
.header .sub.hidden {
  display: none;
}
.app.mgr-mode {
  --header-h: 52px;
}
.app.mgr-mode .header {
  height: auto;
  min-height: var(--header-h);
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}
.app.mgr-mode .header .sub {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.app.mgr-mode .header .sub:empty,
.app.mgr-mode .header .sub.hidden {
  display: none;
}
.header-stack.header-stack--home-bare {
  display: none;
}
.header .logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: none;
  flex-shrink: 0;
}
.header .brand-logo {
  width: auto;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
}
.header .logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.header .back-btn {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 0;
}
.header .back-btn svg {
  display: block;
  width: 26px;
  height: 26px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-return {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--brand-orange);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}
.header-return--labeled {
  width: auto;
  min-width: 38px;
  max-width: 120px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.header-return.hidden { display: none; }
.home-top-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--header-search-gap) 12px 0;
  background: transparent;
}
.home-top-bar.hidden { display: none; }
.home-top-bar .search-line {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.search-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 17px;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  text-align: left;
}
.search-line-icon {
  flex-shrink: 0;
  color: #9ca3af;
}
.search-line-text {
  color: #9ca3af;
  font-size: 1rem;
}
main { flex: 1; padding: 12px 14px 16px; }
#screen-loading,
#screen-setup,
#screen-main { display: none; }
#screen-loading:not(.hidden),
#screen-setup:not(.hidden),
#screen-main:not(.hidden) { display: block; }
#screen-setup:not(.hidden) {
  position: fixed;
  inset: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: none;
  width: 100%;
  max-width: 560px;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px 24px;
  box-sizing: border-box;
}
#screen-setup.hidden,
#screen-loading.hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}
#subview-host { display: block; min-height: 40px; }
#subview-host.hidden { display: none !important; }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.panel + .panel { margin-top: 10px; }
.section-title {
  margin: 16px 0 10px;
  font-size: 1rem;
  font-weight: 700;
}
.section-title:first-child { margin-top: 0; }
#home-cats { margin-bottom: 4px; }
#home-cats + .section-title,
.cat-grid + .section-title {
  margin-top: 18px;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--hint);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.promo-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scroll-snap-type: x mandatory;
}
.promo-card-mini {
  flex: 0 0 78%;
  max-width: 300px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #eff6ff, #fff);
  padding: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}
.promo-card-mini h3 { margin: 0 0 6px; font-size: 0.95rem; }
.promo-card-mini p { margin: 0; font-size: 0.85rem; color: var(--hint); }
.promo-card-mini--banner,
.promo-card-mini--product {
  flex: 0 0 min(86%, 320px);
  max-width: 320px;
  padding: 0;
  background: var(--card);
}
.promo-banner-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}
.promo-banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promo-banner-fallback {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #f6e7c3, #e2c56a);
}
.promo-caption { padding: 10px 12px 12px; }
.promo-caption .t { font-weight: 700; font-size: 0.92rem; }
.promo-caption .p { margin-top: 4px; font-size: 0.82rem; color: var(--hint); }
.promo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-secondary, #f97316);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.promo-carousel-track { position: relative; }
.promo-nav {
  position: absolute;
  top: 38%;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.promo-nav--prev { left: 6px; }
.promo-nav--next { right: 6px; }
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: -6px 0 12px;
}
.promo-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d1d5db;
}
.promo-dot.active { background: var(--accent, #1a3a6e); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-align: left;
  padding: 0;
  color: inherit;
}
.cat-tile img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  background: var(--bg);
  pointer-events: none;
}
.cat-tile .cat-emoji-fallback,
.cat-row img,
.prod-card img,
.prod-photo-fallback {
  pointer-events: none;
}
.cat-emoji-fallback {
  height: 88px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.cat-tile .cat-body { padding: 10px 12px; }
.cat-tile .name { font-weight: 600; font-size: 0.92rem; }
.cat-tile .count { font-size: 0.78rem; color: var(--hint); margin-top: 2px; }
.cat-list { display: flex; flex-direction: column; gap: 10px; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  box-shadow: var(--shadow);
  text-align: left;
  color: inherit;
}
.cat-row img,
.prod-card img,
.prod-photo-fallback,
.cat-row .cat-emoji-fallback {
  pointer-events: none;
}
.cat-row img {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg);
}
.cat-row .cat-emoji-fallback {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 14px;
  font-size: 2.4rem;
}
.cat-row .info { flex: 1; min-width: 0; pointer-events: none; }
.cat-row .name { font-weight: 800; font-size: 1.12rem; line-height: 1.3; }
.cat-row .count { font-size: 0.95rem; color: var(--hint); margin-top: 4px; }
.category-banner {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 220px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.prod-list-sentinel { height: 1px; width: 100%; }
.prod-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prod-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.prod-card--list {
  align-items: center;
}
.prod-card-media {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  padding: 6px;
  box-sizing: border-box;
}
.prod-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  border-radius: 8px;
  display: block;
}
.prod-card img {
  width: 72px;
  height: 72px;
  object-fit: contain !important;
  object-position: center;
  border-radius: 10px;
  background: var(--bg);
  flex-shrink: 0;
  padding: 4px;
  box-sizing: border-box;
}
.prod-photo-fallback {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.prod-card .info { flex: 1; min-width: 0; }
.prod-card .name { font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
.prod-card .meta { font-size: 0.95rem; color: var(--text); font-weight: 700; }
.prod-card .meta .meta-extra { color: var(--hint); font-weight: 500; font-size: 0.82rem; }
.qty-discount-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
  animation: qty-discount-pulse 1.15s ease-in-out infinite;
  transform-origin: center;
}
.qty-discount-badge--on-photo {
  position: absolute;
  top: 8px;
  left: 8px;
  margin: 0;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 12px;
  background: #e11d48;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.1;
  animation: none;
  letter-spacing: 0.01em;
  vertical-align: baseline;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.5);
  min-width: 2.6em;
  text-align: center;
}
html.desktop-web.desktop-client .qty-discount-badge--on-photo {
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  font-size: 1.4rem;
  border-radius: 14px;
  min-width: 2.8em;
}
.qty-discount-hint {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  font-size: 0.78rem;
  font-weight: 700;
  color: #be123c;
  line-height: 1.35;
}
.qty-discount-old {
  color: var(--hint);
  font-weight: 600;
  text-decoration: line-through;
  margin-right: 4px;
}
.qty-discount-badge.is-applied {
  background: #16a34a;
}
@keyframes qty-discount-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.72; }
}
@media (prefers-reduced-motion: reduce) {
  .qty-discount-badge { animation: none; }
}
html.tg-dark .qty-discount-hint {
  color: #fecdd3;
  background: rgba(225, 29, 72, 0.18);
  border-color: rgba(251, 113, 133, 0.45);
}
.prod-card--discount {
  align-items: flex-start;
}
.mgr-qty-discount {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.mgr-qty-discount-lab {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.82rem;
  color: var(--hint);
  font-weight: 600;
}
.mgr-qty-discount input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 1rem;
  background: var(--card);
  color: inherit;
  margin-bottom: 6px;
}
.prod-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
}
.prod-actions-btns {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-end;
}
.prod-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  min-height: 36px;
}
.prod-qty-btn {
  border: none;
  background: transparent;
  width: 32px;
  height: 36px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}
.prod-qty-input {
  width: 46px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  -moz-appearance: textfield;
}
.prod-qty-input::-webkit-outer-spin-button,
.prod-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.prod-actions-btns button {
  border: none;
  border-radius: 12px;
  padding: 0;
  width: 40px;
  height: 40px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.prod-actions .add { background: var(--accent); color: var(--accent-text); min-width: 40px; }
.prod-actions .add.has-qty { font-variant-numeric: tabular-nums; }
.prod-actions .fav {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
}
.prod-actions .fav.active { color: #e11d48; border-color: #fecdd3; background: #fff1f2; }
#tab-cart:not(.hidden) {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-bottom, 0px) - 28px);
  min-height: 0;
  overflow-anchor: none;
}
.cart-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}
.cart-hero, .fav-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.cart-hero-badge, .fav-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(26, 58, 110, 0.1);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 8px;
}
.cart-hero-title, .fav-hero-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}
.cart-hero-sub, .fav-hero-sub {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: var(--hint);
  line-height: 1.4;
}
.fav-page { display: flex; flex-direction: column; gap: 12px; }
.fav-list { margin-top: 0; }
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.cart-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 40px;
  grid-template-areas:
    "photo body del"
    "photo pricing del"
    "photo actions del";
  column-gap: 12px;
  row-gap: 6px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.cart-item.invalid { border-color: #fecaca; background: #fffbfb; }
.cart-pricing {
  grid-area: pricing;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  min-width: 0;
}
.cart-line-sum {
  margin-top: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.cart-photo-btn {
  grid-area: photo;
  align-self: center;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}
.cart-photo-btn.cart-photo--empty {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: var(--bg);
}
.cart-item .cart-photo {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  display: block;
}
.cart-name-link {
  display: -webkit-box;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.cart-name-link:hover { color: var(--brand-blue); }
.scroll-top-btn {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 40;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(26, 58, 110, 0.28);
  cursor: pointer;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(28px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s ease;
}
.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top-btn.hidden { display: none; }
.cart-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--hint);
}
.cart-item .cart-body { grid-area: body; min-width: 0; }
.cart-name {
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-promo { font-size: 0.82rem; color: var(--hint); margin-top: 2px; }
.cart-price { font-size: 0.95rem; margin-top: 0; color: var(--text); font-weight: 700; }
.cart-unit { color: inherit; font-size: inherit; font-weight: inherit; }
.cart-item .warn { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }
.cart-actions {
  grid-area: actions;
  display: flex;
  gap: 6px;
  margin-top: 0;
  align-items: center;
  flex-shrink: 0;
}
.cart-actions input {
  width: 64px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
}
.qty-btn, .cart-del {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.cart-del {
  grid-area: del;
  margin-left: 0;
  align-self: center;
  color: var(--danger);
  border-color: #fecaca;
  flex-shrink: 0;
}
.cart-summary {
  margin-top: 0;
  position: static;
  flex-shrink: 0;
  z-index: 8;
  background: var(--card);
}
.cart-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 8;
}
.cart-dock-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.cart-dock-count { font-weight: 700; }
.cart-dock-sum {
  margin-left: auto;
  color: var(--accent);
  font-size: 1.05rem;
}
.cart-dock-chevron {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.28s ease;
}
.cart-dock.is-collapsed .cart-dock-chevron { transform: rotate(180deg); }
.cart-summary-slot {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.32s ease;
}
.cart-dock.is-collapsed .cart-summary-slot {
  grid-template-rows: 0fr;
}
.cart-summary-slot-inner {
  overflow: hidden;
  min-height: 0;
}
.cart-dock.is-collapsed .cart-summary {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .cart-summary-slot,
  .cart-dock-chevron { transition: none; }
}
.cart-total-row--sum strong { color: var(--accent); }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.cart-total-row strong { font-size: 1.2rem; }
.cart-min { font-size: 0.85rem; color: var(--hint); margin-bottom: 10px; }
.cart-min-progress { margin: 4px 0 12px; }
.cart-min-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(26, 58, 110, 0.12);
  overflow: hidden;
  margin-bottom: 6px;
}
.cart-min-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand-blue);
  transition: width 0.25s ease;
}
.cart-min-progress.is-done .cart-min-progress-bar { background: var(--ok); }
.cart-min-progress .cart-min { margin-bottom: 0; }
.cart-summary .btn { margin-top: 8px; }
.cart-summary .btn:first-of-type { margin-top: 0; }
.cart-empty {
  text-align: center;
  padding: 48px 20px;
}
.cart-empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.7; }
.cart-empty-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.cart-empty-hint { color: var(--hint); font-size: 0.9rem; margin: 0 0 20px; }
.cart-empty .btn { max-width: 280px; margin: 0 auto; }
.fav-empty {
  text-align: center;
  padding: 48px 22px;
  max-width: 340px;
  margin: 0 auto;
}
.fav-empty-icon { margin-bottom: 14px; display: flex; justify-content: center; }
.fav-empty-title { font-size: 1.12rem; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.fav-empty-hint {
  color: var(--hint);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 22px;
}
.fav-empty .btn { max-width: 280px; margin: 0 auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
}
.btn.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn.danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn.block { width: 100%; }
.btn.block + .btn.block { margin-top: 10px; }
.btn:disabled,
.btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.cart-checkout-hint { color: var(--danger); font-size: 0.86rem; margin: 0 0 10px; line-height: 1.35; white-space: pre-line; }
.menu-list { display: flex; flex-direction: column; gap: 12px; }
.menu-section { margin-bottom: 18px; }
.menu-section + .menu-section { margin-top: 6px; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow: var(--shadow);
}
.profile-grid { display: grid; gap: 8px; font-size: 0.95rem; }
.profile-grid dt { color: var(--hint); font-size: 0.82rem; }
.profile-grid dd { margin: 0 0 8px; }
.account-card {
  padding: 18px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.account-card-title {
  margin: 0 0 16px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.account-grid {
  display: grid;
  gap: 0;
  margin: 0;
}
.account-grid dt {
  margin: 14px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}
.account-grid dt:first-of-type { margin-top: 0; }
.account-grid dd {
  margin: 4px 0 0;
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}
.account-grid dd code {
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--brand-blue);
  padding: 3px 8px;
  border-radius: 8px;
}
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.account-actions .btn {
  font-size: 1rem;
  min-height: 48px;
}
#home-recent-wrap {
  margin: 8px 0 4px;
}
.recent-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.recent-card {
  flex: 0 0 108px;
  width: 108px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
}
.recent-card-photo {
  display: block;
  line-height: 0;
  position: relative;
}
.recent-card-photo .qty-discount-badge--on-photo {
  top: 6px;
  left: 6px;
  padding: 4px 7px;
  font-size: 0.78rem;
  border-radius: 8px;
  min-width: 0;
  box-shadow: 0 1px 6px rgba(225, 29, 72, 0.45);
}
.recent-card-img,
.recent-card .no-photo {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  background: var(--bg);
}
.recent-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-card-price {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-blue);
}
.account-legal {
  margin: 4px 0 0;
  font-size: 0.98rem;
}
.account-legal a {
  color: var(--brand-blue);
  font-weight: 600;
}
.order-card, .return-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
}
.order-card-more {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent, #1a3a6e);
}
.order-card .status, .return-card .status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  margin-bottom: 6px;
}
.return-text-input {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
  background: var(--card);
  color: var(--text);
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: none;
  bottom: 0;
  z-index: 600;
  width: 100%;
  max-width: 560px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-top: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  outline: none;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.bottom-nav::before,
.bottom-nav::after {
  content: none !important;
  display: none !important;
}
.site-nav-tabs {
  display: contents;
}
.bottom-nav button {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--hint);
  cursor: pointer;
  padding: 4px 2px 6px;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 100%;
  transition: color 0.15s ease, background-color 0.12s ease;
}
.bottom-nav > .theme-toggle {
  display: none !important;
}
.bottom-nav button .ico {
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.28rem;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.14s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.app.sa-mode .bottom-nav button,
.app.mgr-mode .bottom-nav button {
  transition: color 0.15s ease, background-color 0.12s ease;
}
.app.sa-mode .bottom-nav button .ico,
.app.mgr-mode .bottom-nav button .ico {
  transition: transform 0.14s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.bottom-nav button:active,
.app.sa-mode .bottom-nav button:active,
.app.mgr-mode .bottom-nav button:active {
  background-color: rgba(15, 23, 42, 0.08);
}
.bottom-nav button:active .ico,
.app.sa-mode .bottom-nav button:active .ico,
.app.mgr-mode .bottom-nav button:active .ico {
  transform: scale(0.86);
}
.bottom-nav button .nav-label {
  display: block;
  width: 100%;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1px;
}
.bottom-nav button.active { color: var(--brand-blue); }
.bottom-nav button .nav-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.bottom-nav .nav-ico-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.bottom-nav .nav-ico-img--night { display: none; }
html.tg-dark .bottom-nav .nav-ico-img--day { display: none; }
html.tg-dark .bottom-nav .nav-ico-img--night { display: block; }
.bottom-nav .nav-ico-img--boost {
  width: 32px;
  height: 32px;
}
.fav-empty-icon .nav-ico-img {
  width: 48px;
  height: 48px;
  opacity: 0.55;
}
.fav-empty-icon .nav-ico-img--night { display: none; }
html.tg-dark .fav-empty-icon .nav-ico-img--day { display: none; }
html.tg-dark .fav-empty-icon .nav-ico-img--night { display: inline-block; }
.bottom-nav .badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-nav .badge.hidden { display: none; }
.bottom-nav .badge.pulse,
.bottom-nav button.cart-pop .ico {
  animation: cart-pop 0.22s ease;
}
@keyframes cart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.cart-fly {
  position: fixed;
  z-index: 2000;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  pointer-events: none;
  left: 0;
  top: 0;
  will-change: transform, opacity;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.28s ease;
}
@media (prefers-reduced-motion: reduce) {
  .cart-fly { display: none; }
  .bottom-nav .badge.pulse,
  .bottom-nav button.cart-pop .ico { animation: none; }
}
.screen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 45vh;
  gap: 12px;
  padding: 24px 8px;
}
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 1200;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(140%);
  transition: transform 0.25s ease, opacity 0.2s ease;
  max-width: 528px;
  margin: 0 auto;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.toast.show {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
.toast.err { background: #fef2f2; color: var(--danger); }
.toast.ok { background: #f0fdf4; color: var(--ok); }
.hidden { display: none !important; }
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: none;
  width: 100%;
  max-width: 560px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
#legal-overlay {
  z-index: 800;
}
#legal-overlay-close {
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  position: relative;
  z-index: 2;
}
.overlay.hidden {
  display: none !important;
  pointer-events: none !important;
}
.overlay .overlay-head {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.overlay .overlay-head input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
}
.overlay .overlay-body { flex: 1; overflow: auto; padding: 12px 14px; }
#promo-overlay {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 100%;
  max-width: 560px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 180;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
#promo-overlay.hidden { display: none; }
#promo-card {
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  padding: 16px;
}
#promo-card img.banner, #promo-card video.banner { width: 100%; border-radius: 10px; margin-bottom: 10px; }
#promo-card .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#promo-card .actions button { padding: 12px; border: none; border-radius: 10px; font-size: 1rem; }
#promo-card .actions button.primary { background: var(--accent); color: var(--accent-text); }
#promo-card .actions button.ghost { background: var(--bg); color: inherit; }
.empty { text-align: center; color: var(--hint); padding: 28px 12px; font-size: 0.92rem; }
.prod-card,
.cat-tile,
.cat-row,
.search-promo-tile,
.recent-card,
html.desktop-web .account-actions .btn,
html.desktop-web .menu-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.prod-card:hover,
.cat-tile:hover,
.cat-row:hover,
.search-promo-tile:hover,
.recent-card:hover,
html.desktop-web .account-actions .btn:hover,
html.desktop-web .menu-item:hover {
  transform: scale(1.03);
  border-color: var(--brand-blue);
  box-shadow: 0 10px 26px rgba(26, 58, 110, 0.18);
}
.prod-card { cursor: pointer; }
.prod-card .info { cursor: pointer; }
#subview-host:not(.hidden) {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.product-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  overscroll-behavior-y: contain;
  padding: 0 0 8px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-bottom, 0px) - 12px);
}
.product-detail.panel { padding: 0 0 8px; }
.product-detail-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 8px 12px 0;
  background: #fff;
  border: none;
  border-radius: 0;
  overflow: hidden;
  flex: 0 0 auto;
  height: min(46vh, 320px);
  max-height: min(46vh, 320px);
  min-height: 140px;
}
.product-detail .hero {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: min(46vh, 320px);
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: #fff;
  border: none;
  pointer-events: none;
}
.product-detail h2,
.product-detail .price,
.product-detail .meta-line,
.product-detail .stock,
.product-detail .actions-row {
  flex-shrink: 0;
  padding-left: 14px;
  padding-right: 14px;
}
.product-detail h2 {
  font-size: 1.05rem;
  line-height: 1.3;
  padding-top: 8px;
  margin: 0;
}
.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-top: 12px;
}
.product-detail-info h2,
.product-detail-info .price,
.product-detail-info .meta-line,
.product-detail-info .stock,
.product-detail-info .actions-row,
.product-detail-info .pd-qty-row,
.product-detail-info .pd-line-total,
.product-detail-info .qty-discount-hint,
.product-detail-info .pd-cart-hint {
  padding-left: 14px;
  padding-right: 14px;
}
.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.pd-qty-row input {
  width: 88px;
  min-height: 40px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--bg);
  color: inherit;
}
.pd-line-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-blue);
}
.pd-cart-hint {
  font-size: 0.85rem;
  color: var(--hint);
}
.cart-negotiate-box {
  margin: 10px 0;
}
.cart-negotiate-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.cart-negotiate-box input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--card);
  color: var(--text);
}
.no-photo,
img.no-photo,
.prod-photo-fallback img,
.cart-photo.no-photo {
  object-fit: contain;
  background: #fff;
}
.product-detail .price { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.product-detail .price .price-unit { color: inherit; font-size: inherit; font-weight: inherit; }
.product-detail .meta-line { color: var(--hint); font-size: 0.9rem; }
.product-detail .stock { font-size: 0.9rem; margin-top: 4px; }
.product-detail .actions-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
  position: static;
  z-index: 4;
  background: var(--card);
  padding-top: 10px;
  padding-bottom: 12px;
}
.product-detail .actions-row .btn { flex: 1; }
.search-section { margin-bottom: 16px; }
.search-promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.search-promo-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: inherit;
}
.search-promo-tile img { width: 100%; height: 80px; object-fit: cover; }
.search-promo-tile .t { padding: 8px; font-size: 0.82rem; font-weight: 600; }
.menu-section { margin-bottom: 14px; }
.menu-item.danger { color: var(--danger); }
.menu-section h3 { margin: 0 0 8px; font-size: 0.88rem; color: var(--hint); text-transform: uppercase; letter-spacing: 0.04em; }
.pager { display: flex; gap: 8px; margin-top: 12px; }
.pager button { flex: 1; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.auth-shell {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 0 16px;
}
.auth-hero {
  text-align: center;
  padding: 0 8px 2px;
}
.auth-hero-logo {
  width: min(92vw, 300px);
  height: auto;
  max-height: 220px;
  max-width: min(92vw, 300px);
  object-fit: contain;
  margin: 0 auto 4px;
  display: block;
}
#setup-logo:not([src]),
#setup-logo.hidden,
#screen-setup.hidden .auth-hero-logo {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
img.brand-logo {
  width: auto;
  height: 48px;
  max-width: 180px;
  object-fit: contain;
}
.auth-hero--branded .auth-hero-title { display: none; }
.auth-hero-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 6px;
}
.auth-hero-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.auth-hero-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--hint);
  line-height: 1.4;
}
.auth-hero-sub:empty {
  display: none;
}
.auth-card {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}
.auth-panel-body { display: flex; flex-direction: column; gap: 2px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 14px;
  background: #f1f5f9;
}
.auth-tabs button {
  padding: 11px 10px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.92rem;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.auth-tabs button.active {
  background: #fff;
  color: var(--brand-blue);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.auth-field { margin-bottom: 12px; text-align: left; }
.auth-field label span {
  display: block;
  color: #475569;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}
.auth-field input,
.auth-field select {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.auth-field-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--hint);
  line-height: 1.4;
}
.auth-field-warn {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #b45309;
  line-height: 1.4;
  background: #fffbeb;
  border-radius: 8px;
  padding: 6px 8px;
}
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
  text-align: left;
  cursor: pointer;
}
.auth-terms input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand-blue);
}
.auth-terms a {
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
}
.auth-terms a:active { opacity: 0.75; }
.legal-overlay-head h3 { margin: 0; font-size: 1rem; flex: 1; }
.legal-overlay-head { align-items: center; justify-content: space-between; }
.legal-overlay-body { font-size: 0.9rem; line-height: 1.55; }
.legal-overlay-body section { margin-bottom: 16px; }
.legal-overlay-body h2 { font-size: 1.05rem; margin: 0 0 8px; }
.legal-overlay-body h3 { font-size: 0.95rem; margin: 12px 0 6px; }
.legal-overlay-body ul { margin: 0; padding-left: 18px; }
.auth-role-block { margin-bottom: 12px; text-align: left; }
.auth-role-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}
.auth-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-role-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-role-card.selected {
  border-color: var(--brand-blue);
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.auth-role-card-icon { font-size: 1.35rem; line-height: 1.2; }
.auth-role-card-title { font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.auth-role-card-desc { font-size: 0.72rem; color: var(--hint); line-height: 1.3; }
.auth-submit { margin-top: 6px; padding: 13px; font-size: 1rem; border-radius: 12px; }
.auth-submit:disabled {
  opacity: 1;
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
  color: #f8fafc !important;
  cursor: not-allowed;
  box-shadow: none;
}
.auth-dev-label {
  font-size: 0.85rem;
  color: var(--hint);
  margin: 14px 0 8px;
  text-align: left;
}
.auth-success-wrap { width: 100%; text-align: left; }
.auth-cred-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.auth-cred-box {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}
.auth-cred-box.staff-id { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%); }
.auth-cred-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 6px;
}
.auth-cred-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #0f172a;
  word-break: break-all;
  cursor: pointer;
}
.auth-cred-value:active { opacity: 0.7; }
.auth-cred-copy { font-size: 0.72rem; color: var(--hint); margin-top: 4px; }
.auth-steps {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.55;
}
.auth-steps li { margin-bottom: 6px; }
.auth-steps li:last-child { margin-bottom: 0; }
.auth-success-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  margin: 0 auto 12px;
}
.auth-success-badge.staff {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
}
.auth-success-lead {
  text-align: center;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 4px;
}
.auth-steps-card {
  margin: 14px 0;
  padding: 12px 14px;
  background: #fff;
}
.auth-steps-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.auth-birthday-card {
  margin: 14px 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  border-color: #fde68a;
}
.auth-success-wrap > .btn.block { margin-top: 12px; }
.auth-success-wrap > .btn.block + .btn.block { margin-top: 10px; }
#setup-join-host { margin: 12px 16px 20px; }
.auth-birthday-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.auth-birthday-icon { font-size: 1.5rem; line-height: 1; }
.auth-birthday-field { display: block; margin-bottom: 6px; }
.auth-birthday-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.auth-birthday-actions .btn { flex: 1; }
.auth-birthday-ok {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  color: var(--ok);
  font-weight: 600;
}
.btn.ghost {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--hint);
}
.dev-preview-btns { display: flex; flex-direction: column; gap: 8px; }
.auth-login-type { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-login-type button {
  flex: 1;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
}
.auth-login-type button.active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.day-chips label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  margin: 0;
  cursor: pointer;
  font-size: 0.85rem;
}
.day-chips input { width: auto; margin: 0; }
.catalog-blocked {
  padding: 16px;
  border-radius: var(--radius);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  margin-bottom: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.action-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.action-row .btn { flex: 1; min-width: 140px; }
.btn.accent-orange { background: var(--brand-orange); color: #fff; }
.mgr-mkt-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 14px;
}
.mgr-mkt-action {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 16px 16px 16px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}
.mgr-mkt-action-ico {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.18);
}
.mgr-mkt-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mgr-mkt-action-text b {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}
.mgr-mkt-action-text small {
  font-size: 0.78rem;
  opacity: 0.9;
  font-weight: 500;
}
.mgr-mkt-action--promo {
  background:
    radial-gradient(120px 80px at 92% 10%, rgba(255, 255, 255, 0.24), transparent 70%),
    linear-gradient(135deg, #f59e0b 0%, #f97316 48%, #ea580c 100%);
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}
.mgr-mkt-action--product {
  background:
    radial-gradient(120px 80px at 92% 10%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(135deg, #2563eb 0%, #4f46e5 52%, #4338ca 100%);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}
.mgr-mkt-action--text {
  background:
    radial-gradient(120px 80px at 92% 10%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(135deg, #0f766e 0%, #0d9488 48%, #047857 100%);
  box-shadow: 0 12px 28px rgba(4, 120, 87, 0.28);
}
.mgr-mkt-action-pills {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.mgr-mkt-action-pills i {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.mgr-broadcast-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.92rem;
}
.mgr-broadcast-stores {
  max-height: 280px;
  overflow: auto;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mgr-broadcast-store {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.bc-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}
.bc-hero {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(140px 90px at 100% 0%, rgba(255,255,255,0.2), transparent 65%),
    linear-gradient(135deg, #0f766e 0%, #047857 100%);
  box-shadow: 0 12px 28px rgba(4, 120, 87, 0.22);
}
.bc-hero-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  font-size: 1.3rem;
}
.bc-hero-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
}
.bc-hero-sub {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  opacity: 0.92;
}
.bc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}
.bc-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hint);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.bc-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--hint);
  line-height: 1.4;
}
.bc-photo {
  width: 100%;
  min-height: 132px;
  border: 1.5px dashed rgba(15, 118, 110, 0.45);
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #0f766e;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.bc-photo.has-preview {
  border-style: solid;
  min-height: 180px;
  padding: 0;
}
.bc-photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.bc-photo-plus {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}
.bc-photo-title { font-weight: 800; font-size: 0.95rem; }
.bc-photo-hint { font-size: 0.75rem; opacity: 0.75; }
.bc-photo-change {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.bc-photo-clear {
  margin-top: 8px;
  border: 0;
  background: none;
  color: #b45309;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.bc-text {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font: inherit;
  resize: vertical;
  background: var(--bg, #fff);
}
.bc-count {
  text-align: right;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--hint);
}
.bc-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bc-mode {
  border: 1px solid var(--border);
  background: var(--bg, #fff);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bc-mode b { font-size: 0.92rem; }
.bc-mode small { color: var(--hint); font-size: 0.75rem; }
.bc-mode.active {
  border-color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}
.bc-search { margin: 10px 0 8px; }
.bc-stores {
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bc-store {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg, #fff);
}
.bc-store-name { flex: 1; font-weight: 600; }
.bc-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font-weight: 700;
}
.bc-time-row input[type="time"] {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
}
.bc-actions { display: flex; flex-direction: column; gap: 8px; }
.bc-schedule-btn {
  background: #0f766e;
  color: #fff;
}
.bc-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.82rem;
  color: var(--hint);
  text-align: center;
}
.bc-job {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.bc-job:last-child { border-bottom: none; padding-bottom: 0; }
.bc-job-main { flex: 1; min-width: 0; }
.bc-job-days { font-weight: 800; font-size: 0.9rem; }
.bc-job-text { font-size: 0.84rem; margin-top: 2px; color: var(--text); }
.bc-job-meta { font-size: 0.75rem; color: var(--hint); margin-top: 4px; }
.bc-job-stop {
  border: 0;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}
.bc-jobs-empty { margin: 0; color: var(--hint); font-size: 0.85rem; }
html.tg-dark .bc-photo { background: rgba(15, 118, 110, 0.12); }
html.tg-dark .bc-mode.active { background: rgba(45, 212, 191, 0.12); color: #5eead4; }
html.tg-dark .bc-job-stop { background: rgba(185, 28, 28, 0.25); color: #fecaca; }
html.tg-dark .mgr-mkt-action {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.return-qty { width: 80px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
.return-line { padding: 10px 0; border-bottom: 1px solid var(--border); }
.return-line:last-child { border-bottom: none; }

.mgr-panel { padding: 4px 0 24px; }
.mgr-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.mgr-stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.mgr-stat--accent { border-color: var(--brand); background: #eef2ff; }
.mgr-stat-val { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.mgr-stat-label { font-size: 0.78rem; color: var(--hint); margin-top: 4px; }
.mgr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mgr-action-btn {
  display: block;
  width: 100%;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.25;
  cursor: pointer;
}
.mgr-action-btn:active { opacity: 0.85; }
.mgr-periods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.mgr-period-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.mgr-order-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mgr-order-actions .btn { flex: 1; min-width: 120px; padding: 10px 8px; font-size: 0.88rem; }
.mgr-decide {
  flex: 1;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 39, 68, 0.12);
}
.mgr-decide-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  background: rgba(255, 255, 255, 0.22);
}
.mgr-decide--ok {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
}
.mgr-decide--no {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  color: #fff;
}
.mgr-decide:active { transform: scale(0.98); }
.mgr-decide:disabled,
.mgr-decide.is-busy {
  opacity: 0.72;
  pointer-events: none;
}
.mgr-decide.is-busy .mgr-decide-ico { animation: mgrDecidePulse 0.7s ease infinite; }
@keyframes mgrDecidePulse {
  50% { transform: scale(0.86); opacity: 0.7; }
}
html.tg-dark .mgr-decide--ok { box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28); }
html.tg-dark .mgr-decide--no { box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28); }
.mgr-store-card { width: 100%; text-align: left; cursor: pointer; border: 1px solid var(--border); background: var(--card); }
.mgr-select { width: 100%; margin-top: 6px; padding: 10px; border-radius: 10px; border: 1px solid var(--border); }
.mgr-report-body, .order-body { white-space: pre-wrap; font-family: inherit; font-size: 0.88rem; line-height: 1.45; margin-top: 12px; background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; }
.order-detail .status { display: inline-block; margin-bottom: 8px; }
.order-items { margin: 10px 0 0 18px; font-size: 0.9rem; }
.menu-item.active { border-color: var(--brand); background: #eef2ff; }
.mgr-prod-card { margin-bottom: 10px; }
.mgr-photo-preview { width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; background: var(--bg); }
.mgr-photo-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mgr-photo-actions .btn { text-align: left; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.app.mgr-mode .menu-item.mgr-photo-cat-item {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  padding: 14px 16px;
}
.mgr-photo-cat-label { flex: 1; min-width: 0; word-break: break-word; color: inherit; }
.mgr-photo-cat-count { color: #475569; font-weight: 700; }
.mgr-photo-cat-arrow { color: var(--mgr-blue); font-size: 1.2rem; font-weight: 700; flex-shrink: 0; margin-left: 8px; }
.mgr-photo-panel { margin-bottom: 12px; }
.mgr-photo-toolbar { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.mgr-photo-search {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
}
.mgr-photo-product-list { display: flex; flex-direction: column; gap: 8px; }
.mgr-photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mgr-photo-filter {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.mgr-photo-filter.active {
  background: var(--mgr-blue);
  border-color: var(--mgr-blue);
  color: #fff;
}
.mgr-photo-title { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; color: #0f2744; line-height: 1.3; }
.mgr-photo-stats { margin: 0; font-size: 0.92rem; font-weight: 600; color: #334155; line-height: 1.45; }
.mgr-photo-product-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  color: var(--text);
}
.mgr-photo-product-icons { flex-shrink: 0; font-size: 0.95rem; line-height: 1.4; }
.mgr-photo-product-body { flex: 1; min-width: 0; }
.mgr-photo-product-name { font-size: 0.98rem; font-weight: 700; color: #0f172a; line-height: 1.35; margin-bottom: 4px; word-break: break-word; }
.mgr-photo-product-meta { font-size: 0.88rem; font-weight: 600; color: #475569; }
.mgr-photo-product-title { margin: 0 0 8px; font-size: 1.08rem; font-weight: 800; color: #0f2744; line-height: 1.35; }
.mgr-form-hint { font-size: 0.92rem; color: #334155; line-height: 1.45; margin: 0 0 12px; }
.mgr-day-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mgr-day-chip {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f2744;
  cursor: pointer;
}
.mgr-day-chip.active { background: #e8eef8; border-color: var(--mgr-blue); color: var(--mgr-blue); }
.mgr-staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.mgr-staff-id { font-size: 0.92rem; font-weight: 700; color: #0f2744; }
.mgr-staff-meta { font-size: 0.84rem; color: #475569; }
.mgr-staff-remove { flex-shrink: 0; padding: 8px 12px; font-size: 0.82rem; }
.guide-body { white-space: pre-wrap; line-height: 1.5; font-size: 0.92rem; }

/* Super Admin — Mini App */
.app.sa-mode {
  --sa-gold: #f59e0b;
  --sa-navy: #1e3a5f;
  --sa-navy-deep: #0f2744;
  background: linear-gradient(180deg, #eef2f8 0%, var(--bg) 220px);
}
.sa-panel { padding: 4px 0 24px; }
.sa-hero {
  background: linear-gradient(135deg, var(--sa-navy-deep) 0%, var(--sa-navy) 55%, #2d4a7a 100%);
  color: #fff;
  border-radius: 18px;
  padding: 18px 16px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.22);
}
.sa-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sa-hero-logo {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.sa-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}
.sa-hero-top .sa-hero-badge { margin-bottom: 0; }
.sa-hero-sub { margin: 6px 0 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); line-height: 1.4; }
.sa-hero-title { margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.25; color: #fff; }
.sa-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sa-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.sa-stat--accent { border-color: #fbbf24; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
.sa-stat-icon { font-size: 1.25rem; line-height: 1; margin-bottom: 6px; }
.sa-stat-val { font-size: 1.2rem; font-weight: 800; line-height: 1.15; color: var(--sa-navy); }
.sa-stat-label { font-size: 0.76rem; color: var(--hint); margin-top: 4px; }
.sa-stat--project .sa-stat-val { color: #b45309; }
.sa-revenue-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.sa-revenue-block { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sa-revenue-label { font-size: 0.82rem; color: var(--hint); }
.sa-revenue-val { font-size: 1rem; font-weight: 800; color: var(--brand-orange); white-space: nowrap; }
.sa-meta-extra { margin: 0 0 12px; }
.sa-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: inherit;
}
.sa-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.sa-toggle-title { font-size: 0.92rem; font-weight: 700; }
.sa-toggle-sub { font-size: 0.78rem; color: var(--hint); }
.sa-toggle-switch {
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.15s ease;
}
.sa-toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}
.sa-toggle.on .sa-toggle-switch { background: #16a34a; }
.sa-toggle.on .sa-toggle-switch::after { transform: translateX(20px); }
.sa-section { margin-bottom: 16px; }
.sa-section-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sa-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sa-action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #f3f6fb 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.sa-action-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--sa-action-accent, #64748b);
}
.sa-action-card:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1); }
html.desktop-web .sa-action-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}
.sa-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--sa-action-icon-bg, #eef2ff);
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.sa-action-label {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  padding-right: 18px;
}
.sa-action-go {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sa-action-accent, #94a3b8);
  opacity: 0.85;
}
.sa-action--companies { --sa-action-accent: #2563eb; --sa-action-icon-bg: #dbeafe; }
.sa-action--new { --sa-action-accent: #059669; --sa-action-icon-bg: #d1fae5; }
.sa-action--analytics { --sa-action-accent: #7c3aed; --sa-action-icon-bg: #ede9fe; }
.sa-action--pg { --sa-action-accent: #0e7490; --sa-action-icon-bg: #cffafe; }
.sa-action--guide { --sa-action-accent: #d97706; --sa-action-icon-bg: #fef3c7; }
.sa-action--load { --sa-action-accent: #6366f1; --sa-action-icon-bg: #e0e7ff; }
.sa-action--default { --sa-action-accent: #475569; --sa-action-icon-bg: #e2e8f0; }
.sa-company-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--text);
}
.sa-company-card:active { opacity: 0.9; }
.sa-company-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sa-company-head b { font-size: 0.95rem; line-height: 1.3; flex: 1; }
.sa-company-meta { margin-top: 6px; font-size: 0.78rem; color: var(--hint); }
.sa-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.sa-status--active { background: #dcfce7; color: #166534; }
.sa-status--paused { background: #fef3c7; color: #92400e; }
.sa-status--archived { background: #f3f4f6; color: #6b7280; }
.sa-profile-hero {
  background: linear-gradient(135deg, var(--sa-navy-deep) 0%, var(--sa-navy) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.sa-profile-panel { border-top: 3px solid var(--sa-gold); }
.sa-subpanel { border-radius: 14px; }
.sa-form-panel .sa-field span { display: block; font-size: 0.82rem; color: var(--hint); margin-bottom: 6px; }
.sa-form-panel input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
}
.app.sa-mode .home-top-bar,
.app.mgr-mode .home-top-bar {
  display: none !important;
}
.app.sa-mode .header h1 { color: var(--sa-navy); }

/* Manager — Mini App */
.app.mgr-mode {
  --mgr-blue: var(--brand-blue);
  --mgr-blue-deep: #142d52;
  background: linear-gradient(180deg, #eef3fa 0%, var(--bg) 220px);
}
.mgr-home { padding: 4px 0 24px; }
.mgr-hero {
  background: linear-gradient(135deg, var(--mgr-blue-deep) 0%, var(--mgr-blue) 55%, #2a5088 100%);
  color: #fff;
  border-radius: 18px;
  padding: 18px 16px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(26, 58, 110, 0.2);
}
.mgr-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(249, 115, 22, 0.22);
  color: #fed7aa;
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}
.mgr-hero-title { margin: 0; font-size: 1.15rem; font-weight: 800; line-height: 1.25; }
.mgr-hero-sub { margin: 6px 0 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); line-height: 1.4; }
.mgr-hero-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  align-items: center;
}
html.desktop-web .mgr-hero-periods {
  gap: 8px;
}
.mgr-period-chip {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html.desktop-web .mgr-period-chip {
  font-size: 0.78rem;
  padding: 8px 13px;
}
.mgr-period-chip:hover { background: rgba(255, 255, 255, 0.18); }
.mgr-period-chip.active {
  background: #fff;
  color: var(--mgr-blue);
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(15, 39, 68, 0.18);
}
.mgr-period-chip:active { transform: scale(0.97); }
.mgr-profile-hero {
  background: linear-gradient(135deg, var(--mgr-blue-deep) 0%, var(--mgr-blue) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}
.mgr-profile-hero--compact { padding: 14px; margin-bottom: 12px; border-radius: 14px; }
.mgr-alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff1f2 0%, #fff 100%);
  color: #9f1239;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow);
}
.mgr-alert-icon { font-size: 1.25rem; flex-shrink: 0; }
.mgr-alert-text { flex: 1; font-size: 0.88rem; line-height: 1.35; }
.mgr-alert-go { font-size: 1.2rem; color: #be123c; font-weight: 700; }
.mgr-alert-banner--return {
  border-color: #fde68a;
  background: linear-gradient(90deg, #fffbeb 0%, #fff 100%);
  color: #92400e;
}
.mgr-alert-banner--return .mgr-alert-go { color: #d97706; }
.mgr-alert-banner--cats {
  border-color: #bfdbfe;
  background: linear-gradient(90deg, #eff6ff 0%, #fff 100%);
  color: #1e3a8a;
}
.mgr-alert-banner--cats .mgr-alert-go { color: #1d4ed8; }
.mgr-alert-banner--sub {
  border-color: #f59e0b;
  background: #fffbeb;
}
.mgr-alert-banner--sub .mgr-alert-go { color: #d97706; }
.mgr-action-card--cats .mgr-action-label { font-weight: 700; }
.mgr-dash-block { margin-bottom: 8px; }
.mgr-dash-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.mgr-dash-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.mgr-dash-stat--accent { border-color: #f97316; background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); }
.mgr-dash-stat--sales {
  border-color: #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.15);
}
.mgr-dash-stat--sales .mgr-dash-stat-val { font-size: 1.15rem; }
.mgr-dash-stat--sales .mgr-dash-stat-label { color: #166534; font-weight: 600; }
.mgr-dash-stat-icon { font-size: 1.2rem; margin-bottom: 6px; }
.mgr-dash-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--tg-theme-text-color, var(--mgr-blue));
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.85),
    0 0 3px rgba(255, 255, 255, 0.45);
}
:root.tg-dark .mgr-dash-stat-val,
html.tg-dark .mgr-dash-stat-val {
  color: var(--tg-theme-text-color, #fff);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.mgr-dash-stat--sales .mgr-dash-stat-val {
  color: var(--tg-theme-link-color, #15803d);
}
:root.tg-dark .mgr-dash-stat--sales .mgr-dash-stat-val,
html.tg-dark .mgr-dash-stat--sales .mgr-dash-stat-val {
  color: #86efac;
}
.mgr-dash-stat--btn {
  width: 100%;
  cursor: pointer;
  font: inherit;
  appearance: none;
}
.mgr-dash-stat--btn:active { transform: scale(0.98); }
.mgr-dash-stats--extra { margin-bottom: 16px; }
.mgr-dash-stats--extra .mgr-dash-stat-val { font-size: 0.95rem; }
.mgr-dash-stats--extra .mgr-dash-stat-label { font-size: 0.7rem; line-height: 1.25; }
.mgr-section { margin-bottom: 16px; }
.mgr-section-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mgr-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mgr-action-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}
.mgr-action-card:active { transform: scale(0.98); }
html.desktop-web .mgr-action-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
}
.mgr-action-card--promo,
.mgr-action-card--newprod,
.mgr-action-card--cats {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--card);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.mgr-action-card--promo .mgr-action-label,
.mgr-action-card--newprod .mgr-action-label,
.mgr-action-card--cats .mgr-action-label {
  font-weight: 700;
}
.mgr-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e8eef8;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  overflow: visible;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.mgr-quick-grid .mgr-action-card:nth-child(3n+2) .mgr-action-icon {
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.38);
}
.mgr-quick-grid .mgr-action-card:nth-child(3n+3) .mgr-action-icon {
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.38);
}
.mgr-action-card--promo .mgr-action-icon {
  background: #fce7f3;
  box-shadow: 0 8px 18px rgba(236, 72, 153, 0.48) !important;
}
.mgr-action-card--newprod .mgr-action-icon {
  background: #e0f2fe;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.48) !important;
}
.mgr-action-card--cats .mgr-action-icon {
  background: #dbeafe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.48) !important;
}
html.desktop-web .mgr-action-card:hover .mgr-action-icon {
  filter: brightness(1.06);
}
html.tg-dark .mgr-action-card,
html.tg-dark .mgr-action-card--promo,
html.tg-dark .mgr-action-card--newprod,
html.tg-dark .mgr-action-card--cats {
  background: #252830;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
html.tg-dark .mgr-action-icon {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.45);
}
html.tg-dark .mgr-quick-grid .mgr-action-card:nth-child(3n+2) .mgr-action-icon {
  box-shadow: 0 8px 18px rgba(236, 72, 153, 0.5);
}
html.tg-dark .mgr-quick-grid .mgr-action-card:nth-child(3n+3) .mgr-action-icon {
  box-shadow: 0 8px 18px rgba(56, 189, 248, 0.5);
}
html.tg-dark .mgr-action-card--promo .mgr-action-icon {
  background: rgba(236, 72, 153, 0.18);
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.55) !important;
}
html.tg-dark .mgr-action-card--newprod .mgr-action-icon {
  background: rgba(14, 165, 233, 0.18);
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.55) !important;
}
html.tg-dark .mgr-action-card--cats .mgr-action-icon {
  background: rgba(59, 130, 246, 0.18);
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.55) !important;
}
html.desktop-web.tg-dark .mgr-action-card:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 255, 255, 0.14);
}
.mgr-action-icon img,
.mgr-action-icon svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.mgr-action-label { font-size: 0.9rem; font-weight: 600; line-height: 1.25; flex: 1; min-width: 0; }
.mgr-entity-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--text);
}
.mgr-entity-card--static { cursor: default; }
.mgr-entity-card:active:not(.mgr-entity-card--static) { opacity: 0.92; }
.mgr-entity-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 4px;
}
.mgr-entity-head b,
.mgr-entity-title {
  font-size: 0.95rem;
  min-width: 0;
  word-break: break-word;
}
.mgr-entity-code {
  font-size: 0.78rem;
  background: #eef2ff;
  color: #1e3a8a;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  justify-self: end;
}
html.tg-dark .mgr-entity-code {
  background: rgba(147, 197, 253, 0.18);
  color: #93c5fd;
}
.mgr-entity-sum { font-size: 1rem; font-weight: 800; color: var(--mgr-blue); margin: 4px 0; }
.mgr-entity-meta { font-size: 0.82rem; color: var(--hint); margin-top: 4px; }
.mgr-entity-return-flag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
}
.mgr-order-returns { margin-top: 14px; }
.mgr-entity-card--return {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}
.mgr-entity-preview { font-size: 0.84rem; margin-top: 8px; line-height: 1.4; color: var(--text); }
.mgr-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 12px;
  padding: 0 2px;
  font-size: 0.82rem;
  color: var(--hint);
}
.mgr-list-head b { font-size: 1rem; color: var(--mgr-blue); }
.mgr-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8eef8;
  color: var(--mgr-blue);
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  word-break: break-word;
}
.mgr-status--pending { background: #ffedd5; color: #c2410c; }
.mgr-status--accepted { background: #dcfce7; color: #15803d; }
.mgr-status--cancelled { background: #fee2e2; color: #b91c1c; }
.mgr-mkt-editor { display: flex; flex-direction: column; gap: 10px; }
.mgr-mkt-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.mgr-mkt-prod-results { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.mgr-campaign-card { cursor: pointer; }
@keyframes row-remove {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 480px;
  }
  55% {
    opacity: 0;
    transform: translateX(28px) scale(0.97);
  }
  100% {
    opacity: 0;
    transform: translateX(48px) scale(0.94);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
  }
}
.is-removing {
  overflow: hidden;
  pointer-events: none;
  animation: row-remove 0.32s ease-in forwards;
}
.mgr-detail-btn { margin-top: 10px; }
.mgr-empty-state { line-height: 1.6; padding: 28px 16px; }
.mgr-profile-panel { border-top: 3px solid var(--brand-orange); }
.app.mgr-mode .sm-profile-hero { margin-bottom: 12px; }
.app.mgr-mode .sm-more-page { padding-bottom: 20px; }
.mgr-profile-grid dt { font-size: 0.9rem; font-weight: 650; }
.mgr-profile-grid dd { font-size: 1.08rem; font-weight: 700; margin-bottom: 10px; }
.mgr-profile-grid code { font-size: 1.05rem; font-weight: 700; }
.mgr-profile-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding-bottom: 8px; }
.mgr-profile-actions .btn.block + .btn.block { margin-top: 0; }
.mgr-set-row {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.mgr-set-row .btn { flex: 1; min-width: 0; margin-top: 0; }
.mgr-hint-i {
  width: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--hint);
  font-weight: 800;
  font-style: italic;
  font-size: 1rem;
  cursor: pointer;
}
.mgr-hint-i:hover,
.mgr-hint-i:focus {
  color: var(--text);
  border-color: var(--mgr-blue, var(--brand-blue));
}
.mgr-hint-bubble {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 700;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  box-shadow: var(--shadow);
}
.mgr-hint-bubble.mgr-hint-bubble-up {
  top: auto;
  bottom: calc(100% + 6px);
}
.mgr-map {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  margin: 8px 0 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.mgr-profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  margin: 0 auto 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.mgr-photo-size-hint {
  font-size: 0.82rem;
  color: var(--hint);
  margin: 4px 0 10px;
  text-align: center;
}
.mgr-join-photo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.return-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin: 8px 0;
}
.return-pick-row,
.return-picked-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.return-pick-row b,
.return-picked-row b { font-size: 0.9rem; }
.return-picked-row input {
  width: 88px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.mgr-form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.mgr-form-actions .btn.block + .btn.block { margin-top: 0; }
.mgr-more-profile { margin: 10px 0 0; text-align: left; }
.mgr-more-profile dt { margin-top: 6px; }
.mgr-subpanel { border-radius: 14px; }
.mgr-form-panel .mgr-field { display: block; margin-bottom: 4px; }
.mgr-form-panel .mgr-field + .btn.block { margin-top: 12px; }
.mgr-form-panel .mgr-field span { display: block; font-size: 0.82rem; color: var(--hint); margin-bottom: 6px; }
.mgr-form-panel input,
.mgr-form-panel textarea,
.mgr-search-input,
.mgr-dict-search {
  -webkit-user-select: text;
  user-select: text;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
}
.mgr-form-panel input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
}
.mgr-form-result { margin-top: 12px; }
.mgr-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mgr-setting-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.mgr-setting-val { display: block; font-size: 1rem; font-weight: 800; color: var(--mgr-blue); }
.mgr-setting-lbl { display: block; font-size: 0.72rem; color: var(--hint); margin-top: 4px; }
.mgr-sub-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 14px;
  padding: 14px 14px 12px;
}
.mgr-sub-card--empty {
  background: var(--card);
  border-color: var(--border);
}
.mgr-sub-card--soon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(251, 191, 36, 0.16) 100%);
  border-color: rgba(245, 158, 11, 0.45);
}
.mgr-sub-card--warn {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.12) 0%, rgba(251, 146, 60, 0.16) 100%);
  border-color: rgba(234, 88, 12, 0.45);
}
.mgr-sub-card--danger {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(248, 113, 113, 0.14) 100%);
  border-color: rgba(220, 38, 38, 0.42);
}
.mgr-sub-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hint);
  margin-bottom: 4px;
}
.mgr-sub-card-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.mgr-sub-card-val b { color: var(--mgr-blue, var(--brand-blue, #2563eb)); }
.mgr-sub-card-days {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.mgr-sub-card--soon .mgr-sub-card-days { color: #b45309; }
.mgr-sub-card--warn .mgr-sub-card-days { color: #c2410c; }
.mgr-sub-card--danger .mgr-sub-card-days { color: #b91c1c; }
.mgr-sub-card-price {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text);
}
.mgr-sub-card-price b { color: var(--mgr-blue, var(--brand-blue, #2563eb)); }
.mgr-sub-card-cta {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.22);
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
}
.mgr-sub-card-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--hint);
  line-height: 1.35;
}
.sa-sub-panel {
  margin: 12px 0 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
}
.sa-sub-panel-title {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}
.sa-sub-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--hint);
}
.sa-sub-field input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
}
.sa-sub-meta {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text);
}
.mgr-team-note, .mgr-bot-hint { margin-top: 12px; }
.mgr-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.mgr-search-icon { font-size: 1rem; flex-shrink: 0; opacity: 0.7; }
.mgr-join-store-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.mgr-assign-store-list {
  max-height: 52vh;
  overflow-y: auto;
  padding-bottom: 8px;
}
.mgr-join-store-box .mgr-assign-store-list {
  max-height: 280px;
}
.mgr-assign-store-card { margin-bottom: 8px; }
.mgr-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  color: var(--text);
  outline: none;
}
.mgr-store-detail { padding-bottom: 8px; }
.mgr-store-hero-panel { margin-bottom: 12px; }
.mgr-store-recent {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--hint);
}
.mgr-store-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.mgr-connect-hint {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: #fffbeb;
  font-size: 0.88rem;
  line-height: 1.45;
}
.mgr-connect-hint b { color: var(--brand-orange); }
.mgr-store-action-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.mgr-store-action-btn:active { opacity: 0.92; }
.mgr-cat-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px 8px 6px 6px;
}
.mgr-cat-sort {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.mgr-cat-arrow {
  width: 32px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}
.mgr-cat-open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 6px 4px;
  color: inherit;
}
.mgr-cat-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}
.mgr-cat-actions .btn { flex: 1; }
.mgr-cat-move-row {
  display: flex;
  gap: 8px;
  margin: 6px 0 12px;
}
.mgr-cat-move-row .mgr-select { flex: 1; }
.mgr-cat-prod {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 8px;
}
.mgr-cat-prod input { margin-top: 3px; }
.mgr-cat-prod .mgr-dict-sub { display: block; }
.mgr-cat-hits { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.mgr-cat-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
}
.mgr-field-label {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}
.mgr-store-action-btn--danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff1f2;
}
.mgr-store-panel {
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.app.mgr-mode .bottom-nav button.active .nav-label { color: var(--mgr-blue); font-weight: 700; }
.app.mgr-mode .header h1 { color: var(--mgr-blue); }
.mgr-period-btn.active { background: var(--mgr-blue); color: #fff; border-color: var(--mgr-blue); }

/* Працівники — картки */
.mgr-emp-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
}
.mgr-emp-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.mgr-emp-hero-title { font-size: 1.1rem; font-weight: 700; }
.mgr-emp-hero-sub { font-size: 0.88rem; opacity: 0.9; margin-top: 4px; }
.mgr-emp-tools { margin-bottom: 12px; }
.mgr-emp-grid { display: flex; flex-direction: column; gap: 10px; }
.mgr-emp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
}
.mgr-emp-card--blocked { opacity: 0.75; border-color: #fecaca; background: #fff8f8; }
.mgr-emp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mgr-emp-card-body { flex: 1; min-width: 0; }
.mgr-emp-name { font-weight: 600; font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgr-emp-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.mgr-emp-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}
.mgr-emp-badge--bad { background: #fee2e2; color: #b91c1c; }
.mgr-emp-badge--pending { background: #ffedd5; color: #c2410c; }
html.tg-dark .mgr-emp-badge--pending {
  background: rgba(245, 158, 11, 0.22);
  color: #fdba74;
}
.mgr-emp-section {
  margin: 16px 2px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hint);
}
.mgr-emp-stores { font-size: 0.78rem; color: var(--hint); }
.mgr-emp-id { font-size: 0.75rem; color: var(--hint); margin-top: 2px; }
.mgr-emp-chevron { color: var(--hint); font-size: 1.2rem; }

/* Словники: типи / регіони */
.mgr-dict-panel { padding-top: 14px; }
.mgr-dict-panel > .btn.block { margin: 4px 0 14px; }
.mgr-dict-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mgr-dict-heading { margin: 0 0 4px; font-size: 1.05rem; }
.mgr-dict-desc { margin: 0; font-size: 0.85rem; color: var(--hint); line-height: 1.4; }
.mgr-dict-count {
  flex-shrink: 0;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--mgr-blue, var(--brand-blue));
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mgr-dict-toolbar { margin: 10px 0 4px; }
.mgr-dict-search {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
}
.mgr-dict-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.mgr-join-company {
  margin: 12px 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hint);
}
.onboard-join-host { margin: 12px 0 4px; }
.onboard-join-host .mgr-form-panel { margin: 0; }
.mgr-dict-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mgr-dict-card:active { transform: scale(0.99); }
.mgr-dict-card--type { border-left: 4px solid var(--brand-orange); }
.mgr-dict-card--region { border-left: 4px solid var(--mgr-blue, var(--brand-blue)); }
.mgr-dict-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mgr-dict-icon { font-size: 1.35rem; flex-shrink: 0; }
.mgr-dict-body { flex: 1; min-width: 0; }
.mgr-dict-title { display: block; font-weight: 600; font-size: 0.98rem; }
.mgr-dict-sub { display: block; font-size: 0.78rem; color: var(--hint); margin-top: 2px; }
.mgr-dict-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hint);
}
.mgr-dict-badge--all {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.mgr-dict-chevron { color: var(--hint); font-size: 1.1rem; }
.mgr-cat-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.mgr-cat-actions { display: flex; gap: 8px; }
.mgr-cat-selected-count { margin: 0 0 8px; font-size: 0.85rem; color: var(--hint); }
.mgr-cat-all-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 0.92rem;
}
.mgr-sheets-card {
  margin-top: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(37, 99, 235, 0.01));
}
.mgr-sheets-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.mgr-sheets-title { margin: 0 0 2px; font-size: 0.98rem; }
.mgr-sheets-sub { margin: 0; font-size: 0.8rem; color: var(--hint); }
.mgr-check-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}
.mgr-check-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.9rem;
  cursor: pointer;
}
.mgr-check-chip--on {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.06);
}
.mgr-check-chip-text { flex: 1; line-height: 1.35; }
.mgr-check-chip input { width: 18px; height: 18px; flex-shrink: 0; }
.mgr-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 0.95rem;
}
.sa-stats--metrics { margin: 10px 0 8px; }
.sa-load-today {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg, #f6f8fa);
  font-size: 0.92rem;
  line-height: 1.45;
}
.an-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
@media (min-width: 480px) {
  .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.an-kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.an-kpi--sales { border-color: #86efac; background: #f0fdf4; }
.an-kpi--warn { border-color: #fdba74; background: #fff7ed; }
.an-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}
.an-kpi-label { font-size: 0.76rem; color: var(--hint); margin-top: 4px; }
.an-kpi-hint { font-size: 0.72rem; color: #16a34a; margin-top: 4px; font-weight: 600; }
.an-kpi-hint--down { color: #dc2626; }
.an-chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
}
.an-chart-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.an-line-svg {
  width: 100%;
  max-width: 640px;
  max-height: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.an-axis { font-size: 8px; fill: #6b7280; }
.an-grid { stroke: #e5e7eb; stroke-width: 1; }
.an-chart-caption { font-size: 0.72rem; color: var(--hint); margin-top: 4px; text-align: right; }
.an-chart-card { overflow: hidden; }
html.desktop-web .an-report,
html.desktop-web .an-home-chart {
  max-width: 860px;
}
html.desktop-web .an-line-svg {
  max-width: 560px;
  max-height: 180px;
}
html.desktop-web .an-donut-wrap {
  grid-template-columns: 96px minmax(0, 1fr);
}
html.desktop-web .an-donut-svg { width: 96px; height: 96px; }
html.desktop-web .an-toolbar {
  gap: 8px;
  padding: 10px;
}
html.desktop-web .an-scroll {
  flex-wrap: wrap;
  overflow-x: visible;
  cursor: default;
  padding-bottom: 2px;
}
html.desktop-web .an-chip {
  font-size: 0.8rem;
  padding: 7px 12px;
}
.an-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--hint);
}
.an-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.an-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.an-donut-wrap {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.an-donut-svg { width: 108px; height: 108px; }
.an-donut-total { font-size: 13px; font-weight: 800; fill: var(--text, #111); }
.an-donut-unit { font-size: 9px; fill: #6b7280; }
.an-donut-legend { display: flex; flex-direction: column; gap: 8px; }
.an-donut-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.an-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.an-bars { display: flex; flex-direction: column; gap: 8px; }
.an-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto;
  gap: 8px;
  align-items: center;
}
.an-bar-name {
  font-size: 0.78rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.an-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.an-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #16a34a;
}
.an-bar-val {
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.an-table-wrap { overflow-x: auto; }
.an-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.an-table th, .an-table td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}
.an-table th { color: var(--hint); font-weight: 600; }
.an-home-chart { margin: 0 0 14px; }
.an-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.an-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 2px 2px 6px;
  cursor: grab;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  user-select: none;
}
.an-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.an-scroll.is-dragging .an-chip {
  pointer-events: none;
}
.an-scroll::-webkit-scrollbar {
  height: 4px;
}
.an-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.an-chip {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.an-chip--period { font-weight: 600; opacity: 0.95; }
.an-chip.active {
  background: var(--mgr-blue, var(--brand-blue, #2563eb));
  border-color: transparent;
  color: #fff;
}
.an-home-chart--open {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 0 14px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.an-home-chart--open:active { opacity: 0.92; }
.an-report { margin-top: 8px; }
.an-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.an-filter {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--hint);
}
.an-filter .mgr-select { margin-top: 0; }
.mgr-campaign-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.mgr-campaign-actions .btn { flex: 1; }
html.tg-dark .an-kpi--sales { background: rgba(22, 163, 74, 0.16); border-color: rgba(134, 239, 172, 0.4); }
html.tg-dark .an-toolbar {
  background: #151821;
  border-color: var(--border);
}
html.tg-dark .an-chip {
  background: #2a2f3a;
  color: var(--text);
  border-color: var(--border);
}
html.tg-dark .an-chip.active {
  background: #3b82f6;
  color: #fff;
}
html.tg-dark.desktop-web.desktop-client .prod-card-media {
  background: #1c1c1e;
}
html.tg-dark .an-kpi--warn { background: rgba(249, 115, 22, 0.16); }
html.tg-dark .an-bar-fill { background: #4ade80; }
html.tg-dark .an-grid { stroke: rgba(255, 255, 255, 0.08); }
html.tg-dark .an-axis { fill: #a1a1aa; }
html.tg-dark .an-donut-total { fill: #f4f4f5; }
html.tg-dark .an-kpi-hint--down { color: #fca5a5; }

.sa-chart-card { margin-top: 8px; }
.sa-chart-legend { display: flex; gap: 12px; margin-bottom: 6px; font-size: 0.85rem; }
.sa-chart-key::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}
.sa-chart-key--cpu::before { background: #2563eb; }
.sa-chart-key--ram::before { background: #d97706; }
.sa-load-chart { width: 100%; height: auto; display: block; }
.sa-chart-axis { font-size: 8px; fill: #6b7280; }

html.tg-dark {
  color-scheme: dark;
  --bg: var(--tg-theme-bg-color, #1c1c1e);
  --text: #f4f4f5;
  --hint: #c4c4cc;
  --card: var(--tg-theme-secondary-bg-color, #2c2c2e);
  --border: rgba(255, 255, 255, 0.16);
  --brand-blue: #8ab4ff;
  --accent: var(--tg-theme-button-color, #3b82f6);
  --accent-text: var(--tg-theme-button-text-color, #fff);
  --danger: #f87171;
  --ok: #4ade80;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  --sa-navy: #dbe7ff;
  --sa-navy-deep: #1a2740;
}
html.tg-dark,
html.tg-dark body,
html.tg-dark .app,
html.tg-dark .app.mgr-mode,
html.tg-dark .app.sa-mode {
  background: var(--bg);
  color: var(--text);
}
html.tg-dark .header .logo,
html.tg-dark .search-line,
html.tg-dark .auth-tabs button.active,
html.tg-dark .auth-steps-card,
html.tg-dark .auth-cred-box,
html.tg-dark .product-detail-photo,
html.tg-dark .product-detail .hero,
html.tg-dark .cart-item.invalid,
html.tg-dark .sa-stat--accent,
html.tg-dark .mgr-dash-stat--accent,
html.tg-dark .mgr-dash-stat--sales,
html.tg-dark .sa-status--archived,
html.tg-dark .mgr-emp-card--blocked,
html.tg-dark .panel,
html.tg-dark .prod-card,
html.tg-dark .mgr-setting-tile,
html.tg-dark .mgr-store-hero-panel,
html.tg-dark .mgr-entity-head,
html.tg-dark .cat-tile,
html.tg-dark .cat-row {
  background: var(--card);
  color: var(--text);
}
html.tg-dark .auth-cred-box.staff-id,
html.tg-dark .sa-stat--accent,
html.tg-dark .mgr-dash-stat--accent,
html.tg-dark .mgr-alert-banner {
  background: var(--card);
  background-image: none;
}
html.tg-dark .prod-photo-fallback {
  background: rgba(255, 255, 255, 0.08);
}
html.tg-dark .search-line { color: var(--hint); }
html.tg-dark .prod-actions .fav.active {
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.18);
}
html.tg-dark .btn.danger {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}
html.tg-dark .account-grid dd code,
html.tg-dark .mgr-entity-code,
html.tg-dark .mgr-profile-grid code {
  background: rgba(255, 255, 255, 0.1);
  color: #93c5fd;
}
html.tg-dark .account-grid dt {
  color: #94a3b8;
}
html.tg-dark .mgr-alert-banner,
html.tg-dark .mgr-alert-banner--return,
html.tg-dark .mgr-alert-banner--cats,
html.tg-dark .mgr-alert-banner--sub {
  background: var(--card);
  color: var(--text);
}
html.tg-dark .mgr-period-chip.active {
  background: #f8fafc;
  color: #0f172a;
  border-color: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
html.tg-dark input,
html.tg-dark select,
html.tg-dark textarea {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}
html.tg-dark .sa-action-icon {
  background: var(--sa-action-icon-bg, rgba(255, 255, 255, 0.12));
  box-shadow: none;
}
html.tg-dark .sa-stat-val {
  color: #f4f7ff;
  text-shadow: none;
}
html.tg-dark .sa-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #2563eb 120%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
html.tg-dark .sa-stat,
html.tg-dark .sa-revenue-card,
html.tg-dark .sa-company-card,
html.tg-dark .sa-form-panel {
  background: #1c2230;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
html.tg-dark .sa-stat--accent {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.16) 0%, #1c2230 100%);
  border-color: rgba(251, 191, 36, 0.45);
}
html.tg-dark .sa-stat--project {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.2) 0%, #1c2230 100%);
  border-color: rgba(251, 191, 36, 0.5);
}
html.tg-dark .sa-stat--project .sa-stat-val { color: #fcd34d; }
html.tg-dark .sa-action-label,
html.tg-dark .sa-company-head b,
html.tg-dark .sa-revenue-val {
  color: #f4f7ff;
}
html.tg-dark .sa-stat-label,
html.tg-dark .sa-company-meta,
html.tg-dark .sa-revenue-label,
html.tg-dark .sa-section-title,
html.tg-dark .sa-meta-extra {
  color: #b8c0d4;
}
html.tg-dark .sa-action-card {
  background: linear-gradient(145deg, #1c2230 0%, #151a24 100%);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
html.tg-dark .sa-action--companies {
  --sa-action-accent: #60a5fa;
  --sa-action-icon-bg: rgba(37, 99, 235, 0.35);
  background: linear-gradient(145deg, #1a2744 0%, #152033 100%);
}
html.tg-dark .sa-action--new {
  --sa-action-accent: #34d399;
  --sa-action-icon-bg: rgba(16, 185, 129, 0.32);
  background: linear-gradient(145deg, #14312a 0%, #152033 100%);
}
html.tg-dark .sa-action--analytics {
  --sa-action-accent: #a78bfa;
  --sa-action-icon-bg: rgba(124, 58, 237, 0.35);
  background: linear-gradient(145deg, #261a44 0%, #152033 100%);
}
html.tg-dark .sa-action--pg {
  --sa-action-accent: #22d3ee;
  --sa-action-icon-bg: rgba(14, 116, 144, 0.38);
  background: linear-gradient(145deg, #12333a 0%, #152033 100%);
}
html.tg-dark .sa-action--guide {
  --sa-action-accent: #fbbf24;
  --sa-action-icon-bg: rgba(217, 119, 6, 0.35);
  background: linear-gradient(145deg, #3a2a12 0%, #152033 100%);
}
html.tg-dark .sa-action--load {
  --sa-action-accent: #a5b4fc;
  --sa-action-icon-bg: rgba(99, 102, 241, 0.35);
  background: linear-gradient(145deg, #1f1a44 0%, #152033 100%);
}
html.tg-dark .sa-action--default {
  --sa-action-accent: #94a3b8;
  --sa-action-icon-bg: rgba(71, 85, 105, 0.4);
}
html.tg-dark .sa-action-go { color: var(--sa-action-accent); }
html.tg-dark .sa-status--active { background: rgba(34, 197, 94, 0.2); color: #86efac; }
html.tg-dark .sa-status--paused { background: rgba(251, 191, 36, 0.18); color: #fcd34d; }
html.tg-dark .sa-status--archived { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
html.tg-dark .app.mgr-mode {
  --mgr-blue: #8ab4ff;
  --mgr-blue-deep: #1a2740;
  background: var(--bg);
}
html.tg-dark .app.sa-mode .header h1,
html.tg-dark .app.mgr-mode .header h1,
html.tg-dark .header h1,
html.tg-dark .section-title,
html.tg-dark .product-detail h2,
html.tg-dark .cart-name,
html.tg-dark .cart-empty-title,
html.tg-dark .fav-empty-title,
html.tg-dark .auth-hero-title,
html.tg-dark .auth-role-card-title,
html.tg-dark .mgr-photo-title,
html.tg-dark .mgr-photo-product-name,
html.tg-dark .mgr-photo-product-title,
html.tg-dark .app.mgr-mode .menu-item.mgr-photo-cat-item,
html.tg-dark .mgr-photo-cat-label,
html.tg-dark .mgr-photo-stats,
html.tg-dark .mgr-form-hint,
html.tg-dark .mgr-staff-id,
html.tg-dark .mgr-list-head b,
html.tg-dark .mgr-setting-val,
html.tg-dark .mgr-entity-sum,
html.tg-dark .mgr-dash-stat-val,
html.tg-dark h2,
html.tg-dark h3 {
  color: var(--text);
}
html.tg-dark .header .sub,
html.tg-dark .auth-hero-sub,
html.tg-dark .auth-role-card-desc,
html.tg-dark .auth-field-hint,
html.tg-dark .mgr-photo-product-meta,
html.tg-dark .mgr-staff-meta,
html.tg-dark .mgr-photo-cat-count,
html.tg-dark .cart-empty-hint,
html.tg-dark .fav-empty-hint {
  color: var(--hint);
}
html.tg-dark .bottom-nav {
  background: var(--bg);
  border-top-color: var(--border);
}
html.tg-dark .bottom-nav button { color: var(--hint); }
html.tg-dark .bottom-nav button.active,
html.tg-dark .app.mgr-mode .bottom-nav button.active .nav-label {
  color: var(--brand-blue);
}
html.tg-dark .auth-role-card,
html.tg-dark .auth-tabs button,
html.tg-dark .more-row,
html.tg-dark .profile-card,
html.tg-dark .search-promo-grid,
html.tg-dark .mgr-day-chip,
html.tg-dark .mgr-setting-tile {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}
html.tg-dark .mgr-sub-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(251, 191, 36, 0.12) 100%);
  border-color: rgba(96, 165, 250, 0.35);
}
html.tg-dark .mgr-sub-card--empty {
  background: var(--card);
  border-color: var(--border);
}
html.tg-dark .mgr-sub-card--soon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(251, 191, 36, 0.14) 100%);
  border-color: rgba(251, 191, 36, 0.45);
}
html.tg-dark .mgr-sub-card--warn {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(251, 146, 60, 0.14) 100%);
  border-color: rgba(251, 146, 60, 0.45);
}
html.tg-dark .mgr-sub-card--danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(248, 113, 113, 0.12) 100%);
  border-color: rgba(248, 113, 113, 0.4);
}
html.tg-dark .mgr-sub-card-val b,
html.tg-dark .mgr-sub-card-price b { color: #93c5fd; }
html.tg-dark .mgr-sub-card--soon .mgr-sub-card-days { color: #fbbf24; }
html.tg-dark .mgr-sub-card--warn .mgr-sub-card-days { color: #fdba74; }
html.tg-dark .mgr-sub-card--danger .mgr-sub-card-days { color: #fca5a5; }
html.tg-dark .mgr-sub-card-cta {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.3);
  color: #e5e7eb;
}
html.tg-dark .sa-sub-panel {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.16) 0%, rgba(251, 191, 36, 0.1) 100%);
  border-color: rgba(96, 165, 250, 0.35);
}
html.tg-dark .sa-sub-field input {
  background: var(--card);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}
html.tg-dark .mgr-day-chip.active {
  background: rgba(138, 180, 255, 0.2);
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
html.tg-dark .overlay .overlay-head input,
html.tg-dark .search-line {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}
html.tg-dark .search-line-text { color: var(--hint); }
html.tg-dark .header .logo { background: var(--card); }
html.tg-dark .toast.err {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}
html.tg-dark .toast.ok {
  background: rgba(74, 222, 128, 0.16);
  color: #bbf7d0;
}
html.tg-dark .auth-card,
html.tg-dark .auth-shell {
  color: var(--text);
}
html.tg-dark label,
html.tg-dark .auth-field span,
html.tg-dark .auth-role-label {
  color: var(--text);
}

.site-brand,
.theme-toggle {
  display: none;
}

html:not(.desktop-web):not(.tg-miniapp) .theme-toggle--mobile:not([hidden]) {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0 2px 0 4px;
  min-height: 0;
  height: auto;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
}
html:not(.desktop-web) .theme-toggle--mobile .theme-toggle-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9fd4ff 0%, #6eb6f5 55%, #4aa3f0 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), inset 0 6px 10px rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
html:not(.desktop-web).tg-dark .theme-toggle--mobile .theme-toggle-track {
  background: linear-gradient(180deg, #2a3358 0%, #1b2140 60%, #12162a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -6px 10px rgba(0, 0, 0, 0.28);
}
html:not(.desktop-web) .theme-toggle--mobile .theme-toggle-sun,
html:not(.desktop-web) .theme-toggle--mobile .theme-toggle-moon {
  position: absolute;
  top: 50%;
  font-size: 12px;
  line-height: 1;
  display: inline;
}
html:not(.desktop-web) .theme-toggle--mobile .theme-toggle-sun {
  left: 6px;
  transform: translateY(-50%);
  opacity: 1;
}
html:not(.desktop-web) .theme-toggle--mobile .theme-toggle-moon {
  right: 6px;
  transform: translateY(-50%) scale(0.75);
  opacity: 0.3;
}
html:not(.desktop-web).tg-dark .theme-toggle--mobile .theme-toggle-sun {
  opacity: 0.22;
}
html:not(.desktop-web).tg-dark .theme-toggle--mobile .theme-toggle-moon {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
html:not(.desktop-web) .theme-toggle--mobile .theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0%, #fff6d6 42%, #ffe08a 100%);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.2);
  transition: transform 0.35s ease, background 0.35s ease;
}
html:not(.desktop-web).tg-dark .theme-toggle--mobile .theme-toggle-knob {
  transform: translateX(22px);
  background: radial-gradient(circle at 35% 30%, #f8fafc 0%, #dbe4f0 55%, #b7c4d6 100%);
}
html.desktop-web .theme-toggle--mobile,
html.tg-miniapp .theme-toggle--mobile,
.theme-toggle--mobile[hidden],
.home-top-bar .theme-toggle--mobile[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.desktop-web,
html.desktop-web body {
  background: var(--bg);
}
html.desktop-web,
html.desktop-web body,
html.desktop-web .app,
html.desktop-web .bottom-nav {
  transition: background-color 0.45s ease, color 0.35s ease;
}
html.desktop-web .app {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding-bottom: 28px;
  box-shadow: none;
}
html.desktop-web #screen-setup,
html.desktop-web #screen-loading {
  max-width: none;
}
html.desktop-web #screen-setup:not(.hidden) {
  position: fixed;
  top: 92px;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  transform: none;
  width: auto;
  z-index: 5;
  max-width: none;
  padding: 16px 24px 32px;
}
html.desktop-web .bottom-nav {
  position: sticky;
  top: 0;
  bottom: auto;
  order: -1;
  max-width: none;
  width: 100%;
  height: 92px;
  padding: 0 28px;
  gap: 0;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  border-top: none;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  z-index: 50;
  box-shadow: 0 1px 0 var(--border);
}
html.desktop-web .site-nav-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  grid-column: 2;
  justify-self: center;
}
html.desktop-web .site-brand {
  display: flex;
  align-items: center;
  gap: 0;
  margin-right: 0;
  flex: 0 0 auto;
  grid-column: 1;
  justify-self: start;
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
html.desktop-web .site-brand img {
  width: auto;
  height: 78px;
  max-width: 340px;
  object-fit: contain;
}
html.desktop-web.tg-dark .site-brand img {
  height: 72px;
  max-width: 360px;
}
html.desktop-web .site-brand span {
  display: none;
}
html.desktop-web .bottom-nav button[data-tab] {
  flex: 0 0 auto;
  flex-direction: row;
  gap: 8px;
  padding: 0 14px;
  min-height: 42px;
  border-radius: 11px;
  font-size: 0.9rem;
}
html.desktop-web .bottom-nav button[data-tab] .nav-label {
  width: auto;
  overflow: visible;
  padding: 0;
}
html.desktop-web .bottom-nav button[data-tab]:hover {
  background: rgba(15, 23, 42, 0.06);
}
html.desktop-web.tg-dark .bottom-nav button[data-tab]:hover {
  background: rgba(255, 255, 255, 0.08);
}
html.desktop-web .bottom-nav button[data-tab].active {
  background: rgba(26, 58, 110, 0.1);
}
html.desktop-web:not(.tg-miniapp) .theme-toggle:not(.theme-toggle--mobile) {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: 0;
  flex: 0 0 auto;
  grid-column: 3;
  justify-self: end;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0;
  height: auto;
  min-height: 0;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
html.desktop-web .theme-toggle-track {
  position: relative;
  width: 76px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9fd4ff 0%, #6eb6f5 55%, #4aa3f0 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), inset 0 8px 12px rgba(255, 255, 255, 0.28);
  overflow: hidden;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
html.desktop-web.tg-dark .theme-toggle-track {
  background: linear-gradient(180deg, #2a3358 0%, #1b2140 60%, #12162a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -8px 14px rgba(0, 0, 0, 0.28);
}
html.desktop-web .theme-toggle-sun,
html.desktop-web .theme-toggle-moon {
  position: absolute;
  top: 50%;
  font-size: 15px;
  line-height: 1;
  display: inline;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 1.2, 0.36, 1);
}
html.desktop-web .theme-toggle-sun {
  left: 8px;
  transform: translateY(-50%) rotate(0deg) scale(1);
  opacity: 1;
}
html.desktop-web .theme-toggle-moon {
  right: 8px;
  transform: translateY(-50%) rotate(-40deg) scale(0.7);
  opacity: 0.28;
}
html.desktop-web.tg-dark .theme-toggle-sun {
  transform: translateY(-50%) rotate(90deg) scale(0.7);
  opacity: 0.22;
}
html.desktop-web.tg-dark .theme-toggle-moon {
  transform: translateY(-50%) rotate(0deg) scale(1);
  opacity: 1;
}
html.desktop-web .theme-toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0%, #fff6d6 42%, #ffe08a 100%);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2), 0 0 0 4px rgba(255, 220, 120, 0.18);
  transition: transform 0.55s cubic-bezier(0.22, 1.35, 0.36, 1), background 0.5s ease, box-shadow 0.5s ease;
}
html.desktop-web.tg-dark .theme-toggle-knob {
  transform: translateX(36px);
  background: radial-gradient(circle at 35% 30%, #f8fafc 0%, #dbe4f0 55%, #b7c4d6 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 0 0 5px rgba(148, 180, 255, 0.16);
}
html.desktop-web .theme-toggle-text {
  min-width: 2.6em;
  transition: opacity 0.25s ease;
}
html.desktop-web .theme-toggle:hover .theme-toggle-track {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14), 0 0 0 4px rgba(26, 58, 110, 0.08);
}
html.desktop-web.tg-dark .theme-toggle:hover .theme-toggle-track {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 4px rgba(255, 255, 255, 0.06);
}
html.desktop-web .theme-toggle:active .theme-toggle-knob {
  transform: scale(0.92);
}
html.desktop-web.tg-dark .theme-toggle:active .theme-toggle-knob {
  transform: translateX(36px) scale(0.92);
}
@media (prefers-reduced-motion: reduce) {
  html.desktop-web .theme-toggle-track,
  html.desktop-web .theme-toggle-knob,
  html.desktop-web .theme-toggle-sun,
  html.desktop-web .theme-toggle-moon,
  html.desktop-web,
  html.desktop-web body,
  html.desktop-web .app {
    transition: none;
  }
}
html.tg-miniapp .theme-toggle {
  display: none !important;
}
html.desktop-web .bottom-nav.nav-chrome-only button[data-tab] {
  display: none !important;
}
html.desktop-web .header-stack {
  position: sticky;
  top: 92px;
}
html.desktop-web main {
  padding: 22px 36px 40px;
}
html.desktop-web .overlay,
html.desktop-web #promo-overlay {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  transform: none;
  top: 92px;
  bottom: 0;
}
html.desktop-web #header-brand-logo {
  display: none;
}
html.desktop-web .cat-grid,
html.desktop-web .search-promo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
html.desktop-web.desktop-client main {
  max-width: none;
  margin: 0 auto;
  width: 100%;
}
html.desktop-web.desktop-client .cat-grid {
  gap: 18px;
}
html.desktop-web.desktop-client .cat-tile {
  border-radius: 18px;
}
html.desktop-web.desktop-client .cat-tile img,
html.desktop-web.desktop-client .cat-tile .cat-emoji-fallback {
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
html.desktop-web.desktop-client .cat-tile .cat-emoji-fallback {
  font-size: 3.2rem;
}
html.desktop-web.desktop-client .cat-tile .cat-body {
  padding: 14px 16px 16px;
}
html.desktop-web.desktop-client .cat-tile .name {
  font-size: 1.05rem;
  font-weight: 800;
}
html.desktop-web.desktop-client .cat-tile .count {
  font-size: 0.88rem;
  margin-top: 4px;
}
html.desktop-web.desktop-client .cat-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
html.desktop-web.desktop-client .cat-row {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}
html.desktop-web.desktop-client .cat-row img,
html.desktop-web.desktop-client .cat-row .cat-emoji-fallback {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}
html.desktop-web.desktop-client .cat-row .cat-emoji-fallback {
  font-size: 3.2rem;
}
html.desktop-web.desktop-client .cat-row .info {
  padding: 14px 16px 16px;
}
html.desktop-web.desktop-client .cat-row .name {
  font-size: 1.08rem;
}
html.desktop-web.desktop-client .prod-list,
html.desktop-web.desktop-client .fav-list,
html.desktop-web.desktop-client #home-popular {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
html.desktop-web.desktop-client .prod-card,
html.desktop-web.desktop-client .prod-card--list {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}
html.desktop-web.desktop-client .prod-card img,
html.desktop-web.desktop-client .prod-card-media,
html.desktop-web.desktop-client .prod-photo-fallback {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}
html.desktop-web.desktop-client .prod-card-media {
  overflow: hidden;
  padding: 12px;
  box-sizing: border-box;
  background: #f8fafc;
}
html.desktop-web.desktop-client .prod-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  border-radius: 0;
}
html.desktop-web.desktop-client .prod-card img,
html.desktop-web.desktop-client .prod-photo-fallback {
  object-fit: contain !important;
  object-position: center;
  padding: 12px;
  box-sizing: border-box;
}
html.desktop-web.desktop-client .prod-photo-fallback {
  font-size: 2.6rem;
}
html.desktop-web.desktop-client .prod-card .info {
  padding: 12px 14px 6px;
}
html.desktop-web.desktop-client .prod-card .name {
  font-size: 1.02rem;
  line-height: 1.35;
  margin-bottom: 6px;
}
html.desktop-web.desktop-client .prod-card .meta {
  font-size: 1.02rem;
}
html.desktop-web.desktop-client .prod-actions {
  flex-direction: row;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 12px;
  align-self: stretch;
  align-items: center;
}
html.desktop-web.desktop-client .prod-actions-btns {
  flex-direction: row;
  gap: 8px;
}
html.desktop-web.desktop-client .prod-actions-btns button {
  min-height: 40px;
  min-width: 40px;
  border-radius: 12px;
}
html.desktop-web.desktop-client .prod-qty-stepper {
  border-radius: 12px;
}
html.desktop-web .account-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(188px, 240px));
  justify-content: start;
  gap: 12px;
}
html.desktop-web .account-legal {
  margin: 12px 0 4px;
}
html.desktop-web .account-actions .btn {
  width: 100%;
  min-height: 88px;
  margin-top: 0;
  padding: 16px 12px;
  border-radius: 14px;
  white-space: normal;
  line-height: 1.3;
  font-size: 0.95rem;
}
html.desktop-web .account-actions .btn.block + .btn.block {
  margin-top: 0;
}
html.desktop-web .account-actions .btn.danger:hover {
  border-color: var(--danger);
  box-shadow: 0 10px 26px rgba(185, 28, 28, 0.16);
}
html.desktop-web .menu-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(188px, 240px));
  justify-content: start;
  gap: 12px;
}
html.desktop-web .menu-item {
  width: auto;
  min-height: 88px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: 14px;
  font-weight: 700;
}
html.desktop-web .menu-item span {
  display: none;
}
html.desktop-web.desktop-client:has(#tab-cart:not(.hidden)) {
  overflow: hidden;
}
html.desktop-web.desktop-client:has(#tab-cart:not(.hidden)) body,
html.desktop-web.desktop-client:has(#tab-cart:not(.hidden)) .app {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}
html.desktop-web.desktop-client:has(#tab-cart:not(.hidden)) main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
html.desktop-web.desktop-client:has(#tab-cart:not(.hidden)) #screen-main:not(.hidden),
html.desktop-web.desktop-client:has(#tab-cart:not(.hidden)) #tab-pages {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
html.desktop-web.desktop-client #tab-cart:not(.hidden) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}
html.desktop-web.desktop-client .cart-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr);
  justify-content: stretch;
  max-width: none;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  gap: 32px;
  align-items: stretch;
  overflow: hidden;
  padding-right: 16px;
}
html.desktop-web.desktop-client .cart-items {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-gutter: stable;
}
html.desktop-web.desktop-client .cart-items::-webkit-scrollbar {
  width: 10px;
}
html.desktop-web.desktop-client .cart-items::-webkit-scrollbar-thumb {
  background: rgba(26, 58, 110, 0.28);
  border-radius: 999px;
}
html.desktop-web.desktop-client .cart-item {
  grid-template-columns: 80px minmax(0, 1fr) minmax(108px, max-content) minmax(108px, max-content) auto 40px;
  grid-template-areas: "photo body price sum actions del";
  align-items: center;
  column-gap: 20px;
  row-gap: 0;
  padding: 16px 18px;
  overflow: hidden;
  border-radius: 16px;
  min-height: 108px;
  min-width: 0;
  flex-shrink: 0;
}
html.desktop-web.desktop-client .cart-pricing {
  display: contents;
}
html.desktop-web.desktop-client .cart-price {
  grid-area: price;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}
html.desktop-web.desktop-client .cart-line-sum {
  grid-area: sum;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  font-size: 0.98rem;
  color: var(--brand-blue);
  white-space: nowrap;
}
html.desktop-web.desktop-client .cart-price::before,
html.desktop-web.desktop-client .cart-line-sum::before {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
html.desktop-web.desktop-client .cart-price::before { content: "Ціна"; }
html.desktop-web.desktop-client .cart-line-sum::before { content: "Сума"; }
html.desktop-web.desktop-client .cart-photo-btn,
html.desktop-web.desktop-client .cart-photo-btn.cart-photo--empty,
html.desktop-web.desktop-client .cart-item .cart-photo {
  width: 80px;
  height: 80px;
  aspect-ratio: auto;
  border-radius: 12px;
  flex-shrink: 0;
}
html.desktop-web.desktop-client .cart-item .cart-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
}
html.desktop-web.desktop-client .cart-body {
  padding: 0;
}
html.desktop-web.desktop-client .cart-name {
  font-size: 1.02rem;
  padding-top: 2px;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
html.desktop-web.desktop-client .recent-card {
  flex-basis: 122px;
  width: 122px;
  padding: 10px;
}
html.desktop-web.desktop-client .recent-card-img,
html.desktop-web.desktop-client .recent-card .no-photo {
  width: 102px;
  height: 102px;
}
html.desktop-web.desktop-client .cart-actions {
  margin-top: 0;
  flex-shrink: 0;
}
html.desktop-web.desktop-client .cart-del {
  align-self: center;
}
html.desktop-web.desktop-client .cart-dock {
  grid-column: 2;
  margin-top: 0;
  align-self: start;
  position: sticky;
  top: 0;
  width: 100%;
  min-width: 280px;
  overflow: visible;
  flex-shrink: 0;
}
html.desktop-web.desktop-client .cart-dock-toggle { display: none; }
html.desktop-web.desktop-client .cart-summary-slot {
  display: block;
}
html.desktop-web.desktop-client .cart-summary {
  grid-column: auto;
  margin-top: 0;
  align-self: start;
  position: static;
  width: 100%;
  min-width: 0;
  overflow: visible;
  flex-shrink: 0;
}
html.desktop-web.desktop-client .cart-total-row strong {
  white-space: nowrap;
}
html.desktop-web.desktop-client .cart-summary .btn {
  white-space: normal;
}
html.desktop-web .scroll-top-btn {
  right: 28px;
  bottom: 28px;
  width: 52px;
  height: 52px;
  z-index: 60;
  font-size: 1.35rem;
}
html.desktop-web .auth-shell {
  max-width: 460px;
  margin: 32px auto 0;
}
@media (min-width: 1100px) {
  html.desktop-web:not(.desktop-client) .cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1440px) {
  html.desktop-web .search-promo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  html.desktop-web.desktop-client .cat-grid,
  html.desktop-web.desktop-client .cat-list,
  html.desktop-web.desktop-client .prod-list,
  html.desktop-web.desktop-client .fav-list,
  html.desktop-web.desktop-client #home-popular {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1800px) {
  html.desktop-web.desktop-client .cat-grid,
  html.desktop-web.desktop-client .cat-list,
  html.desktop-web.desktop-client .prod-list,
  html.desktop-web.desktop-client .fav-list,
  html.desktop-web.desktop-client #home-popular {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
html.desktop-web.desktop-client .product-detail {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
  gap: 8px 28px;
  padding: 20px 20px 16px;
  max-height: none;
  align-items: start;
}
html.desktop-web.desktop-client .product-detail-photo {
  height: auto;
  max-height: none;
  min-height: 280px;
  padding: 0;
  border-radius: 16px;
}
html.desktop-web.desktop-client .product-detail .hero {
  max-height: min(62vh, 520px);
  border-radius: 16px;
}
html.desktop-web.desktop-client .product-detail-info {
  padding-top: 18px;
}
html.desktop-web.desktop-client .product-detail-info h2 {
  padding-top: 6px;
  font-size: 1.28rem;
}
.search-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}
.search-filters select,
.search-filters input {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  padding: 0 10px;
  font-size: 0.9rem;
}
#search-filter-sort {
  grid-column: 1 / -1;
}
html.desktop-web .search-filters {
  grid-template-columns: 1.3fr 0.9fr 0.7fr 0.7fr 1.1fr;
  max-width: 1080px;
  padding: 8px 14px 12px;
}
html.desktop-web #search-filter-sort {
  grid-column: auto;
}
.toast.notify {
  background: #eef4ff;
  color: var(--brand-blue);
}
.badge.inbox-badge {
  background: #dc2626;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-top-btn {
    transition: none;
    transform: none;
  }
  .prod-card,
  .cat-tile,
  .cat-row,
  .search-promo-tile,
  .recent-card,
  html.desktop-web .account-actions .btn,
  html.desktop-web .menu-item {
    transition: none;
  }
  .prod-card:hover,
  .cat-tile:hover,
  .cat-row:hover,
  .search-promo-tile:hover,
  .recent-card:hover,
  html.desktop-web .account-actions .btn:hover,
  html.desktop-web .menu-item:hover {
    transform: none;
  }
}

.loyalty-home-card {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
}
.loyalty-home-label { font-size: 0.72rem; font-weight: 700; color: var(--hint); text-transform: uppercase; letter-spacing: 0.04em; }
.loyalty-home-val { margin-top: 4px; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.loyalty-home-val b { color: #b45309; }
.loyalty-home-lvl { font-size: 0.82rem; font-weight: 650; color: var(--hint); margin-left: 6px; }
.loyalty-home-prog { margin-top: 6px; font-size: 0.78rem; color: var(--hint); }
.loyalty-home-bar {
  margin-top: 6px; height: 6px; border-radius: 999px; background: rgba(15, 23, 42, 0.08); overflow: hidden;
}
.loyalty-home-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #2563eb); }
.loyalty-cart-box {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
}
.loyalty-cart-head { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.loyalty-cart-label { display: block; font-size: 0.78rem; color: var(--hint); margin-bottom: 4px; }
.loyalty-cart-box input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 700;
}
.loyalty-cart-pay { margin-top: 6px; font-size: 0.88rem; font-weight: 700; color: var(--text); }
.sa-loyalty-panel {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.sa-loyalty-panel .sa-sub-field,
.sa-loyalty-panel .sa-loy-field {
  min-width: 0;
  max-width: 100%;
}
.sa-loyalty-panel .sa-loy-levels { display: flex; flex-direction: column; gap: 10px; max-width: 100%; }
.sa-loyalty-panel .sa-loy-level {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.sa-loy-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}
.sa-loy-del {
  border: none;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  cursor: pointer;
}
.sa-loy-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--hint);
}
.sa-loyalty-panel .sa-loy-level input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg, #fff);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
.sa-loyalty-toggle {
  flex-direction: row !important; align-items: center; justify-content: space-between;
}
.sa-loyalty-toggle input { width: auto !important; }
.loyalty-settings-card {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
}
.loyalty-rules, .loyalty-levels, .loyalty-ledger { margin-top: 12px; }
.loyalty-rules-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hint);
  margin-bottom: 6px;
}
.loyalty-rules ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
}
.loyalty-level-row, .loyalty-ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.loyalty-level-row.is-current { font-weight: 800; color: #b45309; }
.loyalty-ledger-row .pos { color: #15803d; font-weight: 700; }
.loyalty-ledger-row .neg { color: #b91c1c; font-weight: 700; }
.loyalty-hint { margin: 10px 0 0; font-size: 0.78rem; color: var(--hint); line-height: 1.35; }
html.tg-dark .loyalty-home-card,
html.tg-dark .loyalty-settings-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(37, 99, 235, 0.14) 100%);
  border-color: rgba(251, 191, 36, 0.4);
}
html.tg-dark .loyalty-home-val b { color: #fbbf24; }
html.tg-dark .loyalty-home-bar { background: rgba(255, 255, 255, 0.08); }
html.tg-dark .loyalty-cart-box {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
}
html.tg-dark .sa-loy-level { background: #1c2230; border-color: rgba(255,255,255,0.1); }
html.tg-dark .sa-loy-del { background: rgba(248, 113, 113, 0.18); color: #fecaca; }
html.tg-dark .loyalty-level-row.is-current { color: #fbbf24; }
html.tg-dark .loyalty-level-row, html.tg-dark .loyalty-ledger-row {
  border-bottom-color: rgba(255,255,255,0.08);
}

/* Pull-to-refresh */
.ptr-indicator {
  position: fixed;
  top: calc(6px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 2500;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%) translateY(-56px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.ptr-indicator.ptr-visible { opacity: 1; }
.ptr-spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent, var(--brand-blue, #1a3a6e));
  border-radius: 50%;
}
.ptr-indicator.ptr-ready .ptr-spinner,
.ptr-indicator.ptr-refreshing .ptr-spinner {
  animation: spin 0.7s linear infinite;
}
html.tg-dark .ptr-indicator {
  background: #252830;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* === Bulk store select (kept from Progect_Fish) === */
.mgr-stores-select-btn {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.mgr-stores-select-btn.active {
  background: var(--mgr-blue, #2563eb);
  border-color: transparent;
  color: #fff;
}
.mgr-stores-select-hint { margin: 0 0 10px; }
.mgr-entity-card--selectable {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.mgr-entity-card--selected {
  border-color: var(--mgr-blue, #2563eb);
  box-shadow: 0 0 0 1px var(--mgr-blue, #2563eb);
}
.mgr-store-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: transparent;
}
.mgr-entity-card--selected .mgr-store-check {
  background: var(--mgr-blue, #2563eb);
  border-color: var(--mgr-blue, #2563eb);
}
.mgr-store-card-main { flex: 1; min-width: 0; }
.mgr-store-open-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  align-self: center;
}
.mgr-stores-host--bulk { padding-bottom: 120px; }
.mgr-bulk-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 650;
  width: calc(100% - 24px);
  max-width: 536px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
.mgr-bulk-bar-count {
  font-size: 0.84rem;
  color: var(--hint);
  margin-bottom: 8px;
}
.mgr-bulk-bar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mgr-bulk-bar-actions .btn {
  margin: 0;
  font-size: 0.82rem;
  padding: 10px 8px;
}

