/* ================================================================
   DESIGN SYSTEM - Portal de Suporte Dr. Fagner Andrade
   Baseado nos HTMLs aprovados: Prontuários, Ferramentas Clínicas,
   Página de Seleção e Formulário Nutricional/Esportivo
   ================================================================ */

/* === VARIÁVEIS === */
:root {
  --bg: #e2e8f0;
  --card-bg: #ffffff;
  --input-bg: #f8fafc;
  --accent: #0f766e;
  --accent-dark: #0b3552;
  --ink: #0f172a;
  --muted: #334155;
  --muted2: #475569;
  --muted-light: #64748b;
  --line: #cbd5e1;
  --line-soft: rgba(15,23,42,.06);
  --focus: #0ea5e9;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --accent-green: #0f766e;
  --accent-blue: #0ea5e9;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100%;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === TIPOGRAFIA === */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1.2;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 12px; }
.text-muted { color: var(--muted-light); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-upper { text-transform: uppercase; letter-spacing: 0.03em; }

/* === GRIDS === */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* === CARDS E SEÇÕES (padrão prontuário/ferramentas) === */
section, .card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.6);
  animation: slideUp 0.6s ease-out;
}
section h2, .card-header h3 {
  margin: 0;
  padding: 20px 28px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.card-header {
  padding: 20px 28px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header .icon {
  font-size: 20px;
  color: var(--accent);
}
.card-body {
  padding: 24px 28px;
}

/* === FORMULÁRIOS (padrão prontuário) === */
label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}
label span {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
  margin-left: 4px;
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--focus);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
}
textarea { min-height: 80px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: rgba(15,23,42,.4); }
.form-group { margin-bottom: 20px; }
.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.is-invalid { border-color: var(--danger) !important; }

/* === BOTÕES (padrão prontuário/ferramentas: pill 24px) === */
button, .btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  text-decoration: none;
}
button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  color: var(--ink);
  border-color: var(--accent);
}
.btn-primary, button.primary-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover, button.primary-btn:hover {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}
.btn-danger, button.danger-btn {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover, button.danger-btn:hover {
  background: rgba(239,68,68,0.2);
}
.btn-ghost, button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  box-shadow: none;
}
.btn-ghost:hover, button.ghost:hover {
  background: rgba(15,118,110,0.08);
  color: var(--accent);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-warning { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-danger { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-info { background: rgba(14,165,233,0.1); color: #0284c7; }
.badge-accent { background: rgba(15,118,110,0.1); color: var(--accent); }

/* === TABELAS (padrão ferramentas clínicas) === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
.data-table tr:hover { background: #f8fafc; }

/* === ABAS / TABS (padrão ferramentas clínicas) === */
.tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #fff;
  padding: 0 28px;
  flex-wrap: wrap;
}
.tabs::before,
.tabs::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 20px 28px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  box-shadow: none;
}
.tab:hover {
  color: var(--accent);
  background: transparent;
  transform: none;
  box-shadow: none;
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.tab-pane.active { display: block; }

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.active { display: flex; }
.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.6);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.25s ease-out;
}
.modal-header {
  padding: 20px 28px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--muted-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  box-shadow: none;
}
.modal-close:hover {
  color: var(--danger);
  background: rgba(239,68,68,0.08);
  transform: none;
  box-shadow: none;
}
.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* === TOAST (padrão ferramentas) === */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #1e293b;
  color: #fff;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  box-shadow: none;
}
.toast-close:hover {
  color: #fff;
  transform: none;
  box-shadow: none;
}

/* === DROPDOWN === */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 100;
  display: none;
  overflow: hidden;
}
.dropdown.active .dropdown-menu { display: block; }
.dropdown-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.dropdown-item:hover {
  background: #f8fafc;
  text-decoration: none;
}
.dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted-light);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.9rem;
}

/* === LOADING === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
}
.pagination button, .pagination .page-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pagination button.active, .pagination .page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* === ALERTS === */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* === FOOTER (padrão prontuário/ferramentas) === */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  background: #fff;
  border-radius: var(--radius);
}
.footer p { margin: 0; }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* === ANIMAÇÕES === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVIDADE === */
@media (max-width: 900px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .tabs {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    padding: 14px 20px;
    font-size: 13px;
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  section h2, .card-header h3 { padding: 16px 20px; font-size: 1rem; }
  .card-body { padding: 16px 20px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 20px; padding-right: 20px; }
}

/* ================================================================
   LAYOUT - Sidebar, Header, Content do Painel Admin
   Consistente com Design System dos Prontuários Aprovados
   ================================================================ */

/* === APP LAYOUT === */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.app-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, var(--accent-dark) 0%, #062033 100%);
  color: #fff;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Sidebar Logo / Brand */
.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.sidebar-brand-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}
.nav-section-title {
  padding: 16px 20px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  font-weight: 700;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent-blue);
  border-radius: 0 3px 3px 0;
}
.nav-item i, .nav-item .icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-item .badge, .nav-badge {
  margin-left: auto;
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Sidebar User */
.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
}
.sidebar-user-info {
  flex: 1;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
}

