/* ================================================
   ALUME CLINIC — Component Styles
   ================================================ */

/* ====== DASHBOARD PAGE ====== */
.dash-charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-widgets-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* Upcoming appointments list */
.appt-list { display: flex; flex-direction: column; gap: 10px; }
.appt-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--bg-card2); border-radius: 12px; border: 1px solid var(--border);
}
.appt-time { font-size: 0.75rem; font-weight: 700; color: var(--purple); white-space: nowrap; min-width: 40px; }
.appt-info { flex: 1; min-width: 0; }
.appt-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.appt-proc { font-size: 0.75rem; color: var(--text-muted); }
.appt-badge { flex-shrink: 0; }

/* Alert list */
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--bg-card2); border-radius: 10px;
  font-size: 0.8125rem; color: var(--text-secondary);
}
.alert-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.alert-item.warn { color: var(--warning); }
.alert-item.danger { color: var(--danger); }
.alert-item.info { color: var(--info); }

/* ====== AGENDA PAGE ====== */
.agenda-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; height: calc(100vh - 140px); min-height: 600px; }
.agenda-sidebar-panel { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }

.mini-cal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.mini-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mini-cal-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.mini-cal-nav { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.mini-cal-nav:hover { background: var(--bg-hover); color: var(--text-primary); }
.mini-cal-nav svg { width: 16px; height: 16px; display: block; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-cal-dow { font-size: 0.625rem; font-weight: 700; text-align: center; color: var(--text-muted); padding: 4px 0; text-transform: uppercase; }
.mini-cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; border-radius: 50%; cursor: pointer; transition: all 0.15s;
  color: var(--text-secondary);
}
.mini-cal-day:hover { background: var(--bg-hover); color: var(--text-primary); }
.mini-cal-day.today { background: var(--grad-main); color: #fff; font-weight: 700; }
.mini-cal-day.selected { background: rgba(139,92,246,0.2); color: var(--purple); font-weight: 700; }
.mini-cal-day.has-events::after { content: ''; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--pink); margin: 1px auto 0; }
.mini-cal-day.other-month { color: var(--text-muted); opacity: 0.4; }

.agenda-filter-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.agenda-filter-panel h4 { font-size: 0.8125rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; }
.filter-option:hover { background: var(--bg-hover); }
.filter-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.filter-option span { font-size: 0.8125rem; color: var(--text-secondary); }

.agenda-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.agenda-toolbar {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.agenda-view-btns { display: flex; gap: 4px; background: var(--bg-input); border-radius: 10px; padding: 3px; }
.view-btn { padding: 6px 14px; font-size: 0.8125rem; font-weight: 600; border-radius: 7px; color: var(--text-secondary); transition: all 0.2s; }
.view-btn.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.agenda-nav { display: flex; align-items: center; gap: 10px; }
.agenda-nav-btn { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.agenda-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.agenda-nav-btn svg { width: 16px; height: 16px; }
.agenda-date-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); min-width: 180px; text-align: center; }

.agenda-grid-wrap { flex: 1; overflow: auto; }
.agenda-day-view { display: grid; grid-template-columns: 56px 1fr; }
.time-col { }
.time-slot { height: 60px; display: flex; align-items: flex-start; padding-top: 4px; padding-right: 8px; justify-content: flex-end; font-size: 0.6875rem; color: var(--text-muted); font-weight: 600; border-right: 1px solid var(--border); }
.events-col { position: relative; }
.hour-line { height: 60px; border-bottom: 1px dashed var(--border); position: relative; }
.cal-event {
  position: absolute; left: 4px; right: 4px;
  border-radius: 8px; padding: 6px 8px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  overflow: hidden; transition: opacity 0.2s;
  border-left: 3px solid currentColor;
}
.cal-event:hover { opacity: 0.85; }
.cal-event-name { color: var(--text-primary); font-size: 0.8rem; font-weight: 700; }
.cal-event-proc { font-size: 0.7rem; opacity: 0.8; }

/* Week view */
.agenda-week-view { display: grid; grid-template-columns: 56px repeat(7, 1fr); }
.week-header-cell { padding: 10px 4px; text-align: center; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.week-day-name { font-size: 0.6875rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.week-day-num { font-size: 1.125rem; font-weight: 800; color: var(--text-primary); }
.week-day-num.today { background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.week-time-col { border-right: 1px solid var(--border); }
.week-hour { height: 50px; display: flex; align-items: flex-start; padding-top: 3px; padding-right: 6px; justify-content: flex-end; font-size: 0.6875rem; color: var(--text-muted); font-weight: 600; }
.week-day-col { border-right: 1px solid var(--border); position: relative; }
.week-cell { height: 50px; border-bottom: 1px dashed var(--border); }
.week-event { padding: 3px 5px; margin: 1px 2px; border-radius: 6px; font-size: 0.6875rem; font-weight: 600; cursor: pointer; }

/* ====== PATIENTS PAGE ====== */
.patient-profile-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; margin-bottom: 20px;
}
.patient-profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.patient-avatar-lg {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-main); color: #fff; font-size: 1.5rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.patient-name-block h2 { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); }
.patient-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.patient-meta span { font-size: 0.8125rem; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }
.patient-meta svg { width: 14px; height: 14px; color: var(--purple); }
.allergy-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ====== PRONTUÁRIO ====== */
.prontuario-grid { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.prontuario-aside { display: flex; flex-direction: column; gap: 14px; }
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.info-value { font-size: 0.875rem; color: var(--text-primary); }

/* ====== FINANCEIRO ====== */
.fin-period-selector { display: flex; gap: 6px; }
.period-btn { padding: 7px 14px; font-size: 0.8125rem; font-weight: 600; border-radius: 8px; color: var(--text-secondary); background: var(--bg-input); border: 1px solid var(--border); }
.period-btn.active { background: var(--grad-main); color: #fff; border-color: transparent; }

.transaction-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; transition: background 0.15s; }
.transaction-row:hover { background: var(--bg-hover); }
.trans-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trans-icon.income { background: rgba(16,185,129,0.1); color: var(--success); }
.trans-icon.expense { background: rgba(239,68,68,0.1); color: var(--danger); }
.trans-icon svg { width: 18px; height: 18px; }
.trans-info { flex: 1; min-width: 0; }
.trans-title { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.trans-meta { font-size: 0.75rem; color: var(--text-muted); }
.trans-amount { font-size: 0.9375rem; font-weight: 700; flex-shrink: 0; }
.trans-amount.income { color: var(--success); }
.trans-amount.expense { color: var(--danger); }

/* ====== ESTOQUE ====== */
.stock-level { display: flex; align-items: center; gap: 8px; }
.stock-bar { flex: 1; height: 6px; background: var(--border2); border-radius: 3px; overflow: hidden; max-width: 80px; }
.stock-fill { height: 100%; border-radius: 3px; }
.stock-fill.ok { background: var(--success); }
.stock-fill.low { background: var(--warning); }
.stock-fill.critical { background: var(--danger); }

/* ====== GALERIA ====== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: all 0.2s;
}
.gallery-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gallery-img-row { display: grid; grid-template-columns: 1fr 1fr; height: 140px; }
.gallery-img-slot {
  background: var(--bg-input); display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; position: relative; overflow: hidden;
}
.gallery-img-slot:first-child { border-right: 1px solid var(--border); }
.gallery-img-slot .slot-label { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.5); color: #fff; font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.gallery-card-info { padding: 12px 14px; }
.gallery-card-name { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.gallery-card-proc { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }

/* ====== COMPARE SLIDER ====== */
.compare-wrap { position: relative; overflow: hidden; border-radius: 12px; height: 300px; background: var(--bg-input); }
.compare-before, .compare-after { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-muted); }
.compare-before { background: linear-gradient(135deg, var(--bg-card2), var(--bg-input)); z-index: 1; }
.compare-after { background: linear-gradient(135deg, var(--bg-input), var(--bg-card)); z-index: 2; clip-path: inset(0 50% 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; z-index: 3; cursor: ew-resize; }
.compare-handle::after { content: '↔'; position: absolute; top: 50%; transform: translateY(-50%); left: 50%; transform: translate(-50%,-50%); background: #fff; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #333; font-size: 0.875rem; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* ====== PROFISSIONAIS ====== */
.prof-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: all 0.2s;
}
.prof-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.prof-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin-bottom: 12px;
  background: var(--grad-main); color: #fff; font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.prof-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }
.prof-spec { font-size: 0.8125rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 12px; }
.prof-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 12px; }
.prof-stat { background: var(--bg-card2); border-radius: 10px; padding: 10px 6px; }
.prof-stat-val { font-size: 1.125rem; font-weight: 800; color: var(--text-primary); }
.prof-stat-lbl { font-size: 0.6875rem; color: var(--text-muted); margin-top: 2px; }

/* ====== CONFIGURAÇÕES ====== */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.settings-menu { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.settings-menu-item {
  padding: 10px 14px; border-radius: 10px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 10px;
}
.settings-menu-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.settings-menu-item.active { background: rgba(139,92,246,0.12); color: var(--purple); font-weight: 700; }
.settings-menu-item svg { width: 17px; height: 17px; }
.settings-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.settings-section-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.settings-section-desc { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 24px; }

/* TOGGLE SWITCH */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-wrap:last-child { border-bottom: none; }
.toggle-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.toggle-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.toggle-switch { position: relative; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-thumb {
  position: absolute; inset: 0; background: var(--border2); border-radius: 12px; cursor: pointer; transition: background 0.2s;
}
.toggle-thumb::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-thumb { background: var(--purple); }
.toggle-switch input:checked + .toggle-thumb::before { transform: translateX(20px); }

/* PLAN CARDS */
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card {
  border: 2px solid var(--border); border-radius: 16px; padding: 24px; text-align: center;
  transition: all 0.2s; cursor: pointer;
}
.plan-card:hover { border-color: var(--purple); }
.plan-card.popular { border-color: var(--purple); background: rgba(139,92,246,0.05); position: relative; }
.plan-card.popular::before { content: 'POPULAR'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--grad-main); color: #fff; font-size: 0.65rem; font-weight: 800; padding: 3px 12px; border-radius: 20px; letter-spacing: 0.08em; }
.plan-name { font-size: 1.0625rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.plan-price { font-size: 2rem; font-weight: 800; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.plan-period { font-size: 0.75rem; color: var(--text-muted); }
.plan-features { list-style: none; margin: 16px 0; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.plan-features li { font-size: 0.8125rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--success); font-weight: 800; }

/* ANAMNESE */
.anamnese-section { margin-bottom: 28px; }
.anamnese-section-title {
  font-size: 0.875rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--purple); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 2px solid rgba(139,92,246,0.2);
  display: flex; align-items: center; gap: 8px;
}
.anamnese-section-title svg { width: 16px; height: 16px; }

/* CONTRACT PREVIEW */
.contract-preview {
  background: #fff; color: #000; border-radius: 12px; padding: 40px;
  font-size: 0.9rem; line-height: 1.7; min-height: 600px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.contract-preview h2 { font-size: 1.25rem; text-align: center; margin-bottom: 6px; color: #1a1a2e; }
.contract-preview .contract-clinic { text-align: center; font-size: 0.875rem; color: #666; margin-bottom: 24px; }
.contract-section { margin-bottom: 18px; }
.contract-section h3 { font-size: 0.9rem; font-weight: 700; border-bottom: 1px solid #ddd; padding-bottom: 4px; margin-bottom: 8px; color: #333; }
.sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.sign-block { text-align: center; }
.sign-canvas { border: 1px solid #ddd; border-radius: 8px; width: 100%; height: 80px; cursor: crosshair; margin-bottom: 6px; }
.sign-label { font-size: 0.75rem; color: #888; }

/* SIGNATURE PAD in dark */
.sig-pad-wrap { border: 1px dashed var(--border2); border-radius: 12px; overflow: hidden; background: var(--bg-input); }
.sig-pad { width: 100%; height: 120px; cursor: crosshair; display: block; }

/* CHART TOOLTIPS */
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-secondary); }
.chart-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 1100px) {
  .dash-charts-row { grid-template-columns: 1fr; }
  .dash-widgets-row { grid-template-columns: 1fr 1fr; }
  .agenda-layout { grid-template-columns: 1fr; }
  .prontuario-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dash-widgets-row { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
}

/* Notification Panel */
.notif-panel {
  position: absolute; top: 48px; right: 0; width: 340px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 300;
  overflow: hidden; animation: slideUp 0.2s ease;
}
.notif-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }
.notif-item { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item:last-child { border-bottom: none; }
.notif-dot-col { padding-top: 4px; }
.notif-content p { font-size: 0.8125rem; color: var(--text-primary); line-height: 1.4; }
.notif-content span { font-size: 0.7rem; color: var(--text-muted); }

/* Loading spinner */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--purple); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Inventory chart override */
canvas { max-width: 100%; }

/* Sticky table header */
.table-sticky thead { position: sticky; top: 0; background: var(--bg-card); z-index: 5; }

/* ====== GALERIA EVOLUTIVA — REGISTROS MÚLTIPLOS ====== */

/* Grid de miniaturas por registro */
.reg-foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

/* Miniatura individual */
.reg-foto-thumb {
  position: relative;
  padding-bottom: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-input);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.18s, box-shadow 0.18s;
}
.reg-foto-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.reg-foto-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Botão "+" para adicionar foto */
.reg-foto-add {
  position: relative;
  padding-bottom: 100%;
  border-radius: 10px;
  border: 2px dashed var(--border2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.reg-foto-add:hover {
  border-color: var(--purple);
  background: rgba(139,92,246,0.05);
}
.reg-foto-add > div {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}

/* Barra de progresso de fotos */
.reg-foto-progress {
  margin-top: 10px;
  display: flex; align-items: center; gap: 8px;
}
.reg-foto-progress-bar {
  flex: 1; height: 4px;
  background: var(--border2); border-radius: 2px; overflow: hidden;
}
.reg-foto-progress-fill {
  height: 100%; border-radius: 2px;
  background: var(--grad-main);
  transition: width 0.4s ease;
}

/* ====== FULLSCREEN — Tira de miniaturas ====== */
#pacFsThumbStrip {
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 4px; justify-content: center;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
#pacFsThumbStrip::-webkit-scrollbar { height: 4px; }
#pacFsThumbStrip::-webkit-scrollbar-track { background: transparent; }
#pacFsThumbStrip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* Imagem no fullscreen — transição suave */
#pacFsImg { transition: opacity 0.18s ease; }

/* ====== PRONTUÁRIO — ANAMNESE FORMULÁRIO ====== */
.anamnese-section-title {
  font-size: 0.75rem; font-weight: 700; color: var(--purple);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

/* ====== FULLSCREEN OVERLAY ACESSIBILIDADE ====== */
#pacFsOverlay, #galeriaFullscreen {
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: contain;
}
#pacFsOverlay *:focus, #galeriaFullscreen *:focus {
  outline: 2px solid rgba(139,92,246,0.6);
  outline-offset: 2px;
}

/* ====== ABAS — badge warn ====== */
.nav-badge.warn { background: var(--danger); }

/* ====== TIMELINE MELHORADA ====== */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border2); border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -22px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad-main); border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px rgba(139,92,246,0.3);
}
.timeline-time { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-bottom: 3px; }
.timeline-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }
.timeline-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ====== PATIENT PROFILE — RESPONSIVE ====== */
@media (max-width: 600px) {
  .patient-profile-header { flex-direction: column; align-items: flex-start; }
  .patient-profile-header > div:last-child { text-align: left; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
