/* ==========================================================================
   BeautyBot — Premium Telegram Mini App Design System v2
   ========================================================================== */

:root {
  --bg-app: #F7F3EF;
  --bg-card: #FFFFFF;
  --bg-card-alt: #FFF8F4;
  --bg-elevated: #FFFFFF;
  --bg-input: #F4F0EC;
  --bg-nav: rgba(255, 255, 255, 0.82);
  --bg-hero: linear-gradient(145deg, #E8C4B8 0%, #D4A08C 40%, #C18B74 100%);
  --bg-overlay: rgba(0, 0, 0, 0.4);
  --text-primary: #1C1917;
  --text-secondary: #78716C;
  --text-tertiary: #A8A29E;
  --text-on-accent: #FFFFFF;
  --accent: #C18B74;
  --accent-light: #D4A08C;
  --accent-soft: rgba(193, 139, 116, 0.10);
  --accent-glow: rgba(193, 139, 116, 0.30);
  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, 0.12);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #FBBF24;
  --border: rgba(28, 25, 23, 0.06);
  --border-strong: rgba(28, 25, 23, 0.12);
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 20px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 12px 40px rgba(28, 25, 23, 0.12);
  --shadow-glow: 0 4px 24px var(--accent-glow);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.3s var(--ease);
  --nav-height: 72px;
}

[data-theme="dark"] {
  --bg-app: #0F0F12;
  --bg-card: #1A1A20;
  --bg-card-alt: #1F1F26;
  --bg-elevated: #22222A;
  --bg-input: #1A1A20;
  --bg-nav: rgba(15, 15, 18, 0.88);
  --bg-hero: linear-gradient(145deg, #3D2E28 0%, #2A1F1B 40%, #1A1412 100%);
  --bg-overlay: rgba(0, 0, 0, 0.6);
  --text-primary: #F5F5F4;
  --text-secondary: #A8A29E;
  --text-tertiary: #57534E;
  --accent: #D4A08C;
  --accent-light: #E0B5A3;
  --accent-soft: rgba(212, 160, 140, 0.12);
  --accent-glow: rgba(212, 160, 140, 0.20);
  --border: rgba(245, 245, 244, 0.06);
  --border-strong: rgba(245, 245, 244, 0.10);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.40);
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent
}

body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  padding-bottom: 100px;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain
}

::-webkit-scrollbar {
  width: 0;
  height: 0
}

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

/* Pages */
.pages {
  position: relative
}

.page {
  display: none;
  min-height: calc(100dvh - var(--nav-height));
  animation: pageIn .4s var(--ease) both
}

.page.active {
  display: block;
  padding-bottom: 100px
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 3rem 1.5rem 2.5rem;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl)
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg-hero);
  z-index: 0
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .18) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .08) 0%, transparent 40%)
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center
}

.hero__badge {
  display: inline-block;
  background: rgba(255, 255, 255, .20);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: .375rem 1rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: .75rem
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.1
}

.hero__subtitle {
  font-size: .9375rem;
  font-weight: 300;
  color: rgba(255, 255, 255, .80);
  margin-top: .5rem;
  max-width: 280px;
  margin-inline: auto
}

/* Section headers */
.home-section {
  padding: 1.25rem 1rem 0
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .875rem
}

.section-header__title {
  font-size: 1.125rem;
  font-weight: 700
}

.section-header__link {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: var(--radius-xs);
  transition: background var(--transition)
}

.section-header__link:hover {
  background: var(--accent-soft)
}

.featured-scroll {
  display: flex;
  gap: .875rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: .25rem 1rem 1rem 0;
  -webkit-overflow-scrolling: touch
}

/* About Card */
.about-card {
  margin: 0 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.about-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about-card__text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.featured-scroll::-webkit-scrollbar {
  display: none
}

.featured-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative
}

.featured-card:active {
  transform: scale(.97)
}

.featured-card__img-wrap {
  width: 100%;
  height: 130px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  font-size: 3rem
}

.featured-card__body {
  padding: .75rem
}

.featured-card__name {
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.3
}

.featured-card__price {
  position: absolute;
  top: .625rem;
  right: .625rem;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .1875rem .5rem;
  border-radius: var(--radius-full)
}

