/* ===================================================
   MedControl · Hospital System CSS
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #1d4ed8;
  --blue-700: #1e40af;
  --blue-800: #1e3a8a;

  --red-50:  #fff1f2;
  --red-100: #ffe4e6;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --yellow-50:  #fefce8;
  --yellow-100: #fef9c3;
  --yellow-500: #eab308;
  --yellow-600: #ca8a04;

  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;

  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic tokens — light */
  --bg-base:      #f0f4f8;
  --bg-surface:   #ffffff;
  --bg-surface-2: #f8fafc;
  --bg-nav:       rgba(255,255,255,0.92);
  --border:       #e2e8f0;
  --border-strong:#cbd5e1;
  --text-primary: #0f172a;
  --text-secondary:#475569;
  --text-muted:   #94a3b8;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --font-head:    'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --navbar-h:     70px;
}

/* ── DARK MODE TOKENS ── */
[data-bs-theme="dark"] {
  --bg-base:      #090e1a;
  --bg-surface:   #0f1729;
  --bg-surface-2: #162035;
  --bg-nav:       rgba(9,14,26,0.94);
  --border:       rgba(255,255,255,0.07);
  --border-strong:rgba(255,255,255,0.12);
  --text-primary: #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.5);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background .3s, color .3s;
}

/* ── NAVBAR ── */
#mainNavbar {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--navbar-h);
  z-index: 1050;
  box-shadow: var(--shadow-sm);
  transition: background .3s, border-color .3s;
}

.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(59,130,246,.35);
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1;
}

.brand-sub {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: .02em;
}

.navbar-nav .nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .875rem;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--blue-600);
  background: var(--blue-50);
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar-nav .nav-link.active {
  color: #60a5fa;
  background: rgba(59,130,246,.12);
}

.btn-icon-pill {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  font-size: 1rem;
  padding: 0;
}

.btn-icon-pill:hover {
  border-color: var(--blue-500);
  color: var(--blue-500);
  background: var(--blue-50);
  transform: rotate(15deg);
}

.nav-badge {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--red-500);
  border-radius: 50%;
  position: absolute;
  top: 6px; right: 6px;
  border: 2px solid var(--bg-surface);
  display: none;
}

.badge-dot.show { display: block; animation: pop .3s ease; }

.nav-user {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 4px 10px 4px 4px;
  border-radius: var(--radius-sm);
  transition: background .2s;
}

.nav-user:hover { background: var(--bg-surface-2); }

.nav-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: .95rem;
}

.nav-user-name { font-weight: 600; font-size: .85rem; line-height: 1.2; }
.nav-user-role  { font-size: .72rem; color: var(--text-muted); }

/* ── MAIN CONTENT ── */
.main-content {
  padding-top: calc(var(--navbar-h) + 28px);
  padding-bottom: 48px;
  min-height: 100vh;
}

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 28px; }

.page-title {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.page-sub {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0;
  display: flex; align-items: center; gap: 4px;
}

/* ── BTN PRIMARY ── */
.btn-primary-custom {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-weight: 600;
  font-size: .875rem;
  transition: all .25s;
  box-shadow: 0 4px 14px rgba(59,130,246,.35);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,.45);
  color: white;
}

.btn-primary-custom:active { transform: translateY(0); }

/* ── STAT CARDS ── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .3s;
  animation: slideUp .5s ease both;
}

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

.stat-card__icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  position: relative; z-index: 1;
}

.stat-card__body { position: relative; z-index: 1; }

.stat-card__value {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card__label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  margin-top: 4px;
}

.stat-card__bg-icon {
  position: absolute;
  right: -10px; bottom: -10px;
  font-size: 5rem;
  opacity: .07;
  line-height: 1;
}

/* Card variants */
.stat-card--blue  { border-top: 3px solid var(--blue-500); }
.stat-card--red   { border-top: 3px solid var(--red-500); }
.stat-card--yellow{ border-top: 3px solid var(--yellow-500); }
.stat-card--green { border-top: 3px solid var(--green-500); }

.stat-card--blue  .stat-card__icon { background: var(--blue-50);   color: var(--blue-600); }
.stat-card--red   .stat-card__icon { background: var(--red-50);    color: var(--red-600); }
.stat-card--yellow.stat-card__icon { background: var(--yellow-50); color: var(--yellow-600); }
.stat-card--green .stat-card__icon { background: var(--green-50);  color: var(--green-600); }

.stat-card--blue   .stat-card__icon { background: var(--blue-50);    color: var(--blue-600); }
.stat-card--red    .stat-card__icon { background: var(--red-50);     color: var(--red-600); }
.stat-card--yellow .stat-card__icon { background: var(--yellow-50);  color: var(--yellow-600); }
.stat-card--green  .stat-card__icon { background: var(--green-50);   color: var(--green-600); }

