/* ═══════════════════════════════════════════
   Премиальный салон красоты — ELYSIUM
   Тема: чёрный + золото, элегантный минимализм
   ═══════════════════════════════════════════ */

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

:root {
  --gold:        #C9A96E;
  --gold-light:  #D4BC8A;
  --gold-dark:   #A8874A;
  --black:       #0D0D0D;
  --black-soft:  #1A1A1A;
  --black-card:  #141414;
  --white:       #F5F0EB;
  --white-muted: #B0A99F;
  --border:      #2A2A2A;
  --danger:      #C44D4D;
  --success:     #5B9A6B;
  --radius:      8px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --transition:  0.25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
}

/* ═══ CONTAINER ═══ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  font-weight: 600;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--black);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201,169,110,0.25);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: rgba(201,169,110,0.1);
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-sm { padding: 8px 18px; font-size: 0.82rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d45; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #4a8a5b; }

/* ═══ HEADER ═══ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  transition: background var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
}
.header-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2px;
}
.header-logo span { color: var(--white); }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { color: var(--white-muted); font-size: 0.9rem; }
.header-nav a:hover { color: var(--gold); }
.header-nav .btn { margin-left: 8px; }

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(13,13,13,0.4) 0%, rgba(13,13,13,0.9) 100%),
    url('https://picsum.photos/seed/beauty-salon/1920/1080?grayscale') center/cover no-repeat;
  padding: 120px 24px 80px;
}
.hero-content { max-width: 720px; }
.hero-badge {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--white);
  margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p {
  font-size: 1.15rem;
  color: var(--white-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ═══ SECTIONS ═══ */
.section {
  padding: 100px 0;
}
.section-dark { background: var(--black-soft); }
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 12px;
}
.section-header .accent-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 16px;
}
.section-header p { color: var(--white-muted); max-width: 500px; margin: 0 auto; }

/* ═══ SERVICES GRID ═══ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.service-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 4px 4px;
}
.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.service-card p { color: var(--white-muted); font-size: 0.92rem; line-height: 1.6; }
.service-card .price {
  display: block;
  margin-top: 16px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
}

/* ═══ BOOKING FORM ═══ */
.booking-section {
  background: var(--black-soft);
}
.booking-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
}
.booking-card h3 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.booking-card > p { text-align: center; color: var(--white-muted); margin-bottom: 32px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--white-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  cursor: pointer;
}
.form-group .checkbox-label input { width: auto; margin-top: 2px; accent-color: var(--gold); }

.form-status {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  margin-top: 12px;
  font-size: 0.9rem;
  display: none;
}
.form-status.success { display: block; background: rgba(91,154,107,0.15); color: var(--success); border: 1px solid rgba(91,154,107,0.3); }
.form-status.error { display: block; background: rgba(196,77,77,0.15); color: var(--danger); border: 1px solid rgba(196,77,77,0.3); }

/* ═══ FOOTER ═══ */
.footer {
  background: var(--black-soft);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.footer p { color: var(--white-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin: 16px 0; }
.footer-links a { font-size: 0.85rem; }

/* ═══ DASHBOARD LAYOUT ═══ */
.dashboard-body { background: var(--black); padding-top: 72px; }

.dashboard-shell {
  display: flex;
  min-height: calc(100vh - 72px);
}
.dashboard-sidebar {
  width: 260px;
  background: var(--black-soft);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  flex-shrink: 0;
}
.dashboard-sidebar .user-info {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.dashboard-sidebar .user-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
}
.dashboard-sidebar .user-email {
  font-size: 0.82rem;
  color: var(--white-muted);
}
.dashboard-sidebar .user-role {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  background: rgba(201,169,110,0.15);
  color: var(--gold);
}
.sidebar-nav { list-style: none; padding: 0 12px; }
.sidebar-nav li { margin-bottom: 4px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--white-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(201,169,110,0.1);
  color: var(--gold);
}
.sidebar-nav a.active { font-weight: 500; }
.sidebar-nav .logout-btn {
  color: var(--danger);
  cursor: pointer;
  margin-top: 24px;
}
.sidebar-nav .logout-btn:hover { background: rgba(196,77,77,0.1); }

.dashboard-main {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}
.dashboard-main h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 28px;
}
.dashboard-main h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 16px;
}

