/**
 * styles.css — Стили Telegram Mini App
 *
 * Нативный iOS/Telegram дизайн.
 * Все цвета берутся из CSS-переменных Telegram (--tg-theme-*).
 */

/* ==============================
   0. ТЕМА ПО УМОЛЧАНИЮ (для браузера без Telegram)
   ============================== */

:root {
  --tg-theme-bg-color: #ffffff;
  --tg-theme-text-color: #000000;
  --tg-theme-hint-color: #999999;
  --tg-theme-link-color: #007AFF;
  --tg-theme-button-color: #007AFF;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-secondary-bg-color: #f2f2f7;
  --tg-theme-destructive-text-color: #ff3b30;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tg-theme-bg-color: #1c1c1e;
    --tg-theme-text-color: #ffffff;
    --tg-theme-hint-color: #8e8e93;
    --tg-theme-link-color: #0a84ff;
    --tg-theme-button-color: #0a84ff;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #2c2c2e;
    --tg-theme-destructive-text-color: #ff453a;
  }
}

/* ==============================
   1. СБРОС И БАЗОВЫЕ СТИЛИ
   ============================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--tg-theme-text-color, #000000);
  background-color: var(--tg-theme-secondary-bg-color, #f2f2f7);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

a {
  color: var(--tg-theme-link-color, #007AFF);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ==============================
   2. ЭКРАНЫ И ПЕРЕХОДЫ
   ============================== */

#app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background-color: var(--tg-theme-secondary-bg-color, #f2f2f7);
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: opacity 250ms ease-out, transform 250ms ease-out;
  padding: 0 16px 90px;
  overflow-y: auto;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  position: relative;
}

.screen.slide-out-left {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
}