.stat-card--blue   .stat-card__value { color: var(--blue-600); }
.stat-card--red    .stat-card__value { color: var(--red-600); }
.stat-card--yellow .stat-card__value { color: var(--yellow-600); }
.stat-card--green  .stat-card__value { color: var(--green-600); }

.stat-card--blue   .stat-card__label { color: var(--blue-600); }
.stat-card--red    .stat-card__label { color: var(--red-600); }
.stat-card--yellow .stat-card__label { color: var(--yellow-600); }
.stat-card--green  .stat-card__label { color: var(--green-600); }

[data-bs-theme="dark"] .stat-card--blue   .stat-card__icon { background: rgba(59,130,246,.12); }
[data-bs-theme="dark"] .stat-card--red    .stat-card__icon { background: rgba(239,68,68,.12); }
[data-bs-theme="dark"] .stat-card--yellow .stat-card__icon { background: rgba(234,179,8,.12); }
[data-bs-theme="dark"] .stat-card--green  .stat-card__icon { background: rgba(34,197,94,.12); }

/* Staggered animation */
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .1s; }
.stat-card:nth-child(3) { animation-delay: .15s; }
.stat-card:nth-child(4) { animation-delay: .2s; }

/* ── CURRENT PATIENT BANNER ── */
.current-patient-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: white;
  box-shadow: 0 8px 24px rgba(29,78,216,.3);
  animation: slideDown .4s ease;
}

.current-dot {
  width: 16px; height: 16px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
}

.pulse-ring {
  position: relative;
}

.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid #4ade80;
  animation: pulseRing 1.5s ease-out infinite;
}

.current-label { font-size: .78rem; opacity: .8; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.current-name  { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; }

.btn-finish {
  background: rgba(255,255,255,.18);
  color: white;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-weight: 600;
  font-size: .875rem;
  transition: all .2s;
  backdrop-filter: blur(6px);
}

.btn-finish:hover {
  background: rgba(255,255,255,.28);
  color: white;
  transform: translateY(-1px);
}

/* ── TABLE SECTION ── */
.table-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface-2);
}

.table-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-count {
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--blue-100);
}

[data-bs-theme="dark"] .badge-count {
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.25);
  color: #60a5fa;
}

/* Search */
.search-wrap {
  position: relative;
  display: flex; align-items: center;
}

.search-icon {
  position: absolute; left: 12px;
  color: var(--text-muted); font-size: .85rem;
  pointer-events: none;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px 8px 34px;
  font-size: .85rem;
  color: var(--text-primary);
  width: 220px;
  transition: all .2s;
  outline: none;
}

.search-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.search-input::placeholder { color: var(--text-muted); }

/* Attend button */
.btn-attend {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-weight: 600;
  font-size: .875rem;
  transition: all .25s;
  box-shadow: 0 4px 12px rgba(34,197,94,.3);
}

.btn-attend:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(34,197,94,.4);
  color: white;
}

.btn-attend:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Table */
.med-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.med-table thead tr th {
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.med-table tbody tr {
  transition: background .15s;
}

.med-table tbody tr:hover { background: var(--bg-surface-2); }

.med-table tbody tr td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
  vertical-align: middle;
  color: var(--text-primary);
}

.med-table tbody tr:last-child td { border-bottom: none; }

/* Turno badge */
.turno-badge {
  width: 36px; height: 36px;
  background: var(--blue-50);
  color: var(--blue-600);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .9rem;
  border: 1px solid var(--blue-100);
}

[data-bs-theme="dark"] .turno-badge {
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.2);
  color: #60a5fa;
}

/* Patient name cell */
.patient-name { font-weight: 600; }
.patient-age  { font-size: .78rem; color: var(--text-muted); }

/* Symptom truncate */
.symptom-text {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: .82rem;
}

/* Priority pills */
.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.priority-pill--normal {
  background: var(--green-50);
  color: var(--green-600);
  border: 1px solid var(--green-100);
}

.priority-pill--urgencia {
  background: var(--yellow-50);
  color: var(--yellow-600);
  border: 1px solid var(--yellow-100);
}

.priority-pill--emergencia {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid var(--red-100);
  animation: urgentPulse 2s ease-in-out infinite;
}

[data-bs-theme="dark"] .priority-pill--normal {
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.2);
  color: #4ade80;
}

[data-bs-theme="dark"] .priority-pill--urgencia {
  background: rgba(234,179,8,.1);
  border-color: rgba(234,179,8,.2);
  color: #facc15;
}

