/* View Transitions API (Chromium 111+, сучасні Telegram WebView).
   Browsers без підтримки просто ігнорують — main.js feature-detect. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/*
 * Admin WebApp — Warp-inspired warm dark canvas + Premium Blue brand layer.
 * Клас-префікс `.aw-*` (admin webapp). Жодних inline-стилів, крім динамічних
 * (позиції drawer/sheet під час жестів).
 *
 * Палітра:
 *   - Canvas:  Warp warm near-black + Warm Parchment text + Earth Gray surfaces.
 *   - Brand:   Federal Blue → Pacific Cyan (#03045E → #0096C7) — лежить *поверх*
 *              Warp-каркасу як акцент-шар (CTA, focus, active, links, charts).
 *   - Statuses: success/warning/danger/info — НЕ міняємо (бізнес-критично читабельні).
 *
 * Цей файл — джерело правди для дизайну; окремого DESIGN.md не тримаємо.
 */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  /* Warp source-of-truth tokens (DESIGN.md §2). */
  --warp-deep-void: #0F0E0C;
  --warp-surface-1: #15140F;
  --warp-surface-2: #1D1C1A;
  --warp-earth-gray: #353534;
  --warp-earth-gray-hover: #3D3D3C;
  --warp-warm-parchment: #FAF9F6;
  --warp-ash-gray: #AFAEAC;
  --warp-stone-gray: #868584;
  --warp-frosted-veil: rgba(255, 255, 255, 0.04);
  --warp-mist-border-soft: rgba(226, 226, 226, 0.14);
  --warp-mist-border-strong: rgba(226, 226, 226, 0.30);

  /* Premium blue brand layer (Federal Blue → Pacific Cyan).
     Лежить ПОВЕРХ Warp-токенів: canvas, типографіка та semantic-кольори
     не змінюються; brand задає лише акцент-стани (CTA, focus, active). */
  --brand-deep:    #03045E;
  --brand-mid:     #023E8A;
  --brand:         #0077B6;
  --brand-bright:  #0096C7;

  --brand-gradient:        linear-gradient(135deg, #023E8A 0%, #0077B6 50%, #0096C7 100%);
  --brand-gradient-soft:   linear-gradient(135deg, rgba(2, 62, 138, 0.18), rgba(0, 150, 199, 0.10));
  --brand-gradient-radial: radial-gradient(circle at 30% 30%, #0096C7, #0077B6 60%, #023E8A 100%);

  --brand-glow-soft:   0 0 0 3px rgba(0, 150, 199, 0.18);
  --brand-glow:        0 0 16px rgba(0, 150, 199, 0.35);
  --brand-glow-strong: 0 0 24px rgba(0, 150, 199, 0.55), 0 4px 18px rgba(2, 62, 138, 0.45);

  /* Legacy aliases — existing selectors `var(--bg-0)`, `var(--accent)` тощо
     підхоплять Warp-палітру без переписування селекторів. */
  --bg-0: var(--warp-deep-void);
  --bg-1: var(--warp-surface-1);
  --bg-2: var(--warp-surface-2);
  --bg-elev: var(--warp-earth-gray);

  --border-soft: var(--warp-mist-border-soft);
  --border-strong: var(--warp-mist-border-strong);

  --text-primary: var(--warp-warm-parchment);
  --text-secondary: var(--warp-ash-gray);
  --text-muted: var(--warp-stone-gray);

  /* Primary CTA / active states тепер мапляться на blue brand.
     `--accent` залишаємо як alias-точку — десятки селекторів його використовують,
     і одна зміна тут перефарбує весь UI разом. */
  --accent: var(--brand);
  --accent-hover: var(--brand-bright);
  --accent-glow: rgba(0, 150, 199, 0.35);
  --accent-contrast: #FFFFFF;

  /* Семантичні (статуси) — НЕ міняємо: бізнес-критично читабельні. */
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Радіуси (DESIGN.md §5). */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 50px;

  --nav-height: 72px;
  --nav-center-size: 56px;
  --nav-swipe-hint-offset: 20px;

  /* In-app FAB (каталог): над нижньою навігацією; висота стеку для padding у вкладці */
  --aw-fab-offset-bottom: calc(
    var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px)
  );
  --aw-fab-stack-height: 48px;
  --aw-catalog-tab-bottom-pad: calc(var(--aw-fab-stack-height) + 28px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-primary);
  font-family: "Geist", Inter, "SF Pro Text", -apple-system, system-ui,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* Premium декоративний шар: легкий blue radial vignette у правому верхньому куті.
   `pointer-events: none` + z-index: 0 — не ламає жести й клік. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at top right,
    rgba(0, 119, 182, 0.08),
    transparent 50%
  );
  z-index: 0;
}

.aw-app {
  position: relative;
  z-index: 1;
}

::selection {
  background: rgba(0, 150, 199, 0.35);
  color: var(--warp-warm-parchment);
}

a,
.aw-link {
  color: var(--brand-bright);
  text-decoration-color: rgba(0, 150, 199, 0.40);
  transition: text-shadow 150ms ease, text-decoration-color 150ms ease;
}

a:hover,
.aw-link:hover {
  text-decoration-color: var(--brand-bright);
  text-shadow: 0 0 8px rgba(0, 150, 199, 0.30);
}

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.018em;
  font-weight: 400;
}

code, pre, kbd, samp {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, monospace;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

button:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: var(--r-sm);
  box-shadow: var(--brand-glow-soft);
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

.aw-numeric {
  font-variant-numeric: tabular-nums;
}

/* Visually hidden; remains available to screen readers (e.g. drawer swipe hint). */
.aw-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── App shell ──────────────────────────────────────────────────────────── */

.aw-app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
  background: var(--bg-0);
}

.aw-screen {
  padding: 16px 16px 8px;
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
}

.aw-home__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.aw-home__header .aw-screen__title {
  margin-bottom: 0;
  flex: 1;
}

.aw-home__reviews-shortcut {
  position: relative;
  flex-shrink: 0;
}

.aw-home__reviews-shortcut .aw-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}

