/* ═══════════════════════════════════════════════
   Dr Wellness — Premium Light Theme
   Font: Outfit (Google Fonts)
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Custom Properties ─────────────────── */
:root {
  --bg-base:        #f0f4f8;
  --bg-surface:     #ffffff;
  --bg-elevated:    #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8faff;
  --border-color:   #e2e8f0;
  --border-accent:  rgba(0,176,140,0.35);

  --primary:        #00a87c;
  --primary-light:  #00d4aa;
  --primary-dark:   #007d5c;
  --primary-glow:   rgba(0,168,124,0.15);
  --secondary:      #6d28d9;
  --secondary-glow: rgba(109,40,217,0.12);
  --accent-blue:    #2563eb;
  --accent-orange:  #ea6b00;
  --accent-red:     #dc2626;
  --accent-green:   #16a34a;
  --accent-yellow:  #ca8a04;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  --sidebar-w:      260px;
  --header-h:       64px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  --shadow-sm:  0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:  0 4px 16px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg:  0 10px 40px rgba(15,23,42,0.12), 0 4px 8px rgba(15,23,42,0.05);
  --shadow-glow:0 0 24px rgba(0,168,124,0.12);

  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ─── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar            { width: 5px; height: 5px; }
::-webkit-scrollbar-track      { background: var(--bg-base); }
::-webkit-scrollbar-thumb      { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover{ background: #94a3b8; }

/* ═══════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 15% -10%, rgba(0,168,124,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 110%, rgba(109,40,217,0.06) 0%, transparent 60%),
    linear-gradient(160deg, #f0f9ff 0%, #f0f4f8 50%, #f5f3ff 100%);
  padding: 1.5rem;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.login-logo-img {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-accent);
  box-shadow: var(--shadow-glow);
  background: #f0faf7;
  display: flex; align-items: center; justify-content: center;
}
.login-logo-img img { width: 100%; height: 100%; object-fit: cover; }
.login-clinic-name {
  font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(135deg, #0f172a 30%, var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-align: center;
}
.login-subtitle {
  font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: -0.4rem;
}

.login-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group label {
  display: block; font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 0.4rem; letter-spacing: 0.02em;
}
.form-input {
  width: 100%; padding: 0.7rem 1rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem; transition: var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: var(--text-muted); }

.password-wrapper { position: relative; }
.password-wrapper .form-input { padding-right: 2.5rem; }
.password-toggle {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; color: var(--text-muted); padding: 0; line-height: 0;
  transition: var(--transition);
}
.password-toggle:hover { color: var(--primary); }
.password-toggle svg { width: 16px; height: 16px; }

.login-error {
  color: var(--accent-red); font-size: 0.8rem;
  text-align: center; display: none;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 0.5rem; margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary); color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(0,168,124,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(0,168,124,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: #ffffff; color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-base); border-color: #cbd5e1; color: var(--text-primary); }

.btn-danger {
  background: #fef2f2; color: var(--accent-red);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; border-color: #fca5a5; }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  padding: 0.5rem;
}
.btn-ghost:hover { background: var(--bg-base); color: var(--text-primary); }

.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════ */
.app-layout {
  display: flex; min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #f0faf7 0%, #f8fafc 100%);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 0.75rem;
}
.sidebar-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: #f0faf7;
  border: 1.5px solid var(--border-accent);
  overflow: hidden; flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}
.sidebar-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.sidebar-tagline { font-size: 0.7rem; color: var(--text-muted); }

.sidebar-nav {
  flex: 1; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 0.65rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.75rem 0.5rem 0.25rem;
}

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem; font-weight: 500;
  transition: var(--transition);
  position: relative; cursor: pointer;
  background: transparent; width: 100%; text-align: left;
  border: 1px solid transparent;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-base);
}
.nav-item.active {
  color: var(--primary);
  background: #f0faf7;
  border-color: rgba(0,168,124,0.2);
}
.nav-item.active svg { color: var(--primary); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff; font-size: 0.65rem; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
}
.logout-btn {
  display: flex; align-items: center; gap: 0.6rem;
  width: 100%; padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 0.875rem;
  transition: var(--transition); background: none;
}
.logout-btn:hover { color: var(--accent-red); background: #fef2f2; }
.logout-btn svg { width: 17px; height: 17px; }

/* ─── Main Area ────────────────────────────────  */
.main-area {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ─── Top Header ─────────────────────────────── */
.top-header {
  height: var(--header-h);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 90;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.header-left { flex: 1; display: flex; align-items: center; gap: 1rem; }
.header-page-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.header-right { display: flex; align-items: center; gap: 0.75rem; }
.mobile-menu-btn { display: none; }

/* ─── Page Content ───────────────────────────── */
.page-content { flex: 1; padding: 1.5rem; }

.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ─── Cards ──────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.glass-card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.card-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 1.25rem; }

/* ─── KPI Cards ──────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kpi-card.kpi-total::before    { background: linear-gradient(90deg, var(--primary), #00c4ff); }
.kpi-card.kpi-completed::before{ background: linear-gradient(90deg, #16a34a, #22c55e); }
.kpi-card.kpi-cancelled::before{ background: linear-gradient(90deg, #dc2626, #ef4444); }
.kpi-card.kpi-noshow::before   { background: linear-gradient(90deg, #ea6b00, #f97316); }
.kpi-card.kpi-enquiries::before{ background: linear-gradient(90deg, var(--secondary), #8b5cf6); }

.kpi-card:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon-wrap {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-icon-wrap svg { width: 22px; height: 22px; }
.kpi-total     .kpi-icon-wrap { background: #f0faf7;  color: var(--primary); }
.kpi-completed .kpi-icon-wrap { background: #f0fdf4;  color: #16a34a; }
.kpi-cancelled .kpi-icon-wrap { background: #fef2f2;  color: #dc2626; }
.kpi-noshow    .kpi-icon-wrap { background: #fff7ed;  color: #ea6b00; }
.kpi-enquiries .kpi-icon-wrap { background: #f5f3ff;  color: var(--secondary); }

.kpi-info { flex: 1; min-width: 0; }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.2rem; }
.kpi-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.kpi-total     .kpi-value { color: var(--primary); }
.kpi-completed .kpi-value { color: #16a34a; }
.kpi-cancelled .kpi-value { color: #dc2626; }
.kpi-noshow    .kpi-value { color: #ea6b00; }
.kpi-enquiries .kpi-value { color: var(--secondary); }
.kpi-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ─── Filter Bar ─────────────────────────────── */
.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end;
  box-shadow: var(--shadow-sm);
}
.filter-group { display: flex; flex-direction: column; gap: 0.3rem; min-width: 150px; }
.filter-label {
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 0.3rem;
}
.filter-label svg { width: 12px; height: 12px; }
.filter-input, .filter-select {
  padding: 0.55rem 0.85rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem; transition: var(--transition);
  font-family: inherit;
}
.filter-input:focus, .filter-select:focus {
  outline: none; border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.filter-input::placeholder { color: var(--text-muted); }
.filter-select option { background: #ffffff; color: var(--text-primary); }

/* ─── Data Table ─────────────────────────────── */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-container-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  background: #fafbfc;
}
.table-responsive { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left; font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc; white-space: nowrap;
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary); vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8faff; }
.data-table .empty-row td { text-align: center; padding: 2.5rem; color: var(--text-muted); }

/* ─── Status Badges ──────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 99px; font-size: 0.72rem; font-weight: 600;
  white-space: nowrap;
}
.badge-booked     { background: #eff6ff;  color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-completed  { background: #f0fdf4;  color: #15803d; border: 1px solid #bbf7d0; }
.badge-cancelled  { background: #fef2f2;  color: #b91c1c; border: 1px solid #fecaca; }
.badge-no_show    { background: #fff7ed;  color: #c2410c; border: 1px solid #fed7aa; }
.badge-new        { background: #eff6ff;  color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-contacted  { background: #fff7ed;  color: #c2410c; border: 1px solid #fed7aa; }
.badge-converted  { background: #f0fdf4;  color: #15803d; border: 1px solid #bbf7d0; }
.badge-lost       { background: #fef2f2;  color: #b91c1c; border: 1px solid #fecaca; }

/* ─── Charts ─────────────────────────────────── */
.chart-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 1.5rem;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.chart-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-primary); }
.chart-wrapper { position: relative; height: 220px; }

