@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

@font-face {
  font-family: 'Igra Sans';
  src: url('/fonts/IgraSans.woff2') format('woff2'),
       url('/fonts/IgraSans.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #fdf6f0;
  --accent: #c9967a;
  --accent-dark: #8b5e52;
  --text: #3d2b1f;
  --white: #ffffff;
  --disabled: #d9d9d9;
  --slot-taken-bg: #f0d0d0;
  --slot-taken-text: #999;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius-card: 12px;
  --radius-btn: 8px;
  --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Igra Sans', 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

/* ── UTILITIES ───────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  font-family: 'Igra Sans', 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  min-height: 48px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

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

.btn-danger {
  background: #e74c3c;
  color: var(--white);
  padding: 8px 16px;
  font-size: 13px;
}

.btn-danger:hover { background: #c0392b; }

.btn:disabled {
  background: var(--disabled);
  color: #999;
  cursor: not-allowed;
  transform: none;
}

/* ── HEADER ──────────────────────────────── */
.header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo span { color: var(--text); font-size: 0.8rem; font-family: 'Igra Sans', 'Montserrat', sans-serif; display: block; font-weight: 400; }

.nav { display: flex; gap: 32px; align-items: center; }

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.nav a:hover { color: var(--accent); }

/* ── HERO ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #fdf6f0 0%, #fce8d8 50%, #f5d5c0 100%);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '✂';
  position: absolute;
  font-size: 300px;
  opacity: 0.04;
  top: -40px;
  right: -40px;
  transform: rotate(-30deg);
}

.hero-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--text);
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 1.1rem;
  color: #7a5c50;
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── SALONS ──────────────────────────────── */
.salons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.salon-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}

.salon-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.salon-card-number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.salon-card h3 { font-size: 1.2rem; margin-bottom: 12px; }

.salon-info-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 14px;
  color: #5a3d33;
}

.salon-info-row .icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.salon-phone {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 16px;
  transition: var(--transition);
}

.salon-phone:hover { color: var(--accent-dark); }

/* ── PRICE ───────────────────────────────── */
.price-section { background: var(--white); }

.price-categories { display: flex; flex-direction: column; gap: 16px; }

