/* ================================================================
   DAAWEEYE  –  Hospital Management System  –  UI v2.0
   Professional Hospital-Grade Design
   ================================================================ */

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-light:  #EFF6FF;
  --success:        #059669;
  --success-light:  #ECFDF5;
  --warning:        #D97706;
  --warning-light:  #FFFBEB;
  --danger:         #DC2626;
  --danger-light:   #FEF2F2;
  --info:           #0891B2;
  --info-light:     #ECFEFF;
  --purple:         #7C3AED;
  --purple-light:   #F5F3FF;

  --sidebar-bg:     #0F172A;
  --sidebar-w:      260px;
  --topbar-h:       64px;
  --topbar-bg:      #ffffff;

  --body-bg:        #F1F5F9;
  --card-bg:        #ffffff;
  --border:         #E2E8F0;
  --border-light:   #F1F5F9;

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;

  --radius-sm:      0.375rem;
  --radius:         0.625rem;
  --radius-lg:      1rem;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 24px -3px rgba(0,0,0,.1), 0 4px 8px -2px rgba(0,0,0,.06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--body-bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  margin: 0;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── App Shell ─────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--topbar-h);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Sidebar header */
.sidebar-header {
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 0.5rem;
}
.sidebar-role-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}
.sidebar-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: #F1F5F9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Sidebar nav */
.sidebar .nav { padding: 0.5rem 0.75rem; flex: 1; }

.sidebar .nav-section {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 1rem 0.75rem 0.3rem;
  user-select: none;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.875rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  position: relative;
  white-space: nowrap;
}
.sidebar .nav-link:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}
.sidebar .nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}
.sidebar .nav-link i {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}
.sidebar .nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-weight: 700;
  line-height: 1.4;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1039;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── Main Content ──────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-h);
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-content {
  padding: 1.75rem;
  flex: 1;
}

/* ── Top Navigation ────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  z-index: 1050;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.topbar-brand {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-brand:hover { color: var(--primary-dark); }
.topbar-brand .brand-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}
.topbar-toggle {
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  display: none;
}
.topbar-toggle:hover { background: var(--border-light); }
.topbar-spacer { flex: 1; }

/* Topbar search */
.topbar-search {
  position: relative;
  max-width: 280px;
  flex: 1;
}
.topbar-search input {
  width: 100%;
  background: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem 0.4rem 2.25rem;
  font-size: 0.825rem;
  color: var(--text-primary);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}
.topbar-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.topbar-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

/* Topbar actions */
.topbar-actions { display: flex; align-items: center; gap: 0.25rem; }

.topbar-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.topbar-btn:hover { background: var(--border-light); color: var(--text-primary); }

.topbar-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Topbar user pill */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
  text-decoration: none;
}
.topbar-user:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.topbar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.topbar-user-info { line-height: 1.25; }
.topbar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ── Page Header ───────────────────────────────────────────────── */
.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header-left h1,
.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 0.125rem;
}
.page-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin: 0;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-muted); }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header .card-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
}
.card-body { padding: 1.25rem; }
.card-footer {
  background: var(--border-light);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
}

/* ── Stat Cards ────────────────────────────────────────────────── */
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.primary::before  { background: var(--primary); }
.stat-card.success::before  { background: var(--success); }
.stat-card.warning::before  { background: var(--warning); }
.stat-card.danger::before   { background: var(--danger); }
.stat-card.info::before     { background: var(--info); }
.stat-card.purple::before   { background: var(--purple); }

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.danger  { background: var(--danger-light);  color: var(--danger); }
.stat-icon.info    { background: var(--info-light);    color: var(--info); }
.stat-icon.purple  { background: var(--purple-light);  color: var(--purple); }

.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}
.stat-trend.up   { background: var(--success-light); color: var(--success); }
.stat-trend.down { background: var(--danger-light);  color: var(--danger); }

