:root {
  --blue: #1f6fb2;
  --blue-dark: #164f82;
  --blue-light: #eaf3fb;
  --ink: #1c2733;
  --muted: #5c6b7a;
  --line: #e0e7ee;
  --bg-alt: #f5f8fb;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(28, 39, 51, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--ink); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.brand-role { color: var(--muted); font-size: 0.8rem; }
.main-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: var(--ink); font-size: 0.95rem; }
.main-nav a.active { color: var(--blue); font-weight: 600; }
.header-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}
.header-cta:hover { background: var(--blue-dark); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--blue-light), var(--white));
  padding: 56px 0;
}
.hero-inner { text-align: left; }
.hero-roles { color: var(--blue-dark); font-weight: 600; margin-bottom: 0.6em; }
.hero-desc { color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--blue); color: var(--white) !important; }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; }
.btn-outline { background: var(--white); color: var(--blue) !important; border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 20px; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: var(--white); font-weight: 700; margin-bottom: 10px;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 20px 0; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

.contacts-preview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

.doctor-card { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.roles-list { padding-left: 18px; color: var(--blue-dark); font-weight: 600; }

.service-block { border-bottom: 1px solid var(--line); padding: 20px 0; }
.service-block:last-child { border-bottom: none; }

.contacts-grid { margin: 20px 0; }
.contacts-grid h2 { font-size: 1rem; color: var(--muted); margin-top: 1.2em; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 24px 0; }
.map-embed iframe { display: block; }

/* Booking form */
.booking-form { max-width: 560px; margin-top: 20px; }
.field-group { margin-bottom: 20px; }
.field-group > label { display: block; font-weight: 600; margin-bottom: 8px; }
.field-group input[type="text"],
.field-group input[type="tel"],
.field-group input[type="date"],
.field-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}
.radio-pill input:checked + span { background: var(--blue); color: var(--white); border-color: var(--blue); }

.slots-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.slots-hint { color: var(--muted); font-size: 0.9rem; }
.slot-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
}
.slot-btn:hover { border-color: var(--blue); }
.slot-btn.selected { background: var(--blue); color: var(--white); border-color: var(--blue); }

.form-message { margin-top: 12px; font-size: 0.9rem; }
.form-message.error { color: #c0392b; }
.form-success { color: var(--blue-dark); font-weight: 600; font-size: 1.05rem; }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-contacts p { margin: 0 0 4px; color: var(--muted); }
.disclaimer { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 20px 0 0; }

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; }
}

/* Admin panel */
.admin-body { background: var(--bg-alt); }
.admin-header { background: var(--white); border-bottom: 1px solid var(--line); }
.admin-header-inner { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
.admin-nav { display: flex; gap: 18px; }
.admin-nav a { color: var(--ink); }
.admin-main { padding: 32px 20px 60px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.admin-inline-form { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.admin-inline-form .field-group { margin-bottom: 0; min-width: 200px; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.admin-table th { background: var(--blue-light); color: var(--blue-dark); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-row-actions { white-space: nowrap; }

.btn-link { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 0.85rem; padding: 2px 6px; text-decoration: underline; }
.btn-link-danger { color: #c0392b; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; background: var(--line); color: var(--muted); }
.badge-ok { background: #dff3e4; color: #1e7a3d; }

.status { font-size: 0.85rem; font-weight: 600; }
.status-new { color: #b8860b; }
.status-confirmed { color: #1e7a3d; }
.status-done { color: var(--muted); }
.status-cancelled { color: #c0392b; }
