: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);
  --app-max: 560px;
  --nav-h: 76px;
  --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: hidden;
}
.app {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
.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; }
.header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header .sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header .logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: none;
  flex-shrink: 0;
}
.header .brand-logo {
  width: 44px;
  height: 44px;
  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: 4px 8px 4px 0;
  cursor: pointer;
  color: var(--accent);
}
.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;
}
.header-return.hidden { display: none; }
.home-top-bar {
  padding: var(--header-search-gap) 12px 0;
  background: transparent;
}
.home-top-bar.hidden { display: none; }
.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; }
#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: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
}
.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-carousel {
  position: relative;
  margin-bottom: 14px;
  min-width: 0;
}
.promo-carousel .section-title { margin-bottom: 8px; }
.promo-carousel-track { position: relative; min-width: 0; }
.promo-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  touch-action: pan-x;
}
.promo-scroll::-webkit-scrollbar { display: none; }
.promo-scroll.snap-one > * { scroll-snap-stop: always; }
.promo-card-mini {
  scroll-snap-align: start;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.promo-dots.hidden { display: none; }
.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.promo-dot.active {
  width: 18px;
  background: var(--brand-orange);
}
.promo-nav {
  display: none;
}
.promo-card-mini--banner .promo-banner-frame {
  width: 100%;
  aspect-ratio: 1200 / 450;
  background: var(--bg);
  overflow: hidden;
}
.promo-card-mini--banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg);
}
.promo-banner-fallback {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, #eff6ff, #fff);
}
.promo-caption {
  padding: 12px 14px;
}
.promo-caption .t {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.promo-caption--plain .t { margin-bottom: 6px; }
.promo-caption .s {
  font-size: 0.88rem;
  color: var(--hint);
}
.promo-card-mini--banner .promo-caption { display: none; }
.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);
}
.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: 8px; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  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 {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg);
}
.cat-row .cat-emoji-fallback {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 12px;
  font-size: 2.2rem;
}
.cat-row .info { flex: 1; min-width: 0; }
.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 { display: flex; flex-direction: column; gap: 10px; }
.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 img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg);
  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.82rem; color: var(--hint); }
.prod-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}
.prod-actions button {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
}
.prod-actions .add { background: var(--accent); color: var(--accent-text); }
.prod-actions .fav {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.prod-actions .fav.active { color: #e11d48; border-color: #fecdd3; background: #fff1f2; }
.cart-page { display: flex; flex-direction: column; gap: 12px; }
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex;
  gap: 12px;
  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-item .cart-photo {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.cart-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--hint);
}
.cart-item .cart-body { flex: 1; min-width: 0; }
.cart-name { font-weight: 600; font-size: 0.94rem; line-height: 1.3; }
.cart-promo { font-size: 0.82rem; color: var(--hint); margin-top: 2px; }
.cart-price { font-size: 0.9rem; margin-top: 4px; color: var(--text); }
.cart-unit { color: var(--hint); }
.cart-item .warn { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }
.cart-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.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 { margin-left: auto; color: var(--danger); border-color: #fecaca; }
.cart-summary { margin-top: 4px; }
.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-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:disabled { opacity: 0.45; cursor: not-allowed; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.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.9rem; }
.profile-grid dt { color: var(--hint); font-size: 0.78rem; }
.profile-grid dd { margin: 0 0 8px; }
.order-card, .return-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.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: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 200;
  width: 100%;
  max-width: var(--app-max);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.bottom-nav button {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--hint);
  cursor: pointer;
  padding: 8px 2px 6px;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 100%;
}
.bottom-nav button .ico {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.28rem;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
}
.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); }
.nav-ico-img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.82;
  transition: opacity 0.15s ease, transform 0.15s ease;
  image-rendering: -webkit-optimize-contrast;
}
.nav-ico-img--boost {
  transform: scale(1.18);
}
.bottom-nav button.active .nav-ico-img {
  opacity: 1;
}
.fav-empty-icon .nav-ico-img {
  width: 72px;
  height: 72px;
  opacity: 1;
}
.bottom-nav .badge {
  position: absolute;
  top: -2px;
  right: -6px;
  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; }
.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) + 16px);
  z-index: 60;
  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;
  max-width: var(--app-max);
  margin: 0 auto;
}
.toast.show { transform: translateY(0); }
.toast.err { background: #fef2f2; color: var(--danger); }
.toast.ok { background: #f0fdf4; color: var(--ok); }
.hidden { display: none !important; }
.overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.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: var(--app-max);
  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;
}

@media (min-width: 900px) {
  :root {
    --app-max: 1120px;
  }

  main { padding: 18px 22px 22px; }

  .section-title { font-size: 1.08rem; margin-bottom: 12px; }

  .promo-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-blue);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
  }
  .promo-nav:disabled {
    opacity: 0.35;
    cursor: default;
  }
  .promo-nav--prev { left: -6px; }
  .promo-nav--next { right: -6px; }
  .promo-carousel.has-nav .promo-scroll {
    scroll-padding-inline: 0;
  }

  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .cat-tile img, .cat-emoji-fallback { height: 110px; }

  .prod-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .prod-card { height: 100%; }

  .cart-page { flex-direction: row; align-items: flex-start; }
  .cart-items { flex: 1; min-width: 0; }
  .cart-summary {
    width: 360px;
    flex: 0 0 360px;
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }

  .overlay { max-width: 820px; }
  #promo-overlay { max-width: 820px; }
}

@media (min-width: 1200px) {
  .prod-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
}
#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 { cursor: pointer; }
.prod-card .info { cursor: pointer; }
.product-detail { display: flex; flex-direction: column; gap: 14px; }
.product-detail .hero {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}
.product-detail .price { font-size: 1.25rem; font-weight: 800; }
.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: 8px; }
.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(88vw, 220px);
  height: auto;
  max-height: 168px;
  object-fit: contain;
  margin: 0 auto 4px;
  display: block;
}
.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-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; }
.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; }
.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; }
.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: 8px; margin-top: 10px; }
.mgr-order-actions .btn { flex: 1; min-width: 120px; padding: 10px 8px; font-size: 0.88rem; }
.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: #0f2744;
  line-height: 1.35;
  padding: 14px 16px;
}
.mgr-photo-cat-label { flex: 1; min-width: 0; word-break: break-word; }
.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-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-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-title { margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.sa-hero-sub { margin: 6px 0 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); line-height: 1.4; }
.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-revenue-card {
  display: flex;
  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-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-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 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 88px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sa-action-card:active { transform: scale(0.98); box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08); }
.sa-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef2ff;
  font-size: 1.1rem;
}
.sa-action-label { font-size: 0.88rem; font-weight: 600; line-height: 1.25; }
.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 .bottom-nav button.active .nav-label { color: var(--sa-navy); font-weight: 700; }
.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;
}
.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;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.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-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 { color: #15803d; 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(--mgr-blue); }
.mgr-dash-stat-label { font-size: 0.76rem; color: var(--hint); margin-top: 4px; }
.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: 10px; }
.mgr-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 88px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.12s ease;
}
.mgr-action-card:active { transform: scale(0.98); }
.mgr-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e8eef8;
  font-size: 1.1rem;
}
.mgr-action-label { font-size: 0.88rem; font-weight: 600; line-height: 1.25; }
.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;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  justify-self: end;
}
.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-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);
}
.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; }
.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); }
.mgr-profile-grid code { font-size: 0.92rem; }
.mgr-profile-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mgr-subpanel { border-radius: 14px; }
.mgr-form-panel .mgr-field span { display: block; font-size: 0.82rem; color: var(--hint); margin-bottom: 6px; }
.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-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-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-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-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); }