/* Sidebar Overlay (mobile) */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 499;
}

/* === HEADER === */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
#sidebarToggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  box-shadow: none;
  border-radius: 6px;
}
#sidebarToggle:hover {
  color: var(--accent);
  transform: none;
  box-shadow: none;
}
.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.header-search-input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 0.9rem;
  color: var(--ink);
  font-family: inherit;
}
.header-search-input:focus {
  outline: none;
  border-color: var(--focus);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
}
.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-light);
  font-size: 14px;
  pointer-events: none;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  transition: all 0.15s;
  position: relative;
  padding: 0;
  box-shadow: none;
}
.header-icon-btn:hover {
  background: #f1f5f9;
  color: var(--accent);
  transform: none;
  box-shadow: none;
}
.header-icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--card-bg);
}
.header-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  box-shadow: none;
}
.header-user-btn:hover {
  background: #f1f5f9;
  transform: none;
  box-shadow: none;
}
.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}
.header-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

/* === PAGE HEADER === */
.page-header {
  padding: 28px 28px 20px;
}
.page-title {
  font-size: 18pt;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 1.15;
}
.page-subtitle {
  font-size: 0.9rem;
  color: var(--muted-light);
  margin-top: 4px;
}

/* === MAIN CONTENT AREA === */
.main-wrap {
  flex: 1;
  padding: 0 28px 40px;
}

/* === STAT CARDS (padrão ferramentas) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.25s;
  animation: slideUp 0.6s ease-out;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.12);
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-icon.blue { background: rgba(14,165,233,0.1); color: #0284c7; }
.stat-icon.amber { background: rgba(245,158,11,0.1); color: #d97706; }
.stat-icon.red { background: rgba(239,68,68,0.1); color: #dc2626; }
.stat-icon.green { background: rgba(16,185,129,0.1); color: #059669; }
.stat-icon.purple { background: rgba(124,58,237,0.1); color: #7c3aed; }
.stat-info { flex: 1; }
.stat-label {
  font-size: 0.8rem;
  color: var(--muted-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-dark);
  line-height: 1.2;
  margin-top: 2px;
}
.stat-change {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 600;
}
.stat-change.up { color: #059669; }
.stat-change.down { color: #dc2626; }

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.filter-bar select, .filter-bar input {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: #fff;
  min-width: 140px;
  width: auto;
}

/* === SETTINGS NAV (configurações) === */
.settings-nav {
  display: flex;
  gap: 0;
  background: #fff;
  padding: 0 28px;
  flex-wrap: wrap;
}
.settings-nav::before,
.settings-nav::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
}
.settings-nav-item {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 20px 28px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  box-shadow: none;
}
.settings-nav-item:hover {
  color: var(--accent);
  background: transparent;
  transform: none;
  box-shadow: none;
}
.settings-nav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}
.settings-section {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.settings-section.active { display: block; }

/* === TIMELINE / ACTIVITY === */
.timeline {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: #f1f5f9;
  color: var(--muted);
}
.timeline-content { flex: 1; }
.timeline-text {
  font-size: 0.9rem;
  color: var(--ink);
}
.timeline-time {
  font-size: 0.75rem;
  color: var(--muted-light);
  margin-top: 2px;
}

/* === NOTIFICATIONS LIST === */
#notificationsList {
  max-height: 300px;
  overflow-y: auto;
}

/* === RESPONSIVIDADE === */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .app-content { margin-left: 0; }
  #sidebarToggle { display: flex; }
  #sidebarOverlay.active { display: block; }
  .settings-nav {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .settings-nav-item {
    padding: 14px 20px;
    font-size: 13px;
    white-space: nowrap;
  }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header { padding: 0 16px; }
  .page-header { padding: 20px 16px 12px; }
  .page-title { font-size: 16pt; }
  .main-wrap { padding: 0 16px 30px; }
  .header-search { display: none; }
  .filter-bar { padding: 12px 16px; }
  .filter-bar select, .filter-bar input { min-width: 100%; }
}

/* ================================================================
   ADMIN CSS - Painel Administrativo
   Estilos específicos do painel (login, chat, tickets, etc.)
   ================================================================ */