.featured-card__duration {
  font-size: .6875rem;
  color: var(--text-tertiary);
  margin-top: .125rem
}

/* Page header */
.page-header {
  padding: 1.5rem 1.25rem 1rem
}

.page-header__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em
}

.page-header__sub {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-top: .125rem
}

/* Sub-tabs */
.sub-tabs {
  display: flex;
  gap: 0;
  margin: 0 1.25rem;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1rem
}

.sub-tab {
  flex: 1;
  padding: .625rem .5rem;
  font-family: var(--font);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap
}

.sub-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs)
}

.sub-page {
  display: none
}

.sub-page.active {
  display: block;
  animation: pageIn .3s var(--ease)
}

/* Service cards grid */
.services-list {
  display: grid;
  gap: 1rem;
  padding: 0 1.25rem 1.5rem
}

.service-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative
}

.service-card:hover {
  box-shadow: var(--shadow-md)
}

.service-card:active {
  transform: scale(.985)
}

.service-card__image-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  font-size: 4rem
}

.service-card__price {
  grid-area: price;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  justify-self: end;
  align-self: start;
  margin: 0;
}

.service-card__body {
  padding: 1rem;
  display: grid;
  grid-template-areas:
    "title price"
    "desc desc"
    "duration button";
  grid-template-columns: 1fr auto;
  gap: .5rem .75rem;
  align-items: end;
}

.service-card__info {
  display: contents;
  /* Allows children to participate in parent grid */
}

.service-card__name {
  grid-area: title;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  align-self: start;
}

.service-card__desc {
  grid-area: desc;
  font-size: .8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* We remove .service-card__meta and .service-card__bottom since we use grid areas directly */
.service-card__meta,
.service-card__bottom {
  display: contents;
}

.service-card__duration {
  grid-area: duration;
  font-size: .75rem;
  color: var(--text-tertiary);
  background: var(--accent-soft);
  padding: .1875rem .5rem;
  border-radius: var(--radius-full);
  justify-self: start;
  align-self: center;
}

.service-card__book-btn {
  grid-area: button;
  flex-shrink: 0;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  padding: .5rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  justify-self: end;
  align-self: center;
}


.service-card__book-btn:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-glow)
}

.service-card__book-btn:active {
  transform: scale(.95)
}

/* Reviews scroll */
.reviews-scroll,
.featured-scroll {
  display: flex !important;
  min-height: 200px !important;
  gap: .75rem;
  overflow-x: auto !important;
  scrollbar-width: thin;
  padding: .25rem 1rem 1.5rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch
}

.reviews-scroll {
  display: flex !important;
  min-height: 200px;
  overflow-x: auto;
  gap: 1rem;
  z-index: 10 !important;
  position: relative !important;
  background: transparent !important;
}

/* On mobile: hide scrollbar for swipe feel */
@media (max-width: 599px) {
  .reviews-scroll::-webkit-scrollbar {
    display: none
  }

  .reviews-scroll {
    scrollbar-width: none
  }
}

/* On PC: show visible styled scrollbar */
@media (min-width: 600px) {
  .reviews-scroll::-webkit-scrollbar {
    height: 8px !important;
    display: block !important
  }

  .reviews-scroll::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px
  }

  .reviews-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 3px
  }

  .reviews-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent)
  }
}

.review-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-xs)
}

.review-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .375rem
}

.review-card__author {
  font-size: .8125rem;
  font-weight: 600
}

.review-card__stars {
  color: var(--warning);
  font-size: .875rem
}

.review-card__text {
  font-size: .8125rem;
  color: var(--text-secondary);
  line-height: 1.5
}

.review-card__date {
  font-size: .6875rem;
  color: var(--text-tertiary);
  margin-top: .5rem
}

/* Selected service bar */
.selected-service-bar {
  margin: 0 1.25rem 1rem;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  animation: pageIn .3s var(--ease)
}

.selected-service-bar__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0
}

.selected-service-bar__info {
  flex: 1;
  min-width: 0
}