.aw-reviews__store-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.aw-reviews__store-pill-label {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.aw-reviews__store-pill-count {
  font-variant-numeric: tabular-nums;
}

.aw-reviews__store-pill-count--zero {
  color: var(--text-muted);
}

.aw-reviews__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aw-review-card {
  border-radius: var(--r-lg, 12px);
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.aw-review-card .aw-row:last-child {
  margin-bottom: 0;
}

.aw-review-card .aw-row {
  border-bottom: none;
  padding: 0;
  min-height: 0;
}

.aw-home__account {
  margin-bottom: 12px;
  padding: 14px 16px;
}

.aw-home__account-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.aw-home__account-balance-block {
  flex: 1 1 140px;
  min-width: 0;
}

.aw-home__account-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.aw-home__account-balance {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.aw-home__account-topup {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.aw-home__account-proxy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 12px 4px 0;
  border: none;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
  box-sizing: border-box;
}

.aw-home__account-proxy:active {
  opacity: 0.85;
}

.aw-home__account-proxy-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.aw-home__account-proxy-chevron {
  flex-shrink: 0;
  transform: rotate(-90deg);
  color: var(--text-muted);
}

.aw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-secondary);
}

.aw-icon-btn:active {
  background: var(--bg-elev);
}

.aw-screen__title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin-bottom: 12px;
}

.aw-screen__subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.aw-muted {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.aw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0;
  transition: background 160ms ease, transform 120ms ease;
}

.aw-btn:active {
  transform: scale(0.98);
}

.aw-btn--primary {
  background: var(--brand-gradient);
  color: var(--accent-contrast);
  border: 1px solid rgba(0, 150, 199, 0.45);
  box-shadow: 0 4px 14px rgba(2, 62, 138, 0.30);
  transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.aw-btn--primary:hover,
.aw-btn--primary:focus-visible {
  background: var(--brand-gradient);
  border-color: rgba(0, 150, 199, 0.65);
  box-shadow: var(--brand-glow);
}

.aw-btn--primary:active {
  box-shadow: var(--brand-glow-strong);
}

.aw-btn--primary:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

.aw-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}

/* ─── Bottom navigation ──────────────────────────────────────────────────── */

.aw-bnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-1);
  border-top: 1px solid var(--border-soft);
  /* Brand-tinted hairline вгорі панелі — м'який blue-glow без обтяжування. */
  border-image: linear-gradient(90deg, transparent, rgba(0, 150, 199, 0.45), transparent) 1;
  border-image-slice: 1;
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  z-index: 40;
}

.aw-bnav__swipe-hint {
  position: absolute;
  top: calc(-1 * var(--nav-swipe-hint-offset));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0.88;
  max-height: 48px;
  transition:
    opacity 220ms ease,
    max-height 220ms ease,
    transform 200ms ease;
}

.aw-bnav__swipe-hint.is-dismissed {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.aw-bnav__swipe-pill {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  flex-shrink: 0;
  animation: aw-bnav-swipe-pill-pulse 2.4s ease-in-out infinite;
}

html.is-drawer-armed .aw-bnav__swipe-hint {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
}

html.is-drawer-armed .aw-bnav__swipe-pill {
  background: var(--text-secondary);
  animation-play-state: paused;
  opacity: 1;
}

@keyframes aw-bnav-swipe-pill-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.95;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aw-bnav__swipe-pill {
    animation: none !important;
    opacity: 0.75;
  }
}

.aw-bnav__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-height);
  padding: 0 24px;
}

.aw-bnav__tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.aw-bnav__tab:active {
  color: var(--text-primary);
}

.aw-bnav__tab.is-active {
  color: var(--brand-bright);
  text-shadow: 0 0 12px rgba(0, 150, 199, 0.45);
}

.aw-bnav__tab.is-active .aw-bnav__icon {
  stroke: var(--brand-bright);
  filter: drop-shadow(0 0 6px rgba(0, 150, 199, 0.40));
}

.aw-bnav__icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aw-bnav__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.aw-bnav__center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-center-size);
  height: var(--nav-center-size);
  border-radius: 50%;
  background: var(--brand-gradient-radial);
  color: var(--accent-contrast);
  border: 1px solid rgba(0, 150, 199, 0.50);
  margin-top: -12px;
  box-shadow: 0 4px 18px rgba(2, 62, 138, 0.35);
  /* Spring transform — push-effect із швидким повертанням. */
  transition:
    box-shadow 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 150ms ease;
}

.aw-bnav__center:hover,
.aw-bnav__center:focus-visible {
  border-color: rgba(0, 150, 199, 0.75);
  box-shadow: 0 4px 18px rgba(2, 62, 138, 0.35), var(--brand-glow);
}

.aw-bnav__center:active {
  box-shadow: 0 0 0 12px rgba(0, 150, 199, 0.18), 0 6px 20px rgba(0, 119, 182, 0.40);
  transform: scale(0.92);
}

.aw-bnav__center-icon {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── BottomSheet / Drawer ──────────────────────────────────────────────── */

.aw-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 6, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 50;
  pointer-events: none;
}

.aw-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.aw-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  background: var(--bg-1);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  border-top: 1px solid var(--border-soft);
  z-index: 60;
  transform: translateY(100%);
  /* Закриття: stiff ease-out, без overshoot — pull-to-close жест має лагодити
     прогноз, а не «підстрибувати». */
  transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.aw-sheet.is-open {
  transform: translateY(0);
  /* Відкриття: spring із легким overshoot — sheet «приземляється» pружно. */
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aw-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  margin: 10px auto 6px;
  opacity: 0.8;
  touch-action: none;
}

.aw-sheet__header {
  padding: 6px 20px 12px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
}

.aw-sheet__body {
  overflow-y: auto;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
  /* Brand-tinted scrollbar — тільки в sheet/drawer body, без глобального override. */
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}

.aw-sheet__body::-webkit-scrollbar {
  width: 6px;
}

.aw-sheet__body::-webkit-scrollbar-track {
  background: transparent;
}

.aw-sheet__body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-mid), var(--brand));
  border-radius: 4px;
}

.aw-sheet__body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand), var(--brand-bright));
}

/* ─── Anchored dropdown (trigger-relative menu) ───────────────────────── */

.aw-anchor-menu {
  position: fixed;
  z-index: 61;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 18px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 150, 199, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 200ms ease;
  max-width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
}

.aw-anchor-menu.is-open {
  opacity: 1;
}