.price-category {
  border: 1px solid #f0e0d6;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.price-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}

.price-category-header:hover { background: #fce8d8; }

.price-category-header h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-category-header .icon { font-size: 20px; }

.price-arrow {
  font-size: 12px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.price-category.open .price-arrow { transform: rotate(180deg); }

.price-list {
  display: none;
  padding: 0 24px 20px;
  border-top: 1px solid #f0e0d6;
}

.price-category.open .price-list { display: block; }

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #fce8d8;
  font-size: 14px;
}

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

.price-amount { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ── ADVANTAGES ──────────────────────────── */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.advantage-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.advantage-card:hover { transform: translateY(-4px); }

.advantage-icon { font-size: 2.5rem; margin-bottom: 16px; }

.advantage-card h3 { font-size: 1rem; margin-bottom: 8px; }

.advantage-card p { font-size: 13px; color: #7a5c50; }

/* ── CONTACTS ────────────────────────────── */
.contacts-section { background: var(--white); }

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.contacts-info h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.contact-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  align-items: flex-start;
}

.contact-row .icon { font-size: 20px; flex-shrink: 0; }

.contact-row strong { display: block; margin-bottom: 2px; }

.social-links { display: flex; gap: 12px; margin-top: 24px; }

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.social-link.vk { background: #4c75a3; color: var(--white); }
.social-link.vk:hover { background: #3a5a82; }

.social-link.ig {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: var(--white);
}

.social-link.ig:hover { opacity: 0.9; }

.map-placeholder {
  background: #f5ede6;
  border-radius: var(--radius-card);
  padding: 40px;
  text-align: center;
  color: #7a5c50;
}

.map-placeholder .map-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── FOOTER ──────────────────────────────── */
.footer {
  background: var(--text);
  color: #d4b8ae;
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.footer p { font-size: 13px; line-height: 1.7; }

.footer h4 {
  font-family: 'Igra Sans', 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer a { color: #d4b8ae; transition: var(--transition); }
.footer a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid #5a3d33;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #7a5c50;
}

/* ── BOOKING PAGE ────────────────────────── */
.booking-page {
  min-height: 100vh;
  padding: 48px 0 80px;
}

.booking-page .page-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 8px;
}

.booking-page .page-subtitle {
  text-align: center;
  color: #7a5c50;
  margin-bottom: 40px;
  font-size: 14px;
}

/* Progress bar */
.progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
  overflow-x: auto;
  padding: 0 8px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--disabled);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}

.step-dot.active { background: var(--accent); color: var(--white); }
.step-dot.done { background: var(--accent-dark); color: var(--white); }

.step-label {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 4px;
}

.step-dot.active .step-label,
.step-dot.done .step-label { color: var(--text); }

.step-line {
  width: 40px;
  height: 2px;
  background: var(--disabled);
  transition: var(--transition);
  flex-shrink: 0;
}

.step-line.done { background: var(--accent-dark); }

.progress-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Steps */
.step-panel {
  display: none;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.step-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 28px;
  color: var(--text);
}

/* Salon selector */
.salon-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.salon-option {
  border: 2px solid #f0e0d6;
  border-radius: var(--radius-card);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
}

.salon-option:hover { border-color: var(--accent); }
.salon-option.selected { border-color: var(--accent); background: #fef5ef; }

.salon-option h3 { font-size: 1rem; margin-bottom: 10px; }
.salon-option .addr { font-size: 13px; color: #7a5c50; margin-bottom: 8px; }
.salon-option .phone { font-size: 1rem; font-weight: 600; color: var(--accent); }

.salon-option:active { transform: scale(0.98); }

/* Service selector */
.service-category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

.cat-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 2px solid #f0e0d6;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.cat-tab:hover { border-color: var(--accent); color: var(--accent); }
.cat-tab.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

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

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--white);
  border: 2px solid #f0e0d6;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
  min-height: 52px;
}

.service-item:hover { border-color: var(--accent); }
.service-item.selected { border-color: var(--accent); background: #fef5ef; }
.service-item .svc-name { font-size: 14px; }
.service-item .svc-price { font-weight: 600; color: var(--accent); font-size: 14px; }

/* Calendar */
.calendar-wrapper { background: var(--white); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow); }

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

.calendar-title { font-size: 1.1rem; }

.cal-nav {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  transition: var(--transition);
}

.cal-nav:hover { background: #fce8d8; }

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

.cal-day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #999;
  padding: 6px 0;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  min-height: 40px;
}

.cal-day:hover:not(.disabled):not(.empty) { background: #fce8d8; border-color: var(--accent); }
.cal-day.selected { background: var(--accent); color: var(--white); border-color: var(--accent); }
.cal-day.disabled { color: var(--disabled); cursor: not-allowed; }
.cal-day.empty { cursor: default; }
.cal-day.today { font-weight: 700; color: var(--accent); }

/* Time slots */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.time-slot {
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius-btn);
  border: 2px solid #f0e0d6;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  background: var(--white);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-slot:hover:not(.taken) { border-color: var(--accent); }
.time-slot.selected { background: var(--accent); color: var(--white); border-color: var(--accent); }
.time-slot.taken { background: var(--slot-taken-bg); color: var(--slot-taken-text); cursor: not-allowed; border-color: #e5baba; font-size: 12px; }

/* Client form */
.client-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-group label .required { color: var(--accent); }

.form-input {
  padding: 12px 16px;
  border: 2px solid #f0e0d6;
  border-radius: var(--radius-btn);
  font-family: 'Igra Sans', 'Montserrat', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input::placeholder { color: #bbb; }

textarea.form-input { min-height: 90px; resize: vertical; }

/* Step navigation */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 16px;
}

/* Confirmation */
.confirmation-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
}

.confirmation-icon { font-size: 4rem; margin-bottom: 16px; }

.confirmation-card h2 { font-size: 1.8rem; margin-bottom: 8px; color: var(--text); }

.confirmation-card .conf-subtitle { color: #7a5c50; margin-bottom: 32px; font-size: 14px; }

.booking-details {
  background: var(--bg);
  border-radius: var(--radius-btn);
  padding: 24px;
  text-align: left;
  margin-bottom: 28px;
}

.detail-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0e0d6;
  font-size: 14px;
}

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

.detail-label { color: #7a5c50; min-width: 120px; flex-shrink: 0; }

.detail-value { font-weight: 500; }

/* ── ADMIN PAGE ───────────────────────────── */
.admin-page { min-height: 100vh; }

.admin-header {
  background: var(--text);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--accent);
}

.admin-logo span {
  color: #d4b8ae;
  font-family: 'Igra Sans', 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 400;
  margin-left: 10px;
}

.admin-content { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* Login */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf6f0, #fce8d8);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 48px 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 400px;
}

.login-card .login-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 6px;
}

.login-card .login-sub {
  text-align: center;
  font-size: 13px;
  color: #7a5c50;
  margin-bottom: 32px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.error-msg {
  background: #fde8e8;
  color: #c0392b;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  display: none;
}

/* Filters */
.admin-filters {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; }

.filter-group label { font-size: 11px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }

.filter-select, .filter-input {
  padding: 8px 12px;
  border: 2px solid #f0e0d6;
  border-radius: var(--radius-btn);
  font-family: 'Igra Sans', 'Montserrat', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  min-height: 40px;
}

.filter-select:focus, .filter-input:focus { outline: none; border-color: var(--accent); }

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding-top: 20px;
}

/* Table */
.table-wrapper {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
}

.bookings-table th {
  background: #fdf0e8;
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #7a5c50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.bookings-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid #fce8d8;
  vertical-align: middle;
}

.bookings-table tr:last-child td { border-bottom: none; }

.bookings-table tr:hover td { background: #fffaf7; }

.salon-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #fce8d8;
  color: var(--accent-dark);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }

.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  flex: 1;
  min-width: 150px;
}

.stat-card .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
}

.stat-card .stat-label { font-size: 13px; color: #7a5c50; margin-top: 4px; }

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .section-title { font-size: 1.6rem; }

  .salons-grid { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: 1fr 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }

  .nav { display: none; }

  .salon-selector { grid-template-columns: 1fr; }
  .time-slots-grid { grid-template-columns: repeat(3, 1fr); }

  .step-nav { flex-direction: column-reverse; }
  .step-nav .btn { width: 100%; }

  .admin-filters { flex-direction: column; align-items: stretch; }
  .filter-checkbox-label { padding-top: 0; }

  .bookings-table { font-size: 12px; }
  .bookings-table th, .bookings-table td { padding: 10px 10px; }

  .login-card { padding: 32px 24px; margin: 16px; }

  .confirmation-card { padding: 28px 20px; }

  .progress-bar { gap: 0; }
  .step-line { width: 24px; }
}

@media (max-width: 480px) {
  .advantages-grid { grid-template-columns: 1fr; }
  .time-slots-grid { grid-template-columns: repeat(2, 1fr); }
  .social-links { flex-direction: column; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }
}