.selected-service-bar__name {
  font-size: .875rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.selected-service-bar__meta {
  font-size: .75rem;
  color: var(--text-secondary)
}

/* No-service hint */
.no-service-hint {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary)
}

.no-service-hint__icon {
  font-size: 2.5rem;
  margin-bottom: .75rem
}

.no-service-hint p {
  margin-bottom: 1rem
}

/* Calendar */
.calendar-card {
  margin: 0 1.25rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm)
}

.calendar-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem
}

.calendar-card__month {
  font-weight: 700;
  font-size: 1rem;
  text-transform: capitalize
}

.calendar-nav {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-app);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  color: var(--text-primary)
}

.calendar-nav svg {
  width: 18px;
  height: 18px
}

.calendar-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft)
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: .6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .375rem
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px
}

.cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xs);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  transition: all .2s var(--ease)
}

.cal-day:hover:not(.disabled):not(.empty) {
  background: var(--accent-soft);
  color: var(--accent)
}

.cal-day.today {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 600
}

.cal-day.selected {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  border: 1.5px solid var(--accent) !important
}

.cal-day.disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: .3
}

.cal-day.empty {
  cursor: default
}

.cal-day.blocked {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px dashed var(--danger)
}

.cal-day.available {
  background: var(--success-soft);
  color: var(--success);
  border: 1px dashed var(--success)
}

/* Slots */
.slots-section {
  padding: 0 1.25rem;
  margin-bottom: 1rem
}

.slots-section__title {
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: .75rem
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem
}

.slot-btn {
  padding: .625rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  text-align: center;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s var(--ease)
}

.slot-btn:hover:not(.unavailable) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent)
}

.slot-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow)
}

.slot-btn.unavailable {
  opacity: .25;
  cursor: not-allowed;
  text-decoration: line-through
}

.slots-blocked {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary)
}

.slots-blocked__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: .5rem
}

/* Confirm */
.confirm-card {
  margin: 0 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  animation: slideUp .35s var(--ease-spring)
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.confirm-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .875rem
}

.confirm-card__row {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary)
}

.confirm-card__row strong {
  color: var(--text-primary)
}

.confirm-card__row:last-of-type {
  border: none;
  margin-bottom: .75rem
}

/* User booking cards */
.bookings-section {
  padding: 0 1.25rem;
  margin-bottom: 1.5rem
}

.bookings-section__title {
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--text-primary)
}

.booking-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .875rem;
  animation: pageIn .3s var(--ease);
  transition: opacity .3s, transform .3s
}

.booking-card.leaving {
  opacity: 0;
  transform: translateX(40px) scale(.95)
}

.booking-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0
}

.booking-card__info {
  flex: 1;
  min-width: 0
}

.booking-card__service {
  font-size: .875rem;
  font-weight: 600
}

.booking-card__date {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: .125rem
}

.booking-card__status {
  font-size: .6875rem;
  font-weight: 600;
  padding: .125rem .5rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: .25rem
}

.booking-card__status.pending {
  background: rgba(251, 191, 36, .12);
  color: #D97706
}

.booking-card__status.approved {
  background: var(--success-soft);
  color: var(--success)
}

.booking-card__status.cancelled {
  background: var(--danger-soft);
  color: var(--danger)
}

.booking-card__status.rejected {
  background: var(--danger-soft);
  color: var(--danger)
}

.booking-card__status.completed {
  background: var(--accent-soft);
  color: var(--accent)
}

.booking-card__cancel {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: .375rem .75rem;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: .6875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s
}

.booking-card__cancel:hover {
  background: var(--danger);
  color: #fff
}

/* Admin stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  padding: 0 1.25rem 1rem
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-xs)
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  line-height: 1
}

.stat-card__label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .375rem;
  display: block
}

/* Admin booking cards */
.admin-bookings {
  display: grid;
  gap: .75rem;
  padding: 0 1.25rem 1.5rem
}

.admin-booking-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  animation: pageIn .3s var(--ease);
  transition: opacity .3s, transform .3s
}

.admin-booking-card.leaving {
  opacity: 0;
  transform: translateX(40px) scale(.95)
}

.admin-booking-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .75rem
}