/* --- ВКЛАДКИ КЛИЕНТ/МАСТЕР --- */
.role-tabs {
  display: flex;
  margin: 0 -16px;
  background: var(--tg-theme-bg-color, #fff);
  border-bottom: 0.5px solid var(--tg-theme-secondary-bg-color, #e5e5ea);
  position: sticky;
  top: 0;
  z-index: 10;
}

.role-tab {
  flex: 1;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--tg-theme-hint-color, #8e8e93);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all 200ms;
  font-family: inherit;
}

.role-tab.active {
  color: var(--tg-theme-text-color, #000);
  border-bottom-color: var(--tg-theme-button-color, #007AFF);
  font-weight: 600;
}

/* ==============================
   3. ШАПКА МАСТЕРА
   ============================== */

.master-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  margin: 0 -16px;
  background: var(--tg-theme-bg-color, #ffffff);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.master-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tg-theme-button-color, #007AFF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--tg-theme-button-text-color, #ffffff);
  flex-shrink: 0;
  overflow: hidden;
}

.master-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.master-info {
  flex: 1;
  min-width: 0;
}

.master-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000000);
  letter-spacing: -0.3px;
}

.master-desc {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==============================
   3.1. КНОПКИ «ПОЗВОНИТЬ / НАПИСАТЬ»
   ============================== */

.contact-buttons {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.contact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.contact-btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.contact-btn-call {
  background: #34C759;
  color: #ffffff;
}

.contact-btn-write {
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #ffffff);
}

.contact-btn-icon {
  font-size: 15px;
}

/* ==============================
   4. СЕТКА КАТЕГОРИЙ
   ============================== */

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px;
  padding-left: 4px;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.category-card {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.category-card:active {
  transform: scale(0.96);
  opacity: 0.8;
}

.category-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000000);
}

.category-count {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 3px;
}

/* ==============================
   5. БАННЕР АКЦИИ
   ============================== */

.promo-banner {
  background: linear-gradient(135deg, #FF6B35, #FF8F5E);
  border-radius: 16px;
  padding: 18px 20px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
  -webkit-user-select: none;
  user-select: none;
  margin-bottom: 16px;
}

.promo-banner:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.promo-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.promo-title {
  font-size: 17px;
  font-weight: 700;
}

.promo-text {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ==============================
   5.1. КНОПКИ ДЕЙСТВИЙ (ГЛАВНАЯ)
   ============================== */

.home-booking-section {
  margin-top: 16px;
}

.home-booking-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 0;
  border-radius: 14px;
  border: none;
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #ffffff);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, opacity 120ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.home-booking-btn:active {
  transform: scale(0.98);
  opacity: 0.85;
}

.home-booking-btn.active {
  border-radius: 14px 14px 0 0;
}

.home-booking-btn-icon {
  font-size: 17px;
}

/* --- Группа кнопок: история, бонусы, абонементы, поделиться --- */
.home-history-btn {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 20px;
  border-radius: 14px;
  border: none;
  background: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #000);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms ease, opacity 120ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.home-history-btn:active {
  transform: scale(0.98);
  opacity: 0.8;
}

.home-bonus-btn {
  /* наследует от home-history-btn */
}

.home-abonement-btn {
  /* наследует от home-history-btn */
}

.home-calendar {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 0 0 14px 14px;
  padding: 16px;
  transition: max-height 300ms ease;
}

.home-calendar.hidden {
  display: none;
}

/* --- БЛОК ОТЗЫВОВ --- */
.reviews-section {
  margin-top: 20px;
  padding-bottom: 16px;
}

.reviews-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.review-card {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--tg-theme-text-color, #000);
}

.review-stars {
  color: #FF9500;
  font-size: 14px;
  letter-spacing: 1px;
}

.review-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--tg-theme-hint-color, #8e8e93);
}

/* --- ЭКРАН ИСТОРИИ ПОСЕЩЕНИЙ --- */
.history-screen {
  padding: 0;
}

.history-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -0.5px;
}

.history-card {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.history-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--tg-theme-text-color, #000);
}

.history-card-price {
  font-weight: 600;
  font-size: 15px;
  color: var(--tg-theme-button-color, #007AFF);
}

.history-card-details {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  font-size: 15px;
  color: var(--tg-theme-hint-color, #8e8e93);
  line-height: 1.5;
}

/* --- БОНУСЫ --- */
.bonus-balance-card {
  background: linear-gradient(135deg, #FF9500, #FFCC00);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
  color: #fff;
}

.bonus-balance-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.bonus-balance-value {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
}

.bonus-balance-hint {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 6px;
}

.bonus-history-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.bonus-plus {
  color: #34C759 !important;
}

/* --- АБОНЕМЕНТЫ --- */
.abonement-info {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

.abonement-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
  margin-top: 16px;
  margin-bottom: 4px;
}

.abonement-section-sub {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 12px;
}

.abonement-card {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.abonement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.abonement-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000);
}

.abonement-card-badge {
  background: #5856D6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.abonement-card-prices {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.abonement-old-price {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-decoration: line-through;
}

.abonement-new-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
}

.abonement-card-saving {
  font-size: 13px;
  color: #34C759;
  font-weight: 600;
}

.abonement-hint {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-align: center;
  margin-top: 16px;
  padding: 0 8px;
}

/* --- ПАНЕЛЬ МАСТЕРА --- */
.master-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.master-stat-card {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 16px 8px;
  text-align: center;
}

.master-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
  letter-spacing: -0.3px;
}

.master-stat-label {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 4px;
}

.master-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  margin-top: 16px;
  padding-left: 4px;
}

/* --- ЭКРАН ВХОДА МАСТЕРА --- */
.master-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 40px;
}

.master-login-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.master-login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.master-login-hint {
  font-size: 15px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 28px;
}

.master-login-input {
  width: 100%;
  max-width: 240px;
  padding: 14px 16px;
  font-size: 20px;
  text-align: center;
  letter-spacing: 8px;
  border: none;
  border-radius: 14px;
  background: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #000);
  outline: none;
  transition: box-shadow 200ms;
  font-family: inherit;
}

.master-login-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