.aw-anchor-menu__title {
  flex-shrink: 0;
  padding: 10px 16px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
}

.aw-anchor-menu__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
  padding: 4px 0 10px;
}

.aw-anchor-menu__scroll::-webkit-scrollbar {
  width: 6px;
}

.aw-anchor-menu__scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-mid), var(--brand));
  border-radius: 4px;
}

.aw-sheet--payment .aw-sheet__body {
  padding-left: 20px;
  padding-right: 20px;
}

/* User profile sheet: align with header / payment sheet; one horizontal inset. */
.aw-sheet--user .aw-sheet__body {
  padding-top: 4px;
  padding-bottom: 16px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.aw-sheet--user .aw-payrow {
  padding: 14px 0;
}

.aw-sheet--user .aw-empty {
  padding: 32px 0;
}

.aw-kv--payment .aw-kv__val--wrap {
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.aw-drawer {
  max-height: 92vh;
  height: 92vh;
}

.aw-drawer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.aw-drawer__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px 10px;
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  min-height: 84px;
  /* Drawer items живуть на темному backdrop — глибина через подвійну тінь. */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.20);
  transition: background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

.aw-drawer__badge,
.aw-badge {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  background: var(--danger);
  color: #fff;
}

.aw-drawer__badge {
  position: absolute;
  top: 6px;
  right: 6px;
}

.aw-drawer__item:active {
  background: var(--brand-gradient-soft);
  border-color: rgba(0, 150, 199, 0.35);
  transform: scale(0.97);
}

.aw-drawer__item-icon {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── List rows ─────────────────────────────────────────────────────────── */

.aw-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.aw-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
  min-height: 56px;
}

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

.aw-row__main {
  flex: 1;
  min-width: 0;
}

.aw-row__title {
  font-weight: 500;
  font-size: 15px;
}

.aw-row__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.aw-row__check {
  color: var(--brand-bright);
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 6px rgba(0, 150, 199, 0.45));
}

.aw-row--active .aw-row__title {
  color: var(--brand-bright);
  font-weight: 500;
}

.aw-row--highlight {
  border-color: var(--brand-bright);
  background: rgba(0, 150, 199, 0.08);
}

.aw-row--cta {
  color: var(--brand-bright);
  font-weight: 500;
}

/* Store switcher / pick — один ряд: назва | мета підписки | шеврон/check */
.aw-row.aw-row--store-list {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.aw-row--store-list__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 15px;
  color: var(--text-primary);
}

.aw-row--store-list__meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(50%, 200px);
  font-size: 12px;
  line-height: 1.28;
  color: var(--text-secondary);
  text-align: right;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.aw-row__chevron--store-list-tail {
  flex-shrink: 0;
  color: var(--text-muted);
  transform: rotate(-90deg);
}

.aw-row--store-list .aw-row__check {
  flex-shrink: 0;
}

.aw-row--store-list__trail-spacer {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: inline-block;
}

/* ─── Skeleton / empty state / search ──────────────────────────────────── */

.aw-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-1) 0%,
    rgba(0, 119, 182, 0.12) 50%,
    var(--bg-1) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--r-md);
  animation: aw-skeleton-shimmer 1.4s linear infinite;
}

@keyframes aw-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.aw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
  color: var(--text-secondary);
}

.aw-empty__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.aw-empty__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 280px;
}

.aw-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}

.aw-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font-size: 15px;
}

.aw-search input::placeholder {
  color: var(--text-muted);
}

.aw-search.aw-search--pill {
  border-radius: var(--r-pill);
}

/* ─── Toast ─────────────────────────────────────────────────────────────── */

.aw-toast-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 80;
  pointer-events: none;
}

.aw-toast {
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  background: var(--bg-elev);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  box-shadow: none;
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
}

.aw-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aw-toast--success { border-left: 3px solid var(--success); }
.aw-toast--warning { border-left: 3px solid var(--warning); }
.aw-toast--danger  { border-left: 3px solid var(--danger); }
.aw-toast--info    {
  border-left: 4px solid var(--brand-bright);
  box-shadow: 0 0 24px rgba(0, 150, 199, 0.20);
}

/* ─── Home / charts placeholder ─────────────────────────────────────────── */

.aw-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  /* Layered depth: top inner highlight (1px) + close shadow + far halo. */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.20),
    0 4px 12px rgba(0, 0, 0, 0.12);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.aw-card:hover,
.aw-card:focus-within {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.20),
    0 6px 18px rgba(0, 0, 0, 0.18),
    0 12px 32px rgba(0, 119, 182, 0.10);
}

/* Premium-варіант картки: легкий blue-tint + brand-hairline. */
.aw-card--premium {
  background: linear-gradient(180deg, var(--bg-1) 0%, rgba(2, 62, 138, 0.06) 100%);
  border-color: rgba(0, 150, 199, 0.22);
}

.aw-chart-placeholder {
  height: 180px;
  border-radius: var(--r-md);
}

.aw-chart {
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
}

.aw-chart .u-legend { display: none !important; }

.aw-bar-list__title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.aw-bar-list-row {
  display: grid;
  grid-template-columns: minmax(0, 90px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.aw-bar-list-row:last-child {
  border-bottom: 0;
}

.aw-bar-list-row--more {
  color: var(--text-secondary);
  cursor: pointer;
}

.aw-bar-list-row--more:active {
  background: var(--bg-2);
}

.aw-bar-list__name {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aw-bar-list__track {
  position: relative;
  height: 10px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}

.aw-bar-list__bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--brand-mid), var(--brand-bright));
  border-radius: 999px;
  transition: width 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.aw-bar-list__value {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 32px;
  text-align: right;
}

.aw-bar-list__empty {
  padding: 8px 0;
}

.aw-home__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.aw-home__summary strong {
  color: var(--text-primary);
  font-weight: 500;
}

.aw-home__delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.aw-home__delta--up { color: var(--success); background: rgba(34,197,94,0.12); }
.aw-home__delta--down { color: var(--danger); background: rgba(239,68,68,0.12); }
.aw-home__delta--flat { color: var(--brand-bright); background: var(--brand-gradient-soft); }

.aw-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(15, 14, 12, 0.72);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-soft);
  /* Brand hairline: симетрично до .aw-bnav, дає ледь-помітний blue світловий шов. */
  border-image: linear-gradient(90deg, transparent, rgba(0, 150, 199, 0.40), transparent) 1;
  border-image-slice: 1;
}