/* === LOGIN PAGE === */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 40px 16px;
}
.login-wrap {
  width: 100%;
  max-width: 480px;
}
/* Brand header (padrão prontuário) */
.brand {
  text-align: center;
  padding-top: 8px;
  margin-bottom: 40px;
  animation: fadeIn 0.6s ease-out;
}
.brand .name {
  font-size: 30.4pt;
  font-weight: 800;
  color: var(--accent-dark);
  line-height: 1.1;
}
.brand .tagline {
  font-size: 19.9pt;
  color: #6b7280;
  font-weight: 400;
  line-height: 1.15;
  margin-top: 6px;
}
.brand .credentials {
  font-size: 13.2pt;
  color: var(--muted2);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 7px;
}
.form-title-box {
  margin-top: 40px;
  text-align: center;
}
.formtitle {
  margin-top: 0;
  font-size: 18pt;
  font-weight: 700;
  color: var(--muted2);
  line-height: 1.15;
  display: inline-block;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Login Card */
.login-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}
.login-card-header {
  padding: 28px 28px 20px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.login-card-header .login-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(15,118,110,0.1);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.login-card-header h1 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 4px;
}
.login-card-header p {
  font-size: 0.85rem;
  color: var(--muted-light);
  margin: 0;
}
.login-card-body {
  padding: 28px;
}
.login-card-body .form-group { margin-bottom: 20px; }
.login-card-body label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.login-card-body input {
  padding: 12px 14px;
}
.password-wrap {
  position: relative;
}
.password-wrap input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted-light);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  box-shadow: none;
  border-radius: 4px;
}
.password-toggle:hover {
  color: var(--accent);
  transform: translateY(-50%);
  box-shadow: none;
}
.login-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.login-extras label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 0.85rem;
  cursor: pointer;
}
.login-extras label input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}
.login-extras a {
  color: var(--accent);
  font-weight: 600;
}
.login-submit {
  width: 100%;
  padding: 12px;
}
.login-card-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  background: #f8fafc;
}
.login-card-footer a {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* 2FA Section */
.twofa-section { display: none; }
.twofa-section.active { display: block; }
.codigo-2fa-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}
.codigo-2fa-inputs input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
}
.codigo-2fa-inputs input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
  background: #fff;
}
/* Recuperar Senha */
.recuperar-section { display: none; }
.recuperar-section.active { display: block; }

/* === CHAT / MENSAGENS (tickets) === */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: 400px;
}
.chat-header {
  padding: 20px 28px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.message {
  max-width: 75%;
  animation: fadeIn 0.3s ease-out;
}
.message.sent {
  align-self: flex-end;
}
.message.received {
  align-self: flex-start;
}
.message-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.message.sent .message-bubble {
  background: var(--accent-dark);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.message.received .message-bubble {
  background: #f1f5f9;
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.message-meta {
  font-size: 0.7rem;
  color: var(--muted-light);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.message.sent .message-meta { justify-content: flex-end; }
.chat-input {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.chat-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border-radius: 12px;
  padding: 10px 14px;
}
.chat-input button {
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
}

/* === TICKET DETAIL === */
.ticket-detail-header {
  padding: 24px 28px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
}
.ticket-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.ticket-info-item {}
.ticket-info-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  margin-bottom: 4px;
}
.ticket-info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

/* === TICKETS STATS ROW === */
.tickets-stats {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  flex-wrap: wrap;
}
.tickets-stat-item {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--muted);
}
.tickets-stat-item.active {
  background: rgba(15,118,110,0.1);
  color: var(--accent);
}

/* === PATIENT CARDS === */
.patient-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all 0.2s;
  cursor: pointer;
}
.patient-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.patient-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15,118,110,0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.patient-info { flex: 1; min-width: 0; }
.patient-name {
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.95rem;
}
.patient-detail {
  font-size: 0.8rem;
  color: var(--muted-light);
}

/* === TASKS === */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all 0.2s;
}
.task-item:hover { border-color: var(--accent); }
.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}
.task-item.completed {
  opacity: 0.6;
}
.task-item.completed .task-title { text-decoration: line-through; }
.task-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.task-due {
  font-size: 0.8rem;
  color: var(--muted-light);
  margin-top: 2px;
}

