/* ============================================
   CallPCA - Premium Medical CRM
   Global Styles + Theme System
   ============================================ */

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

/* ---- THEME VARIABLES ---- */
:root {
  --font-body: 'Nunito', sans-serif;
  --font-display: 'Playfair Display', serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.16);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* THEME: Ocean (Default) */
[data-theme="ocean"] {
  --primary: #1a73e8;
  --primary-light: #e8f0fe;
  --primary-dark: #1557b0;
  --accent: #00bcd4;
  --accent-light: #e0f7fa;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text: #1a2332;
  --text-muted: #6b7a8d;
  --text-light: #9aa5b4;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #1a73e8 0%, #00bcd4 100%);
  --gradient-card: linear-gradient(135deg, #e8f0fe 0%, #e0f7fa 100%);
  --sidebar-text: #1a2332;
}

/* THEME: Forest */
[data-theme="forest"] {
  --primary: #2d6a4f;
  --primary-light: #d8f3dc;
  --primary-dark: #1b4332;
  --accent: #52b788;
  --accent-light: #d8f3dc;
  --bg: #f0f7f4;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text: #1b2d25;
  --text-muted: #5a7566;
  --text-light: #95b5a4;
  --border: #d8ead3;
  --success: #40916c;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #2d6a4f 0%, #52b788 100%);
  --gradient-card: linear-gradient(135deg, #d8f3dc 0%, #f0f7f4 100%);
  --sidebar-text: #1b2d25;
}

/* THEME: Sunset */
[data-theme="sunset"] {
  --primary: #e05c3a;
  --primary-light: #fdeee9;
  --primary-dark: #b84428;
  --accent: #f4a261;
  --accent-light: #fef3e8;
  --bg: #fdf6f0;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text: #2d1b0e;
  --text-muted: #7a5c4a;
  --text-light: #b8967e;
  --border: #f0ddd0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #e05c3a 0%, #f4a261 100%);
  --gradient-card: linear-gradient(135deg, #fdeee9 0%, #fef3e8 100%);
  --sidebar-text: #2d1b0e;
}

/* THEME: Lavender */
[data-theme="lavender"] {
  --primary: #6c63ff;
  --primary-light: #ede9ff;
  --primary-dark: #4f46e5;
  --accent: #a78bfa;
  --accent-light: #f3f0ff;
  --bg: #f5f3ff;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text: #1e1a3a;
  --text-muted: #6b5f8a;
  --text-light: #a89cca;
  --border: #e4dffe;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #6c63ff 0%, #a78bfa 100%);
  --gradient-card: linear-gradient(135deg, #ede9ff 0%, #f3f0ff 100%);
  --sidebar-text: #1e1a3a;
}

/* THEME: Dark Pro */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-light: #1e3a5f;
  --primary-dark: #2563eb;
  --accent: #06b6d4;
  --accent-light: #0e3a45;
  --bg: #0f1117;
  --bg-card: #1a1d2e;
  --bg-sidebar: #13151f;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --text-light: #4a5568;
  --border: #2d3448;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(135deg, #1e3a5f 0%, #0e3a45 100%);
  --sidebar-text: #e2e8f0;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 700; }

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

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition), background var(--transition);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px; height: 42px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.logo-text span {
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 10px;
}

.user-avatar {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-name { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.user-role { font-size: 0.7rem; color: var(--text-muted); }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.page-content {
  padding: 24px;
  flex: 1;
}

/* ---- HAMBURGER ---- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text);
  font-size: 1.3rem;
}

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 14px; }

.btn-icon {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
}

/* ---- FORM ELEMENTS ---- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.form-control::placeholder { color: var(--text-light); }

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a8d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ---- DOCTOR CARDS GRID ---- */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.doctor-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.doctor-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}

.doctor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.doctor-card:hover::before {
  opacity: 1;
}

.doctor-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.doctor-avatar {
  width: 48px; height: 48px;
  background: var(--gradient-card);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}

.doctor-info { flex: 1; min-width: 0; }

.doctor-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doctor-code {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.doctor-speciality {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 4px;
}

.doctor-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doctor-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.meta-label { color: var(--text-muted); font-weight: 600; }
.meta-value { color: var(--text); font-weight: 700; }

/* Market Share Progress */
.market-share-bar {
  margin-top: 12px;
}

.market-share-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.market-share-label .pct { color: var(--primary); font-size: 0.9rem; }

.progress-track {
  height: 7px;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.last-visit-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* ---- SEARCH & FILTERS ---- */
.search-bar {
  position: relative;
  flex: 1;
}

.search-bar input {
  padding-left: 42px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- STATS CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  background: var(--gradient-card);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---- MODALS ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
}

/* ---- THEME SWITCHER ---- */
.theme-switcher {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.theme-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.theme-dot:hover, .theme-dot.active {
  border-color: var(--text);
  transform: scale(1.15);
}

.theme-dot[data-t="ocean"] { background: linear-gradient(135deg, #1a73e8, #00bcd4); }
.theme-dot[data-t="forest"] { background: linear-gradient(135deg, #2d6a4f, #52b788); }
.theme-dot[data-t="sunset"] { background: linear-gradient(135deg, #e05c3a, #f4a261); }
.theme-dot[data-t="lavender"] { background: linear-gradient(135deg, #6c63ff, #a78bfa); }
.theme-dot[data-t="dark"] { background: linear-gradient(135deg, #0f1117, #3b82f6); }

/* ---- BADGE ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-muted { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ---- TABLES ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 12px 16px;
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ---- CALL HISTORY ---- */
.call-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.call-entry {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  border-left: 3px solid var(--primary);
  position: relative;
}

.call-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.call-date {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.call-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.call-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.call-meta-item .cmi-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.call-meta-item .cmi-val { font-size: 0.88rem; color: var(--text); font-weight: 600; }

.call-analysis-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.cab-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cab-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

/* ---- LOGIN PAGE ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-brand {
  flex: 1;
  background: var(--gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -200px; right: -200px;
}

.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -100px; left: -100px;
}

.auth-box {
  width: 100%;
  max-width: 420px;
}

.auth-header { margin-bottom: 28px; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-logo .logo-icon {
  background: var(--gradient);
}

/* ---- LANDING / PRICING PAGE ---- */
.pricing-section {
  padding: 80px 24px;
  background: var(--bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 32px 28px;
  transition: all var(--transition);
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: white;
  padding: 4px 18px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin: 12px 0 4px;
}

.pricing-price sup { font-size: 1.2rem; vertical-align: top; padding-top: 6px; }
.pricing-period { font-size: 0.82rem; color: var(--text-muted); }
.pricing-features { list-style: none; text-align: left; margin: 20px 0; display: flex; flex-direction: column; gap: 8px; }
.pricing-features li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* ---- REPORTS PAGE ---- */
.report-controls {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.report-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-card);
}

.report-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.report-card-body { padding: 0; }

/* ---- PRINT STYLES ---- */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  body { background: white !important; }
  .card, .report-card { box-shadow: none !important; border: 1px solid #ddd !important; }
  .print-header { display: block !important; }
}

.print-header {
  display: none;
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #ddd;
}

/* ---- TOAST ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  animation: slideInRight 0.3s ease;
  min-width: 260px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state p { font-size: 0.88rem; }

/* ---- OVERLAY SIDEBAR ON MOBILE ---- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  display: none;
}

/* ---- MOBILE RESPONSIVE ---- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 150;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.show {
    display: block;
  }

  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    margin-left: 0;
  }

  .page-content {
    padding: 16px;
  }

  .doctors-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-brand {
    display: none;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .modal {
    max-height: 95vh;
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .topbar {
    padding: 12px 16px;
  }

  .pricing-card.featured {
    transform: none;
  }

  .auth-page {
    flex-direction: column;
  }
}

/* ---- ANIMATIONS ---- */
.fade-in { animation: fadeIn 0.4s ease; }
.slide-up { animation: slideUp 0.4s ease; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Stagger children */
.stagger-children > * {
  animation: slideUp 0.4s ease backwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(n+7) { animation-delay: 0.35s; }

/* ---- UPLOAD ZONE ---- */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-zone .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* ---- DIVIDER ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 18px 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