/* ─── Heatmap ────────────────────────────────── */
.heatmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem; margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.heatmap-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-primary); }
.heatmap-scroll { overflow-x: auto; }
.heatmap-table { border-collapse: collapse; font-size: 0.75rem; }
.heatmap-table th, .heatmap-table td {
  padding: 0.4rem 0.5rem; text-align: center; white-space: nowrap;
}
.heatmap-table th { color: var(--text-muted); font-weight: 600; }
.hm-cell {
  width: 48px; height: 32px; border-radius: 6px;
  cursor: pointer; transition: var(--transition); font-weight: 600;
  background: #f1f5f9; color: transparent;
}
.hm-cell.hm-1 { background: #ccf2e9; color: #007d5c; }
.hm-cell.hm-2 { background: #99e5d3; color: #005e46; }
.hm-cell.hm-3 { background: #55ccb2; color: #fff; }
.hm-cell.hm-4 { background: #00b890; color: #fff; }
.hm-cell.hm-5 { background: var(--primary); color: #fff; font-weight: 700; }
.hm-cell:hover { transform: scale(1.12); z-index: 2; box-shadow: var(--shadow-md); }

.heatmap-tooltip {
  position: fixed; z-index: 9999; display: none;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.78rem; color: var(--text-primary);
  pointer-events: none; max-width: 220px;
  box-shadow: var(--shadow-lg);
}

/* ─── Doctors Page ───────────────────────────── */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.doctor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.doctor-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at top right, rgba(0,168,124,0.04), transparent 60%);
  pointer-events: none;
}
.doctor-card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.doctor-card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.doctor-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #fff; flex-shrink: 0;
  border: 2px solid var(--border-accent);
  box-shadow: 0 2px 8px rgba(0,168,124,0.2);
}
.doctor-info { flex: 1; min-width: 0; }
.doctor-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.doctor-spec { font-size: 0.8rem; color: var(--primary); margin-top: 0.1rem; font-weight: 500; }
.doctor-practice { font-size: 0.75rem; color: var(--text-muted); }
.doctor-card-meta {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem;
}
.doctor-meta-item { display: flex; align-items: center; gap: 0.3rem; }
.doctor-meta-item svg { width: 13px; height: 13px; }
.doctor-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.slots-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 99px;
  font-size: 0.72rem; font-weight: 600;
  background: #f0faf7; color: var(--primary);
  border: 1px solid rgba(0,168,124,0.25);
}

/* ─── Doctor Schedule Page ───────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text-muted); font-size: 0.85rem;
  transition: var(--transition); margin-bottom: 1.25rem;
}
.back-link:hover { color: var(--primary); }
.back-link svg { width: 16px; height: 16px; }

.doctor-profile-banner {
  background: linear-gradient(135deg, #f0faf7 0%, #f5f3ff 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.profile-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
  border: 2px solid var(--border-accent);
  box-shadow: 0 4px 12px rgba(0,168,124,0.2);
}
.schedule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.schedule-day-group { border-bottom: 1px solid var(--border-color); }
.schedule-day-group:last-child { border-bottom: none; }
.schedule-day-header {
  padding: 0.85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  background: #f8fafc;
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
}
.slot-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 1.25rem 0.65rem 2rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.82rem;
}
.slot-time { color: var(--text-secondary); }
.slot-cap  { color: var(--text-muted); font-size: 0.75rem; }
.slot-actions { display: flex; align-items: center; gap: 0.5rem; }

/* ─── Toggle Switch ──────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-thumb {
  position: absolute; inset: 0; background: #e2e8f0;
  border-radius: 99px; cursor: pointer; transition: var(--transition);
}
.toggle-thumb::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-thumb { background: rgba(0,168,124,0.25); }
.toggle-switch input:checked + .toggle-thumb::before { transform: translateX(16px); background: var(--primary); }

/* ─── Enquiries ──────────────────────────────── */
.enquiry-status-tabs {
  display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.status-tab {
  padding: 0.4rem 1rem; border-radius: 99px;
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  background: #ffffff;
  border: 1.5px solid var(--border-color); color: var(--text-secondary);
  transition: var(--transition);
}
.status-tab.active { background: var(--primary); color: #ffffff; border-color: var(--primary); }
.status-tab:hover:not(.active) { background: var(--bg-base); border-color: #cbd5e1; color: var(--text-primary); }

/* ─── Services ───────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition); position: relative;
  box-shadow: var(--shadow-sm);
}
.service-card:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.service-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.75rem; }
.service-category-pill {
  font-size: 0.7rem; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: 99px;
}
.cat-skin      { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.cat-hair      { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.cat-laser     { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cat-wellness  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.cat-other     { background: #f8fafc; color: var(--text-muted); border: 1px solid #e2e8f0; }

.service-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.3rem; }
.service-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.5; }
.service-meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 1rem;
}
.service-meta-item { display: flex; align-items: center; gap: 0.3rem; }
.service-meta-item svg { width: 13px; height: 13px; }
.service-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.service-card-actions { display: flex; gap: 0.5rem; }

/* ─── Settings ───────────────────────────────── */
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.25rem;
}
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.settings-section-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: #fafbfc;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
}
.settings-section-header svg { width: 18px; height: 18px; color: var(--primary); }
.settings-section-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.9rem; }
.settings-row { display: flex; gap: 0.75rem; }
.settings-row .form-group { flex: 1; }

/* ─── Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeOverlay 0.2s ease;
}
@keyframes fadeOverlay { from { opacity:0; } to { opacity:1; } }

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.25s ease;
}
.modal-card.modal-wide { max-width: 680px; }
@keyframes modalSlide { from { opacity:0; transform:scale(0.96) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  background: #fafbfc;
}
.modal-title { display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.modal-title svg { width: 18px; height: 18px; color: var(--primary); }
.modal-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: #f1f5f9;
  color: var(--text-muted); transition: var(--transition);
}
.modal-close:hover { background: #fef2f2; color: var(--accent-red); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #fafbfc;
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ─── Form Elements ──────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
  font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
}
.form-group .form-input { width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
textarea.form-input { min-height: 80px; resize: vertical; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); }

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.checkbox-group input[type="checkbox"] {
  accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer;
}
.checkbox-group span { font-size: 0.85rem; color: var(--text-secondary); }

/* ─── Spinner ────────────────────────────────── */
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 3rem 1rem; gap: 0.75rem; color: var(--text-muted);
}

