/* ═══════════════════════════════════════════════
   PsicoCamila · Admin Panel CSS
═══════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --pink-300: #f0abfc;

  --bg-900: #09080f;
  --bg-800: #0e0b18;
  --bg-750: #120f1e;
  --bg-700: #170f28;
  --bg-600: #1e1535;
  --bg-500: #261a42;
  --card-bg: rgba(22, 16, 40, 0.8);
  --card-border: rgba(168, 85, 247, 0.18);

  --text-100: #f5f0ff;
  --text-200: #e2d9f3;
  --text-400: #a89cc0;
  --text-600: #6b5f82;

  --grad-primary: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #c084fc 100%);
  --grad-soft: linear-gradient(135deg, rgba(168,85,247,0.12) 0%, rgba(124,58,237,0.06) 100%);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(168,85,247,0.08);
  --shadow-btn: 0 4px 24px rgba(168,85,247,0.4);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-900);
  color: var(--text-200);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-800); }
::-webkit-scrollbar-thumb { background: var(--purple-700); border-radius: 3px; }

/* ══════════ LOGIN ══════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-900);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  background-image: radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.25) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(232,121,249,0.15) 0%, transparent 60%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card), 0 0 80px rgba(168,85,247,0.15);
  animation: loginFadeIn 0.5s ease;
}
@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 1.5rem;
  justify-content: center;
}
.login-logo__icon { color: var(--purple-400); }

.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-100);
  text-align: center;
  margin-bottom: 0.4rem;
}
.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-400);
  text-align: center;
  margin-bottom: 2rem;
}

.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.login-form__group { display: flex; flex-direction: column; gap: 0.5rem; }
.login-form__group label { font-size: 0.85rem; font-weight: 500; color: var(--text-400); }

.login-input-wrap {
  position: relative;
}
.login-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 3rem 0.85rem 1.1rem;
  font-size: 0.95rem;
  color: var(--text-100);
  transition: var(--transition);
  outline: none;
}
.login-input-wrap input:focus {
  border-color: var(--purple-500);
  background: rgba(168,85,247,0.06);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}
.login-toggle-pass {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-600);
  transition: var(--transition);
  padding: 0.2rem;
}
.login-toggle-pass:hover { color: var(--purple-400); }

.login-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.83rem;
  color: #fca5a5;
}

.login-hint {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-600);
  text-align: center;
  line-height: 1.6;
}
.login-hint strong { color: var(--purple-300); }

/* ══════════ ADMIN SHELL ══════════ */
.admin-shell {
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-800);
  border-right: 1px solid rgba(168,85,247,0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar__head {
  padding: 1.75rem 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(168,85,247,0.08);
}
.sidebar__logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-100);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.sidebar__logo span { color: var(--purple-400); }
.sidebar__role { font-size: 0.75rem; color: var(--text-600); letter-spacing: 0.08em; text-transform: uppercase; }

.sidebar__nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-400);
  transition: var(--transition);
  text-align: left;
  position: relative;
}
.sidebar__item:hover {
  background: rgba(168,85,247,0.08);
  color: var(--text-200);
}
.sidebar__item.active {
  background: var(--grad-soft);
  color: var(--purple-300);
  border: 1px solid rgba(168,85,247,0.2);
}
.sidebar__item-icon { font-size: 1.1rem; }
.sidebar__badge {
  margin-left: auto;
  background: var(--grad-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar__footer {
  padding: 1rem 0.75rem 1.5rem;
  border-top: 1px solid rgba(168,85,247,0.08);
}
.sidebar__logout {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-600);
  transition: var(--transition);
}
.sidebar__logout:hover {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
}

/* ── MAIN ── */
.admin-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-900);
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9,8,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(168,85,247,0.08);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-topbar__menu {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.admin-topbar__menu span {
  display: block; width: 22px; height: 2px;
  background: var(--text-200); border-radius: 2px;
}
.admin-topbar__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-100);
  flex: 1;
}
.admin-topbar__date {
  font-size: 0.8rem;
  color: var(--text-600);
}