.admin-booking-card__client {
  font-weight: 600;
  font-size: .9375rem
}

.admin-booking-card__id {
  font-size: .6875rem;
  color: var(--text-tertiary);
  background: var(--bg-app);
  padding: .1875rem .5rem;
  border-radius: var(--radius-full)
}

.admin-booking-card__details {
  display: grid;
  gap: .375rem;
  margin-bottom: .875rem
}

.admin-booking-card__detail {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--text-secondary)
}

.admin-booking-card__detail-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0
}

.admin-booking-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem
}

.admin-action-btn {
  padding: .625rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease)
}

.admin-action-btn--approve {
  background: var(--success-soft);
  color: var(--success)
}

.admin-action-btn--approve:hover {
  background: var(--success);
  color: #fff
}

.admin-action-btn--reject {
  background: var(--danger-soft);
  color: var(--danger)
}

.admin-action-btn--reject:hover {
  background: var(--danger);
  color: #fff
}

.admin-action-btn:active {
  transform: scale(.95)
}

/* Admin services CRUD */
.admin-services-list {
  display: grid;
  gap: .75rem;
  padding: 0 1.25rem 1.5rem
}

.admin-svc-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: .875rem;
  transition: opacity .3s, transform .3s
}

.admin-svc-card.leaving {
  opacity: 0;
  transform: scale(.95)
}

.admin-svc-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0
}

.admin-svc-card__info {
  flex: 1;
  min-width: 0
}

.admin-svc-card__name {
  font-size: .875rem;
  font-weight: 600
}

.admin-svc-card__meta {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: .125rem
}

.admin-svc-card__actions {
  display: flex;
  gap: .5rem
}

.admin-svc-card__btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: var(--bg-app);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: .875rem;
  transition: all .2s
}

.admin-svc-card__btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft)
}

.admin-svc-card__btn--danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft)
}

/* Admin review moderation */
.admin-review-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0 1.25rem .75rem;
  box-shadow: var(--shadow-xs);
  transition: opacity .3s, transform .3s
}

.admin-review-card.leaving {
  opacity: 0;
  transform: translateX(40px) scale(.95)
}

.admin-review-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem
}

.admin-review-card__author {
  font-size: .8125rem;
  font-weight: 600
}

.admin-review-card__stars {
  color: var(--warning);
  font-size: .875rem
}

.admin-review-card__text {
  font-size: .8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: .75rem
}

.admin-review-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  animation: fadeOverlay .25s var(--ease)
}

@keyframes fadeOverlay {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .35s var(--ease-spring)
}

.modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem
}

.modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .5rem
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem
}

/* Profile */
.profile-card {
  margin: 0 1.25rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm)
}

.profile-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin: 0 auto .875rem
}

.profile-card__name {
  font-size: 1.25rem;
  font-weight: 700
}

.profile-card__username {
  font-size: .8125rem;
  color: var(--text-tertiary);
  margin-top: .125rem
}

/* Settings */
.settings-group {
  margin: 0 1.25rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs)
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background .2s
}

.setting-row:hover {
  background: var(--bg-card-alt)
}

.setting-row__left {
  display: flex;
  align-items: center;
  gap: .75rem
}

.setting-row__icon {
  font-size: 1.25rem
}

.setting-row__label {
  font-size: .9375rem;
  font-weight: 500
}

.toggle {
  cursor: pointer
}

.toggle__track {
  width: 44px;
  height: 26px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  position: relative;
  transition: background .3s var(--ease)
}

.toggle__thumb {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform .3s var(--ease-spring);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15)
}

.toggle.active .toggle__track {
  background: var(--accent)
}

.toggle.active .toggle__thumb {
  transform: translateX(18px)
}

/* Review form */
.review-form-card {
  margin: 0 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs)
}

.review-form-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .875rem
}

.star-rating {
  display: flex;
  gap: .375rem;
  margin-bottom: .875rem
}

.star {
  font-size: 1.75rem;
  color: var(--border-strong);
  cursor: pointer;
  transition: color .2s, transform .2s
}

.star.active {
  color: var(--warning)
}

.star:hover {
  transform: scale(1.2)
}