/* ─── Toast ──────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem; color: var(--text-primary);
  pointer-events: all;
  animation: toastIn 0.3s ease;
  min-width: 280px;
}
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
.toast.success { border-left: 3px solid #16a34a; }
.toast.error   { border-left: 3px solid #dc2626; }
.toast.info    { border-left: 3px solid var(--primary); }
.toast.warning { border-left: 3px solid #ea6b00; }
.toast-icon svg { width: 16px; height: 16px; }
.toast.success .toast-icon { color: #16a34a; }
.toast.error   .toast-icon { color: #dc2626; }
.toast.info    .toast-icon { color: var(--primary); }
.toast.warning .toast-icon { color: #ea6b00; }

/* ─── Empty States ───────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 3rem 1rem; text-align: center;
}
.empty-icon {
  width: 64px; height: 64px;
  background: var(--bg-base); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}
.empty-icon svg { width: 28px; height: 28px; color: var(--text-muted); }
.empty-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; }
.empty-desc  { font-size: 0.82rem; color: var(--text-muted); }

/* ─── Patient Autocomplete ───────────────────── */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 4px; max-height: 200px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.autocomplete-item {
  padding: 0.65rem 0.9rem; cursor: pointer;
  font-size: 0.85rem; transition: var(--transition);
  border-bottom: 1px solid #f1f5f9;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: #f8faff; }
.autocomplete-item .patient-phone { font-size: 0.75rem; color: var(--text-muted); }

.selected-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #f0faf7; border: 1.5px solid var(--border-accent);
  border-radius: 99px; padding: 0.3rem 0.75rem;
  font-size: 0.82rem; color: var(--primary);
}
.chip-remove { background: none; color: var(--primary); padding: 0; display: flex; }
.chip-remove svg { width: 13px; height: 13px; }

