/* ═══════════════════════════════════════════════════════════════
   МЕДКАБИНЕТ — REDESIGN 2025
   Aesthetic: Clean Medical Light
   Font: Clash Display + DM Sans
   Palette: White × Light Grey × Blue × Crimson
═══════════════════════════════════════════════════════════════ */


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

:root {
  /* Core palette — LIGHT */
  --navy:        #f0f4f8;
  --navy-mid:    #e8edf4;
  --navy-light:  #d0d9e8;
  --navy-card:   #ffffff;
  --crimson:     #dc2626;
  --crimson-dk:  #b91c1c;
  --crimson-lt:  rgba(220, 38, 38, 0.08);
  --blue-acc:    #1d4ed8;
  --blue-lt:     rgba(29, 78, 216, 0.08);
  --teal:        #1d4ed8;
  --teal-lt:     rgba(29, 78, 216, 0.08);
  --gold:        #d97706;
  --gold-lt:     rgba(217, 119, 6, 0.10);
  --green:       #059669;
  --green-lt:    rgba(5, 150, 105, 0.10);
  --white:       #ffffff;
  --off-white:   #f0f4f8;
  --text:        #1e293b;
  --text-sub:    #475569;
  --text-muted:  #94a3b8;
  --border:      #e2e8f0;
  --border-acc:  #cbd5e1;
  --glass-bg:    #ffffff;
  --glass-hover: #f8fafc;

  /* Radii */
  --r-xs:  8px;
  --r-sm:  14px;
  --r-md:  20px;
  --r-lg:  28px;
  --r-xl:  36px;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(0,0,0,0.06), 0 1px 0 rgba(0,0,0,0.03);
  --shadow-btn:  0 4px 16px rgba(220,38,38,0.25);
  --shadow-blue: 0 4px 16px rgba(29,78,216,0.2);
  --shadow-glow: 0 0 40px rgba(29,78,216,0.06);

  /* Fonts */
  --fn-display: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fn-body:    system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ── GLOBAL ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--fn-body);
  background: #f0f4f8;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH SCREEN
═══════════════════════════════════════════════════════════════ */
#lk-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f4f8 50%, #fef2f2 100%);
}

#lk-auth::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29,78,216,0.07) 0%, transparent 70%);
  top: -150px; left: -150px;
  animation: floatOrb 8s ease-in-out infinite;
}
#lk-auth::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220,38,38,0.06) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  animation: floatOrb 10s ease-in-out infinite reverse;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(30px,-20px) scale(1.05); }
  66%       { transform: translate(-20px,15px) scale(0.95); }
}

.lk-auth-box {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08), 0 1px 0 rgba(0,0,0,0.04);
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lk-auth-logo { text-align: center; margin-bottom: 32px; }
.lk-auth-logo img { max-height: 48px; max-width: 200px; }

.lk-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-lt);
  border: 1px solid rgba(29,78,216,0.2);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-acc);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.lk-auth-title {
  font-family: var(--fn-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.lk-auth-sub {
  font-size: 14px;
  color: var(--text-sub);
  text-align: center;
  margin-bottom: 36px;
  line-height: 1.6;
}

.lk-field { margin-bottom: 18px; }
.lk-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lk-inp {
  width: 100%;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
  appearance: none;
}
.lk-inp::placeholder { color: var(--text-muted); }
.lk-inp:focus {
  background: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}
.lk-inp.err {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.lk-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--crimson) 0%, #c91a1a 100%);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.lk-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.lk-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(224,32,32,0.45);
}
.lk-btn:active { transform: translateY(0); }
.lk-btn:disabled {
  background: var(--border);
  box-shadow: none;
  cursor: not-allowed;
  color: var(--text-muted);
}

.lk-auth-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13px;
  margin-top: 16px;
  display: none;
  line-height: 1.5;
}
.lk-auth-err.show { display: block; }

.lk-auth-info {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 28px;
  line-height: 1.8;
}
.lk-auth-info b { color: var(--text-sub); }

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════════════ */
#lk-main { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

/* ── HEADER ── */
.lk-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.lk-header-logo { flex-shrink: 0; }
.lk-header-logo img { display: block; max-height: 36px; max-width: 150px; width: auto; height: auto; }
.lk-header-logo--second { display: none; }

.lk-header-user {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.lk-header-user .lk-urole {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  white-space: nowrap;
  order: 0;
}
.lk-header-user .lk-uname {
  font-family: var(--fn-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  order: 1;
}

.lk-menu-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid var(--border-acc);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-acc);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.lk-menu-btn:hover {
  border-color: var(--blue-acc);
  color: #ffffff;
  background: var(--blue-acc);
}

.lk-logout-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid var(--border-acc);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.lk-logout-btn:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  background: var(--crimson-lt);
}

/* ── ACTIONS BAR (Главное меню + Выйти под навигацией) ── */
.lk-actions {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.lk-actions .lk-menu-btn { margin-right: auto; }

@media(max-width:640px) {
  .lk-header .lk-menu-btn, .lk-header .lk-logout-btn { display: none; }
  .lk-actions { display: flex; }
}

/* ── BANNER ── */
.lk-banner {
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  font-family: var(--fn-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-acc);
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lk-banner::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-acc);
  box-shadow: 0 0 6px rgba(29,78,216,0.4);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── NAV TABS — desktop: top, mobile: fixed bottom ── */
.lk-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  overflow-x: hidden;
  padding: 0 4px;
  gap: 2px;
  flex-shrink: 0;
}
.lk-nav::-webkit-scrollbar { height: 0; }

