/* =============================================
   YaSkidki — Mobile-first, max-width 600px
   Primary: #882AFF | Accent: #CC33FF
   ============================================= */

:root {
  --primary: #882AFF;
  --primary-dark: #6a1fd4;
  --accent: #CC33FF;
  --accent-light: #f3e8ff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --bg: #F5F5F5;
  --bg-card: #ffffff;
  --border: #e9d5ff;
  --icon-color: #CBCFD6;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(136,42,255,0.08);
  --shadow-hover: 0 6px 24px rgba(136,42,255,0.18);
  --transition: 0.18s ease;
  --bottom-nav-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Ограничение ширины только для публичного сайта (не для админки) */
body:not(.admin-body) {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: calc(var(--bottom-nav-h) + 8px);
}

/* Фон за пределами 600px только для публичного сайта */
html:not(:has(.admin-body)) { background: #e0e0e0; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }

/* ---- Логотип ---- */
.logo { display: flex; align-items: center; }
.logo__img { height: 24px; width: auto; display: block; }
.logo__ya { color: var(--primary); }
.logo__skidki { color: var(--accent); }

/* ============================================
   HEADER
   ============================================ */
.header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(136,42,255,0.08);
  width: 100%;
}

.header__top {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 8px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.logo__ya { color: var(--primary); }
.logo__skidki { color: var(--accent); }

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header__points {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.header__city {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
  font-family: inherit;
}
.header__city:hover { color: var(--primary); }

/* Поиск */
.header__search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 10px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 8px 14px;
  transition: border-color var(--transition);
}
.header__search:focus-within { border-color: var(--primary); }
.header__search svg { color: var(--text-muted); flex-shrink: 0; }
.header__search input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.875rem;
  outline: none;
  color: var(--text);
  font-family: inherit;
  min-width: 0;
}
.header__search input::placeholder { color: var(--text-muted); }

/* Плашка статистики */
.header__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.header__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  color: var(--text);
  transition: background var(--transition);
  border-right: 1px solid var(--border);
  cursor: pointer;
}
.header__stat:last-child { border-right: none; }
.header__stat:hover { background: var(--accent-light); }
.header__stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.header__stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

/* ============================================
   BOTTOM NAV
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: var(--bottom-nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  z-index: 200;
  box-shadow: 0 -2px 16px rgba(136,42,255,0.1);
}
/* 4 пункта когда нет организации */
.bottom-nav--4 {
  grid-template-columns: repeat(4, 1fr);
}
/* 5 пунктов для организации */
.bottom-nav--5 {
  grid-template-columns: repeat(5, 1fr);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
  transition: color var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-decoration: none;
}
.bottom-nav__item svg {
  stroke: var(--icon-color);
  transition: stroke var(--transition);
}
.bottom-nav__item:hover,
.bottom-nav__item--active {
  color: var(--primary);
}
.bottom-nav__item:hover svg,
.bottom-nav__item--active svg {
  stroke: var(--primary);
}

.bottom-nav__item--add {
  color: var(--icon-color);
  background: transparent;
  border-radius: 14px;
  margin: 8px 4px;
  height: calc(var(--bottom-nav-h) - 16px);
}
.bottom-nav__item--add svg { stroke: var(--icon-color); }
.bottom-nav__item--add:hover,
.bottom-nav__item--add.bottom-nav__item--active {
  color: var(--primary);
  background: var(--accent-light);
}
.bottom-nav__item--add:hover svg,
.bottom-nav__item--add.bottom-nav__item--active svg {
  stroke: var(--primary);
}
.bottom-nav__item--empty { pointer-events: none; }

/* ============================================
   MAIN
   ============================================ */
.main {
  padding: 12px 16px;
  min-height: 50vh;
}

/* ============================================
   MAP BUTTON
   ============================================ */
.map-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  font-family: inherit;
  transition: opacity var(--transition);
}
.map-btn:hover { opacity: 0.9; }
.map-btn svg { stroke: #fff; flex-shrink: 0; }

/* ============================================
   SECTIONS
   ============================================ */
.section { margin-bottom: 20px; }

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section__title { font-size: 1.05rem; font-weight: 800; }

.section__cats-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  transition: background var(--transition);
  white-space: nowrap;
}
.section__cats-btn:hover { background: #ddb8ff; color: var(--primary); }
.section__cats-btn svg { stroke: var(--primary); }

.section__link { color: var(--primary); font-size: 0.82rem; font-weight: 500; }

/* ============================================
   PROMOTIONS GRID — 2 колонки
   ============================================ */
.promotions-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Для страницы списка */
.promotions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ============================================
   PROMO CARD
   ============================================ */
.promo-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Изображение */
.promo-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--accent-light);
  flex-shrink: 0;
}