/* ═══ TABS ═══ */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ═══ BOOKINGS TABLE ═══ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--black-card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td { padding: 14px 18px; text-align: left; }
th {
  background: var(--black-soft);
  color: var(--white-muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid rgba(42,42,42,0.5); color: var(--white); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(201,169,110,0.03); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-pending  { background: rgba(201,169,110,0.15); color: var(--gold); }
.badge-confirmed { background: rgba(91,154,107,0.15); color: var(--success); }
.badge-cancelled { background: rgba(196,77,77,0.15); color: var(--danger); }

/* ═══ CALENDAR ═══ */
.calendar-container {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 480px;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-header h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
}
.calendar-nav-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.calendar-nav-btn:hover { border-color: var(--gold); background: rgba(201,169,110,0.1); }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.calendar-day-name {
  font-size: 0.75rem;
  color: var(--white-muted);
  padding: 8px 0;
  text-transform: uppercase;
}
.calendar-day {
  padding: 10px 0;
  border-radius: var(--radius);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--white-muted);
  position: relative;
}
.calendar-day:hover:not(.empty):not(.past) {
  background: rgba(201,169,110,0.1);
  color: var(--gold);
}
.calendar-day.empty { cursor: default; }
.calendar-day.past { color: #3A3A3A; cursor: default; }
.calendar-day.today { border: 1px solid var(--gold); color: var(--gold); font-weight: 600; }
.calendar-day.selected {
  background: var(--gold);
  color: var(--black);
  font-weight: 600;
}
.calendar-day.has-slots::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.calendar-day.selected.has-slots::after { display: none; }

/* ═══ TIME SLOTS ═══ */
.time-slots {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.time-slots h4 { margin-bottom: 12px; }
.time-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.time-slot {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--white-muted);
  transition: all var(--transition);
  background: transparent;
  font-family: var(--font-body);
}
.time-slot:hover:not(.booked) { border-color: var(--gold); color: var(--gold); }
.time-slot.selected { background: var(--gold); color: var(--black); border-color: var(--gold); font-weight: 600; }
.time-slot.booked { color: #3A3A3A; border-color: #2A2A2A; cursor: not-allowed; text-decoration: line-through; }
.time-slot.my-booking { border-color: var(--success); color: var(--success); }

/* ═══ BOOKING FORM (dashboard) ═══ */
.booking-form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .booking-form-wrap { grid-template-columns: 1fr; } }
.booking-form-details {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.booking-summary {
  background: var(--black-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--white-muted);
}
.booking-summary strong { color: var(--gold); }

/* ═══ EMPTY STATE ═══ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--white-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state p { font-size: 1rem; }

/* ═══ ADMiN ═══ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}
.stat-card .stat-label { color: var(--white-muted); font-size: 0.82rem; margin-top: 4px; }

.admin-tabs { display: flex; gap: 0; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.admin-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  color: var(--white-muted);
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.admin-tab:hover { color: var(--white); }
.admin-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ═══ SLOTS MANAGER ═══ */
.slots-manager { max-width: 700px; }
.slot-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.slot-form-row .form-group { margin-bottom: 0; flex: 1; min-width: 160px; }

/* ═══ MODAL ═══ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--white-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--white); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .header-nav { gap: 12px; }
  .header-nav a { font-size: 0.8rem; }
  .dashboard-shell { flex-direction: column; }
  .dashboard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 16px;
  }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar-nav li { margin-bottom: 0; }
  .dashboard-main { padding: 24px 16px; }
  .booking-card { padding: 32px 20px; }
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9rem;
  z-index: 300;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