/* ── Tables ────────────────────────────────────────────────────── */
.table-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  margin-bottom: 0;
  font-size: 0.85rem;
}
.table thead th {
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  border-top: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: #FAFBFC; }

.table .user-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.table .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.table .user-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.table .user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Badges & Status Pills ─────────────────────────────────────── */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

/* Status badges - overrides */
.badge.bg-success   { background: var(--success-light) !important; color: var(--success) !important; }
.badge.bg-warning   { background: var(--warning-light) !important; color: var(--warning) !important; }
.badge.bg-danger    { background: var(--danger-light)  !important; color: var(--danger)  !important; }
.badge.bg-primary   { background: var(--primary-light) !important; color: var(--primary) !important; }
.badge.bg-info      { background: var(--info-light)    !important; color: var(--info)    !important; }
.badge.bg-secondary { background: #F1F5F9 !important; color: #64748B !important; }
.badge.bg-dark      { background: #1E293B !important; color: #F8FAFC !important; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
}
.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.btn-success:hover { filter: brightness(1.08); box-shadow: 0 4px 12px rgba(5,150,105,.3); }

.btn-sm {
  font-size: 0.775rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
}
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  padding: 0.5rem 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}
.form-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.input-group-text {
  background: var(--border-light);
  border-color: var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  border: none;
  border-left: 4px solid;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  padding: 0.875rem 1rem;
}
.alert-success {
  background: var(--success-light);
  border-left-color: var(--success);
  color: #065F46;
}
.alert-danger {
  background: var(--danger-light);
  border-left-color: var(--danger);
  color: #991B1B;
}
.alert-warning {
  background: var(--warning-light);
  border-left-color: var(--warning);
  color: #92400E;
}
.alert-info {
  background: var(--info-light);
  border-left-color: var(--info);
  color: #164E63;
}

/* ── Auth Pages ────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--body-bg);
}
.auth-split-left {
  flex: 1;
  background: linear-gradient(145deg, #0F172A 0%, #1E3A5F 50%, #1D4ED8 100%);
  display: none;
  padding: 3rem;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-split-left::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  top: -200px;
  right: -200px;
}
.auth-split-left::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -150px;
  left: -100px;
}
.auth-split-right {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.auth-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}
.auth-logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.auth-logo-text span { color: var(--primary); }
.auth-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.auth-subheading {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 1.25rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Auth page left panel content */
.auth-tagline {
  color: rgba(255,255,255,.9);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}
.auth-tagline span { color: #93C5FD; }
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}
.auth-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,.75);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}
.auth-features li i {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93C5FD;
  flex-shrink: 0;
}
.auth-bottom-text {
  color: rgba(255,255,255,.4);
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

/* ── Doctor Card (public search) ───────────────────────────────── */
.doctor-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.doctor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.doctor-card-photo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

/* ── Admin Doctor Cards ─────────────────────────────────────────── */
.doc-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
  background: white;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.doc-card-header {
  height: 90px;
  background: linear-gradient(135deg, #0F172A 0%, #1e3a8a 50%, var(--primary) 100%);
  position: relative;
  flex-shrink: 0;
}
.doc-card-avatar {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.doc-card-body {
  padding: 3rem 1.25rem 1rem;
  text-align: center;
  flex: 1;
}
.doc-card-footer {
  padding: 0.625rem 0.875rem;
  border-top: 1px solid var(--border);
  background: #F8FAFC;
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

/* ── Doctor Profile Page ────────────────────────────────────────── */
.doc-profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #0F172A 0%, #1e3a8a 50%, var(--primary) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}
.doc-profile-avatar {
  position: absolute;
  bottom: -52px;
  left: 2rem;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.doc-profile-header-info {
  padding: 4rem 2rem 1.5rem;
}

/* Doctor stat pill */
.doc-stat-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.875rem 1rem;
  background: var(--border-light);
  border-radius: var(--radius);
  min-width: 78px;
}
.doc-stat-pill .val {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.doc-stat-pill .lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* Day availability badge */
.day-pill {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.day-pill.on  { background: var(--primary-light); color: var(--primary); }
.day-pill.off { background: var(--border-light);  color: var(--text-muted); }

/* Photo upload preview */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.photo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.photo-upload-area img {
  border-radius: 50%;
  object-fit: cover;
}

/* Section header inside profile */
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Review placeholder card */
.review-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* ── Hero (public landing) ─────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, var(--primary-dark) 100%);
  padding: 5rem 0 4rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  top: -400px;
  right: -200px;
}

/* ── Queue Card Print ──────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
}

/* ── Notifications Dropdown ────────────────────────────────────── */
.notif-dropdown {
  min-width: 340px;
  max-height: 420px;
  overflow-y: auto;
}
.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.1s;
}
.notif-item:hover { background: var(--border-light); }
.notif-item.unread { background: var(--primary-light); }
.notif-time { font-size: 0.7rem; color: var(--text-muted); }

/* ── Chat (Telemedicine) ───────────────────────────────────────── */
.consultation-area {
  background: linear-gradient(145deg, #0F172A, #1E293B);
  border-radius: var(--radius);
  min-height: 320px;
}
.chat-box {
  height: 320px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  scrollbar-width: thin;
}
.chat-msg { margin-bottom: 0.75rem; overflow: hidden; }
.chat-msg .bubble {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  border-radius: 1rem;
  max-width: 72%;
  font-size: 0.85rem;
  line-height: 1.5;
}
.chat-msg.mine .bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 0.2rem;
  float: right;
}
.chat-msg.theirs .bubble {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.2rem;
  float: left;
}
.chat-msg::after { content: ''; display: table; clear: both; }

/* ── Specialty Cards ───────────────────────────────────────────── */
.specialty-card {
  transition: transform 0.15s, box-shadow 0.15s;
  border-radius: var(--radius);
  overflow: hidden;
}
.specialty-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ── Misc Utilities ────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.divider-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Image upload preview */
.img-upload-wrap {
  position: relative;
  display: inline-block;
}
.img-upload-wrap .img-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  cursor: pointer;
  border: 2px solid white;
  transition: background 0.15s;
}
.img-upload-wrap .img-upload-btn:hover { background: var(--primary-dark); }

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  padding: 1rem 1.75rem;
  background: white;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (min-width: 992px) {
  .auth-split-left { display: flex; }
  .auth-split-right { width: 520px; flex-shrink: 0; }
  .topbar-toggle { display: none; }
}

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .topbar-search { display: none; }
  .topbar-user-info { display: none; }
}

@media (max-width: 575.98px) {
  .page-content { padding: 1rem; }
  .auth-card { padding: 1.75rem 1.25rem; }
}