/* Shared */
.chip {
  display: inline-flex;
  align-items: center;
  padding: .375rem .75rem;
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition)
}

.chip--outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary)
}

.chip--outline:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.input {
  width: 100%;
  padding: .875rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: .9375rem;
  font-family: var(--font);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  margin-bottom: .75rem
}

.input::placeholder {
  color: var(--text-tertiary)
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft)
}

.textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .875rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: var(--text-on-accent);
  box-shadow: var(--shadow-sm)
}

.btn--primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px)
}

.btn--primary:active {
  transform: translateY(0) scale(.98)
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text-secondary)
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.btn--sm {
  padding: .625rem 1.125rem;
  font-size: .8125rem
}

.btn--full {
  width: 100%
}

.btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none
}

.btn.loading .btn__text {
  opacity: 0
}

.btn.loading .btn__spinner {
  display: block;
  position: absolute
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: .625rem;
  z-index: 100
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem .75rem;
  color: var(--text-tertiary);
  transition: color .2s var(--ease);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font)
}

.bottom-nav__item.active {
  color: var(--accent)
}

.bottom-nav__icon {
  width: 24px;
  height: 24px;
  transition: transform .2s var(--ease-spring)
}

.bottom-nav__item.active .bottom-nav__icon {
  transform: scale(1.12)
}

.bottom-nav__label {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .02em
}

.bottom-nav__badge {
  position: absolute;
  top: -2px;
  right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  padding: 0 4px
}

/* Empty */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary)
}

.empty-state.small {
  padding: 1.5rem
}

/* Emoji picker grid */
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 8px
}

.emoji-pick {
  aspect-ratio: 1;
  font-size: 1.5rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .2s var(--ease);
  padding: 0
}

.emoji-pick:hover {
  border-color: var(--accent);
  background: var(--accent-soft)
}

.emoji-pick.active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: scale(1.1)
}

.empty-state__icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: .75rem;
  opacity: .5
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translate(-50%, 24px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  font-size: .875rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease-spring)
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto
}

/* ════════ MEDIA QUERIES (Responsive Web App for PC/Tablets) ════════ */

@media (min-width: 600px) {
  body {
    background: #e5e5e5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px 0;
  }

  #pages {
    width: 100%;
    max-width: 440px;
    background: var(--bg-app);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-strong);

    /* Исправляем контейнер для ПК (600px+) */
    height: 85vh !important;
    /* Ограничиваем высоту */
    max-height: 850px;
    overflow-y: auto !important;
    /* ВКЛЮЧАЕМ СКРОЛЛ ВНУТРИ */
    position: relative;
    display: block;
  }

  .page {
    min-height: auto;
    padding-bottom: calc(var(--nav-height) + 32px);
  }

  .bottom-nav {
    position: sticky;
    /* Прилипает к низу контейнера, а не экрана */
    bottom: 0;
    width: 100%;
    max-width: 440px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }

  .toast {
    bottom: calc(var(--nav-height) + 20px);
  }



  [data-theme="dark"] body {
    background: #000;
  }
}

/* Responsive */
@media(min-width:420px) {
  .slots-grid {
    grid-template-columns: repeat(4, 1fr)
  }
}

@media(min-width:520px) {
  .services-list {
    grid-template-columns: repeat(2, 1fr)
  }
}

.user-info {
  display: flex;
  flex-direction: column;
  /* Имя сверху, юзернейм под ним */
  align-items: center;
  /* Центрируем, так как в профиле обычно всё по центру */
}

.user-info__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tg-theme-text-color, #000);
}

.user-info__username {
  font-size: 0.9rem;
  color: var(--tg-theme-hint-color, gray);
  /* Используем цвет подсказки из темы TG */
  margin-top: 2px;
}

/* ФИКС КАЛЕНДАРЯ: чтобы выбранная дата ВСЕГДА была видна */
.cal-day.selected {
  background-color: var(--accent) !important;
  color: #fff !important;
  border: 1.5px solid var(--accent) !important;
  z-index: 10;
}

/* Отступ внизу каждой страницы, чтобы контент не перекрывался навигацией */
.page {
  padding-bottom: 120px !important;
}