.aw-header__store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
}

.aw-header__chevron {
  width: 16px;
  height: 16px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
}

/* ─── Chips (filter pills) ──────────────────────────────────────────────── */

.aw-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 4px 0 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.aw-chips::-webkit-scrollbar {
  display: none;
}

.aw-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}

.aw-chip:active {
  transform: scale(0.97);
}

.aw-chip.is-active {
  background: var(--brand-gradient);
  color: var(--accent-contrast);
  border: 1px solid rgba(0, 150, 199, 0.50);
  box-shadow: var(--brand-glow-soft);
}

/* ─── Segmented control ─────────────────────────────────────────────────── */

.aw-seg {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  gap: 2px;
}

.aw-seg__item {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
}

.aw-seg__item.is-active {
  background: var(--brand-gradient-soft);
  color: var(--brand-bright);
  border: 1px solid rgba(0, 150, 199, 0.30);
}

.aw-seg.aw-seg--pill {
  border-radius: var(--r-pill);
  width: 100%;
  justify-content: stretch;
}

.aw-seg.aw-seg--pill .aw-seg__item {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  border-radius: 999px;
}

/* ─── Swipe actions ─────────────────────────────────────────────────────── */

.aw-swipe {
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
}

.aw-swipe__main {
  position: relative;
  z-index: 2;
  background: var(--bg-1);
  will-change: transform;
}

.aw-swipe__actions {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: stretch;
  z-index: 1;
}

.aw-swipe__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-contrast);
  background: var(--accent);
}

.aw-swipe__action--danger {
  background: var(--danger);
  color: #fff;
}

.aw-swipe__action--default {
  background: var(--bg-elev);
  color: var(--text-primary);
}

/* ─── Users screen (idle: hint + top purchasers) ───────────────────────── */

.aw-users-body {
  margin-top: 4px;
}

.aw-users-hint {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 12px;
}

.aw-users-top-heading {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 10px;
  letter-spacing: 0;
}

.aw-users-top-list {
  background: var(--bg-2);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

.aw-users-top-list.aw-users-top-list--empty {
  border-radius: var(--r-pill);
}

.aw-users-top-list .aw-payrow:last-child {
  border-bottom: none;
}

.aw-users-top-empty {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  padding: 14px 16px;
}

/* ─── Payment / user card patterns ──────────────────────────────────────── */

.aw-payrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.aw-payrow__title {
  font-weight: 400;
  color: var(--text-primary);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aw-payrow__sub {
  color: var(--text-secondary);
  font-size: 12px;
  grid-column: 1 / 2;
}

.aw-payrow__amount {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.aw-payrow__status {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  text-align: right;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.aw-payrow__status--paid { color: var(--success); }
.aw-payrow__status--pending { color: var(--warning); }
.aw-payrow__status--overdue,
.aw-payrow__status--cancelled { color: var(--danger); }

.aw-list-sticky {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(15, 14, 12, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  padding: 12px 16px 4px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aw-list-sticky__head > .aw-seg--pill {
  flex: 1 1 auto;
  min-width: 0;
}

.aw-list-sticky__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aw-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  padding: 12px 0;
}

.aw-kv__key {
  color: var(--text-secondary);
  font-size: 13px;
}

.aw-kv__val {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.aw-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--warp-frosted-veil);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.aw-badge--accent {
  background: var(--brand-gradient-soft);
  color: var(--brand-bright);
  border: 1px solid rgba(0, 150, 199, 0.30);
}

.aw-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.aw-form-field label {
  font-size: 12px;
  color: var(--text-secondary);
}

.aw-form-field input,
.aw-form-field textarea,
.aw-form-field select {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.aw-form-field input:focus,
.aw-form-field textarea:focus,
.aw-form-field select:focus {
  border-color: var(--brand-bright);
  box-shadow: var(--brand-glow-soft);
}

.aw-form-row {
  display: flex;
  gap: 8px;
}

.aw-matched-via {
  margin-left: 6px;
}

/* --- Iteration 4: Store Detail, Tabs, RadioChips, Switch, Dropdown, FileField --- */

.aw-tabs { display: block; margin-bottom: 16px; }
.aw-tabs__head { margin-bottom: 12px; }
.aw-tabs__panel { display: block; }

.aw-radio-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}
.aw-radio-chips::-webkit-scrollbar { display: none; }
.aw-radio-chip {
  background: var(--bg-1);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 120ms ease;
}
.aw-radio-chip.is-active {
  background: var(--brand-gradient);
  color: var(--accent-contrast);
  border-color: rgba(0, 150, 199, 0.50);
  box-shadow: var(--brand-glow-soft);
}
.aw-radio-chip.is-disabled { opacity: .5; cursor: not-allowed; }

.aw-switch {
  display: inline-flex;
  width: 44px; height: 26px;
  background: var(--border-soft);
  border: none;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background 180ms ease;
}
.aw-switch.is-on { background: var(--brand-gradient); }
.aw-switch.is-readonly { cursor: default; opacity: .85; }
.aw-switch.is-disabled { cursor: not-allowed; opacity: .5; }
.aw-switch__knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.aw-switch.is-on .aw-switch__knob {
  transform: translateX(18px);
  box-shadow: 0 0 8px rgba(0, 150, 199, 0.50), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.aw-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  width: 100%;
  justify-content: space-between;
}
.aw-dropdown.is-disabled { opacity: .5; cursor: not-allowed; }
.aw-dropdown__label { flex: 1; text-align: left; }
.aw-dropdown__chevron { flex-shrink: 0; }

.aw-dropdown.aw-dropdown--pill {
  border-radius: var(--r-pill);
}

.aw-file-field { display: block; }
.aw-file-field__input { display: none; }
.aw-file-field__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aw-file-field__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-1);
  border: 1px dashed var(--border-soft);
  border-radius: var(--r-md);
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-primary);
}
.aw-file-field__filename {
  color: var(--text-muted);
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aw-file-field__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}
.aw-file-field__preview {
  margin-top: 8px;
  display: flex;
}
.aw-file-field__image,
.aw-file-field__video {
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--r-md);
}

.aw-step-indicator {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  gap: 4px;
  align-items: center;
}
.aw-step-indicator__item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.aw-step-indicator__dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--border-soft);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 12px;
}
.aw-step-indicator__item.is-active .aw-step-indicator__dot {
  background: var(--brand-gradient);
  color: var(--accent-contrast);
  box-shadow: 0 0 0 4px rgba(0, 150, 199, 0.15);
}
.aw-step-indicator__item.is-done .aw-step-indicator__dot {
  background: var(--brand-mid);
  color: var(--accent-contrast);
}
.aw-step-indicator__item.is-active .aw-step-indicator__label {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Store Detail screen --- */
.aw-store-detail__header {
  padding: 16px;
  background: var(--bg-1);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
}
.aw-store-detail__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.aw-store-detail__status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}
.aw-store-detail__status-pill.is-active {
  border-color: rgba(0, 150, 199, 0.42);
  background: rgba(0, 150, 199, 0.09);
  box-shadow:
    0 0 22px rgba(0, 150, 199, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.aw-store-detail__status-pill.is-inactive {
  border-color: var(--border-soft);
  background: var(--bg-0);
  color: var(--text-secondary);
}
.aw-store-status-pill__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aw-store-detail__status-pill.is-active .aw-store-status-pill__glyph {
  background: var(--brand-gradient);
  color: var(--accent-contrast);
  box-shadow: var(--brand-glow-soft);
}
.aw-store-detail__status-pill.is-inactive .aw-store-status-pill__glyph {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  box-shadow: none;
}
.aw-store-status-pill__svg {
  display: block;
}
.aw-store-status-pill__label {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.aw-store-detail__status-pill.is-active .aw-store-status-pill__label {
  color: var(--text-primary);
}
.aw-store-detail__status-pill.is-inactive .aw-store-status-pill__label {
  color: var(--text-secondary);
}

.aw-store-detail__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.aw-store-detail__subscription { font-size: 13px; }
.aw-store-detail__renew-pill {
  flex-shrink: 0;
}

.aw-store-detail__subsection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aw-store-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  margin: 0 0 4px 0;
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.aw-store-detail__back:active {
  opacity: 0.85;
}
.aw-store-detail__back:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.aw-store-detail__back-chevron {
  transform: rotate(180deg);
  flex-shrink: 0;
}

.aw-store-detail__counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.aw-link-bar.aw-counter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 11px 14px;
  margin-bottom: 12px;
  text-align: left;
  cursor: pointer;
}
.aw-link-bar.aw-counter:active {
  transform: scale(0.995);
}
.aw-link-bar__label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}
.aw-link-bar__glyph {
  flex-shrink: 0;
  opacity: 0.9;
}
.aw-link-bar__chevron {
  flex-shrink: 0;
  opacity: 0.45;
  transform: rotate(-90deg);
}
button.aw-counter {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  border: 1px solid var(--border-soft);
  text-align: center;
  padding: 14px 8px;
  background: var(--bg-1);
  border-radius: var(--r-lg);
  margin-bottom: 0;
  cursor: default;
  /* Counter використовується як stat-tile — додаємо стандартний 3-layer depth. */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.10);
  transition: opacity 0.15s, transform 0.1s, box-shadow 150ms ease;
}
button.aw-counter.aw-counter--action {
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, background 160ms ease, border-color 160ms ease;
}
button.aw-counter.aw-counter--action:hover {
  background: var(--brand-gradient-soft);
  border-color: rgba(0, 150, 199, 0.40);
  opacity: 1;
}
button.aw-counter.aw-counter--action:active {
  transform: scale(0.98);
}
button.aw-counter.aw-counter--action:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  box-shadow: var(--brand-glow-soft);
}
button.aw-counter.aw-counter--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.aw-counter {
  text-align: center;
  padding: 14px 8px;
}
.aw-counter__value { font-size: 22px; font-weight: 500; }
.aw-counter__label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.aw-store-detail__more {
  margin-top: 0;
}

