/* ==========================================================================
   PRIME Space — Brand Design System & Stylesheet
   "Space to Grow Together"
   ========================================================================== */

:root {
  --bg-main: #FAF7F2;          /* Теплый сливочно-песочный фон как на постере */
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-soft: #F4EFEA;          /* Мягкая бежево-льняная подложка преимуществ */
  --bg-tint: #EBE3DA;

  --text-main: #253B4E;        /* Глубокий темно-синий/морской графит как 'ОСАНКА' */
  --text-muted: #5D6C78;       /* Мягкий приглушенный сине-серый */
  --text-dim: #8C99A4;
  --text-white: #FFFFFF;

  --border-light: rgba(37, 59, 78, 0.08);
  --border-medium: rgba(37, 59, 78, 0.16);

  /* Точная цветовая палитра с постера PRIME */
  --prime-cta-blue: #435667;        /* Кнопка 'Запишитесь на занятие в ЛС >' */
  --prime-cta-blue-hover: #334453;
  --prime-sage-olive: #878B72;      /* Оливково-шалфейный 'ЗАВТРА' и иконки галочек */
  --prime-sage-olive-hover: #757962;
  --prime-clay-peach: #D5A88B;      /* Персиково-глиняная плашка '16:00' */
  --prime-sand-date: #E4D6CB;       /* Песочная плашка '14 ОКТЯБРЯ' */
  --prime-navy-dark: #253B4E;       /* Темно-синий титульный акцент */

  /* Системные переменные */
  --accent-terracotta: #D5A88B;
  --accent-terracotta-hover: #C59678;
  --accent-dark: #253B4E;
  --accent-emerald: #5E7A60;
  --accent-blue: #435667;
  --accent-purple: #7C3AED;
  --accent-amber: #D5A88B;

  --shadow-sm: 0 2px 8px rgba(37, 59, 78, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(37, 59, 78, 0.08);
  --shadow-lg: 0 16px 36px -6px rgba(37, 59, 78, 0.12);
  --shadow-modal: 0 25px 60px -12px rgba(25, 41, 56, 0.28);

  --radius-sm: 8px;
  --radius-md: 12px;           /* Мягкие прямоугольные плашки времени и даты */
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;       /* Капсулы/пилюли как на постере */

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  background-color: var(--bg-main);
  overflow-x: hidden;
}

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

button, input, select, textarea {
  font-family: inherit;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--prime-navy-dark);
  line-height: 1;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--prime-sage-olive);
  font-weight: 700;
  margin-top: 4px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--prime-navy-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   BUTTONS (ФОРМА И ЦВЕТА С ПОСТЕРА PRIME)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

/* Основная кнопка как 'Запишитесь на занятие в ЛС >' на постере */
.btn-primary {
  background: var(--prime-cta-blue);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(67, 86, 103, 0.28);
}

.btn-primary:hover {
  background: var(--prime-cta-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67, 86, 103, 0.38);
}

/* Оливково-шалфейная кнопка как бейдж 'ЗАВТРА' */
.btn-sage {
  background: var(--prime-sage-olive);
  color: var(--text-white);
}

.btn-sage:hover {
  background: var(--prime-sage-olive-hover);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--prime-navy-dark);
  color: var(--text-white);
}

.btn-dark:hover {
  background: #172430;
  transform: translateY(-1px);
}

/* Вторичная кнопка в песочно-льняном тоне постера */
.btn-outline {
  background: var(--bg-soft);
  border: 1px solid var(--border-medium);
  color: var(--prime-navy-dark);
}

.btn-outline:hover {
  background: var(--prime-sand-date);
  border-color: var(--prime-cta-blue);
  color: var(--prime-navy-dark);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 48px 0 64px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-terracotta);
  border-radius: 50%;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 20px;
}

.hero-title span.accent {
  color: var(--accent-terracotta);
}

.hero-desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--prime-navy-dark);
  box-shadow: var(--shadow-sm);
}

.pill-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--prime-sage-olive);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.8;
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-float-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-surface);
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-float-icon {
  font-size: 32px;
}

.hero-float-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.hero-float-text p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   PHILOSOPHY & DUAL CARE BANNER
   ========================================================================== */
.dual-care-banner {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 32px 40px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 40px 0 64px;
}

.dual-care-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.dual-care-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.dual-care-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dual-care-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   SPACES SECTION (9 ПРОСТРАНСТВ PRIME)
   ========================================================================== */
.section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 10px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
}

.spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.space-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.space-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.1);
}