.master-login-error {
  color: #FF3B30;
  font-size: 14px;
  margin-top: 12px;
  font-weight: 500;
}

.master-login-error.hidden {
  display: none;
}

.master-login-btn {
  margin-top: 20px;
  width: 100%;
  max-width: 240px;
  padding: 15px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--tg-theme-button-color, #007AFF);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 120ms;
  font-family: inherit;
}

.master-login-btn:active {
  opacity: 0.8;
}

/* ==============================
   6. КАРТОЧКИ УСЛУГ (КАТАЛОГ)
   ============================== */

.catalog-header {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 20px;
  text-align: center;
  color: var(--tg-theme-text-color, #000000);
  letter-spacing: -0.5px;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-card {
  display: flex;
  gap: 14px;
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.service-card:active {
  transform: scale(0.98);
  opacity: 0.8;
}

.service-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  overflow: hidden;
}

.service-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000000);
  margin-bottom: 3px;
}

.service-duration {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 6px;
}

.service-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000000);
}

.service-old-price {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-decoration: line-through;
}

.sale-badge {
  display: inline-block;
  background: #FF3B30;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  padding: 3px 7px;
  position: absolute;
  top: 10px;
  right: 10px;
}

/* ==============================
   7. ДЕТАЛИ УСЛУГИ
   ============================== */