.aw-store-site-sheet__btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.aw-store-site-sheet__divider {
  height: 1px;
  background: var(--border-soft);
  margin: 16px 0;
}
.aw-store-site-sheet__contacts-title {
  margin-top: 4px;
  margin-bottom: 4px;
}
.aw-store-site-sheet__contacts {
  display: flex;
  flex-direction: column;
}
.aw-store-site-sheet__contact-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.aw-store-site-sheet__contact-title {
  font-weight: 500;
  margin-bottom: 2px;
}
.aw-store-site-sheet__contact-url {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
}
.aw-store-site-sheet__contact-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.aw-store-site-sheet__contact-edit {
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aw-store-site-sheet__add {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* E23: site sheet — host state, copy, hints */
.aw-store-site-sheet__host {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aw-store-site-sheet__current {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
}
.aw-store-site-sheet__preview {
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
}
.aw-store-site-sheet__error {
  font-size: 12px;
  color: var(--danger);
}
.aw-store-site-sheet__warn {
  font-size: 12px;
  color: var(--warning);
}
.aw-store-site-sheet__hint-block {
  margin-top: 2px;
  margin-bottom: 4px;
}
.aw-store-site-sheet__contacts-empty {
  padding: 4px 0 2px;
}
.aw-input.aw-input--invalid {
  border-color: var(--danger);
}

/* E24: redirect sheet + clones */
.aw-redirect-sheet__status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.aw-redirect-sheet__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}
.aw-redirect-sheet__badge.is-on {
  color: var(--brand-bright);
  border-color: rgba(0, 150, 199, 0.35);
  background: var(--brand-gradient-soft);
}
.aw-redirect-sheet__username {
  font-weight: 500;
}
.aw-redirect-sheet__open {
  margin-left: auto;
}
.aw-redirect-sheet__users {
  font-size: 14px;
  margin: 4px 0 10px;
}
.aw-redirect-sheet__text {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
}
.aw-clones .aw-row__subtitle {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* E25: settings footer + referrals */
.aw-settings__release {
  text-align: center;
  margin-top: 16px;
}
.aw-store-matrix-sheet__kv {
  display: grid;
  grid-template-columns: minmax(0, 108px) 1fr;
  gap: 6px 12px;
  align-items: start;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.aw-store-matrix-sheet__mono {
  color: var(--text-primary);
  font-size: 13px;
  word-break: break-all;
}

.aw-store-matrix-sheet__form {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.aw-store-matrix-sheet__e2ee {
  width: 100%;
  margin-top: 14px;
  box-sizing: border-box;
}

.aw-picker-sheet.aw-store-site-sheet-root .aw-sheet__body,
.aw-picker-sheet.aw-store-matrix-sheet-root .aw-sheet__body {
  max-height: min(74vh, 640px);
  overflow-y: auto;
}

/* Matrix Element sheet: inset + pill inputs (homeserver з конфігурації сервера) */
.aw-picker-sheet.aw-store-matrix-sheet-root .aw-sheet__body {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 8px;
}

.aw-picker-sheet.aw-store-matrix-sheet-root .aw-input {
  border-radius: var(--r-pill);
}

/* Store «Сайт» sheet: inset aligned with catalog sheets; pill text fields */
.aw-picker-sheet.aw-store-site-sheet-root .aw-sheet__body {
  padding: 8px 20px 20px;
}

.aw-picker-sheet.aw-store-site-sheet-root .aw-input {
  border-radius: var(--r-pill);
}

.aw-store-detail__preview-text {
  white-space: pre-wrap;
  color: var(--text-primary);
  font-size: 14px;
  margin-top: 8px;
}

.aw-field {
  display: block;
  margin-bottom: 14px;
}
.aw-field__label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.aw-field--hint {
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 12px;
  background: var(--bg-1);
  border-radius: var(--r-md);
}
.aw-field__hint { color: var(--text-muted); font-size: 12px; }

.aw-textarea,
.aw-input {
  display: block;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}
.aw-textarea:focus, .aw-input:focus {
  outline: none;
  border-color: var(--brand-bright);
  box-shadow: var(--brand-glow-soft);
}

.aw-input.aw-input--pill,
select.aw-input.aw-input--pill {
  border-radius: 999px;
}

.aw-store-detail__media {
  display: grid;
  gap: 8px;
}
.aw-store-detail__save { margin-top: 16px; }

.aw-store-detail__broadcast-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.aw-store-detail__broadcast-entries {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.aw-broadcast-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aw-broadcast-row {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
  cursor: pointer;
}
.aw-broadcast-row__head {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.aw-broadcast-row__text {
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.aw-broadcast-row__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.aw-broadcast__header {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.aw-broadcast__text {
  background: var(--bg-1);
  border-radius: var(--r-md);
  padding: 10px 12px;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.aw-broadcast__status--sent { background: rgba(34, 197, 94, 0.16); color: var(--success); }
.aw-broadcast__status--cancelled { background: var(--warp-frosted-veil); color: var(--text-muted); }
.aw-broadcast__status--pending,
.aw-broadcast__status--queued { background: rgba(245, 158, 11, 0.16); color: var(--warning); }
.aw-broadcast__status--scheduled,
.aw-broadcast__status--recurring { background: rgba(59, 130, 246, 0.16); color: var(--info); }
.aw-broadcast__status--failed { background: rgba(239, 68, 68, 0.16); color: var(--danger); }

.aw-broadcast__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.aw-wizard { display: flex; flex-direction: column; gap: 16px; }
.aw-wizard__body { display: block; }
.aw-wizard__footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.aw-wizard__review { margin-bottom: 16px; }

.aw-row--chevron {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  width: 100%;
}
.aw-row__leading { color: var(--text-muted); flex-shrink: 0; }
.aw-row__chevron {
  color: var(--text-muted);
  transform: rotate(-90deg);
  flex-shrink: 0;
  margin-left: auto;
}

.aw-store-switcher__row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.aw-store-switcher__open { flex: 1; }
.aw-store-switcher__select { flex-shrink: 0; }

.aw-btn--danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.aw-btn--danger:hover,
.aw-btn--danger:focus-visible {
  background: rgba(239, 68, 68, 0.12);
}

/* FAB */
.aw-fab {
  position: fixed;
  right: 16px;
  bottom: var(--aw-fab-offset-bottom);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 150, 199, 0.45);
  background: var(--brand-gradient);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 150, 199, 0.30);
  cursor: pointer;
  /* Spring на tap: легкий overshoot, який повертається — додає «вагу» кнопці. */
  transition:
    transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 150ms ease,
    border-color 150ms ease;
}
.aw-fab:hover,
.aw-fab:focus-visible {
  border-color: rgba(0, 150, 199, 0.70);
  box-shadow: 0 8px 24px rgba(0, 150, 199, 0.30), var(--brand-glow);
}
.aw-fab:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: var(--brand-glow-strong);
}
.aw-fab:disabled { opacity: .5; cursor: not-allowed; }
.aw-fab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  font-size: 17px;
  line-height: 1;
}
.aw-fab__label { white-space: nowrap; }
.aw-fab--icon-only { padding: 12px; }
.aw-fab--icon-only .aw-fab__label { display: none; }

/* Sortable list */
.aw-sortable {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aw-sortable__hint {
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 2px;
}
.aw-sortable__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-1);
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  touch-action: pan-y;
}
.aw-sortable__item.is-dragging {
  opacity: 0.85;
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.aw-sortable__handle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  cursor: grab;
  flex-shrink: 0;
}
.aw-sortable__handle:active { cursor: grabbing; }
.aw-sortable__body { flex: 1; min-width: 0; }
.aw-sortable__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.aw-sortable.is-disabled .aw-sortable__handle { display: none; }

/* Catalog */
.aw-catalog__top-hint {
  margin: 0 12px 8px;
}
.aw-catalog__tabs { padding: 0 12px; }
.aw-catalog__tab {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: var(--aw-catalog-tab-bottom-pad);
}
.aw-catalog__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aw-catalog-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: var(--bg-1);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}
.aw-catalog-row__main {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.aw-catalog-row__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aw-catalog-row__meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.aw-catalog-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.aw-catalog-row__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Sheet variants */
.aw-sheet--catalog-city,
.aw-sheet--catalog-structure,
.aw-sheet--catalog-position { padding-bottom: 24px; }

.aw-sheet--catalog-city > .aw-sheet__body,
.aw-sheet--catalog-structure > .aw-sheet__body,
.aw-sheet--catalog-position > .aw-sheet__body {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 8px;
}

.aw-sheet--catalog-city .aw-form-field input:not([type="checkbox"]):not([type="radio"]),
.aw-sheet--catalog-city .aw-form-field textarea,
.aw-sheet--catalog-city .aw-form-field select,
.aw-sheet--catalog-structure .aw-form-field input:not([type="checkbox"]):not([type="radio"]),
.aw-sheet--catalog-structure .aw-form-field textarea,
.aw-sheet--catalog-structure .aw-form-field select,
.aw-sheet--catalog-position .aw-form-field input:not([type="checkbox"]):not([type="radio"]),
.aw-sheet--catalog-position .aw-form-field textarea,
.aw-sheet--catalog-position .aw-form-field select {
  border-radius: 9999px;
}

.aw-sheet--catalog-city .aw-form-field textarea,
.aw-sheet--catalog-structure .aw-form-field textarea,
.aw-sheet--catalog-position .aw-form-field textarea {
  border-radius: var(--r-xl);
  min-height: 88px;
}

.aw-catalog-sheet-submit.aw-btn {
  border-radius: 9999px;
  padding: 12px 20px;
}

.aw-catalog-cover__input {
  display: none;
}

.aw-catalog-cover__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aw-catalog-cover__filename {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aw-catalog-position__district-readonly {
  padding: 10px 16px;
  border-radius: 9999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-1);
}

/* Checkbox list (structure cities) */
.aw-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 2px;
}
.aw-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  cursor: pointer;
}
.aw-radio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.aw-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Upload wizard */
.aw-upload__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aw-upload__footer {
  padding: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-soft);
  position: sticky;
  bottom: 0;
  background: var(--bg-0);
}

/* Stats */
.aw-stats__controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}
.aw-stats__groupby {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.aw-stats__internal-credits {
  margin: 0 12px 10px;
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}
.aw-stats__summary {
  padding: 12px;
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Iter 6a — settings, top-up, broadcast, discounts, promocodes */
.aw-settings__row--danger .aw-row__title {
  color: var(--danger);
}
.aw-picker-sheet .aw-list {
  padding: 8px 0;
}

.aw-locale-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 4px 16px;
  justify-content: center;
  box-sizing: border-box;
}

.aw-locale-picker__pill {
  align-self: auto;
  white-space: nowrap;
  max-width: 100%;
  text-align: center;
}

.aw-locale-picker__pill.is-active {
  background: var(--brand-gradient);
  color: #fff;
  border-color: rgba(0, 150, 199, 0.5);
  box-shadow: var(--brand-glow-soft);
}
.aw-topup--screen .aw-topup__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: calc(var(--aw-fab-offset-bottom) + 56px);
}

.aw-topup__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aw-topup__currency-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aw-topup__amount-field.aw-search {
  margin-bottom: 0;
}

.aw-topup__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.aw-topup__mono {
  font-size: 13px;
  word-break: break-all;
  flex: 1 1 160px;
  min-width: 0;
}

.aw-topup__addr {
  line-height: 1.35;
}

.aw-topup__kv {
  font-size: 14px;
}

/* ─── Payment systems (CryptoN / PaySync / Simplex) ───────────────────── */

.aw-payment-systems__lead {
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.aw-payment-systems__tabs {
  margin-bottom: 14px;
}

.aw-payment-systems__tabs .aw-seg {
  width: 100%;
  justify-content: stretch;
}

.aw-payment-systems__tabs .aw-seg__item {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.aw-payment-systems__section {
  margin-top: 16px;
}

.aw-payment-systems__section:first-child {
  margin-top: 0;
}

.aw-payment-systems__section-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.aw-payment-systems__currency-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aw-payment-systems__field-block {
  margin-top: 10px;
}

.aw-payment-systems__field-block:first-of-type {
  margin-top: 0;
}

.aw-payment-systems__primary-action {
  margin-top: 10px;
}

.aw-payment-systems__secondary-action {
  margin-top: 8px;
}

.aw-payment-systems__settings-btn {
  margin-top: 12px;
}

.aw-payment-systems__ltc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 10px 12px;
  gap: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}

.aw-payment-systems__ltc-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.aw-payment-systems__ltc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.aw-payment-systems__pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.aw-payment-systems .aw-input {
  border-radius: var(--r-pill);
}

.aw-topup__note {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.aw-topup-actions {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: var(--aw-fab-offset-bottom);
  z-index: 39;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.aw-topup-actions .aw-btn {
  flex: 0 0 auto;
}
.aw-topup .aw-input,
.aw-broadcast .aw-input {
  width: 100%;
  box-sizing: border-box;
}
.aw-pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  color: var(--text-primary);
  font-size: 13px;
}

.aw-pill--brand {
  background: var(--brand-gradient);
  color: #fff;
  border-color: rgba(0, 150, 199, 0.50);
  box-shadow: var(--brand-glow-soft);
}

.aw-pill--compact {
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.aw-pill--icon {
  padding: 5px 9px;
  font-size: 13px;
  min-width: 2.25rem;
  justify-content: center;
}

.aw-pill--danger-outline {
  color: #e53935;
  border-color: rgba(229, 57, 53, 0.45);
  background: transparent;
}

.aw-inv-stack .aw-inv-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.aw-inv-stack .aw-inv-toolbar__back {
  flex-shrink: 0;
}

.aw-inv-stack .aw-inv-toolbar__title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.aw-inv-stack__body .aw-inv-row-full {
  width: 100%;
  text-align: left;
}

.aw-inv-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.aw-inv-pager .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.aw-inv-pager__info {
  font-size: 13px;
  color: var(--text-muted);
}

.aw-inv-detail__text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-elev);
}

.aw-inv-detail__link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 14px;
}

.aw-inv-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.aw-inv-issue__hint {
  font-size: 14px;
  margin: 0 0 8px;
}

.aw-inv-issue__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.aw-catalog-row__actions--tight {
  gap: 6px;
  flex-shrink: 0;
}

/* ─── E0: 5-slot BottomNav, quick actions, subscriptions, drawer sections ── */

.aw-bnav__row {
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  padding: 0 8px;
}

.aw-drawer__section-title {
  grid-column: 1 / -1;
  margin: 10px 4px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.aw-home__quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.aw-home__quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 10px 6px;
  border-radius: var(--r-lg, 12px);
  border: 1px solid var(--border-soft);
  background: var(--bg-1);
  color: var(--text-secondary);
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.aw-home__quick-btn:active {
  transform: scale(0.97);
  color: var(--text-primary);
  border-color: var(--brand-bright, var(--text-primary));
}

.aw-home__quick-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aw-home__quick-label {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

.aw-home__subs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aw-home__subs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.aw-home__subs-row:last-child {
  border-bottom: none;
}

.aw-home__subs-state--unpaid {
  color: var(--danger);
}

.aw-home__subs-state--due {
  color: var(--warning);
}

.aw-home__subs-state--active {
  color: var(--text-muted);
}

.aw-home__subs-name {
  font-size: 13px;
  line-height: 1.3;
}

.aw-home__subs-chevron {
  flex: none;
  opacity: 0.6;
}

.aw-home__referral {
  margin-top: 6px;
  font-size: 12px;
}

.aw-weblogin {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 12vh auto 0;
  padding: 20px;
}

.aw-weblogin__title {
  margin: 0;
  font-size: 1.5rem;
}

.aw-weblogin__label {
  font-size: 13px;
  color: var(--text-secondary);
}

.aw-weblogin__input {
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--r-lg, 12px);
  border: 1px solid var(--border-soft);
  background: var(--bg-1);
  color: var(--text-primary);
  font-size: 16px;
}

.aw-weblogin__captcha {
  min-height: 4px;
}

.aw-weblogin__submit {
  min-height: 48px;
}

.aw-weblogin__error {
  min-height: 18px;
  font-size: 13px;
  color: var(--danger);
}

/* ─── E5: store settings toggles / sub captcha ──────────────────────────── */

.aw-store-detail__toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aw-store-detail__toggle-row .aw-field__hint {
  flex: 1;
  line-height: 1.35;
}

/* ─── E9: inventory group row quick issue ───────────────────────────────── */

.aw-inv-group-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aw-inv-group-row .aw-inv-row-full {
  flex: 1;
}

.aw-inv-group-row__issue {
  flex: none;
  min-height: 40px;
  white-space: nowrap;
}

/* ─── E12: stats store picker row ───────────────────────────────────────── */

.aw-stats__store-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aw-stats__store-pick {
  flex: 1;
  min-height: 44px;
  text-align: left;
}

.aw-stats__store-clear {
  flex: none;
  min-width: 44px;
  min-height: 44px;
}

/* ─── E13: discount targets search/summary ──────────────────────────────── */

.aw-discount-targets__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aw-discount-targets__actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.aw-discount-targets__summary {
  margin-top: 8px;
}

/* ─── E14: promocodes rows / code generator ─────────────────────────────── */

.aw-promocode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aw-promocode-row__main {
  flex: 1;
  min-width: 160px;
}

.aw-promocode-row__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.aw-promocode__code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aw-promocode__code-row .aw-input {
  flex: 1;
}

/* ─── E15: roulette participants stepper ────────────────────────────────── */

.aw-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aw-stepper__btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-1);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
}

