/* style.css — ClinicaSaaS Design System */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ─── CSS VARIABLES ─────────────────────────────────────── */
:root {
  --primary:        #1A6FB5;
  --primary-dark:   #0D4F8A;
  --primary-light:  #D6E8F7;
  --primary-xlight: #EEF6FD;
  --success:        #2BAF7C;
  --success-light:  #D4F0E4;
  --danger:         #E53E3E;
  --danger-light:   #FEE2E2;
  --warning:        #F6A623;
  --warning-light:  #FEF3C7;
  --bg:             #F0F4F8;
  --surface:        #FFFFFF;
  --text:           #1E2D3D;
  --text-secondary: #64748B;
  --muted:          #94A3B8;
  --border:         #D1DCE8;
  --sidebar-width:  260px;
  --header-height:  64px;
  --radius:         10px;
  --radius-lg:      16px;
  --shadow:         0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.10), 0 8px 32px rgba(0,0,0,0.07);
  --transition:     all 0.2s ease;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

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

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, #0D4F8A 0%, #1A6FB5 60%, #1d7fcf 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: var(--transition);
  box-shadow: 2px 0 16px rgba(13,79,138,0.15);
}

.sidebar-logo {
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-logo .logo-text { line-height: 1.2; }
.sidebar-logo .logo-name {
  font-size: 15px; font-weight: 700;
  color: #fff; letter-spacing: -0.3px;
}
.sidebar-logo .logo-sub {
  font-size: 11px; color: rgba(255,255,255,0.65);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-group-label {
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,0.82);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-item.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: #fff;
  border-radius: 0 2px 2px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px; text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}
.user-avatar {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 12px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role {
  font-size: 11px; color: rgba(255,255,255,0.6);
}
.sidebar-footer .logout-btn {
  margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  font-size: 13px; cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}
.sidebar-footer .logout-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── HEADER ─────────────────────────────────────────────── */
.page-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.hamburger {
  display: none;
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
}
.header-title {
  font-size: 16px; font-weight: 600;
  color: var(--text);
  flex: 1;
}
.header-breadcrumb {
  font-size: 12px; color: var(--muted);
  font-weight: 400;
  display: block;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-clinic-name {
  font-size: 13px; color: var(--text-secondary);
  font-weight: 500;
  padding: 5px 12px;
  background: var(--bg);
  border-radius: 20px;
}
.header-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.header-btn:hover { background: var(--bg); color: var(--primary); }

/* ─── PAGE BODY ──────────────────────────────────────────── */
.page-body {
  flex: 1;
  padding: 28px;
}
.page-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(209,220,232,0.5);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-size: 14px; font-weight: 600;
  color: var(--text);
}
.card-body { padding: 20px 24px; }

/* ─── METRIC CARDS ───────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid rgba(209,220,232,0.5);
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}
.metric-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.metric-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.metric-icon.blue  { background: var(--primary-light); }
.metric-icon.green { background: var(--success-light); }
.metric-icon.orange{ background: var(--warning-light); }
.metric-icon.red   { background: var(--danger-light); }
.metric-info { flex: 1; }
.metric-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.metric-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; }
.metric-sub { font-size: 11.5px; color: var(--muted); }
.metric-tag {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  display: inline-block; margin-top: 4px;
}
.metric-tag.up   { background: var(--success-light); color: #1A6B4A; }
.metric-tag.down { background: var(--danger-light); color: #991B1B; }
.metric-tag.warn { background: var(--warning-light); color: #92400E; }

/* ─── GRID LAYOUTS ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ─── TABLES ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: var(--primary-dark);
  color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.data-table th:first-child { border-radius: 8px 0 0 0; }
.data-table th:last-child  { border-radius: 0 8px 0 0; }
.data-table td {
  padding: 11px 16px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table tr:nth-child(even) td { background: rgba(240,244,248,0.5); }
.data-table tr:nth-child(even):hover td { background: var(--bg); }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-agendado     { background: var(--primary-light); color: var(--primary-dark); }
.badge-confirmado   { background: var(--success-light); color: #1A6B4A; }
.badge-atendimento  { background: var(--warning-light); color: #92400E; }
.badge-realizado    { background: #E0F2FE; color: #0369A1; }
.badge-cancelado    { background: #F1F5F9; color: var(--text-secondary); }
.badge-noshow       { background: var(--danger-light); color: #991B1B; }
.badge-reagendado   { background: #EDE9FE; color: #5B21B6; }
.badge-default      { background: var(--bg); color: var(--text-secondary); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(26,111,181,0.35); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #229a68; color: #fff; }
.btn-secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: var(--primary-xlight); }
.btn-outline { background: #fff; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: var(--danger-light); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon { padding: 7px; border-radius: 7px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── FORMS ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,181,0.12);
}
.form-textarea { min-height: 90px; resize: vertical; }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 16px; border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ─── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
  border-left: 4px solid;
}
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-light); border-color: var(--success); color: #1A6B4A; }
.alert-danger  { background: var(--danger-light);  border-color: var(--danger);  color: #991B1B; }
.alert-warning { background: var(--warning-light); border-color: var(--warning); color: #92400E; }
.alert-info    { background: var(--primary-light);  border-color: var(--primary);  color: var(--primary-dark); }

/* ─── SCHEDULE CARD ──────────────────────────────────────── */
.schedule-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-time {
  font-size: 15px; font-weight: 700;
  color: var(--primary);
  width: 52px; flex-shrink: 0;
  text-align: center;
}
.schedule-info { flex: 1; }
.schedule-patient { font-size: 14px; font-weight: 600; color: var(--text); }
.schedule-detail { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.schedule-actions { display: flex; gap: 6px; }

/* ─── ALERT ITEMS ────────────────────────────────────────── */
.alert-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.alert-item:last-child { border-bottom: none; }
.alert-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 6px; flex-shrink: 0;
}
.alert-dot.red    { background: var(--danger); }
.alert-dot.orange { background: var(--warning); }
.alert-dot.blue   { background: var(--primary); }
.alert-item-text { font-size: 13px; color: var(--text); }
.alert-item-sub  { font-size: 12px; color: var(--muted); }

/* ─── STARS ──────────────────────────────────────────────── */
.star { font-size: 16px; color: var(--border); }
.star.filled { color: #F59E0B; }
.stars-row { display: flex; gap: 1px; }

/* ─── PAGINATION ─────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; padding-top: 20px; }
.page-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── SEARCH BAR ─────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap .search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.search-input-wrap .form-input { padding-left: 36px; }

/* ─── MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed;
  inset: 0; background: rgba(15,30,50,0.45);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  padding: 28px;
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none;
  font-size: 20px; color: var(--muted);
  cursor: pointer; padding: 2px;
  line-height: 1; transition: var(--transition);
}
.modal-close:hover { color: var(--danger); }

/* ─── TABS ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px; background: none; border: none;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer; position: relative;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary); font-weight: 600;
}
.tab-btn.active::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary);
  border-radius: 2px 2px 0 0;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── STATS MINI ─────────────────────────────────────────── */
.stat-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-val { font-size: 13px; font-weight: 600; color: var(--text); }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* ─── AGENDA ─────────────────────────────────────────────── */
.agenda-grid {
  display: grid;
  grid-template-columns: 60px repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.agenda-header-cell {
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 10px;
  font-size: 12.5px; font-weight: 600;
  text-align: center;
}
.agenda-time-col {
  background: var(--bg);
  padding: 8px 6px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.agenda-cell {
  min-height: 44px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px;
  position: relative;
}
.agenda-event {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11.5px;
  cursor: pointer;
  transition: var(--transition);
}
.agenda-event:hover { background: var(--primary); color: #fff; }
.agenda-event.confirmado { border-color: var(--success); background: var(--success-light); }
.agenda-event.confirmado:hover { background: var(--success); color: #fff; }
.agenda-event.no_show { border-color: var(--danger); background: var(--danger-light); }

/* ─── LOGIN PAGE ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0D4F8A 0%, #1A6FB5 50%, #2BAF7C 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  padding: 44px 40px;
  width: 100%; max-width: 420px;
}
.auth-logo {
  text-align: center; margin-bottom: 28px;
}
.auth-logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--success));
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 12px;
}
.auth-title { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-secondary); }
.auth-divider {
  text-align: center; position: relative;
  margin: 20px 0; color: var(--muted); font-size: 12px;
}
.auth-link { font-size: 13.5px; text-align: center; margin-top: 20px; color: var(--text-secondary); }

/* ─── TRIAGEM ────────────────────────────────────────────── */
.triagem-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  transition: var(--transition);
}
.triagem-card:hover { box-shadow: var(--shadow); }
.triagem-card.prioridade-alta { border-left: 4px solid var(--danger); }
.triagem-card.prioridade-media { border-left: 4px solid var(--warning); }
.triagem-card.prioridade-baixa { border-left: 4px solid var(--success); }

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

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid-3-1 { grid-template-columns: 1fr; }
  .grid-2   { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 150;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .page-body { padding: 16px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-top { flex-direction: column; align-items: flex-start; }
  .header-clinic-name { display: none; }
  .auth-card { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── PRINT ──────────────────────────────────────────────── */
@media print {
  .sidebar, .page-header, .btn { display: none !important; }
  .main-content { margin-left: 0 !important; }
}