.promo-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.promo-card__img--active { opacity: 1; }

.promo-card__image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
}

/* Логотип организации — левый верхний угол */
.promo-card__org-logo {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 2;
}
.promo-card__org-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Бейдж скидки — правый верхний угол */
.promo-card__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  z-index: 2;
  line-height: 1.4;
}

/* Избранное — правый нижний угол */
.promo-card__fav {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #bbb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: all var(--transition);
  z-index: 3;
  padding: 0;
}
.promo-card__fav:hover { color: var(--primary); transform: scale(1.15); }
.promo-card__fav--active { color: var(--primary); }
.promo-card__fav--active svg { fill: var(--primary); stroke: var(--primary); }

/* Стрелки галереи */
.promo-card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 2;
  padding: 0;
  line-height: 1;
}
.promo-card__arrow--prev { left: 4px; }
.promo-card__arrow--next { right: 4px; }

/* Точки галереи */
.promo-card__dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}
.promo-card__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background var(--transition);
}
.promo-card__dot--active { background: #fff; }

/* Тело карточки */
.promo-card__body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  color: var(--text);
}
.promo-card__category {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.promo-card__title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.promo-card__price { margin-top: 2px; }
.promo-card__free {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.promo-card__points {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.promo-card__address {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}
.promo-card__address svg { flex-shrink: 0; margin-top: 1px; stroke: var(--text-muted); }
.promo-card__address em { color: var(--primary); font-style: normal; }
.promo-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.stars { display: flex; gap: 1px; }
.promo-card__rating-count { font-size: 0.62rem; color: var(--text-muted); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--ghost:hover { background: var(--accent-light); }
.btn--danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn--danger:hover { background: #dc2626; }
.btn--white { background: #fff; color: var(--primary); border-color: #fff; }
.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn--sm { padding: 5px 12px; font-size: 0.78rem; }
.btn--full { width: 100%; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--primary); }
.form-control.is-invalid { border-color: #ef4444; }
.form-error { display: block; font-size: 0.75rem; color: #ef4444; margin-top: 3px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; margin-bottom: 12px; cursor: pointer; }
.form-check input { accent-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group--full { grid-column: 1 / -1; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.875rem;
  font-weight: 500;
}
.alert--success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert--error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert--info { background: var(--accent-light); color: var(--primary-dark); border: 1px solid #d8b4fe; }

/* ============================================
   BADGES
   ============================================ */
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.badge--active { background: #d1fae5; color: #065f46; }
.badge--draft { background: #fef3c7; color: #92400e; }
.badge--archived { background: #f3f4f6; color: #6b7280; }
.badge--pending { background: #fef3c7; color: #92400e; }
.badge--category { background: var(--accent-light); color: var(--primary); }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page { padding: 16px; }
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.auth-card--wide { max-width: 100%; }
.auth-card__title { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.auth-card__subtitle { color: var(--text-muted); margin-bottom: 16px; font-size: 0.875rem; }
.auth-card__footer { text-align: center; margin-top: 16px; font-size: 0.875rem; color: var(--text-muted); }
.auth-form { margin-top: 16px; }

/* ============================================
   MODAL (bottom sheet)
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal__box {
  position: relative;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 16px 24px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}
.modal__box--map {
  border-radius: var(--radius);
  margin: 16px;
  max-height: 90vh;
}
.modal__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; padding-right: 28px; }
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-title { font-size: 1.25rem; font-weight: 800; }

/* ============================================
   TABLE
   ============================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; background: var(--bg-card); min-width: 480px; }
.table th { background: var(--accent-light); color: var(--primary-dark); font-weight: 700; padding: 10px 12px; text-align: left; font-size: 0.78rem; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.82rem; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #faf5ff; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dashboard-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.dashboard-card h3 { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.dashboard-card__value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================
   PROMO FORM
   ============================================ */
.promo-form { background: var(--bg-card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.current-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ============================================
   PROMOTIONS LIST PAGE
   ============================================ */
.promotions-layout { display: flex; flex-direction: column; gap: 14px; }
.filters { background: var(--bg-card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.filters__group { margin-bottom: 14px; }
.filters__label { display: block; font-weight: 700; font-size: 0.78rem; margin-bottom: 8px; color: var(--text); }
.filters__check { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; margin-bottom: 6px; cursor: pointer; }
.filters__check input { accent-color: var(--primary); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrap { margin-top: 20px; display: flex; justify-content: center; }
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary);
  background: #fff;
  border: 2px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.pagination__btn:hover { background: var(--accent-light); border-color: var(--primary); color: var(--primary); }
.pagination__btn--active { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
.pagination__btn--active:hover { background: var(--primary); color: #fff; }
.pagination__btn--disabled { color: var(--text-muted); background: #f9fafb; cursor: default; }
.pagination__btn--disabled:hover { background: #f9fafb; border-color: var(--border); color: var(--text-muted); }
.pagination__dots { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; color: var(--text-muted); font-size: 0.82rem; }

/* ============================================
   PROMO DETAIL PAGE
   ============================================ */
.promo-detail { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.promo-detail__title { font-size: 1.3rem; font-weight: 800; margin: 6px 0; }
.promo-detail__discount { margin-bottom: 10px; }
.discount-badge { display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 1.2rem; font-weight: 800; color: #fff; }
.discount-badge--percent { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.discount-badge--fixed { background: linear-gradient(135deg, var(--accent), var(--primary)); }
.promo-detail__address { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }
.promo-detail__dates { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 10px; }
.promo-detail__description, .promo-detail__conditions { margin-top: 16px; }
.promo-detail__description h3, .promo-detail__conditions h3 { margin-bottom: 6px; }
.gallery__main img { width: 100%; border-radius: var(--radius); max-height: 260px; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.gallery__thumb { width: 60px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; opacity: 0.7; transition: opacity var(--transition); }
.gallery__thumb:hover { opacity: 1; }

/* ============================================
   REVIEWS
   ============================================ */
.reviews-section { margin-top: 20px; }
.reviews-section h2 { margin-bottom: 14px; }
.review { background: var(--bg-card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.review__header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.review__rating { color: #f59e0b; font-size: 0.875rem; }
.review__date { color: var(--text-muted); font-size: 0.72rem; margin-left: auto; }
.review-form { background: var(--bg-card); border-radius: var(--radius); padding: 16px; margin-top: 16px; box-shadow: var(--shadow); }

/* ============================================
   COUPON PAGE
   ============================================ */
.coupon-page { padding: 8px 0; }
.coupon-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-hover); overflow: hidden; }
.coupon-card__header { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; padding: 24px 20px; text-align: center; }
.coupon-card__header h1 { font-size: 1.2rem; margin-bottom: 4px; }
.coupon-card__body { padding: 24px 20px; text-align: center; }
.coupon-card__qr { margin-bottom: 20px; }
.coupon-card__qr img { margin: 0 auto; max-width: 160px; }
.coupon-card__code-label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.coupon-card__code-value { display: inline-block; font-size: 1.4rem; font-weight: 800; letter-spacing: 0.1em; color: var(--primary); background: var(--accent-light); padding: 10px 20px; border-radius: var(--radius-sm); font-family: monospace; }
.coupon-card__status { font-size: 1rem; font-weight: 600; margin: 12px 0; }
.coupon-card__status--sold { color: #10b981; }
.coupon-card__status--used { color: var(--text-muted); }
.coupon-card__status--expired { color: #ef4444; }
.coupon-card__expires { font-size: 0.78rem; color: var(--text-muted); }
.coupon-card__footer { padding: 14px 20px; border-top: 1px solid var(--border); text-align: center; }
.coupon-card__hint { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 12px; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.empty-state p { font-size: 0.95rem; margin-bottom: 16px; }

/* ============================================
   ORG DASHBOARD
   ============================================ */
.org-dashboard h1 { margin-bottom: 20px; }

/* ============================================
   CATEGORIES GRID
   ============================================ */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.category-card { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); font-weight: 500; font-size: 0.7rem; transition: all var(--transition); text-align: center; }
.category-card:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.category-card__icon { font-size: 1.4rem; }

/* ============================================
   DROPDOWN (десктоп/планшет)
   ============================================ */
.dropdown { position: relative; }
.dropdown__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
  overflow: hidden;
  z-index: 200;
}
.dropdown__menu.is-open { display: block; }
.dropdown__item { display: block; width: 100%; padding: 10px 16px; font-size: 0.875rem; color: var(--text); background: none; border: none; text-align: left; cursor: pointer; transition: background var(--transition); font-family: inherit; }
.dropdown__item:hover { background: var(--accent-light); color: var(--primary); }
.dropdown__item--danger { color: #ef4444; }
.dropdown__item--danger:hover { background: #fef2f2; }

/* ============================================
   FOOTER (минимальный, т.к. есть bottom nav)
   ============================================ */
.footer { background: var(--text); color: #fff; padding: 20px 16px 12px; margin-top: 20px; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.footer__brand p { color: rgba(255,255,255,0.6); font-size: 0.78rem; margin-top: 4px; }
.footer__brand .logo__ya { color: var(--accent); }
.footer__brand .logo__skidki { color: #fff; }
.footer__links { display: flex; flex-direction: column; gap: 6px; }
.footer__links a { color: rgba(255,255,255,0.7); font-size: 0.82rem; transition: color var(--transition); }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 12px; text-align: center; color: rgba(255,255,255,0.4); font-size: 0.72rem; }

/* ============================================
   RESPONSIVE — очень маленькие экраны
   ============================================ */
@media (max-width: 360px) {
  .promotions-grid-2,
  .promotions-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row, .form-grid { grid-template-columns: 1fr; }
  .promo-card__title { font-size: 0.72rem; }
}

/* ============================================
   SEARCH TRIGGER (кнопка-заглушка в шапке)
   ============================================ */
.header__search-wrap {
  padding: 0 16px 10px;
}
.header__search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #f3e8ff;
  border: none;
  border-radius: 24px;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background var(--transition);
}
.header__search-trigger:hover { background: #e9d5ff; }
.header__search-trigger svg { flex-shrink: 0; stroke: var(--text-muted); }

/* ============================================
   SEARCH OVERLAY (полноэкранный)
   ============================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #fff;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}
.search-overlay[hidden] { display: none; }

.search-overlay__header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-shrink: 0;
}
.search-overlay__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  border-radius: 50%;
  transition: background var(--transition);
}
.search-overlay__back:hover { background: var(--accent-light); }
.search-overlay__form {
  display: flex;
  align-items: center;
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--primary);
  border-radius: 24px;
  padding: 0 0 0 12px;
  gap: 0;
  overflow: hidden;
}
.search-overlay__input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px !important;
  outline: none;
  color: var(--text);
  font-family: inherit;
  padding: 8px 0;
  min-width: 0;
}
.search-overlay__input::placeholder { color: var(--text-muted); }
.search-overlay__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--primary);
  border: none;
  border-radius: 0 23px 23px 0;
  cursor: pointer;
  flex-shrink: 0;
  align-self: stretch;
  margin: 0;
}
.search-overlay__submit svg { stroke: #fff; }

.search-overlay__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.search-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.search-section__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.search-section__clear {
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}

.search-suggestions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-suggestions li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.search-suggestions li:hover { background: var(--accent-light); }
.search-suggestions li svg { flex-shrink: 0; stroke: var(--text-muted); }
.search-suggestions__text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}
.search-suggestions__del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: all var(--transition);
}
.search-suggestions__del:hover { color: #ef4444; background: #fee2e2; }

/* ============================================
   SEARCH OVERLAY — анимация открытия
   ============================================ */
.search-overlay {
  animation: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.search-overlay.is-opening {
  animation: searchSlideIn 0.25s ease forwards;
}
@keyframes searchSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Анимация кнопки-триггера при нажатии */
.header__search-trigger.is-clicked {
  animation: triggerPulse 0.2s ease;
}
@keyframes triggerPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.97); border-color: var(--primary); }
  100% { transform: scale(1); }
}

/* font-size 16px чтобы iOS не зумил */
.search-overlay__input {
  font-size: 16px !important;
}

/* ============================================
   SEARCH HINTS (живые подсказки)
   ============================================ */
.search-hints {
  margin-top: 8px;
  display: none;
}
.search-hints.is-visible { display: block; }

.search-hint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.search-hint-item:hover { background: var(--accent-light); }

.search-hint-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.search-hint-item__icon--category { background: var(--accent-light); }
.search-hint-item__icon--promo    { background: #fef3c7; }
.search-hint-item__icon--org      { background: #d1fae5; }

.search-hint-item__text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}
.search-hint-item__label {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 10px;
}

.search-hints-loading {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   CATEGORIES PAGE
   ============================================ */
.categories-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 1;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: center;
  padding: 12px 8px;
  transition: all var(--transition);
  text-decoration: none;
}
.cat-tile:hover { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.cat-tile__icon { font-size: 2rem; line-height: 1; }
.cat-tile__name { font-size: 0.75rem; font-weight: 600; line-height: 1.3; }
.cat-tile__count { font-size: 0.65rem; color: var(--text-muted); }
.cat-tile:hover .cat-tile__count { color: rgba(255,255,255,0.7); }

/* ============================================
   PROMO SLIDER
   ============================================ */
.promo-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--accent-light);
  margin: -12px -16px 0;
  width: calc(100% + 32px);
}
.promo-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.promo-slider__slide--active { opacity: 1; }
.promo-slider__slide img { width: 100%; height: 100%; object-fit: cover; }

.promo-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--text);
}
.promo-slider__arrow--prev { left: 10px; }
.promo-slider__arrow--next { right: 10px; }

.promo-slider__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}
.promo-slider__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background var(--transition);
}
.promo-slider__dot--active { background: #fff; width: 18px; border-radius: 3px; }

.promo-slider__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 2;
}

/* ============================================
   PROMO PAGE (страница скидки)
   ============================================ */
.promo-page { padding-top: 16px; }

.promo-page__org {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.promo-page__org-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.promo-page__org-name { font-size: 0.875rem; font-weight: 600; color: var(--text-muted); }

.promo-page__title { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; line-height: 1.3; }

.promo-page__price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.promo-page__free { background: #d1fae5; color: #065f46; font-size: 0.85rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.promo-page__points { background: #fef3c7; color: #92400e; font-size: 0.85rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.promo-page__left { font-size: 0.78rem; color: var(--text-muted); }

.promo-page__rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 0.82rem; color: var(--text-muted); }
.promo-page__dates { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }

.promo-page__addresses { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.promo-page__address { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-muted); }
.promo-page__address svg { flex-shrink: 0; stroke: var(--primary); }

.promo-page__action { margin-bottom: 8px; }

.promo-page__section { margin-top: 20px; }
.promo-page__section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.promo-page__section p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

.btn--fav-active { background: var(--accent-light); color: var(--primary); }

/* ============================================
   PROFILE PAGE
   ============================================ */

/* Шапка профиля */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 16px;
}
.profile-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.4);
}
.profile-hero__name { font-size: 1.1rem; font-weight: 700; }
.profile-hero__email { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
.profile-hero__city { font-size: 0.75rem; opacity: 0.75; margin-top: 2px; }

/* Статистика */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.profile-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.profile-stat svg { stroke: var(--primary); }
.profile-stat--points svg { stroke: #f59e0b; }
.profile-stat__label { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }
.profile-stat__value { font-size: 1.3rem; font-weight: 800; color: var(--primary); line-height: 1; }
.profile-stat--points .profile-stat__value { color: #f59e0b; }

/* Меню профиля */
.profile-menu {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.profile-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  text-decoration: none;
}
.profile-menu__item:last-child { border-bottom: none; }
.profile-menu__item:hover { background: var(--accent-light); }
.profile-menu__item svg { stroke: var(--primary); flex-shrink: 0; }
.profile-menu__item span { flex: 1; font-size: 0.9rem; font-weight: 500; }
.profile-menu__arrow { stroke: var(--text-muted) !important; }

/* Секции профиля */
.profile-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.profile-section__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.profile-form .form-group:last-of-type { margin-bottom: 16px; }

/* Кнопка выхода */
.btn--logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: none;
  border: 2px solid #fee2e2;
  border-radius: var(--radius-sm);
  color: #ef4444;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  width: 100%;
}
.btn--logout:hover { background: #fee2e2; }
.btn--logout svg { stroke: #ef4444; }

/* ============================================
   BACK HEADER
   ============================================ */
.back-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--text);
  flex-shrink: 0;
  transition: all var(--transition);
}
.back-btn:hover { background: var(--accent-light); color: var(--primary); }
.back-btn svg { stroke: currentColor; }

/* ============================================
   COUPONS LIST (страница "Мои купоны")
   ============================================ */
.coupons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.coupon-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
}
.coupon-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }

.coupon-item__stripe {
  width: 4px;
  align-self: stretch;
  flex-shrink: 0;
}
.coupon-item__stripe--sold    { background: #10b981; }
.coupon-item__stripe--used    { background: #CBCFD6; }
.coupon-item__stripe--expired { background: #ef4444; }

.coupon-item__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.coupon-item__logo img { width: 100%; height: 100%; object-fit: cover; }

.coupon-item__info {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
}
.coupon-item__title {
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coupon-item__org {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.coupon-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.coupon-item__code {
  font-size: 0.68rem;
  font-family: monospace;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
  font-weight: 600;
}
.coupon-item__date {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.coupon-item__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 12px 0 4px;
  flex-shrink: 0;
}
.coupon-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}
.coupon-status--active  { background: #d1fae5; color: #065f46; }
.coupon-status--used    { background: #f3f4f6; color: #6b7280; }
.coupon-status--expired { background: #fee2e2; color: #991b1b; }

/* ============================================
   COUPON DETAIL (страница одного купона)
   ============================================ */
.coupon-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.coupon-detail__header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  padding: 24px 20px 20px;
  text-align: center;
}
.coupon-detail__org-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 2px solid rgba(255,255,255,0.4);
}
.coupon-detail__org   { font-size: 0.8rem; opacity: 0.85; margin-bottom: 4px; }
.coupon-detail__title { font-size: 1.1rem; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.coupon-detail__discount {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.coupon-detail__status-bar {
  padding: 10px 20px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
}
.coupon-detail__status-bar--sold    { background: #d1fae5; color: #065f46; }
.coupon-detail__status-bar--used    { background: #f3f4f6; color: #6b7280; }
.coupon-detail__status-bar--expired { background: #fee2e2; color: #991b1b; }

.coupon-detail__qr-wrap {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-bottom: 2px dashed var(--border);
}
.coupon-detail__qr-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.coupon-detail__qr {
  padding: 12px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: inline-flex;
}
.coupon-detail__qr img,
.coupon-detail__qr canvas { display: block; }
.coupon-detail__code {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: var(--accent-light);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
}

.coupon-detail__info {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.coupon-detail__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.coupon-detail__row:last-child { border-bottom: none; }
.coupon-detail__row-label { color: var(--text-muted); }
.coupon-detail__row-value { font-weight: 600; }
.text-danger { color: #ef4444; }

.coupon-detail__actions {
  padding: 16px 20px 20px;
}

/* ---- Profile password toggle ---- */
.profile-section__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.profile-section__toggle svg { stroke: var(--primary); flex-shrink: 0; }
.profile-section__toggle-arrow {
  margin-left: auto;
  stroke: var(--text-muted) !important;
  transition: transform 0.2s ease;
}

/* ============================================
   ORG TRIAL BANNER (в шапке)
   ============================================ */
.org-trial-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  border-top: 1px solid var(--border);
}
.org-trial-banner--active { background: #fef3c7; color: #92400e; }
.org-trial-banner--active svg { stroke: #f59e0b; flex-shrink: 0; }
.org-trial-banner--expired { background: #fee2e2; color: #991b1b; }
.org-trial-banner--expired svg { stroke: #ef4444; flex-shrink: 0; }
.org-trial-banner a { color: inherit; font-weight: 700; text-decoration: underline; margin-left: 4px; }

/* ============================================
   ORG DASHBOARD
   ============================================ */
.org-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 14px;
}
.org-hero__logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.org-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}
.org-hero__name { font-size: 1.1rem; font-weight: 700; }
.org-hero__email { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
.org-hero__city { font-size: 0.75rem; opacity: 0.75; margin-top: 2px; }

.org-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.org-notice--trial { background: #fef3c7; color: #92400e; }
.org-notice--trial svg { stroke: #f59e0b; flex-shrink: 0; margin-top: 2px; }
.org-notice--expired { background: #fee2e2; color: #991b1b; }
.org-notice--expired svg { stroke: #ef4444; flex-shrink: 0; margin-top: 2px; }

.org-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.org-stat {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.org-stat__value { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.org-stat__label { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

.org-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.org-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.org-tariff-card {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border-left: 4px solid var(--primary);
  background: var(--accent-light);
}
.org-tariff-card--trial { border-left-color: #f59e0b; background: #fef3c7; }
.org-tariff-card--none  { border-left-color: #ef4444; background: #fee2e2; }
.org-tariff-card__name  { font-weight: 700; font-size: 0.9rem; }
.org-tariff-card__price { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-top: 2px; }
.org-tariff-card__expires { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.org-actions { display: flex; flex-direction: column; gap: 8px; }
.org-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.org-action-btn:hover { background: var(--accent-light); color: var(--primary); }
.org-action-btn svg { stroke: var(--primary); flex-shrink: 0; }
.org-action-btn--primary { background: var(--primary); color: #fff; }
.org-action-btn--primary:hover { background: var(--primary-dark); color: #fff; }
.org-action-btn--primary svg { stroke: #fff; }

/* ---- Кнопка кабинета организации в шапке ---- */
.header__org-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background var(--transition);
}
.header__org-btn:hover { background: var(--primary-dark); color: #fff; }
.header__org-btn svg { stroke: #fff; }

/* ---- Крупная кнопка добавить скидку ---- */
.org-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  transition: opacity var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(136,42,255,0.3);
}
.org-add-btn:hover { opacity: 0.92; color: #fff; }
.org-add-btn svg { stroke: #fff; }

/* ---- Список тарифов в кабинете ---- */
.org-tariffs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.org-tariff-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: border-color var(--transition);
  gap: 10px;
}
.org-tariff-option--current {
  border-color: var(--primary);
  background: var(--accent-light);
}
.org-tariff-option__info { flex: 1; min-width: 0; }
.org-tariff-option__name { font-weight: 700; font-size: 0.875rem; }
.org-tariff-option__desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.org-tariff-option__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.org-tariff-option__price { font-size: 0.9rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.org-tariff-option__price span { font-size: 0.65rem; font-weight: 500; color: var(--text-muted); }
.org-tariff-option__badge {
  background: #d1fae5;
  color: #065f46;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ============================================
   PROMO FORM SECTIONS
   ============================================ */
.promo-form-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.promo-form-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.promo-form-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ---- Загрузка изображений ---- */
.img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.img-upload-area:hover {
  border-color: var(--primary);
  background: var(--accent-light);
  color: var(--primary);
}
.img-upload-area svg { stroke: currentColor; }

.img-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.img-preview-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--accent-light);
}
.img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-preview-main {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.img-preview-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.img-preview-del:hover { background: #ef4444; }

/* ---- Кнопки действий на превью ---- */
.img-preview-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 3px;
}
.img-preview-btn {
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background var(--transition);
}
.img-preview-btn--main:hover { background: #f59e0b; }
.img-preview-btn--del:hover  { background: #ef4444; }
.img-preview-main--hidden { display: none; }

/* ============================================
   TOAST УВЕДОМЛЕНИЯ (избранное и др.)
   ============================================ */
.toast-notification {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast-notification--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   КНОПКА ПЕРЕКЛЮЧЕНИЯ ФИЛЬТРОВ
   ============================================ */
.filters__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 8px;
}
.filters__toggle-arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.filters__body {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   КНОПКА НАЗАД НА СЛАЙДЕРЕ
   ============================================ */
.promo-slider__back {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all var(--transition);
}
.promo-slider__back:hover {
  background: #fff;
  transform: scale(1.05);
}
.promo-slider__back svg {
  stroke: var(--text);
}

/* ============================================
   УЛУЧШЕННАЯ АДАПТАЦИЯ ФОРМЫ CREATE
   ============================================ */
@media (max-width: 600px) {
  .promo-form-section {
    padding: 12px;
  }
  .promo-form-section__title {
    font-size: 0.7rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .form-group {
    margin-bottom: 12px;
  }
  .form-group label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }
  .form-control, .form-control select, .form-control textarea {
    font-size: 0.875rem;
    padding: 8px 10px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .btn--lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  .img-upload-area {
    padding: 18px 12px;
    font-size: 0.8rem;
  }
  .img-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  #addressMap {
    height: 200px !important;
  }
  .page-header {
    padding: 12px 16px;
  }
  .page-title {
    font-size: 1.25rem;
  }
}

/* ============================================
   MOBILE BANNER (только десктоп)
   ============================================ */
.mobile-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  position: relative;
}
.mobile-banner__text {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mobile-banner__text:hover { opacity: 0.85; }
.mobile-banner__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background var(--transition);
  flex-shrink: 0;
}
.mobile-banner__close:hover { background: rgba(255,255,255,0.35); }

/* На мобильных скрываем через CSS тоже */
@media (max-width: 768px) {
  .mobile-banner { display: none !important; }
}

/* ============================================
   COUPON SCANNER PAGE
   ============================================ */
.scanner-page {
  padding: 0 0 24px;
}

.scanner-org-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  margin-bottom: 16px;
}
.scanner-org-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.scanner-org-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.scanner-org-name {
  font-size: 1rem;
  font-weight: 700;
}
.scanner-org-sub {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 2px;
}

.scanner-input-card {
  margin: 0 16px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.scanner-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.scanner-input-row {
  display: flex;
  gap: 8px;
}
.scanner-input {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  background: #fff;
  text-transform: uppercase;
}
.scanner-input:focus { border-color: var(--primary); }
.scanner-qr-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: background var(--transition);
}
.scanner-qr-btn:hover { background: #e9d5ff; }
.scanner-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Камера */
.scanner-camera-wrap {
  margin: 0 16px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.scanner-camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--text);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}
.scanner-camera-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scanner-camera-viewport {
  position: relative;
  background: #000;
  aspect-ratio: 4/3;
  max-height: 280px;
  overflow: hidden;
}
.scanner-camera-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scanner-camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scanner-camera-frame {
  width: 180px;
  height: 180px;
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
  animation: scanPulse 1.5s ease-in-out infinite;
}
@keyframes scanPulse {
  0%, 100% { border-color: var(--primary); }
  50%       { border-color: var(--accent); }
}

/* Результат */
.scanner-result {
  margin: 0 16px 16px;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 0.2s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.scanner-result--loading {
  background: var(--bg-card);
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
  box-shadow: var(--shadow);
}
.scanner-result--success {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}
.scanner-result--used {
  background: #f9fafb;
  border: 1.5px solid var(--border);
}
.scanner-result--error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 500;
}
.scanner-result--error svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.scanner-result--warn {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
}
.scanner-result__top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scanner-result--success .scanner-result__top svg { stroke: #16a34a; }
.scanner-result--used    .scanner-result__top svg { stroke: var(--text-muted); }
.scanner-result--warn    .scanner-result__top svg { stroke: #d97706; }
.scanner-result__status {
  font-size: 1rem;
  font-weight: 700;
}
.scanner-result--success .scanner-result__status { color: #16a34a; }
.scanner-result--used    .scanner-result__status { color: var(--text-muted); }
.scanner-result--warn    .scanner-result__status { color: #d97706; }
.scanner-result__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scanner-result__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  gap: 8px;
}
.scanner-result__row span { color: var(--text-muted); flex-shrink: 0; }
.scanner-result__row b { color: var(--text); text-align: right; }
.scanner-result__code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--primary) !important;
}

/* Кнопка провести */
.scanner-redeem-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(136,42,255,0.3);
}
.scanner-redeem-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.scanner-redeem-btn:active { transform: translateY(0); }
.scanner-redeem-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Спиннер */
.scanner-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   COUPON HISTORY PAGE
   ============================================ */
.coupon-history-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 16px 16px;
}
.coupon-history-stat {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.coupon-history-stat__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.coupon-history-stat__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.coupon-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}

.coupon-history-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: box-shadow var(--transition);
}
.coupon-history-item:hover {
  box-shadow: var(--shadow-hover);
}
.coupon-history-item__left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.coupon-history-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d1fae5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #16a34a;
}
.coupon-history-item__promo {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.coupon-history-item__code {
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.coupon-history-item__user {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.coupon-history-item__right {
  text-align: right;
  flex-shrink: 0;
}
.coupon-history-item__discount {
  display: inline-block;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 4px;
}
.coupon-history-item__date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.coupon-history-item__time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.coupon-history-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.coupon-history-empty svg {
  stroke: var(--border);
  margin: 0 auto 12px;
}
.coupon-history-empty p {
  font-size: 0.875rem;
}

/* ============================================
   STAFF PAGE
   ============================================ */
.staff-page { padding-bottom: 24px; }

.staff-add-card {
  margin: 0 16px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.staff-add-card__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.staff-add-row {
  display: flex;
  gap: 8px;
}
.staff-add-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.staff-add-input:focus { border-color: var(--primary); }
.staff-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background var(--transition);
}
.staff-add-btn:hover { background: var(--primary-dark); }

.staff-created-card {
  margin: 0 16px 16px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius);
  padding: 16px;
  animation: fadeInUp 0.2s ease;
}
.staff-created-card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.staff-created-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.staff-cred-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.staff-cred-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.staff-cred-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.staff-cred-value {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.4;
}
.staff-cred-value--mono {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.staff-cred-value--sm { font-size: 0.72rem; }
.staff-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--transition);
}
.staff-copy-btn:hover { color: var(--primary); }

.staff-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}
.staff-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.staff-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.staff-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.staff-card__info { flex: 1; min-width: 0; }
.staff-card__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.staff-card__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.staff-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.staff-card__badge--active { background: #d1fae5; color: #065f46; }
.staff-card__badge--off    { background: #f3f4f6; color: #6b7280; }

.staff-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.staff-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.staff-action-btn--ghost  { background: #f3f4f6; color: var(--text); }
.staff-action-btn--ghost:hover { background: var(--accent-light); color: var(--primary); }
.staff-action-btn--warn   { background: #fef3c7; color: #92400e; }
.staff-action-btn--warn:hover { background: #fde68a; }
.staff-action-btn--danger { background: #fee2e2; color: #991b1b; }
.staff-action-btn--danger:hover { background: #fca5a5; }

.staff-new-pass {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  animation: fadeInUp 0.2s ease;
}

.staff-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.staff-empty svg { stroke: var(--border); margin: 0 auto 12px; }
.staff-empty p { font-size: 0.875rem; }

/* Страница входа сотрудника */
.staff-login-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 360px;
}
.staff-login-org {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.staff-login-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}
.staff-login-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
}
.staff-login-org-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.staff-login-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}
.staff-login-name {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

/* Кнопка в шапке сканера сотрудника */
.staff-header-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background var(--transition);
}
.staff-header-btn:hover { background: rgba(255,255,255,0.35); color: #fff; }
