/* Riley's Cure Hub -- v2 Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f8fafb;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: rgba(20, 184, 166, 0.12);
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --primary: #0d9488;
  --primary-light: #ccfbf1;
  --primary-dark: #0f766e;
  --primary-glow: rgba(13, 148, 136, 0.15);
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --hope: #06b6d4;
  --hope-light: #cffafe;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success: #10b981;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.screen { display: flex; min-height: 100vh; }

/* ===== LOGIN ===== */
#login-screen {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0d9488 100%);
  justify-content: center;
  align-items: center;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  position: relative;
}

.logo-mark svg { width: 100%; height: 100%; }

.logo-mark.small { width: 36px; height: 36px; }
.logo-mark.small svg { width: 100%; height: 100%; }

.login-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.login-header p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  font-weight: 400;
}

.login-form {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-form .form-group label { color: rgba(255,255,255,0.7); }

.login-form input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3);
  background: rgba(255,255,255,0.12);
}

.login-form input::placeholder { color: rgba(255,255,255,0.3); }

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: all var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea { resize: vertical; }

.error-text {
  color: #fca5a5;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
  transform: translateY(-1px);
}

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

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

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

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

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; padding: 0.7rem; font-size: 0.95rem; }

/* ===== SIDEBAR ===== */
#sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.5rem 1.5rem 1.25rem;
}

.sidebar-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  flex: 1;
  padding: 0 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  border-radius: var(--radius);
  margin-bottom: 2px;
  border-left: none;
}

.nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: #e2e8f0;
}

.nav-link.active {
  color: var(--primary);
  background: var(--bg-sidebar-active);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-link.active svg { opacity: 1; color: var(--primary); }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  font-size: 0.85rem;
  color: var(--text-sidebar);
  font-weight: 500;
}

.sidebar-footer .btn-ghost {
  color: var(--text-sidebar);
  border-color: rgba(255,255,255,0.1);
  font-size: 0.78rem;
}

.sidebar-footer .btn-ghost:hover {
  background: var(--bg-sidebar-hover);
  color: white;
  border-color: rgba(255,255,255,0.2);
}

/* ===== MAIN CONTENT ===== */
#content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem 2.5rem;
  max-width: 1200px;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

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

.card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--hope));
}

.stat-card:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); }

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--hope));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ===== DIAGNOSIS CARD ===== */
.diagnosis-card {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.diagnosis-item { display: flex; flex-direction: column; }

.diagnosis-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  font-weight: 700;
}

.diagnosis-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-group {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 2px 8px rgba(13,148,136,0.3); }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.drop-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--bg);
}

.drop-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-glow);
}

.drop-icon { width: 40px; height: 40px; color: var(--text-light); margin-bottom: 0.5rem; }
.drop-area p { color: var(--text-muted); font-size: 0.9rem; }
.file-label { color: var(--primary); cursor: pointer; font-weight: 600; }
.drop-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 0.25rem; }

.upload-options { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.upload-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.75rem; }

.selected-files {
  flex: 1;
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.65rem 1rem;
  background: var(--primary-light);
  border-radius: var(--radius);
  border: 1.5px solid var(--primary);
}

.selected-files:empty {
  display: none;
}

/* ===== FILE GRID ===== */
.file-grid { display: grid; gap: 0.5rem; }