/* ── SECTIONS ── */
.admin-section { display: none; padding: 2rem; flex: 1; }
.admin-section.active { display: block; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 0.2rem;
}
.section-sub { font-size: 0.88rem; color: var(--text-600); }

/* ── BUTTONS ── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid rgba(168,85,247,0.25);
  color: var(--text-400);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.admin-btn:hover {
  border-color: rgba(168,85,247,0.45);
  color: var(--purple-300);
  background: rgba(168,85,247,0.08);
  transform: translateY(-1px);
}
.admin-btn--primary {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-btn);
}
.admin-btn--primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 28px rgba(168,85,247,0.55);
  color: #fff;
}
.admin-btn--sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.admin-btn--danger {
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.admin-btn--danger:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.5);
  color: #fca5a5;
}

/* Login submit */
.login-submit {
  width: 100%;
  justify-content: center;
  padding: 0.9rem;
  font-size: 0.95rem;
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(16px);
  transition: var(--transition);
}
.stat-card:hover {
  border-color: rgba(168,85,247,0.3);
  transform: translateY(-3px);
}
.stat-card__icon { font-size: 2rem; }
.stat-card__num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-card__label { font-size: 0.8rem; color: var(--text-600); margin-top: 0.2rem; }

/* ── DASHBOARD CARD ── */
.dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
}
.dashboard-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.dashboard-card__head h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-100);
}

.recent-list { display: flex; flex-direction: column; gap: 0.75rem; }
.recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(168,85,247,0.04);
  border: 1px solid rgba(168,85,247,0.08);
  border-radius: var(--radius-md);
}
.recent-item__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}
.recent-item__name { font-weight: 600; font-size: 0.9rem; color: var(--text-100); }
.recent-item__meta { font-size: 0.78rem; color: var(--text-600); }
.recent-item__date { margin-left: auto; font-size: 0.78rem; color: var(--text-600); white-space: nowrap; }

/* ── SEARCH BAR ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.25rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}
.search-bar:focus-within {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.search-bar svg { color: var(--text-600); flex-shrink: 0; }
.search-bar input {
  background: none;
  border: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-100);
  flex: 1;
}
.search-bar input::placeholder { color: var(--text-600); }

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
}
.admin-table th {
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-600);
  background: rgba(168,85,247,0.05);
  border-bottom: 1px solid rgba(168,85,247,0.1);
  text-align: left;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--text-200);
  border-bottom: 1px solid rgba(168,85,247,0.05);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: rgba(168,85,247,0.04); }

.empty-hint {
  color: var(--text-600);
  font-size: 0.88rem;
  text-align: center;
  padding: 2rem;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge--activo   { background:rgba(34,197,94,0.12);  border:1px solid rgba(34,197,94,0.25);  color:#86efac; }
.status-badge--alta     { background:rgba(59,130,246,0.12); border:1px solid rgba(59,130,246,0.25); color:#93c5fd; }
.status-badge--pausa    { background:rgba(234,179,8,0.12);  border:1px solid rgba(234,179,8,0.25);  color:#fde047; }
.status-badge--derivado { background:rgba(168,85,247,0.12); border:1px solid rgba(168,85,247,0.25); color:#d8b4fe; }

.table-actions { display:flex; gap:0.4rem; flex-wrap:wrap; }
.table-actions .admin-btn { padding:0.3rem 0.7rem; font-size:0.76rem; }

/* ── HISTORY ── */
.history-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.history-selector label { font-size: 0.9rem; color: var(--text-400); white-space: nowrap; }

.patient-profile-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(16px);
}
.patient-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.patient-profile-info h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-100); margin-bottom: 0.3rem; }
.patient-profile-meta { display:flex; flex-wrap:wrap; gap:0.75rem; margin-top:0.5rem; }
.patient-profile-meta span { font-size:0.8rem; color:var(--text-600); }
.patient-profile-meta strong { color:var(--text-400); }

