/* AgendaClínica — tema clean */
:root {
  --primary: #0e7490;
  --primary-dark: #155e75;
  --primary-soft: #e0f2f7;
  --ink: #15303a;
  --bg: #f4f6f9;
  --linha: #e7ebf0;
}

body {
  background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #2c3a47;
}

/* Sidebar */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--linha);
  position: sticky;
  top: 0;
  flex-shrink: 0;
}
.brand {
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.brand i { color: var(--primary); font-size: 1.4rem; }
.sidebar .nav-link {
  color: #5a6b7b;
  border-radius: .5rem;
  padding: .55rem .75rem;
  display: flex;
  gap: .6rem;
  align-items: center;
  font-size: .95rem;
}
.sidebar .nav-link:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* Topo */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--linha);
  height: 60px;
}
.user-chip { font-size: .9rem; color: #3c4a59; }
.badge-perfil {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 1rem;
  padding: .15rem .6rem;
  font-size: .75rem;
  white-space: nowrap;
}

/* Componentes */
.card {
  border: none;
  border-radius: .9rem;
  box-shadow: 0 1px 3px rgba(16, 40, 60, .08);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b8a99;
  font-weight: 600;
}
.badge-status-on { color: #0a6b3d !important; background: #d9f2e5 !important; }
.badge-status-off { color: #5a6b7b !important; background: #e9edf1 !important; }

.stat-card .valor { font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-card .icone {
  font-size: 1.5rem;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: .75rem;
  padding: .55rem .75rem;
}

a { color: var(--primary); }

/* Foto de médico */
.foto-medico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.foto-vazia {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.1rem;
}

/* Slots de horário (disponibilidade) */
.slot {
  display: inline-block;
  font-size: .78rem;
  padding: .15rem .45rem;
  border-radius: .4rem;
  margin: 0 .15rem .25rem 0;
  border: 1px solid transparent;
}
.slot-livre {
  background: #d9f2e5;
  color: #0a6b3d;
  border-color: #bfe8d3;
}
.slot-bloqueado {
  background: #fde8e8;
  color: #9b1c1c;
  border-color: #f5c6c6;
  text-decoration: line-through;
}
.slot-ocupado {
  background: #e9edf1;
  color: #5a6b7b;
  border-color: #d8dfe6;
}

/* Status de consulta */
.st-agendada   { background: #e0f2f7 !important; color: #155e75 !important; }
.st-confirmada { background: #dbeafe !important; color: #1e40af !important; }
.st-realizada  { background: #d9f2e5 !important; color: #0a6b3d !important; }
.st-cancelada  { background: #e9edf1 !important; color: #5a6b7b !important; }
.st-falta      { background: #fde8e8 !important; color: #9b1c1c !important; }

/* Portal do paciente */
.portal-bg { background: var(--bg); }
.portal-nav {
  background: #fff;
  border-bottom: 1px solid var(--linha);
  min-height: 58px;
}
.portal-nav-mobile {
  background: #fff;
  border-bottom: 1px solid var(--linha);
}
.nav-link-portal {
  color: #5a6b7b;
  text-decoration: none;
  font-size: .92rem;
}
.nav-link-portal:hover { color: var(--primary-dark); }

/* ============================================================
   Impressão / PDF (window.print)
   ============================================================ */
@media print {
  .no-print, aside.sidebar, header.topbar, .btn, form, nav { display: none !important; }
  .print-only { display: block !important; }
  body, .content { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  a { color: inherit !important; text-decoration: none !important; }
}
@media screen {
  .print-only { display: none !important; }
}

/* Login */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0e7490 0%, #155e75 100%);
  padding: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 1rem;
  padding: 2.2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}