.lk-nav-btn {
  flex: 1;
  padding: 12px 4px;
  border: none;
  background: transparent;
  font-family: var(--fn-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow: hidden;
}
.lk-nav-btn span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  font-size: 9px;
}
.lk-nav-btn:hover { color: var(--text); background: #f8fafc; }
.lk-nav-btn.active {
  color: var(--blue-acc);
  border-bottom-color: var(--blue-acc);
  background: rgba(29,78,216,0.04);
  font-weight: 700;
}
.lk-nav-ico {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.lk-nav-ico img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

/* ── CONTENT ── */
#lk-content { flex: 1; padding: 24px 24px 28px; width: 100%; overflow-x: hidden; box-sizing: border-box; }

/* Content inner wrapper - centered 12-col grid on desktop */
.lk-content-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── LOADING ── */
.lk-ldr { text-align: center; padding: 80px 20px; }
.lk-spin {
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--blue-acc);
  border-radius: 50%;
  animation: lkspin 0.7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes lkspin { to { transform: rotate(360deg); } }
.lk-ldr p { color: var(--text-muted); font-size: 14px; }

/* ── SMOOTH CONTENT FADE ── */
.lk-content-inner > .vl-counters,
.lk-content-inner > .vl-heading,
.lk-content-inner > .vl-booking-btn,
.lk-content-inner > .vl-search,
.lk-content-inner > .vl-list,
.lk-content-inner > .vl-nav,
.lk-content-inner > .dc-list,
.lk-content-inner > .lk-top-bar,
.lk-content-inner > [class^="dd-"],
.lk-content-inner > [class^="ff-"],
.lk-content-inner > .lk-empty {
  animation: fadeInContent 0.3s ease both;
}
@keyframes fadeInContent {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── TOP BAR ── */
.lk-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.lk-section-ttl {
  font-family: var(--fn-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ═══════════════════════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════════════════════ */
.lk-tbl-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  max-width: 100%;
}
.lk-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}
.lk-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.lk-table td {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  transition: background 0.15s;
}
.lk-table tr:last-child td { border-bottom: none; }
.lk-table tbody tr { transition: background 0.15s; }
.lk-table tbody tr:hover td { background: #f8fafc; }

/* ═══════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════ */
.lk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.lk-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.lk-badge.upcoming {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.lk-badge.completed {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
}
.lk-badge.refused {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.lk-badge.waiting {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.lk-badge.active-s {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
}
.lk-badge.done-s {
  background: #f8fafc;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.lk-badge.process {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.lk-badge.closed {
  background: #f8fafc;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.lk-cal-btn {
  padding: 9px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-acc);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.lk-cal-btn:hover {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
}

.lk-act {
  padding: 9px 20px;
  border-radius: var(--r-sm);
  border: none;
  font-family: var(--fn-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.lk-act.primary {
  background: linear-gradient(135deg, var(--crimson) 0%, #c91a1a 100%);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}
.lk-act.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(224,32,32,0.45);
}
.lk-act.outline {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--blue-acc);
}
.lk-act.outline:hover {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: var(--shadow-blue);
}
.lk-act.green {
  background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}
.lk-act.green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16,185,129,0.4);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════════ */
.lk-empty {
  text-align: center;
  padding: 80px 20px;
  background: #ffffff;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.lk-empty-ico {
  font-size: 56px;
  display: block;
  margin-bottom: 20px;
  filter: grayscale(0.3);
}
.lk-empty-t {
  font-family: var(--fn-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 8px;
}.lk-empty-s { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   BOOKING WIDGET
═══════════════════════════════════════════════════════════════ */

/* Steps */
.bw-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  padding: 16px 16px 8px;
}
.bw-step { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bw-dot {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 2px solid var(--border-acc);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
  font-family: var(--fn-display);
}
.bw-step.active .bw-dot {
  background: linear-gradient(135deg, var(--blue-acc) 0%, var(--teal) 100%);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 0 0 6px rgba(37,99,235,0.12), 0 4px 16px rgba(37,99,235,0.4);
  transform: scale(1.1);
}
.bw-step.done .bw-dot {
  background: var(--green-lt);
  border-color: rgba(16,185,129,0.4);
  color: var(--green);
}
.bw-sline {
  flex: 1;
  height: 2px;
  background: var(--border-acc);
  min-width: 12px;
  max-width: 60px;
  transition: background 0.3s;
  border-radius: 1px;
}
.bw-sline.done { background: var(--green); }

/* Breadcrumb */
.bw-crumb {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.bw-crumb .cr-line { color: var(--text-sub); }
.bw-crumb .cr-clinic { font-weight: 800; }
.bw-crumb .cr-clinic.med { color: var(--blue-acc); }
.bw-crumb .cr-clinic.siti { color: #0284c7; }
.bw-crumb .cr-addr { font-weight: 700; color: var(--text); }
.bw-crumb .cr-spec { font-weight: 700; color: var(--text); }
.bw-crumb .cr-doc-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.bw-crumb .cr-doc-photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #bfdbfe;
  flex-shrink: 0;
}
.bw-crumb .cr-doc-name { font-weight: 700; font-size: 13px; line-height: 1.3; color: var(--text); }

/* Main card */
.bw-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  animation: bwIn 0.25s cubic-bezier(0.16,1,0.3,1) both;
}
.bw-card.bw-card-white { background: transparent; padding: 0; box-shadow: none; border: none; }
@keyframes bwIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bw-card-title {
  font-family: var(--fn-display);
  font-size: clamp(20px,3vw,28px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

/* Nav buttons */
.bw-nav { display: flex; gap: 10px; margin-bottom: 20px; }
.bw-nav.bottom { margin-top: 20px; margin-bottom: 0; }
.bw-nav-btn {
  flex: 1;
  padding: 13px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--r-sm);
  color: var(--blue-acc);
  font-family: var(--fn-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  letter-spacing: 0.2px;
}
.bw-nav-btn:hover:not(:disabled) {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: var(--shadow-blue);
}
.bw-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.bw-nav-out { display: flex; gap: 10px; margin-bottom: 20px; }
.bw-nav-out-btn {
  flex: 1;
  padding: 13px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border-acc);
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-family: var(--fn-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.bw-nav-out-btn:hover:not(:disabled) { border-color: var(--blue-acc); color: var(--blue-acc); }
.bw-nav-out-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Selection buttons */
.bw-btn-row {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-family: var(--fn-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
  appearance: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  white-space: normal;
  word-break: break-word;
}
.bw-btn-row--nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bw-btn-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blue-acc), #60a5fa);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.bw-btn-row:last-child { margin-bottom: 0; }
.bw-btn-row:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(29,78,216,0.08);
}
.bw-btn-row:hover::before { opacity: 1; }
.bw-btn-row .brand { font-weight: 800; flex-shrink: 0; }
.bw-btn-row .baddr { color: var(--text-muted); font-size: 12px; font-weight: 400; flex: 1; }
.bw-btn-row .spec-t { color: var(--text); font-weight: 700; }
.bw-btn-row .svc-t { flex: 1; }
.bw-btn-row .svc-p { color: var(--crimson); font-weight: 800; font-size: 13px; margin-left: 8px; flex-shrink: 0; }

/* Mode toggle */
.bw-toggle {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px;
  margin-bottom: 20px;
}
.bw-tgl-btn {
  flex: 1;
  padding: 11px 8px;
  border: none;
  border-radius: var(--r-xs);
  font-family: var(--fn-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--text-muted);
  line-height: 1.3;
}
.bw-tgl-btn.act {
  background: var(--blue-acc);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}
.bw-tgl-btn:hover:not(.act) { color: var(--text); background: rgba(0,0,0,0.04); }

/* Doctor search */
.bw-doc-search {
  width: 100%;
  padding: 13px 18px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.bw-doc-search::placeholder { color: var(--text-muted); }
.bw-doc-search:focus {
  background: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.08);
}

/* Doctor grid */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
  margin-bottom: 16px;
}
@media(min-width:460px) { .doc-grid { grid-template-columns: repeat(4,1fr); } }

.bw-doc-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  display: grid;
  grid-template-rows: auto auto auto 22px auto;
  justify-items: center;
  align-items: start;
  gap: 7px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.bw-doc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-acc), #60a5fa);
  opacity: 0;
  transition: opacity 0.2s;
}
.bw-doc-card:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(29,78,216,0.1);
}
.bw-doc-card:hover::before { opacity: 1; }

.doc-photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  transition: border-color 0.2s;
}
.bw-doc-card:hover .doc-photo { border-color: #bfdbfe; }
@media(min-width:680px) { .doc-photo { width: 80px; height: 80px; } }

.doc-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}
.doc-info {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}
.doc-age-row {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--gold);
  font-weight: 600;
}
.doc-dms-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.doc-dms-badge.yes {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid #bbf7d0;
}
.doc-dms-badge.no {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.doc-dms-badge.no .dms-txt { text-decoration: line-through; }

/* Slider nav */
.sl-nav { display: flex; align-items: center; justify-content: space-between; }
.sl-arr {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-acc);
  background: #ffffff;
  color: var(--text-sub);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.sl-arr:hover:not(:disabled) {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: var(--shadow-blue);
}
.sl-arr:disabled { opacity: 0.3; cursor: not-allowed; }
.sl-dots { display: flex; gap: 6px; align-items: center; }
.sl-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-acc);
  transition: all 0.2s;
}
.sl-dot.act { background: var(--teal); width: 18px; border-radius: 3px; }

/* Calendar */
.bw-cal {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.bw-date {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bw-date:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-2px);
}
.bw-date.active {
  background: #fffbeb;
  border-color: #fde68a;
  box-shadow: 0 0 14px rgba(217,119,6,0.12);
}
.bw-dd { display: block; font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; font-family: var(--fn-display); }
.bw-mm { display: block; font-size: 10px; color: var(--text-muted); margin-top: 3px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.bw-dcnt { display: block; font-size: 10px; font-weight: 700; margin-top: 4px; color: var(--green); }

/* Time slots */
.bw-times-title {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bw-times { display: flex; gap: 10px; flex-wrap: wrap; }
.bw-time {
  padding: 11px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  background: #ffffff;
  color: var(--blue-acc);
  font-family: var(--fn-body);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bw-time:hover {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: var(--shadow-blue);
}
.bw-time.sel {
  background: #fffbeb;
  color: var(--gold);
  border-color: #fde68a;
  box-shadow: 0 0 14px rgba(217,119,6,0.15);
}

/* Legend */
.bw-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  align-items: center;
}
.bw-leg { display: flex; align-items: center; gap: 7px; }
.bw-leg-s { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.bw-div { height: 1px; background: var(--border); margin: 16px 0; }

/* Form */
.bw-form-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.bw-form-title {
  font-family: var(--fn-display);
  font-size: clamp(20px,3vw,28px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.bw-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.bw-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.bw-field label .req { color: var(--crimson); }
.bw-inp {
  padding: 14px 18px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 15px;
  color: var(--text);
  width: 100%;
  outline: none;
  transition: all 0.2s;
  appearance: none;
}
.bw-inp::placeholder { color: var(--text-muted); }
.bw-inp:focus {
  background: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.08);
}
.bw-inp.err {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.06);
}
select.bw-inp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) center;
  background-size: 12px;
  padding-right: 40px;
}
select.bw-inp option { background: #ffffff; color: var(--text); }
.bw-hint { font-size: 11px; color: var(--crimson); margin-top: 4px; display: none; }
.bw-field.has-err .bw-hint { display: block; }

.bw-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--crimson) 0%, #c91a1a 100%);
  color: var(--white);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--fn-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.bw-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.bw-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(224,32,32,0.5);
}
.bw-submit-btn:disabled { background: var(--navy-light); box-shadow: none; cursor: not-allowed; color: var(--text-muted); }

/* Loaders / empty states inside widget */
.bw-ldr { text-align: center; padding: 48px 16px; }
.bw-spin {
  width: 36px; height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--blue-acc);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}
.bw-spin-blue {
  border-color: #bfdbfe;
  border-top-color: var(--blue-acc);
}
@keyframes spin { to { transform: rotate(360deg); } }
.bw-ltxt { font-size: 14px; color: var(--text-muted); margin: 0; }

.bw-empty { text-align: center; padding: 32px 12px; }
.bw-empty-ico { font-size: 48px; display: block; margin-bottom: 12px; }
.bw-empty-t { font-family: var(--fn-display); font-weight: 800; font-size: 16px; margin: 0 0 7px; color: var(--text); }
.bw-empty-t.err { color: #f87171; }
.bw-empty-s { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.bw-phone-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--r-sm);
  padding: 12px 18px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-acc);
}

/* Success */
.bw-succ { padding: 16px 0; }
.bw-succ-check { display: block; width: 72px; height: 72px; margin: 0 auto 18px; object-fit: contain; filter: drop-shadow(0 0 20px rgba(16,185,129,0.5)); }
.bw-succ-title {
  font-family: var(--fn-display);
  font-size: clamp(22px,4vw,32px);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.bw-succ-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
  box-shadow: var(--shadow-card);
}
.bw-succ-card .sc-clinic { font-weight: 800; }
.bw-succ-card .sc-clinic.med { color: var(--blue-acc); }
.bw-succ-card .sc-clinic.siti { color: #0284c7; }
.bw-succ-card .sc-doc-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.bw-succ-card .sc-photo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #bfdbfe; }
.bw-succ-card .sc-doc-name { font-weight: 700; font-size: 14px; color: var(--text); }
.bw-succ-card .sc-row { color: var(--text-sub); font-size: 13px; }
.bw-succ-card .sc-row b { color: var(--text); }
.bw-succ-card .sc-divider { height: 1px; background: var(--border); margin: 12px 0; }
.bw-succ-remind { display: block; text-align: center; color: var(--blue-acc); font-size: 13px; margin-bottom: 20px; font-weight: 600; }
.bw-succ-again {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--crimson) 0%, #c91a1a 100%);
  color: var(--white);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--fn-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-btn);
}
.bw-succ-again:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(224,32,32,0.5);
}

.bw-btn-grid { display: flex; flex-direction: column; gap: 10px; }

/* ── override for booking tab inside LK ── */
#lk-content #bw { min-height: unset !important; background: transparent !important; padding: 0 !important; width: 100% !important; }
#lk-content .bw-wrap { max-width: 100% !important; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media(min-width:1024px) {
  #lk-content { padding: 32px 40px 40px; }
}