.space-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.space-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.space-floor {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.space-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.space-card-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.space-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.space-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.space-feature-tag {
  font-size: 11px;
  background: var(--bg-soft);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

/* ==========================================================================
   SCHEDULE SECTION (ИНТЕРАКТИВНОЕ НЕДЕЛЬНОЕ РАСПИСАНИЕ)
   ========================================================================== */
.schedule-container {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 36px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

/* Переключатель дней недели */
.days-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-main);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  min-width: 110px;
  user-select: none;
}

.day-tab:hover {
  background: var(--bg-soft);
}

.day-tab.active {
  background: var(--prime-cta-blue);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(67, 86, 103, 0.28);
}

.day-name {
  font-size: 14px;
  font-weight: 700;
}

.day-sub {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Фильтры аудитории */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-chip {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.cat-chip:hover {
  background: var(--prime-sand-date);
  color: var(--prime-navy-dark);
}

/* Оливково-шалфейный активный чипс как плашка 'ЗАВТРА' */
.cat-chip.active {
  background: var(--prime-sage-olive);
  color: var(--text-white);
  box-shadow: 0 2px 10px rgba(135, 139, 114, 0.35);
}

/* Сетка карточек занятий */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.schedule-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.schedule-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: var(--card-accent, var(--prime-clay-peach));
}

.schedule-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 59, 78, 0.16);
}

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

/* Плашка времени в стиле '16:00' с постера */
.time-slot {
  font-size: 13px;
  font-weight: 700;
  color: var(--prime-navy-dark);
  background: var(--prime-clay-peach);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.space-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.age-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--bg-soft);
  color: var(--text-muted);
  border-radius: var(--radius-full);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
  margin-bottom: 16px;
  font-size: 13px;
}

.master-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-main);
}

.master-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  overflow: hidden;
}

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

.spots-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.spots-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.spots-badge.available {
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-emerald);
}

.spots-badge.warning {
  background: rgba(217, 119, 6, 0.14);
  color: var(--accent-amber);
}

.spots-badge.full {
  background: rgba(100, 116, 139, 0.12);
  color: #64748B;
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   MODAL DIALOG (ОНЛАЙН-ЗАПИСЬ)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 24, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 36px;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden; /* Исключаем появление горизонтального скроллбара */
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--bg-tint);
  color: var(--text-main);
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.booking-summary-card {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.booking-summary-row:last-child {
  margin-bottom: 0;
}

.booking-summary-row span:first-child {
  color: var(--text-muted);
}

.booking-summary-row span:last-child {
  font-weight: 700;
  color: var(--text-main);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-main);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent-terracotta);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(217, 101, 76, 0.15);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--accent-dark);
  color: var(--text-white);
  padding: 64px 0 32px;
  margin-top: 80px;
}

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

.footer-brand h3 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.footer-brand p {
  color: #94A3B8;
  font-size: 14px;
  max-width: 360px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #CBD5E1;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: #94A3B8;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-white);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748B;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   CRM SPECIFIC STYLES (ADMIN.HTML)
   ========================================================================== */
.admin-body {
  background: #F4F6F9;
  color: #1E293B;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #0F172A;
  color: #F8FAFC;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-brand {
  margin-bottom: 36px;
}

.admin-brand h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.admin-brand span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #F59E0B;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #94A3B8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.admin-main {
  padding: 36px 40px;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

/* KPI Карточки */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: #FFFFFF;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.kpi-label {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: #0F172A;
}

/* ШАХМАТКА РАСПИСАНИЯ CRM (ROOMS × TIME) */
.matrix-wrapper {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 24px;
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.matrix-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  background: #F8FAFC;
  border-bottom: 2px solid #E2E8F0;
}

.matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: top;
}

.matrix-time-col {
  width: 90px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.matrix-slot-card {
  background: #F8FAFC;
  border-left: 4px solid var(--slot-color, var(--accent-terracotta));
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.matrix-slot-card:hover {
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.matrix-slot-title {
  font-weight: 700;
  color: #0F172A;
  font-size: 13px;
  margin-bottom: 4px;
}

.matrix-slot-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748B;
  font-size: 11px;
}

.guest-count-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-emerald);
}

.guest-count-pill.full {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

/* Модалка участников и редактирования занятия */
.participants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.participants-table th {
  text-align: left;
  padding: 10px 10px;
  background: #F8FAFC;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #E2E8F0;
}

.participants-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

@media (max-width: 992px) {
  .nav-menu {
    display: none;
  }
  .header-inner {
    justify-content: space-between;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-title {
    font-size: 38px;
  }
  .dual-care-banner {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 28px;
  }
  .container {
    padding: 0 16px;
  }
  .schedule-container {
    padding: 16px;
    border-radius: var(--radius-lg);
  }
  .schedule-grid {
    grid-template-columns: 1fr;
  }
  .filter-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .days-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }
  .day-tab {
    min-width: 80px;
    padding: 8px 12px;
  }
}