/* ─── Slot grid for booking ──────────────────── */
.slot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; margin-top: 0.5rem;
}
.slot-btn {
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  background: #f8fafc;
  border: 1.5px solid var(--border-color); color: var(--text-secondary);
  transition: var(--transition); text-align: center;
}
.slot-btn:hover { border-color: var(--primary); color: var(--primary); background: #f0faf7; }
.slot-btn.selected { background: #f0faf7; border-color: var(--primary); color: var(--primary); font-weight: 600; box-shadow: 0 0 0 2px var(--primary-glow); }
.slot-btn.full { opacity: 0.4; cursor: not-allowed; }

/* ─── Max doctors notice ─────────────────────── */
.max-doctors-notice {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  font-size: 0.82rem; color: #c2410c; margin-bottom: 1rem;
}
.max-doctors-notice svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── Datetime display ───────────────────────── */
.datetime-display {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem;
}
.datetime-display svg { width: 13px; height: 13px; }

/* ─── Sidebar overlay (mobile) ───────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(15,23,42,0.3); backdrop-filter: blur(2px);
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay.open { display: block; }
  .main-area { margin-left: 0; }
  .mobile-menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--bg-base); color: var(--text-primary);
    border: 1px solid var(--border-color);
  }
  .mobile-menu-btn svg { width: 18px; height: 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 1rem; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .filters-bar { gap: 0.5rem; }
  .filter-group { min-width: 100%; }
}
