/* ============================================================
   DentX · ДИЗАЙН-СИСТЕМА
   Светлый, медицинский, «дорогая частная клиника».
   Используется на всех страницах (client / doctor / admin / landing).
   ============================================================ */

/* ── Дизайн-токены ── */
:root {
  --bg:           #F8FAFB;
  --card:         #FFFFFF;
  --card-tint:    #E8F4FD;
  --primary:      #1B4F8A;
  --primary-dark: #143A66;
  --accent:       #2ECC9A;
  --accent-dark:  #25A87E;
  --text:         #1A2332;
  --text-muted:   #6B7A8D;
  --border:       #E2E8F0;
  --danger:       #E74C3C;
  --success:      #27AE60;
  --warning:      #F39C12;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow:       0 1px 4px rgba(27,79,138,0.08);
  --shadow-lg:    0 8px 24px rgba(27,79,138,0.12);
  --shadow-xl:    0 16px 48px rgba(27,79,138,0.16);
  --font-head:    'Montserrat', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --maxw:         1180px;
}

/* ── Сброс ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Атрибут hidden всегда прячет элемент (иначе display:flex/grid его перебивают) */
[hidden] { display: none !important; }

/* overflow-x: hidden на html обрезает случайный горизонтальный скролл на телефоне
   и не ломает sticky-шапки; на body — clip (без лишнего скролл-контейнера). */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.5vw, 32px); }
h3 { font-size: 18px; }
p { color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Иконки Lucide ── */
.icon { width: 20px; height: 20px; stroke-width: 2; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ── Раскладка ── */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tint { background: linear-gradient(180deg, #F0F7FD 0%, var(--bg) 100%); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { margin-top: 12px; font-size: 16px; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap; min-height: 44px; /* удобная тач-зона */
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-accent { background: var(--accent); color: #06402B; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); background: #F4F9FE; }
.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Карточки ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ── Бейджи статусов ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-head);
}
.badge-scheduled { background: #EEF1F5; color: #5A6B7D; }
.badge-confirmed { background: #E5F0FB; color: var(--primary); }
.badge-completed { background: #E4F7EE; color: var(--success); }
.badge-cancelled { background: #FDECEA; color: var(--danger); }
.badge-no_show   { background: #FEF3E2; color: var(--warning); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ── Формы ── */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,138,0.12);
}
.field { margin-bottom: 16px; }

/* ── Доступность ── */
:focus-visible { outline: 3px solid rgba(27,79,138,0.45); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ── Утилиты ── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