@media(min-width:680px) {
  .bw-cal { grid-template-columns: repeat(7,1fr) !important; }
  .doc-grid { grid-template-columns: repeat(4,1fr) !important; }
  .bw-form-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .bw-form-inner .bw-field-full { grid-column: 1/-1; }
  .bw-submit-wrap { grid-column: 1/-1; }
  .bw-time { padding: 12px 22px; font-size: 15px; }
  .bw-card { padding: 32px 36px; }
  .bw-form-wrap { padding: 32px 36px; }
  #lk-content { padding: 32px 32px; }
}

@media(max-width:640px) {
  .lk-header {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 6px 10px;
  }
  .lk-header-logo img { max-height: 40px; max-width: 180px; }
  .lk-header-logo--second { display: none; }
  .lk-header-user {
    flex: 1 1 100%;
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .lk-header-user .lk-urole {
    order: 0;
    font-size: 11px;
  }
  .lk-header-user .lk-uname {
    order: 1;
    font-size: 14px;
  }
  .lk-actions {
    padding: 10px 16px 12px;
    gap: 8px;
  }
  .lk-actions .lk-menu-btn { margin-right: auto; }
  #lk-content { padding: 16px 14px; }
  .lk-nav-btn { padding: 10px 8px; font-size: 10px; min-width: 62px; }
  .lk-nav-ico { font-size: 18px; }
  .lk-table th, .lk-table td { padding: 10px 12px; }
  .hide-mob { display: none !important; }
  .lk-auth-box { padding: 36px 22px; }
  .bw-card { padding: 22px 18px; }
}

/* ═══════════════════════════════════════════════════════════════
   STATS CARDS (new UX addition for visits overview)
═══════════════════════════════════════════════════════════════ */
.lk-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media(max-width:540px) { .lk-stats-row { grid-template-columns: 1fr 1fr; } }

.lk-stat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.lk-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.lk-stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.lk-stat-card.blue::after  { background: linear-gradient(90deg, var(--blue-acc), var(--teal)); }
.lk-stat-card.green::after { background: linear-gradient(90deg, var(--green), #34d399); }
.lk-stat-card.red::after   { background: linear-gradient(90deg, var(--crimson), #f87171); }

.lk-stat-ico { font-size: 24px; margin-bottom: 10px; display: block; }
.lk-stat-val {
  font-family: var(--fn-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.lk-stat-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

/* ═══════════════════════════════════════════════════════════════
   VISIT CARDS
═══════════════════════════════════════════════════════════════ */
.lk-visit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lk-visit-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: bwIn 0.2s ease both;
  overflow: hidden;
  max-width: 100%;
}
.lk-visit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
}

/* Photo */
.lvc-photo-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.lvc-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  background: #f1f5f9;
}

/* Body */
.lvc-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.lvc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.lvc-doctor {
  font-family: var(--fn-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  min-width: 0;
  flex: 1;
}

/* Meta row */
.lvc-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.lvc-datetime {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  line-height: 1.4;
}
.lvc-clinic-info {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
}
.lvc-clinic-info b {
  font-weight: 600;
  color: var(--text);
}
.lvc-addr {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lvc-room {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Calendar button inside card */
.lvc-cal-btn {
  margin-top: 6px !important;
  font-size: 11px !important;
  padding: 7px 12px !important;
}

/* Mobile visit card */
@media(max-width:560px) {
  .lk-visit-card { padding: 12px 14px; gap: 10px; }
  .lvc-photo { width: 44px; height: 44px; }
  .lvc-doctor { font-size: 13px; }
  .lvc-datetime, .lvc-clinic-info { font-size: 11px; }
  .lvc-addr { font-size: 9px; }
  .lvc-cal-btn { font-size: 10px !important; padding: 6px 10px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   DOCUMENT / FILE / CONSULT CARDS (каждый в отдельном шейпе)
═══════════════════════════════════════════════════════════════ */
.lk-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lk-item-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 0;
  overflow: hidden;
}
.lk-item-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.lk-item-ico {
  font-size: 28px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: var(--r-sm);
}

.lk-item-body {
  flex: 1;
  min-width: 0;
}
.lk-item-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.lk-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.lk-item-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── MOBILE: fixed bottom nav ── */
@media(max-width:640px) {
  #lk-content { padding-bottom: 72px; padding-left: 14px; padding-right: 14px; }

  .lk-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    border-top: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.07);
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    gap: 0;
    background: #ffffff;
  }
  .lk-nav-btn {
    flex: 1;
    border-bottom: none;
    border-top: 2px solid transparent;
    border-radius: 0;
    margin-bottom: 0;
    padding: 7px 1px 5px;
    gap: 2px;
    min-width: 0;
  }
  .lk-nav-btn.active {
    border-top-color: var(--blue-acc);
    border-bottom-color: transparent;
    background: rgba(29,78,216,0.04);
  }
  .lk-nav-ico { font-size: 17px !important; width: 20px; height: 20px; }
  .lk-nav-ico img { width: 20px; height: 20px; }
  .lk-nav-btn span:last-child {
    font-size: 8px !important;
    letter-spacing: 0;
    text-transform: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    display: block;
    text-align: center;
  }
  body { overflow-x: hidden; }
  #lk-main { overflow-x: hidden; }
  .bw-card, .bw-form-wrap { padding: 16px 14px; }
  .lk-visit-card { max-width: 100%; }
  .lk-header { padding: 10px 14px; }
}

/* ── PREVENT HORIZONTAL SCROLL EVERYWHERE ── */
html, body { max-width: 100%; overflow-x: hidden; }
.lk-tbl-wrap { max-width: 100%; }
.bw-wrap { max-width: 100%; overflow-x: hidden; }
#bw { max-width: 100%; overflow-x: hidden; }
.lk-visit-list, .lk-card-list, .lk-stats-row { max-width: 100%; }

/* ── ITEM CARD mobile fixes ── */
@media(max-width:560px) {
  .lk-item-card { padding: 12px 14px; gap: 10px; }
  .lk-item-ico { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
  .lk-item-title { font-size: 13px; }
  .lk-item-meta { font-size: 10px; gap: 3px 8px; }
  .lk-item-actions .lk-act { font-size: 11px; padding: 7px 10px; }
  .lk-stats-row { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .lk-stat-val { font-size: 24px; }
  .lk-stat-lbl { font-size: 9px; }
  .lk-stat-ico { font-size: 18px; margin-bottom: 6px; }
  .lk-stat-card { padding: 12px 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — стартовая страница ЛК
═══════════════════════════════════════════════════════════════ */
.lk-dashboard-mode { background: #f0f4f8; min-height: 100vh; }
.lk-dashboard-mode .lk-header-logo img { max-height: 32px; max-width: 150px; width: auto; height: auto; }

.lk-db-title {
  font-family: var(--fn-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 20px;
}

/* Blue menu block — один шейп на всю ширину 12 колонок */
.lk-db-menu {
  background: var(--blue-acc);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  box-shadow: 0 8px 30px rgba(29,78,216,0.25);
}
.lk-db-menu-title {
  font-family: var(--fn-display);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
}

/* Menu items */
.lk-db-item {
  width: 100%;
  background: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 16px 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--fn-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-acc);
  text-align: left;
  transition: all 0.18s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.lk-db-item:last-child { margin-bottom: 0; }
.lk-db-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}
.lk-db-item:active { transform: scale(0.98); }

.lk-db-item--red {
  color: var(--crimson);
}

.lk-db-ico {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Back button in header */
.lk-back-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--border-acc);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-left: auto;
}
.lk-back-btn:hover {
  border-color: var(--blue-acc);
  color: var(--blue-acc);
}

@media(max-width:480px) {
  .lk-db-title { font-size: 20px; margin-bottom: 16px; }
  .lk-db-menu { padding: 22px 16px 18px; }
  .lk-db-menu-title { font-size: 20px; margin-bottom: 14px; }
  .lk-db-item { font-size: 14px; padding: 14px 18px; gap: 12px; border-radius: 40px; margin-bottom: 10px; }
  .lk-db-ico { width: 28px; height: 28px; }
}

/* ═══════════════════════════════════════════════════════════════
   VISIT LIST — макетный стиль
═══════════════════════════════════════════════════════════════ */

/* Nav top/bot */
.vl-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.vl-nav-btn {
  flex: 1;
  padding: 12px 10px;
  background: #ffffff;
  border: 1.5px solid var(--border-acc);
  border-radius: var(--r-md);
  font-family: var(--fn-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-acc);
  cursor: pointer;
  transition: all 0.18s;
}
.vl-nav-btn:hover:not(:disabled) {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
}
.vl-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.vl-nav-info {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Counters */
.vl-counters {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.vl-cnt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}
.vl-cnt-dot {
  width: 14px; height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
.vl-cnt-dot--active { background: #f59e0b; }
.vl-cnt-dot--done   { background: #e2e8f0; border: 1px solid #cbd5e1; }

/* Heading */
.vl-heading { margin-bottom: 14px; }
.vl-title {
  font-family: var(--fn-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--crimson);
  margin: 0 0 4px;
}
.vl-subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0;
}

/* Booking button */
.vl-booking-btn {
  width: 100%;
  padding: 15px 20px;
  background: var(--crimson);
  border: none;
  border-radius: 50px;
  font-family: var(--fn-display);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(220,38,38,0.3);
  transition: all 0.18s;
}
.vl-booking-btn:hover {
  background: var(--crimson-dk);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(220,38,38,0.35);
}

/* Search */
.vl-search { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.vl-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 16px;
}
.vl-search-ico { font-size: 16px; flex-shrink: 0; }
.vl-search-inp {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--fn-body);
  font-size: 14px;
  color: var(--text);
  background: transparent;
}
.vl-search-inp::placeholder { color: var(--text-muted); }

/* Visit list */
.vl-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.vl-empty { text-align: center; color: var(--text-muted); padding: 24px; font-size: 14px; }

/* Visit card */
.vl-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: box-shadow 0.18s;
}
.vl-card--active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.2), 0 4px 14px rgba(245,158,11,0.1);
}
.vl-card--refused {
  opacity: 0.75;
}

/* Label badge */
.vl-label { margin-bottom: 8px; }
.vl-label-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
}
.vl-label-badge--active { background: #f59e0b; color: #ffffff; }
.vl-label-badge--done   { background: #e2e8f0; color: var(--text-sub); border: 1px solid #cbd5e1; }
.vl-label-badge--refused{ background: #fee2e2; color: var(--crimson); }

/* Clinic row */
.vl-clinic-row {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-acc);
  margin-bottom: 2px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
}
.vl-clinic-name { font-weight: 700; }
.vl-clinic-addr { font-weight: 400; color: var(--text-sub); font-size: 12px; }

/* Specialization */
.vl-spec {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

/* Doctor row */
.vl-doctor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.vl-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
  background: #f1f5f9;
}
.vl-doctor-name {
  font-family: var(--fn-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* Bottom row: date + cal button */
.vl-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.vl-dt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--text-sub);
}
.vl-dt b { color: var(--text); }

/* Calendar button */
.vl-cal-btn {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: #ffffff;
  border: 2px solid var(--crimson);
  border-radius: var(--r-sm);
  font-family: var(--fn-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--crimson);
  cursor: pointer;
  line-height: 1.4;
  text-align: left;
  transition: all 0.18s;
  flex-shrink: 0;
}
.vl-cal-btn:hover {
  background: var(--crimson);
  color: #ffffff;
}

@media(max-width:480px) {
  .vl-title { font-size: 19px; }
  .vl-booking-btn { font-size: 14px; padding: 13px 16px; }
  .vl-doctor-name { font-size: 14px; }
  .vl-photo { width: 48px; height: 48px; }
  .vl-nav-btn { font-size: 13px; padding: 10px 8px; }
  .vl-cal-btn { font-size: 11px; padding: 7px 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   DOCUMENT & FILE CARDS
═══════════════════════════════════════════════════════════════ */
.dc-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.dc-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: box-shadow 0.18s;
}
.dc-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.09); }

.dc-header {
  display: flex;
  align-items: center;
  padding: 12px 16px 10px;
}
.dc-title {
  font-family: var(--fn-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-acc);
  line-height: 1.3;
  flex: 1;
}
.dc-file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding: 0 16px 10px;
}
.dc-divider { height: 1px; background: var(--border); margin: 0 16px; }

.dc-body {
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dc-row {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}
.dc-row b { color: var(--text); font-weight: 700; }
.dc-addr { font-size: 12px; color: var(--text-muted); }

.dc-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  gap: 10px;
}

.dc-dl-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: #ffffff;
  border: 2px solid var(--crimson);
  border-radius: 50px;
  font-family: var(--fn-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}
.dc-dl-btn:hover {
  background: var(--crimson);
  color: #ffffff;
}
.dc-dl-btn:hover {
  background: var(--crimson);
  color: #ffffff;
}

@media(max-width:480px) {
  .dc-title { font-size: 14px; }
  .dc-row { font-size: 12px; }
  .dc-dl-btn { font-size: 12px; padding: 7px 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   BACK TO MAIN MENU NAV
═══════════════════════════════════════════════════════════════ */
.lk-back-nav {
  margin-bottom: 16px;
}
.lk-back-nav:last-child {
  margin-bottom: 0;
  margin-top: 16px;
}
.lk-back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  background: #ffffff;
  border: 1.5px solid var(--border-acc);
  border-radius: var(--r-md);
  font-family: var(--fn-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-acc);
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
  justify-content: center;
}
.lk-back-nav-btn:hover {
  background: var(--blue-acc);
  color: #ffffff;
  border-color: var(--blue-acc);
  box-shadow: var(--shadow-blue);
}

/* ═══════════════════════════════════════════════════════════════
   BOOKING WIDGET — стиль из оригинального виджета
═══════════════════════════════════════════════════════════════ */
#bw {
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color: #1a1a2e;
  overflow-x: hidden;
}
#bw .bw-wrap {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Steps */
#bw .bw-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #b0c4de;
  color: #b0c4de;
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s; flex-shrink: 0;
}
#bw .bw-step.active .bw-dot {
  background: #1568c4; border: 3px solid #1568c4; color: #fff;
  box-shadow: 0 0 0 5px rgba(21,104,196,.2);
}
#bw .bw-step.done .bw-dot { background: #22c55e; border-color: #22c55e; color: #fff; }
#bw .bw-sline { flex:1; height:3px; background:#b0c4de; min-width:14px; max-width:60px; border-radius:2px; transition: background .25s; }
#bw .bw-sline.done { background: #22c55e; }

/* Card */
#bw .bw-card { background: #1568c4; border-radius: 26px; padding: 20px 16px; animation: bwIn .22s ease; }
#bw .bw-card.bw-card-white { background: transparent; padding: 0; }
#bw .bw-card-title { color: #fff; font-size: clamp(17px,3vw,22px); font-weight: 700; margin-bottom: 14px; }

/* Nav buttons inside widget */
#bw .bw-nav { display: flex; gap: 10px; margin-bottom: 14px; }
#bw .bw-nav.bottom { margin-top: 14px; margin-bottom: 0; }
#bw .bw-nav-btn {
  flex: 1; padding: 12px 16px;
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.35);
  border-radius: 10px; color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: .15s; text-align: center;
}
#bw .bw-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,.28); }
#bw .bw-nav-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Out nav (form step) */
#bw .bw-nav-out { display: flex; gap: 10px; margin-bottom: 14px; }
#bw .bw-nav-out-btn {
  flex: 1; padding: 12px 16px;
  background: #fff; border: 2px solid #c8daea; border-radius: 10px;
  color: #64748b; font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: .15s;
}
#bw .bw-nav-out-btn:hover:not(:disabled) { border-color: #1568c4; color: #1568c4; }
#bw .bw-nav-out-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Row buttons (clinics, specialties, services) */
#bw .bw-btn-row {
  width: 100%; background: #fff; border: none; border-radius: 10px;
  padding: 13px 16px; margin-bottom: 8px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  text-align: left; font-family: inherit; font-size: 15px; font-weight: 600;
  transition: .15s; color: #1a1a2e;
  word-break: break-word; white-space: normal;
}
#bw .bw-btn-row.bw-btn-row--nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bw .bw-btn-row:last-child { margin-bottom: 0; }
#bw .bw-btn-row:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.1); }
#bw .bw-btn-row .spec-t { color: #1a1a2e; font-weight: 700; }
#bw .bw-btn-row .svc-t { flex: 1; }
#bw .bw-btn-row .svc-p { color: #1568c4; font-weight: 700; font-size: 13px; margin-left: 8px; flex-shrink: 0; }

/* Toggle */
#bw .bw-toggle { display: flex; gap: 4px; background: rgba(0,0,0,.18); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
#bw .bw-tgl-btn { flex:1; padding:9px 6px; border:none; border-radius:9px; font-family:inherit; font-size:13px; font-weight:700; cursor:pointer; transition:.2s; background:transparent; color:rgba(255,255,255,.65); line-height:1.3; }
#bw .bw-tgl-btn.act { background:#fff; color:#1568c4; box-shadow:0 2px 8px rgba(0,0,0,.15); }

/* Doctor search */
#bw .bw-doc-search { width:100%; padding:11px 14px; border:none; border-radius:10px; font-family:inherit; font-size:14px; color:#1a1a2e; background:rgba(255,255,255,.92); outline:none; margin-bottom:12px; }

/* Doctor grid */
#bw .doc-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:12px; }
@media(min-width:460px){ #bw .doc-grid { grid-template-columns:repeat(4,1fr); } }
#bw .bw-doc-card { background:#fff; border-radius:12px; padding:12px 8px; cursor:pointer; text-align:center; border:2px solid transparent; transition:.18s; display:grid; grid-template-rows:auto auto auto 20px auto; justify-items:center; align-items:start; gap:5px; }
#bw .bw-doc-card:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.13); }
#bw .doc-photo { width:72px; height:72px; border-radius:50%; object-fit:cover; border:3px solid #bfdbfe; }
#bw .doc-name { font-size:13px; font-weight:700; color:#1a1a2e; line-height:1.35; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; width:100%; }
#bw .doc-info { font-size:10px; color:#64748b; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; width:100%; }
#bw .doc-age-row { height:20px; display:flex; align-items:center; justify-content:center; font-size:10px; color:#f59e0b; font-weight:600; }
#bw .doc-dms-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:6px; font-size:10px; font-weight:700; }
#bw .doc-dms-badge.yes { background:#dcfce7; color:#16a34a; }
#bw .doc-dms-badge.no { background:#fee2e2; color:#dc2626; }
#bw .doc-dms-badge.no .dms-txt { text-decoration:line-through; }

/* Slider arrows */
#bw .sl-arr { width:36px; height:36px; border-radius:50%; border:none; background:rgba(255,255,255,.2); color:#fff; font-size:22px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.15s; flex-shrink:0; }
#bw .sl-arr:hover:not(:disabled) { background:rgba(255,255,255,.4); }
#bw .sl-arr:disabled { opacity:.3; cursor:not-allowed; }
#bw .sl-dots { display:flex; gap:6px; align-items:center; }
#bw .sl-dot { width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.3); transition:.2s; }
#bw .sl-dot.act { background:#fff; width:10px; height:10px; }

/* Calendar */
#bw .bw-cal { display:grid; grid-template-columns:repeat(4,1fr); gap:7px; margin-bottom:14px; }
@media(min-width:680px){ #bw .bw-cal { grid-template-columns:repeat(7,1fr); } }
#bw .bw-date { background:#fff; border:2px solid transparent; border-radius:10px; padding:9px 4px; cursor:pointer; text-align:center; transition:.15s; }
#bw .bw-date:hover { transform:translateY(-1px); box-shadow:0 2px 8px rgba(0,0,0,.1); }
#bw .bw-date.active { background:#FFD700; border-color:#e6be00; }
#bw .bw-dd { display:block; font-size:clamp(16px,2.5vw,20px); font-weight:800; color:#1a1a2e; line-height:1.1; }
#bw .bw-mm { display:block; font-size:10px; color:#64748b; margin-top:2px; font-weight:600; }
#bw .bw-dcnt { display:block; font-size:9px; font-weight:700; margin-top:2px; color:#22c55e; }
#bw .bw-date.active .bw-dcnt { color:#7a6000; }

/* Times */
#bw .bw-times-title { color:#fff; font-size:15px; font-weight:700; margin-bottom:10px; }
#bw .bw-times { display:flex; gap:8px; flex-wrap:wrap; }
#bw .bw-time { padding:10px 13px; border:none; border-radius:10px; cursor:pointer; font-weight:700; font-size:14px; transition:.15s; background:#fff; color:#1568c4; font-family:inherit; }
#bw .bw-time:hover { transform:translateY(-1px); box-shadow:0 2px 8px rgba(0,0,0,.1); }
#bw .bw-time.sel { background:#FFD700; color:#7a5f00; }

/* Legend, divider */
#bw .bw-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:rgba(255,255,255,.85); margin-bottom:12px; align-items:center; }
#bw .bw-leg { display:flex; align-items:center; gap:5px; }
#bw .bw-leg-s { width:14px; height:14px; border-radius:4px; flex-shrink:0; }
#bw .bw-div { height:1px; background:rgba(255,255,255,.2); margin:12px 0; }

/* Form */
#bw .bw-form-wrap { background:#fff; border-radius:26px; padding:20px 16px; }
#bw .bw-form-title { font-size:clamp(18px,3vw,22px); font-weight:800; color:#1568c4; margin-bottom:18px; }
#bw .bw-field { display:flex; flex-direction:column; gap:5px; margin-bottom:14px; }
#bw .bw-field label { font-size:13px; font-weight:700; color:#1a1a2e; }
#bw .bw-field label .req { color:#ef4444; }
#bw .bw-inp { padding:13px 14px; border:1.5px solid #c8daea; border-radius:10px; font-family:inherit; font-size:15px; color:#1a1a2e; background:#fff; width:100%; outline:none; appearance:none; transition:border-color .15s,box-shadow .15s; }
#bw .bw-inp:focus { border-color:#1568c4; box-shadow:0 0 0 3px rgba(21,104,196,.12); }
#bw .bw-inp.err { border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.1); }
#bw .bw-hint { font-size:11px; color:#ef4444; margin-top:2px; display:none; }
#bw .bw-field.has-err .bw-hint { display:block; }
#bw .bw-submit-btn { width:100%; padding:14px; background:#1568c4; color:#fff; border:none; border-radius:10px; font-family:inherit; font-size:16px; font-weight:700; cursor:pointer; transition:.15s; margin-top:18px; }
#bw .bw-submit-btn:hover:not(:disabled) { background:#1255a8; transform:translateY(-1px); }
#bw .bw-submit-btn:disabled { background:#b0c4de; cursor:not-allowed; }

/* Loaders */
#bw .bw-ldr { text-align:center; padding:40px 16px; }
#bw .bw-spin { width:34px; height:34px; border:3px solid rgba(255,255,255,.2); border-top-color:#fff; border-radius:50%; animation:spin .6s linear infinite; margin:0 auto 12px; }
#bw .bw-spin-blue { border-color:rgba(21,104,196,.15); border-top-color:#1568c4; }
#bw .bw-ltxt { font-size:14px; color:rgba(255,255,255,.75); margin:0; }

/* Empty states */
#bw .bw-empty { text-align:center; padding:28px 12px; }
#bw .bw-empty-ico { font-size:44px; display:block; margin-bottom:10px; }
#bw .bw-empty-t { font-weight:800; font-size:16px; margin:0 0 6px; color:#fff; }
#bw .bw-empty-t.err { color:#fca5a5; }
#bw .bw-empty-s { font-size:13px; color:rgba(255,255,255,.8); margin:0; line-height:1.6; }
#bw .bw-phone-box { background:rgba(255,255,255,.15); border-radius:10px; padding:11px 14px; margin-top:12px; font-size:14px; font-weight:700; color:#fff; }

/* Crumb */
#bw .bw-crumb { background:#fff; border-radius:14px; padding:12px 16px; margin-bottom:12px; font-size:13px; line-height:1.6; color:#1a1a2e; box-shadow:0 1px 8px rgba(0,0,0,.07); }
#bw .bw-crumb .cr-clinic { font-weight:800; }
#bw .bw-crumb .cr-clinic.med { color:#1568c4; }
#bw .bw-crumb .cr-addr { font-weight:700; color:#1a1a2e; }
#bw .bw-crumb .cr-spec { font-weight:700; color:#1a1a2e; }
#bw .bw-crumb .cr-doc-row { display:flex; align-items:center; gap:10px; margin-top:6px; }
#bw .bw-crumb .cr-doc-photo { width:44px; height:44px; border-radius:50%; object-fit:cover; border:2px solid #bfdbfe; flex-shrink:0; }
#bw .bw-crumb .cr-doc-name { font-weight:700; font-size:13px; line-height:1.3; color:#1a1a2e; }

/* Success */
#bw .bw-succ { padding:12px 0; }
#bw .bw-succ-check { display:block; width:64px; height:64px; margin:0 auto 12px; object-fit:contain; }
#bw .bw-succ-title { font-size:clamp(20px,4vw,26px); font-weight:800; color:#1568c4; text-align:center; margin-bottom:14px; }
#bw .bw-succ-card { background:#fff; border-radius:14px; padding:14px 16px; margin-bottom:14px; font-size:13px; line-height:1.65; }
#bw .bw-succ-card .sc-clinic { font-weight:800; }
#bw .bw-succ-card .sc-clinic.med { color:#1568c4; }
#bw .bw-succ-card .sc-doc-row { display:flex; align-items:center; gap:10px; margin:6px 0; }
#bw .bw-succ-card .sc-photo { width:40px; height:40px; border-radius:50%; object-fit:cover; border:2px solid #bfdbfe; }
#bw .bw-succ-card .sc-doc-name { font-weight:700; font-size:13px; }
#bw .bw-succ-card .sc-row { color:#64748b; font-size:13px; }
#bw .bw-succ-card .sc-row b { color:#1a1a2e; }
#bw .bw-succ-card .sc-divider { height:1px; background:#e2e8f0; margin:8px 0; }
#bw .bw-succ-remind { display:block; text-align:center; color:#1568c4; font-size:14px; margin-bottom:14px; font-weight:600; }
#bw .bw-succ-again { width:100%; padding:14px; background:#1568c4; color:#fff; border:none; border-radius:10px; font-family:inherit; font-size:16px; font-weight:700; cursor:pointer; transition:.15s; }
#bw .bw-succ-again:hover { background:#1255a8; }

@media(min-width:680px){
  #bw .bw-wrap { max-width:860px; }
  #bw .bw-form-wrap { padding:26px 28px; }
  #bw .bw-card { padding:26px 28px; }
  #bw .bw-form-inner { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; }
  #bw .bw-form-inner .bw-field-full { grid-column:1/-1; }
  #bw .bw-submit-wrap { grid-column:1/-1; }
  #bw .bw-time { padding:12px 20px; font-size:15px; }
}
@media(min-width:1200px){
  #bw .bw-wrap { max-width:960px; }
}