.file-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.file-row:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.file-icon.pdf { background: #fee2e2; color: #dc2626; }
.file-icon.doc { background: #dbeafe; color: #2563eb; }
.file-icon.img { background: #d1fae5; color: #059669; }
.file-icon.default { background: #f1f5f9; color: #475569; }

.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.file-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ===== CATEGORY BADGE ===== */
.category-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.category-badge.medical-records { background: #fce7f3; color: #be185d; }
.category-badge.scans { background: #d1fae5; color: #059669; }
.category-badge.lab-results { background: #fef3c7; color: #b45309; }
.category-badge.research { background: #dbeafe; color: #1d4ed8; }
.category-badge.notes { background: #ede9fe; color: #6d28d9; }
.category-badge.other, .category-badge.general { background: #f1f5f9; color: #475569; }
.category-badge.question { background: #fef3c7; color: #b45309; }
.category-badge.idea { background: #cffafe; color: #0e7490; }
.category-badge.diet { background: #d1fae5; color: #059669; }
.category-badge.exercise { background: #dbeafe; color: #1d4ed8; }
.category-badge.supplement { background: #ede9fe; color: #6d28d9; }
.category-badge.observation { background: #f1f5f9; color: #475569; }
.category-badge.emotional { background: #fce7f3; color: #be185d; }

/* ===== RESEARCH GRID ===== */
.research-grid { display: grid; gap: 0.75rem; }

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.research-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }

.research-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.research-card h4 a { color: var(--primary); text-decoration: none; }
.research-card h4 a:hover { text-decoration: underline; }
.research-summary { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.5rem; line-height: 1.5; }
.research-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
}

.research-meta { font-size: 0.78rem; color: var(--text-light); margin-top: 0.5rem; }
.research-card-actions { display: flex; gap: 0.4rem; margin-top: 0.75rem; }

/* ===== NOTES GRID ===== */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.note-card:hover { box-shadow: var(--shadow-md); }
.note-card.pinned { border-left: 3px solid var(--accent); }
.note-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }

.note-content-preview {
  color: var(--text-muted);
  font-size: 0.83rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  line-height: 1.5;
}

.note-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 0.5rem; display: flex; justify-content: space-between; }
.note-card-actions { display: flex; gap: 0.4rem; margin-top: 0.75rem; }

/* ===== TIMELINE ===== */
.timeline-container { position: relative; padding-left: 2rem; }

.timeline-container::before {
  content: '';
  position: absolute;
  left: 0.65rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--hope), var(--border));
}

.timeline-event {
  position: relative;
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

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

.timeline-event::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 1.1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-event.treatment::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.timeline-event.scan::before { background: var(--hope); box-shadow: 0 0 0 2px var(--hope); }
.timeline-event.milestone::before { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

.timeline-date { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.timeline-event h4 { font-size: 0.95rem; margin: 0.15rem 0; font-weight: 700; }
.timeline-event p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }
.timeline-event-actions { position: absolute; top: 0.75rem; right: 0.75rem; }

/* ===== COMPACT LISTS ===== */
.list-compact { font-size: 0.85rem; }

.list-compact-item {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-light);
}

.list-compact-item:last-child { border-bottom: none; }
.list-compact-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; font-weight: 500; }
.list-compact-meta { color: var(--text-light); font-size: 0.78rem; flex-shrink: 0; margin-left: 0.5rem; }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal[hidden] { display: none !important; }

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-content h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; letter-spacing: -0.02em; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }

/* ===== READER OVERLAY ===== */
.reader-overlay {
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 50;
  overflow-y: auto;
}

.reader-toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.reader-overlay[hidden] { display: none !important; }

.reader-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}

.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.reader-body { line-height: 1.85; color: var(--text); }
.reader-body h1 { font-size: 1.75rem; font-weight: 800; margin: 0 0 0.75rem; color: var(--text); border-bottom: 3px solid var(--primary); padding-bottom: 0.5rem; letter-spacing: -0.03em; }
.reader-body h2 { font-size: 1.35rem; font-weight: 700; margin: 2.5rem 0 0.75rem; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; letter-spacing: -0.02em; }
.reader-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.5rem; color: var(--text); }
.reader-body h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.5rem; color: var(--primary-dark); }
.reader-body p { margin: 0.75rem 0; }
.reader-body ul, .reader-body ol { margin: 0.5rem 0 0.75rem 1.5rem; }
.reader-body li { margin: 0.3rem 0; }
.reader-body strong { color: var(--text); }
.reader-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.reader-body a:hover { color: var(--primary-dark); }

.reader-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1.25rem;
  margin: 1rem 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.reader-body code { background: #f1f5f9; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85em; font-family: 'SF Mono','Menlo',monospace; }
.reader-body pre { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: var(--radius); overflow-x: auto; margin: 1rem 0; }
.reader-body pre code { background: none; padding: 0; color: inherit; }

.reader-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; }
.reader-body th { background: var(--primary-light); font-weight: 700; text-align: left; padding: 0.55rem 0.85rem; border: 1px solid var(--border); color: var(--primary-dark); }
.reader-body td { padding: 0.55rem 0.85rem; border: 1px solid var(--border); vertical-align: top; }
.reader-body tr:nth-child(even) { background: #f8fafc; }
.reader-body hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-sidebar);
  color: white;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.success { background: var(--primary); }
.toast.error { background: var(--danger); }

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

.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }
.empty-state p { margin-top: 0.5rem; font-size: 0.9rem; }

/* ===== MOBILE ===== */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 150;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.mobile-nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 768px) {
  .mobile-nav-toggle { display: block; }
  #sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  #sidebar.open { transform: translateX(0); }
  #content { margin-left: 0; padding: 1rem; padding-top: 4rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .upload-options { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .notes-grid { grid-template-columns: 1fr; }
  .diagnosis-grid { grid-template-columns: 1fr; }
  .filter-group { overflow-x: auto; flex-wrap: nowrap; }
  .reader-overlay { left: 0; }
}