.auto-created-badge {
  display:inline-flex; align-items:center; gap:0.4rem;
  background:rgba(168,85,247,0.12);
  border:1px solid rgba(168,85,247,0.25);
  border-radius:var(--radius-full);
  padding:0.2rem 0.75rem;
  font-size:0.75rem;
  color:var(--purple-300);
  margin-top:0.5rem;
}

.history-block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(16px);
}
.history-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.history-block__head h3 { font-size: 1rem; font-weight: 600; color: var(--text-100); }

/* Sessions list */
.sessions-list { display: flex; flex-direction: column; gap: 0.75rem; }
.session-item {
  background: rgba(168,85,247,0.04);
  border: 1px solid rgba(168,85,247,0.1);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: var(--transition);
}
.session-item:hover { border-color: rgba(168,85,247,0.25); }
.session-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.session-item__date { font-weight: 600; font-size: 0.9rem; color: var(--text-100); }
.session-item__type { font-size: 0.78rem; color: var(--purple-400); }
.session-item__notes { font-size: 0.85rem; color: var(--text-400); line-height: 1.6; }
.session-item__mood {
  display:inline-flex; align-items:center; gap:0.3rem;
  font-size:0.75rem; color:var(--text-600);
  margin-top:0.5rem;
}
.session-item__mood-bar {
  display:inline-block;
  height:6px; border-radius:3px;
  background:var(--grad-primary);
  transition:width 0.4s;
}
.session-item__actions { display:flex; gap:0.4rem; margin-top:0.5rem; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { color: var(--text-600); font-size: 0.95rem; }

/* ── INPUTS ── */
.admin-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-100);
  outline: none;
  transition: var(--transition);
}
.admin-input:focus {
  border-color: var(--purple-500);
  background: rgba(168,85,247,0.05);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.admin-input::placeholder { color: var(--text-600); }
.admin-select { 
  appearance: none; 
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer; 
}
.admin-select option { background: var(--bg-700); }

.admin-textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-100);
  outline: none;
  transition: var(--transition);
  resize: vertical;
  line-height: 1.65;
}
.admin-textarea:focus {
  border-color: var(--purple-500);
  background: rgba(168,85,247,0.05);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.admin-textarea::placeholder { color: var(--text-600); }

/* Mood slider */
.mood-slider-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.mood-slider {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(168,85,247,0.2);
  outline: none;
  cursor: pointer;
}
.mood-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 2px 8px rgba(168,85,247,0.5);
  cursor: pointer;
}
#moodValue {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--purple-300);
  min-width: 24px;
  text-align: center;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9,8,15,0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-800);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(168,85,247,0.1);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.modal__head h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-100); }
.modal__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-600);
  font-size: 0.85rem;
  transition: var(--transition);
}
.modal__close:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }

.modal-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-group label { font-size: 0.82rem; font-weight: 500; color: var(--text-400); }
.modal__actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }

/* ── SETTINGS ── */
.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
}
.settings-card h3 { font-size: 1rem; font-weight: 600; color: var(--text-100); margin-bottom: 1.25rem; }
.settings-form { display: flex; flex-direction: column; gap: 1rem; }
.settings-msg {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
}
.settings-msg--ok { background:rgba(34,197,94,0.1); border:1px solid rgba(34,197,94,0.25); color:#86efac; }
.settings-msg--err { background:rgba(239,68,68,0.1); border:1px solid rgba(239,68,68,0.25); color:#fca5a5; }
.settings-card--danger { border-color: rgba(239,68,68,0.2); }
.settings-card--danger h3 { color: #fca5a5; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-700);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.4rem;
  font-size: 0.88rem;
  color: var(--text-200);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  animation: toastIn 0.3s ease;
}
.toast[hidden] { display: none !important; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast--ok  { border-color: rgba(34,197,94,0.3); }
.toast--err { border-color: rgba(239,68,68,0.3); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-260px);
    width: 260px;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-topbar__menu { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .patient-profile-card { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .admin-section { padding: 1.25rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .history-selector { flex-direction: column; align-items: flex-start; }
}