/* === CALENDAR === */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.calendar-header-cell {
  padding: 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
  color: var(--muted);
}
.calendar-cell {
  background: #fff;
  padding: 8px;
  min-height: 80px;
  font-size: 0.85rem;
}
.calendar-cell.today {
  background: rgba(14,165,233,0.05);
}
.calendar-cell.today .day-num {
  background: var(--accent-blue);
  color: #fff;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-event {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  background: rgba(15,118,110,0.1);
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === CONFIGURAÇÕES (settings) === */
.config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.config-item:last-child { border-bottom: none; }
.config-label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}
.config-desc {
  font-size: 0.8rem;
  color: var(--muted-light);
  margin-top: 2px;
}
/* Switch toggle */
.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* === TEMPLATES LIST === */
.template-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.template-item:hover { border-color: var(--accent); }

/* === RESPONSIVIDADE ADMIN === */
@media (max-width: 900px) {
  .brand .name { font-size: 26px; }
  .brand .tagline { font-size: 16px; }
  .formtitle { font-size: 16pt; }
  .login-wrap { max-width: 100%; padding: 0 4px; }
  .login-card-body { padding: 20px; }
  .chat-container { height: calc(100vh - 180px); }
  .chat-messages { padding: 16px; }
  .message { max-width: 85%; }
  .ticket-info-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .brand .name { font-size: 22px; }
  .brand .tagline { font-size: 14px; }
  .brand .credentials { font-size: 11pt; }
  .codigo-2fa-inputs input { width: 38px; height: 46px; font-size: 1.1rem; }
  .ticket-info-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   PACIENTE CSS - Portal do Paciente
   Consistente com Design System dos Prontuários Aprovados
   ================================================================ */

/* === PACIENTE LOGIN === */
.paciente-login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.paciente-login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.paciente-login-wrap {
  width: 100%;
  max-width: 480px;
}
/* Tabs login/cadastro (padrão ferramentas) */
.login-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.login-tabs::before,
.login-tabs::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.login-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
  box-shadow: none;
}
.login-tab:hover {
  color: var(--accent);
  background: transparent;
  transform: none;
  box-shadow: none;
}
.login-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === PACIENTE LAYOUT === */
.paciente-layout {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.paciente-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.paciente-header-brand {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-dark);
}
.paciente-header-brand span {
  color: var(--accent);
}
.paciente-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.paciente-header-user .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.paciente-header-user .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}
.paciente-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

/* === WELCOME CARD === */
.welcome-card {
  background: linear-gradient(135deg, var(--accent-dark) 0%, #0d4a6e 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 30px;
  animation: slideUp 0.6s ease-out;
}
.welcome-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}
.welcome-card p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
}
.welcome-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}
.welcome-stat {
  text-align: center;
}
.welcome-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
}
.welcome-stat-label {
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* === TICKET LIST === */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--ink);
}
.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.12);
  text-decoration: none;
}
.ticket-card-content { flex: 1; min-width: 0; }
.ticket-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-dark);
  margin-bottom: 4px;
}
.ticket-card-meta {
  font-size: 0.8rem;
  color: var(--muted-light);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticket-card-arrow {
  color: var(--muted-light);
  font-size: 1rem;
  transition: transform 0.25s;
}
.ticket-card:hover .ticket-card-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* === CHAT (portal paciente) === */
.paciente-chat {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 400px;
  overflow: hidden;
}
.paciente-chat-header {
  padding: 20px 24px;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
}
.paciente-chat-header .back-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 10px;
}
.paciente-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.paciente-chat-input {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.paciente-chat-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border-radius: 12px;
  padding: 10px 14px;
}
.paciente-chat-input button {
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
}

/* === FAQ (accordion) === */
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
}
.faq-question {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  transition: background 0.2s;
}
.faq-question:hover { background: #f1f5f9; }
.faq-question .arrow {
  font-size: 0.85rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--line);
}
.faq-item.open .faq-answer { display: block; }

/* === PACIENTE FOOTER === */
.paciente-footer {
  text-align: center;
  padding: 24px 20px;
  color: var(--muted-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.paciente-footer a { color: var(--accent); text-decoration: none; }
.paciente-footer a:hover { text-decoration: underline; }

/* === RESPONSIVIDADE PACIENTE === */
@media (max-width: 768px) {
  .paciente-content { padding: 16px 12px 40px; }
  .welcome-card { padding: 20px; }
  .welcome-card h2 { font-size: 1.1rem; }
  .welcome-stats { gap: 16px; }
  .ticket-card { padding: 16px; }
  .paciente-chat { height: calc(100vh - 160px); }
  .paciente-chat-messages { padding: 16px; }
  .paciente-header { padding: 0 16px; }
}
@media (max-width: 480px) {
  .welcome-stats { flex-wrap: wrap; }
  .login-tab { padding: 12px 16px; font-size: 12px; }
}