[data-bs-theme="dark"] .priority-pill--emergencia {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.2);
  color: #f87171;
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
}

.status-pill--waiting {
  background: var(--blue-50);
  color: var(--blue-600);
}

.status-pill--attending {
  background: var(--green-50);
  color: var(--green-600);
}

.status-pill--done {
  background: var(--gray-100);
  color: var(--gray-500);
}

[data-bs-theme="dark"] .status-pill--waiting   { background: rgba(59,130,246,.1);  color: #60a5fa; }
[data-bs-theme="dark"] .status-pill--attending { background: rgba(34,197,94,.1);   color: #4ade80; }
[data-bs-theme="dark"] .status-pill--done      { background: rgba(100,116,139,.12); color: #64748b; }

/* Row states */
.row-attending {
  background: rgba(34,197,94,.04) !important;
  border-left: 3px solid var(--green-500);
}

.row-done { opacity: .5; }

/* Action buttons in table */
.btn-remove {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: all .2s;
  cursor: pointer;
}

.btn-remove:hover {
  border-color: var(--red-500);
  color: var(--red-500);
  background: var(--red-50);
}

/* Empty state */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state.show { display: flex; }

.empty-state i { font-size: 3rem; opacity: .4; }
.empty-state h5 { font-family: var(--font-head); font-weight: 600; margin: 0; color: var(--text-secondary); }
.empty-state p  { font-size: .85rem; margin: 0; }

/* ── MODAL ── */
.modal-custom {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header-custom {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-2);
}

.modal-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
}

.modal-title-custom {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.btn-modal-close:hover {
  border-color: var(--red-500);
  color: var(--red-500);
  background: var(--red-50);
}

.modal-body-custom { padding: 24px; }
.modal-footer-custom {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface-2);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form controls */
.form-label-custom {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: .01em;
}

.input-group-custom {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-custom > i {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: .9rem;
  pointer-events: none;
}

.input-custom {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 38px;
  font-size: .88rem;
  color: var(--text-primary);
  transition: all .2s;
  outline: none;
  font-family: var(--font-body);
}

.input-custom:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.input-custom::placeholder { color: var(--text-muted); }

.select-wrap { position: relative; }

.select-custom {
  width: 100%;
  appearance: none;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 38px 10px 14px;
  font-size: .88rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .2s;
  outline: none;
  font-family: var(--font-body);
}

.select-custom:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.select-arrow {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .8rem;
  pointer-events: none;
}

.textarea-wrap { position: relative; }

.textarea-custom {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .88rem;
  color: var(--text-primary);
  transition: all .2s;
  outline: none;
  font-family: var(--font-body);
  resize: vertical;
}

.textarea-custom:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

/* Priority indicator in modal */
.priority-preview { margin-top: 4px; }

.priority-indicator {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all .3s;
}

.priority-normal    { background: var(--green-50);  color: var(--green-600);  border: 1px solid var(--green-100); }
.priority-urgencia  { background: var(--yellow-50); color: var(--yellow-600); border: 1px solid var(--yellow-100); }
.priority-emergencia{ background: var(--red-50);    color: var(--red-600);    border: 1px solid var(--red-100); }

[data-bs-theme="dark"] .priority-normal     { background: rgba(34,197,94,.08);  border-color: rgba(34,197,94,.2);  color: #4ade80; }
[data-bs-theme="dark"] .priority-urgencia   { background: rgba(234,179,8,.08);  border-color: rgba(234,179,8,.2);  color: #facc15; }
[data-bs-theme="dark"] .priority-emergencia { background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.2);  color: #f87171; }

/* Modal buttons */
.btn-cancel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-weight: 500;
  font-size: .875rem;
  transition: all .2s;
}

.btn-cancel:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-save {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 22px;
  font-weight: 600;
  font-size: .875rem;
  transition: all .25s;
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59,130,246,.4);
  color: white;
}

/* ── TOAST ── */
.toast-custom {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
}

.toast-icon { font-size: 1.4rem; }
.toast-title { font-weight: 700; font-size: .9rem; }
.toast-msg   { font-size: .82rem; color: var(--text-muted); }

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRow {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pop {
  0%   { transform: scale(0); }
  80%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes pulseRing {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes urgentPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .6; }
}

@keyframes countUp {
  from { transform: scale(1.3); }
  to   { transform: scale(1); }
}

.row-enter { animation: fadeInRow .35s ease both; }
.count-update { animation: countUp .25s ease; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page-title { font-size: 1.3rem; }
  .main-content { padding-top: calc(var(--navbar-h) + 16px); }
  .symptom-text { max-width: 100px; }
  .search-input { width: 150px; }
}