.detail-gallery {
  margin: 0 -16px;
  height: 220px;
  background: var(--tg-theme-bg-color, #ffffff);
  position: relative;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}

.gallery-container {
  display: flex;
  height: 100%;
  transition: transform 300ms ease-out;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: var(--tg-theme-bg-color, #ffffff);
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px 0;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tg-theme-hint-color, #cccccc);
  opacity: 0.35;
  transition: opacity 200ms ease, transform 200ms ease;
}

.gallery-dot.active {
  opacity: 1;
  background: var(--tg-theme-button-color, #007AFF);
  transform: scale(1.2);
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 16px 0;
  text-align: center;
  color: var(--tg-theme-text-color, #000000);
  letter-spacing: -0.3px;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 16px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  padding: 13px 0;
  border-bottom: 0.5px solid var(--tg-theme-secondary-bg-color, #e5e5ea);
}

.detail-meta-item:last-child {
  border-bottom: none;
}

.detail-meta-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.detail-meta-value {
  color: var(--tg-theme-text-color, #000000);
  font-weight: 600;
}

.detail-meta-value.price {
  font-size: 20px;
}

.detail-meta-value.sale {
  color: #FF3B30;
}

.detail-meta-value .old-price {
  font-size: 15px;
  font-weight: 400;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-decoration: line-through;
  margin-left: 8px;
}

.detail-description-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 8px;
  padding-left: 4px;
}

.detail-description {
  font-size: 15px;
  color: var(--tg-theme-text-color, #000000);
  line-height: 1.55;
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 14px 16px;
}

/* ==============================
   9. ЭКРАН ЗАПИСИ (ДАТА/ВРЕМЯ)
   ============================== */

.booking-summary {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0 20px;
}

.booking-summary-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000000);
}

.booking-summary-meta {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 4px;
}

.booking-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 12px;
  padding-left: 4px;
}

.booking-phone-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--tg-theme-hint-color, #c7c7cc);
  border-radius: 12px;
  background: var(--tg-theme-bg-color, #fff);
  color: var(--tg-theme-text-color, #000);
  outline: none;
  transition: border-color 200ms;
}

.booking-phone-input:focus {
  border-color: var(--tg-theme-button-color, #007AFF);
}

.booking-phone-input::placeholder {
  color: var(--tg-theme-hint-color, #8e8e93);
}

.booking-phone-display {
  padding: 14px 16px;
  font-size: 16px;
  color: var(--tg-theme-text-color, #000);
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  border-radius: 12px;
}

.bonus-block {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--tg-theme-bg-color, #fff);
  border-radius: 12px;
  border: 1px solid var(--tg-theme-hint-color, #c7c7cc);
}

.bonus-balance {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--tg-theme-text-color, #000);
}

.bonus-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--tg-theme-text-color, #000);
  cursor: pointer;
}

.bonus-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--tg-theme-button-color, #007AFF);
}

.bonus-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.bonus-input {
  width: 120px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--tg-theme-hint-color, #c7c7cc);
  border-radius: 10px;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  color: var(--tg-theme-text-color, #000);
  outline: none;
}

.bonus-input:focus {
  border-color: var(--tg-theme-button-color, #007AFF);
}

.bonus-max {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
}

.booking-confirm-btn {
  display: block;
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--tg-theme-button-color, #007AFF);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: opacity 120ms;
  font-family: inherit;
}

.booking-confirm-btn:active {
  opacity: 0.8;
}

.booking-confirm-btn.hidden {
  display: none;
}

.booking-confirm-btn.disabled {
  background: var(--tg-theme-hint-color, #8e8e93);
  cursor: default;
  opacity: 0.5;
}

.master-confirm-visit-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #34C759;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 120ms;
}

.master-confirm-visit-btn:active {
  opacity: 0.8;
}

.master-confirmed-badge {
  display: block;
  margin-top: 8px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #34C759;
  text-align: center;
}

/* ========== ОФФЕР-МОДАЛКА ========== */

.offer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 300ms ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.offer-overlay.visible {
  opacity: 1;
}

.offer-overlay.visible .offer-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.offer-card {
  background: var(--tg-theme-bg-color, #fff);
  border-radius: 20px;
  padding: 32px 24px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease;
}

.offer-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 16px;
}

.offer-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--tg-theme-text-color, #000);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.offer-subtitle {
  font-size: 15px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 20px;
  line-height: 1.5;
}

.offer-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.offer-bullets li {
  font-size: 15px;
  color: var(--tg-theme-text-color, #333);
  padding: 7px 0;
  padding-left: 24px;
  position: relative;
  line-height: 1.4;
}

.offer-bullets li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--tg-theme-button-color, #007AFF);
  font-weight: 700;
}

.offer-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--tg-theme-button-color, #007AFF);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 50px;
  line-height: 1;
  transition: opacity 120ms;
  font-family: inherit;
}

.offer-btn:active {
  opacity: 0.85;
}

.offer-skip {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-size: 15px;
  color: var(--tg-theme-hint-color, #8e8e93);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.offer-skip:active {
  opacity: 0.6;
}

/* Горизонтальная прокрутка дат */
.date-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.date-picker::-webkit-scrollbar {
  display: none;
}

.date-chip {
  flex-shrink: 0;
  width: 68px;
  padding: 10px 0;
  border-radius: 14px;
  background: var(--tg-theme-bg-color, #ffffff);
  text-align: center;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, transform 120ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.date-chip:active {
  transform: scale(0.95);
}

.date-chip.selected {
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #ffffff);
}

.date-chip-day {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.6;
}

.date-chip.selected .date-chip-day {
  opacity: 1;
}

.date-chip-num {
  font-size: 20px;
  font-weight: 700;
  margin: 2px 0;
}

.date-chip-month {
  font-size: 11px;
  opacity: 0.5;
}

.date-chip.selected .date-chip-month {
  opacity: 0.9;
}

/* Сетка слотов времени */
.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.time-slot {
  padding: 14px 0;
  border-radius: 12px;
  background: var(--tg-theme-bg-color, #ffffff);
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, transform 120ms ease;
  -webkit-user-select: none;
  user-select: none;
  color: var(--tg-theme-text-color, #000000);
}

.time-slot:active {
  transform: scale(0.95);
}

.time-slot.selected {
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #ffffff);
}

.time-slot.booked {
  opacity: 0.3;
  pointer-events: none;
  text-decoration: line-through;
}

.no-slots {
  text-align: center;
  padding: 24px;
  color: var(--tg-theme-hint-color, #8e8e93);
  font-size: 15px;
}

/* ==============================
   10. ЭКРАН УСПЕХА
   ============================== */

.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  text-align: center;
  padding: 0 16px;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #34C759;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: successPop 400ms ease-out;
}

.success-checkmark {
  width: 36px;
  height: 36px;
  color: #ffffff;
}

@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000000);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.success-card {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 16px;
  padding: 18px 20px;
  width: 100%;
  max-width: 320px;
  text-align: left;
  margin-bottom: 24px;
}

.success-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000000);
  margin-bottom: 12px;
}

.success-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
  color: var(--tg-theme-text-color, #000000);
  border-bottom: 0.5px solid var(--tg-theme-secondary-bg-color, #e5e5ea);
}

.success-card-row:last-child {
  border-bottom: none;
}

.success-card-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
}

.success-hint {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #8e8e93);
  line-height: 1.5;
  max-width: 280px;
}

.success-hint + .success-hint {
  margin-top: 8px;
}

/* ==============================
   11. SKELETON-ЗАГРУЗКИ
   ============================== */

.skeleton {
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.04),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.skeleton-card {
  height: 100px;
  border-radius: 16px;
  margin-bottom: 8px;
}

/* ==============================
   12. ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ
   ============================== */

.hidden {
  display: none !important;
}

/* Безопасная зона для устройств с вырезом */
@supports (padding-top: env(safe-area-inset-top)) {
  .screen {
    padding-top: calc(8px + env(safe-area-inset-top));
  }
}

/* ==============================
   13. FALLBACK-КНОПКИ (БРАУЗЕР)
   ============================== */

.fallback-back-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: transparent;
  color: var(--tg-theme-link-color, #007AFF);
  border: none;
  border-radius: 0;
  padding: 8px 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 120ms ease;
  box-shadow: none;
}

.fallback-back-btn:active {
  opacity: 0.7;
}

.fallback-main-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #ffffff);
  border: none;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: opacity 120ms ease;
}

.fallback-main-btn:active {
  opacity: 0.85;
}

/* ==============================
   ОНБОРДИНГ
   ============================== */

.onboarding-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 32px 24px;
  text-align: center;
}

.onboarding-emoji {
  font-size: 64px;
  margin-bottom: 16px;
}

.onboarding-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.onboarding-subtitle {
  font-size: 17px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-bottom: 28px;
}

.onboarding-list {
  list-style: none;
  padding: 0;
  margin: 0 0 36px 0;
  text-align: left;
  width: 100%;
  max-width: 320px;
  background: var(--tg-theme-bg-color, #ffffff);
  border-radius: 14px;
  padding: 4px 16px;
}

.onboarding-list li {
  position: relative;
  padding: 14px 0 14px 28px;
  font-size: 15px;
  color: var(--tg-theme-text-color, #333);
  border-bottom: 0.5px solid var(--tg-theme-secondary-bg-color, #e5e5ea);
}

.onboarding-list li:last-child {
  border-bottom: none;
}

.onboarding-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: #34C759;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}

.onboarding-btn {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #fff);
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 120ms ease;
}

.onboarding-btn:active {
  opacity: 0.85;
}

/* ==============================
   КНОПКА «ПОДЕЛИТЬСЯ»
   ============================== */

.home-share-btn {
  color: var(--tg-theme-link-color, #007AFF) !important;
}

/* ==============================
   НИЖНИЙ ТАБ-БАР
   ============================== */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  background: var(--tg-theme-bg-color, #ffffff);
  border-top: 0.5px solid var(--tg-theme-secondary-bg-color, #e5e5ea);
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: transform 250ms ease;
}

.tab-bar.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.tab-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0 6px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 120ms;
  font-family: inherit;
}

.tab-bar-item:active {
  opacity: 0.6;
}

.tab-bar-icon {
  font-size: 22px;
  line-height: 1;
  color: var(--tg-theme-hint-color, #8e8e93);
  transition: color 200ms;
}

.tab-bar-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--tg-theme-hint-color, #8e8e93);
  transition: color 200ms;
}

.tab-bar-item.active .tab-bar-icon,
.tab-bar-item.active .tab-bar-label {
  color: var(--tg-theme-button-color, #007AFF);
}

.tab-bar-item.active .tab-bar-label {
  font-weight: 600;
}

/* ============================================================
   АДМИН-ПАНЕЛЬ МАСТЕРА
   ============================================================ */

.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  color: var(--tg-theme-text-color, #000);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 200ms;
}

.admin-tab.active {
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #fff);
}

/* Записи */
.admin-booking-card {
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 16px 8px;
}

.admin-booking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.admin-booking-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000);
}

.admin-booking-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.admin-booking-status.pending {
  background: #fff3cd;
  color: #856404;
}

.admin-booking-status.confirmed {
  background: #d4edda;
  color: #155724;
}

.admin-booking-status.cancelled {
  background: #f8d7da;
  color: #721c24;
}

.admin-booking-status.completed {
  background: #c3e6cb;
  color: #0b5e1f;
}

.admin-booking-status.no-show {
  background: #ffeeba;
  color: #856404;
}

.admin-btn.completed {
  background: #28a745;
  color: #fff;
}

.admin-btn.no-show {
  background: #ffc107;
  color: #333;
}

.admin-booking-details {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
  flex-wrap: wrap;
}

.admin-booking-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.admin-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-btn.confirm {
  background: #34c759;
  color: #fff;
}

.admin-btn.cancel {
  background: var(--tg-theme-secondary-bg-color, #e5e5ea);
  color: var(--tg-theme-destructive-text-color, #ff3b30);
}

/* Услуги */
.admin-add-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 12px;
  border: 2px dashed var(--tg-theme-button-color, #007AFF);
  border-radius: 12px;
  background: transparent;
  color: var(--tg-theme-button-color, #007AFF);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-category-group {
  margin-bottom: 8px;
}

.admin-abonement-base {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  padding: 0 4px 4px;
}

.admin-category-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #333);
  padding: 12px 4px 6px;
}

/* --- График работы --- */
.schedule-info {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  padding: 0 4px 12px;
}

.schedule-days-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.schedule-day-card {
  background: var(--tg-theme-bg-color, #fff);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
}

.schedule-day-card.inactive {
  opacity: 0.6;
}

.schedule-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-day-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.schedule-day-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--tg-theme-button-color, #3390ec);
}

.schedule-day-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #333);
}

.schedule-day-time {
  font-size: 13px;
  color: var(--tg-theme-button-color, #3390ec);
  font-weight: 500;
}

.schedule-day-off {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
}

.schedule-day-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--tg-theme-secondary-bg-color, #f0f0f0);
}

.schedule-time-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.schedule-time-row label {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  display: flex;
  align-items: center;
  gap: 4px;
}

.schedule-time-row input[type="time"],
.schedule-time-row select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--tg-theme-secondary-bg-color, #ddd);
  background: var(--tg-theme-secondary-bg-color, #f7f7f7);
  color: var(--tg-theme-text-color, #333);
  font-size: 14px;
}

.admin-service-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 16px 8px;
}

.admin-service-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-service-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--tg-theme-bg-color, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.admin-service-info {
  flex: 1;
  min-width: 0;
}

.admin-service-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-service-meta {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 2px;
}

.admin-service-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.admin-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--tg-theme-bg-color, #fff);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Клиенты */
.admin-client-card {
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 16px 8px;
}

.admin-client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000);
}

.admin-client-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin-top: 4px;
  flex-wrap: wrap;
}

.admin-client-phone {
  font-size: 13px;
  color: var(--tg-theme-link-color, #007AFF);
  margin-top: 2px;
}

/* Рассылка */
.broadcast-info {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #8e8e93);
  margin: 0 16px 12px;
}

.broadcast-textarea {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--tg-theme-hint-color, #c7c7cc);
  border-radius: 12px;
  background: var(--tg-theme-bg-color, #fff);
  color: var(--tg-theme-text-color, #000);
  outline: none;
  resize: vertical;
  min-height: 100px;
}

.broadcast-textarea:focus {
  border-color: var(--tg-theme-button-color, #007AFF);
}

.broadcast-result {
  margin: 8px 16px;
  font-size: 14px;
}

/* Форма услуги */
.admin-form {
  padding: 0 16px 24px;
}

.admin-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #8e8e93);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 12px 0 4px;
}

.admin-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tg-theme-hint-color, #c7c7cc);
  border-radius: 10px;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  color: var(--tg-theme-text-color, #000);
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}

.admin-input:focus {
  outline: none;
  border-color: var(--tg-theme-button-color, #007AFF);
}

.admin-textarea {
  min-height: 80px;
  resize: vertical;
}

.admin-row {
  display: flex;
  gap: 10px;
}

.admin-col {
  flex: 1;
}

.admin-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.admin-photo-item {
  position: relative;
  width: 80px;
  height: 80px;
}

.admin-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.admin-photo-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--tg-theme-destructive-text-color, #ff3b30);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-upload-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  color: var(--tg-theme-button-color, #007AFF);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-save-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #fff);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-save-btn:disabled {
  opacity: 0.5;
}

.admin-back-row {
  padding: 12px 16px;
}

.admin-back-btn {
  background: none;
  border: none;
  color: var(--tg-theme-button-color, #007AFF);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* --- Согласие на обработку ПД --- */
.consent-block {
  margin: 16px 0 8px;
  padding: 0 4px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: var(--tg-theme-hint-color, #999);
}

.consent-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--tg-theme-button-color, #007AFF);
}

.consent-label a {
  color: var(--tg-theme-link-color, #007AFF);
  text-decoration: underline;
}

/* --- Попап политики ПД --- */
.consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.consent-popup {
  background: var(--tg-theme-bg-color, #fff);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.consent-popup-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--tg-theme-text-color, #000);
}

.consent-popup-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tg-theme-text-color, #000);
}

.consent-popup-body p {
  margin: 0 0 10px;
}

.consent-popup-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.consent-popup-body li {
  margin-bottom: 4px;
}

.consent-popup-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #fff);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* --- Колокольчик уведомлений --- */
#notifBellContainer {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
}
.notification-bell {
  position: relative;
  background: var(--tg-theme-bg-color, #fff);
  border: 1px solid var(--tg-theme-hint-color, #ccc);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.notification-panel {
  position: fixed;
  top: 60px;
  right: 12px;
  width: calc(100vw - 24px);
  max-width: 360px;
  max-height: 70vh;
  background: var(--tg-theme-bg-color, #fff);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  z-index: 1001;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tg-theme-hint-color, #eee);
  font-weight: 600;
  font-size: 16px;
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--tg-theme-link-color, #007AFF);
  font-size: 13px;
  cursor: pointer;
}
.notif-panel-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}
.notif-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--tg-theme-hint-color, #999);
}
.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
}
.notification-item.unread {
  background: rgba(0, 122, 255, 0.06);
}
.notif-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.notif-body {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #666);
  line-height: 1.3;
}
.notif-time {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #999);
  margin-top: 4px;
}

.notif-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.notif-action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.notif-action-btn:disabled {
  opacity: 0.5;
}
.notif-action-btn.confirm {
  background: #34c759;
  color: #fff;
}
.notif-action-btn.cancel {
  background: #ff3b30;
  color: #fff;
}
.notif-action-btn.reschedule {
  background: #007aff;
  color: #fff;
}

.notif-action-done {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #999);
  font-style: italic;
  padding: 4px 0;
}

/* --- Супер-админ панель --- */
.sadmin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 8px;
}
.sadmin-title {
  font-size: 18px;
  font-weight: 700;
}
.sadmin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sadmin-refresh-btn {
  background: none;
  border: 1px solid var(--tg-theme-hint-color, #999);
  color: var(--tg-theme-hint-color, #999);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.sadmin-logout-btn {
  background: none;
  border: 1px solid var(--tg-theme-hint-color, #999);
  color: var(--tg-theme-hint-color, #999);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.sadmin-stats {
  display: flex;
  gap: 12px;
  padding: 8px 16px 16px;
}
.sadmin-stat {
  flex: 1;
  background: var(--tg-theme-secondary-bg-color, #f5f5f5);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.sadmin-stat-val {
  font-size: 24px;
  font-weight: 700;
}
.sadmin-stat-label {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #999);
  margin-top: 2px;
}
.sadmin-master-row {
  background: var(--tg-theme-bg-color, #fff);
  border-radius: 12px;
  margin: 8px 16px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.sadmin-paused {
  opacity: 0.6;
}
.sadmin-master-info {
  flex: 1;
  min-width: 0;
}
.sadmin-master-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.sadmin-master-meta {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #999);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sadmin-link {
  color: var(--tg-theme-link-color, #007aff);
  text-decoration: none;
}
.sadmin-master-status {
  font-size: 12px;
}
.sadmin-master-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.sadmin-btn {
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sadmin-btn.pause   { background: #ff9500; color: #fff; }
.sadmin-btn.resume  { background: #34c759; color: #fff; }
.sadmin-btn.delete  { background: #ff3b30; color: #fff; }
.sadmin-btn:disabled { opacity: 0.5; }
.sadmin-empty {
  text-align: center;
  color: var(--tg-theme-hint-color, #999);
  padding: 40px 20px;
}

/* --- Рассылка с чекбоксами --- */
.broadcast-select-all {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
}
.broadcast-client-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 14px;
}
.broadcast-client-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* --- Экран логина (веб-версия) --- */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 24px;
  text-align: center;
}

.login-logo {
  font-size: 64px;
  margin-bottom: 12px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #999);
  margin-bottom: 32px;
}

.login-input-group {
  width: 100%;
  max-width: 320px;
  text-align: left;
  margin-bottom: 16px;
}

.login-label {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  margin-bottom: 6px;
  display: block;
}

.login-phone-row {
  display: flex;
  align-items: center;
  background: var(--tg-theme-secondary-bg-color, #f2f2f7);
  border-radius: 12px;
  overflow: hidden;
}

.login-phone-prefix {
  padding: 14px 0 14px 16px;
  font-size: 17px;
  font-weight: 500;
  color: var(--tg-theme-text-color, #000);
  flex-shrink: 0;
}

.login-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 16px 14px 8px;
  font-size: 17px;
  color: var(--tg-theme-text-color, #000);
  outline: none;
  font-family: inherit;
}

.login-btn {
  width: 100%;
  max-width: 320px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--tg-theme-button-color, #007AFF);
  color: var(--tg-theme-button-text-color, #fff);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.login-btn:disabled {
  opacity: 0.5;
}

.login-error {
  color: var(--tg-theme-destructive-text-color, #ff3b30);
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

.login-hint {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #999);
  margin-bottom: 20px;
}

.login-code-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.login-code-digit {
  width: 52px;
  height: 56px;
  border: 2px solid var(--tg-theme-hint-color, #ccc);
  border-radius: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--tg-theme-text-color, #000);
  background: var(--tg-theme-bg-color, #fff);
  outline: none;
  font-family: inherit;
}

.login-code-digit:focus {
  border-color: var(--tg-theme-button-color, #007AFF);
}

.login-resend {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #999);
  margin-top: 16px;
}

.login-resend-btn {
  background: none;
  border: none;
  color: var(--tg-theme-link-color, #007AFF);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.login-back-link {
  background: none;
  border: none;
  color: var(--tg-theme-link-color, #007AFF);
  font-size: 14px;
  cursor: pointer;
  margin-top: 16px;
  font-family: inherit;
}