.aw-stepper__value {
  min-width: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

/* ─── E16: reviews cards ────────────────────────────────────────────────── */

.aw-review-card__stars {
  color: #f5b301;
  letter-spacing: 2px;
  font-size: 15px;
}

.aw-review-card__text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

/* ─── E17: broadcast composer (buttons, telegram-like preview) ──────────── */

.aw-broadcast__button-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.aw-broadcast__button-row .aw-input {
  flex: 1;
  min-width: 0;
}

.aw-broadcast-preview__bubble {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aw-broadcast-preview__meta {
  font-size: 12px;
}

.aw-broadcast-preview__text {
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.aw-broadcast-preview__buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aw-broadcast-preview__button {
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  color: var(--brand-bright, var(--text-primary));
}

/* ─── E19: payment systems status + per-store methods ───────────────────── */

.aw-payment-systems__status {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.aw-payment-systems__status.is-on {
  color: var(--success, #22c55e);
}

.aw-payment-systems__status.is-off {
  color: var(--danger, #ef4444);
}

.aw-payment-systems__method-store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
}

.aw-payment-systems__method-store-row .aw-pill {
  flex: none;
}

/* ─── E20: top-up auto refresh hint ─────────────────────────────────────── */

.aw-topup__auto-hint {
  margin-top: 6px;
  font-size: 12px;
}

/* ─── E21: proxy status, notes, progress ────────────────────────────────── */

.aw-proxy__balance.is-low {
  color: var(--danger, #ef4444);
  font-weight: 600;
}

.aw-proxy__status.is-on {
  color: var(--success, #22c55e);
  font-size: 13px;
  font-weight: 600;
}

.aw-proxy__status.is-off {
  color: var(--danger, #ef4444);
  font-size: 13px;
  font-weight: 600;
}

.aw-proxy__note {
  font-size: 12px;
  line-height: 1.4;
}

.aw-proxy__progress {
  font-size: 13px;
}

/* ─── Mobile QA fixes (320px overflow, touch targets ≥44, iOS input zoom) ── */

/* Home quick actions не мають розпирати 320px (min-content «Додати магазин») */
.aw-home__quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aw-home__quick-btn { min-width: 0; }
.aw-home__quick-label { overflow-wrap: anywhere; }

/* Stepper: прокрутка замість розпирання сторінки */
.aw-step-indicator {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.aw-step-indicator::-webkit-scrollbar { display: none; }
.aw-step-indicator__item { flex: 0 0 auto; }

/* Touch targets ≥44×44 (WCAG 2.5.5 / §1.4) */
.aw-seg__item { min-height: 44px; }
.aw-radio-chip { min-height: 44px; }
.aw-dropdown { min-height: 44px; }
.aw-fab { min-height: 44px; }
.aw-catalog-row__main { min-height: 44px; }
.aw-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.aw-pill--compact { min-height: 44px; }
.aw-pill--icon { min-width: 44px; min-height: 44px; }
.aw-btn { max-width: 100%; overflow-wrap: anywhere; }

/* iOS Safari: font-size <16px у полях викликає автозум при фокусі */
.aw-app input,
.aw-app select,
.aw-app textarea { font-size: 16px; }
.aw-input { min-height: 44px; }
.aw-search input { min-height: 44px; font-size: 16px; }
