/* ════════════════════════════════
   ÍCONES SVG (uiIcon) — traço fino, alinhados ao texto ao redor
═══════════════════════════════════ */
.ui-icon {
  vertical-align: -0.18em;   /* alinha com o texto em contextos inline */
  flex-shrink: 0;            /* não encolhe dentro de flex (pills, botões) */
}

/* ════════════════════════════════
   BOTÕES
═══════════════════════════════════ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 14px var(--sp-lg);
  border-radius: 999px;          /* pílula — combina com a redondeza da Nunito */
  border: none;
  font-size: var(--text-base);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 50px;
  letter-spacing: -0.1px;
}

.btn:active { transform: scale(0.97); opacity: 0.9; }

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: var(--btn-shadow);   /* profundidade sutil na cor da marca */
}
.btn-primary:active { background: var(--gold-dark); box-shadow: none; }

/* Botão gradiente (verde claro → verde escuro) — telas de login/cadastro */
.btn-gradient {
  background: linear-gradient(135deg, #90BF99 0%, #4F7455 55%, #2E4E34 100%);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(79, 116, 85, 0.28);
}
.btn-gradient:active { opacity: 0.92; }

.btn-secondary {
  background: var(--gold-pale);
  color: var(--gold);
  border: 1.5px solid var(--gold-light);
}

.btn-lavender {
  background: var(--lavender-light);
  color: var(--lavender-dark);
  border: 1.5px solid var(--lavender);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-blue {
  background: #EBF3FB;
  color: #2980B9;
  border: 1.5px solid #AED6F1;
}
.btn-blue:active { background: #D6EAF8; }

.btn-danger {
  background: var(--danger-pale);
  color: var(--danger);
}

.btn-full { width: 100%; }

/* ── Modal de confirmação (substitui confirm() do navegador) ── */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
}
.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.confirm-box {
  position: relative;
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow-md);
  animation: confirm-pop 0.16s ease-out;
}
@keyframes confirm-pop {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.confirm-message {
  font-size: var(--text-base);
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: var(--sp-lg);
  text-align: center;
}
.confirm-actions {
  display: flex;
  gap: var(--sp-sm);
}
.confirm-actions .btn { flex: 1; }

.btn-sm {
  min-height: 38px;
  padding: 7px 12px;
  font-size: var(--text-sm);
}

.btn-whatsapp {
  background: #E8F8F0;
  color: #1A7A44;
  border: 1.5px solid #82E0AA;
}
.btn-whatsapp:active { background: #D5F5E3; }

.btn-receipt {
  background: var(--lavender-light);
  color: var(--lavender-dark);
  border: 1.5px solid var(--lavender);
}
.btn-receipt:active { background: #EEE0CC; }
.btn-receipt:disabled { opacity: 0.45; pointer-events: none; }

/* Botão Plantões — banner acima da busca de pacientes */
.btn-shifts-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  cursor: pointer;
  margin-bottom: var(--sp-sm);
  overflow: hidden;
  transition: transform 0.12s;
}
.btn-shifts-banner:active { transform: scale(0.992); }

.btn-shifts-banner-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-shifts-banner-label {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-dark);
  text-align: left;
}

.btn-shifts-banner-arrow {
  color: var(--gold);
  flex-shrink: 0;
}

/* Botão ícone (quadrado) */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--gold-pale);
  border: none;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-icon:active { transform: scale(0.9); }

/* Botão ícone pequeno (nav de mês) */
.btn-icon-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--gold-pale);
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.15s;
}
.btn-icon-sm:active { transform: scale(0.88); }

/* ════════════════════════════════
   CARDS
═══════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: var(--sp-md);
  margin-bottom: var(--sp-sm);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  gap: var(--sp-md);
  align-items: center;
}

.card:active {
  transform: scale(0.99);
  background: var(--cream);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.card-age {
  font-size: var(--text-xs);
  color: var(--lavender-dark);
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.card-value {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.2px;
}

/* ── Avatar com iniciais ── */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.avatar-lavender {
  background: var(--lavender-light);
  border-color: var(--lavender);
  color: var(--lavender-dark);
}

/* ════════════════════════════════
   BADGES
═══════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-realizada  { background: var(--gold-pale); color: var(--gold-dark); }
.badge-faltou     { background: #FEF3E8; color: #C06010; }
.badge-cancelou   { background: #f3f3f3; color: #888; }
.badge-pendente   { background: #FFF3CC; color: #B8860B; }
.badge-realizado  { background: var(--gold-pale); color: var(--gold-dark); }
.badge-cancelado  { background: #f3f3f3; color: #888; }
.badge-desmarcou  { background: #fff3e0; color: #e65100; }
.badge-pending    { background: var(--lavender-light); color: var(--lavender-dark); }
.badge-paid       { background: var(--success-pale); color: var(--success); }
.badge-monthly    { background: var(--gold-pale); color: var(--gold-dark); }
.badge-per_session { background: var(--lavender-light); color: var(--lavender-dark); }
.badge-inactive   { background: #f0f0f0; color: #999; }

/* ── Mood picker ── */
.mood-picker {
  display: flex;
  gap: 6px;
}
.mood-btn {
  flex: 1;
  padding: 6px;
  border: 2px solid transparent;
  background: var(--cream);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s;
  opacity: 0.72;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mood-btn:hover  { opacity: 0.88; }
.mood-btn.active { border-color: var(--gold); opacity: 1; transform: scale(1.06); background: var(--gold-pale); }

/* Ícones de mood — SVG inline */
.mood-btn svg { display: block; flex-shrink: 0; }
.mood-icon-inline { display: inline-block; vertical-align: middle; margin-left: 4px; }
.label-opt { color: var(--text-muted); font-weight: 400; font-size: 0.85em; margin-left: 4px; }

/* ════════════════════════════════
   INPUTS E CAMPOS
═══════════════════════════════════ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.label-hint {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--lavender-dark);
  letter-spacing: 0;
}

.input {
  width: 100%;
  padding: 13px var(--sp-md);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: var(--text-base);
  font-family: var(--font);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.input:focus {
  border-color: var(--gold);
  background: var(--white);
}

.input::placeholder { color: #C8B8A4; }

.textarea {
  resize: none;
  line-height: 1.5;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A7560' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.input-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A7560' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 40px;
}

/* ── Segmented control ── */
.segmented-control {
  display: flex;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 3px;
}

.segment {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: calc(var(--r-md) - 4px);
  background: none;
  font-size: var(--text-sm);
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.segment.active {
  background: var(--white);
  color: var(--gold);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ── Card inativo / desbotado (sessão com falta ou cancelamento) ── */
.card--inactive { opacity: 0.6; }
.card--faded    { opacity: 0.55; }

.avatar--inactive {
  background: #f0f0f0;
  border-color: #ddd;
  color: #aaa;
}

/* ── Checkbox customizado ── */
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}

.checkbox-native {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-native:checked + .checkbox-custom {
  background: var(--gold);
  border-color: var(--gold);
}

.checkbox-native:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2.5px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.checkbox-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-dark);
}

/* ── Divisor ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-md) 0;
}

/* ── Seção de título inline ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-sm);
}

.section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--lavender-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ════════════════════════════════
   CALENDÁRIO MENSAL
═══════════════════════════════════ */
.calendar-section {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: var(--sp-md) var(--sp-sm) var(--sp-sm);
  margin-top: var(--sp-md);
  overflow: hidden;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
  padding: 0 2px;
}

.cal-month-title {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.cal-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 6px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);   /* aparece nos vãos de 1px → grade sutil */
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 1px 5px;
  border-radius: 0;            /* células quadradas tilam a grade sem falhas */
  cursor: pointer;
  background: var(--white);
  border: none;
  min-height: 50px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  gap: 3px;
  font-family: var(--font);
}

/* Listras alternadas por linha (zebra: semanas ímpares com tom mais visível) */
.cal-day:nth-child(n+1):nth-child(-n+7),
.cal-day:nth-child(n+15):nth-child(-n+21),
.cal-day:nth-child(n+29):nth-child(-n+35) {
  background: var(--cal-stripe);
}

.cal-day:nth-child(n):active { background: var(--gold-pale); }

/* Evento pessoal — só o contorno do bonequinho, na fileira entre as bolinhas */
.cal-event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  flex-shrink: 0;
}
.cal-event-icon .ui-icon { stroke-width: 2.2; }

.cal-day--other-month {
  opacity: 0.2;
  pointer-events: none;
}

.cal-day-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-day--today .cal-day-num {
  background: none;
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
}

.cal-day--today {
  background: var(--gold-pale) !important;
  box-shadow: inset 0 0 0 2px var(--gold);
  border-radius: var(--r-sm);
}

.cal-day--today:active {
  background: var(--gold-light) !important;
}

.cal-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 18px;
}

.cal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  min-width: 17px;
  padding: 0 4px;
  border-radius: 9px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--white);
  background: var(--gold);
  flex-shrink: 0;
  line-height: 1;
}

.cal-badge--pending {
  background: #FFF3CC;
  color: #B8860B;
}

.cal-badge--shift {
  background: var(--lavender-dark);
  letter-spacing: 0.3px;
  font-size: 8.5px;
}
/* Ícone SVG de hospital (usuárias genéricas) dentro do badge do calendário */
.cal-badge--shift svg { width: 10px; height: 10px; display: block; }

/* Ícone de hospital genérico (banner de plantões + header da página) */
.shift-svg { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--lavender-dark); }
.shift-svg svg { width: 100%; height: 100%; }
.shift-svg--banner {
  width: 36px;
  height: 36px;
  margin: 0;
  box-sizing: border-box;
  padding: 8px;
  border-radius: 10px;
  background: var(--white);
  color: var(--gold-dark);
}
.shift-svg--header { width: 34px; height: 34px; }
.shifts-brand-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-sm);
}
.shifts-header-generic {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--gold-pale);
  border-radius: var(--r-md);
  padding: 8px 14px;
}

.cal-badge--event {
  background: #2980B9;
  letter-spacing: 0.3px;
  font-size: 8.5px;
}

/* Indicadores normais: flex row */
.cal-indicators {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin-top: 2px;
}

/* 3 badges simultâneos: estilo cartas sobrepostas */
.cal-indicators--stacked {
  position: relative;
  display: block;
  height: 15px;
  width: 32px;
  margin: 2px auto 0;
}
.cal-indicators--stacked .cal-badge {
  position: absolute;
  top: 0;
  height: 15px;
  min-width: 15px;
  font-size: 8px;
  padding: 0 3px;
}
.cal-indicators--stacked .cal-badge:nth-child(1) { left: 0px;  z-index: 1; }
.cal-indicators--stacked .cal-badge:nth-child(2) { left: 8px;  z-index: 2; }
.cal-indicators--stacked .cal-badge:nth-child(3) { left: 16px; z-index: 3; }

.cal-legend {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  padding: var(--sp-sm) 0 4px;
  border-top: 1px solid var(--border);
  margin-top: var(--sp-sm);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ════════════════════════════════
   PAINEL INLINE DE DIA (aba Hoje)
═══════════════════════════════════ */
.day-panel-card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

/* Barra de navegação */
.day-panel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--sp-md) 10px;
  background: var(--gold-pale);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.day-panel-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gold-pale);
  border: none;
  border-radius: var(--r-sm);
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.day-panel-nav-btn:active { background: var(--gold-light); }

.day-panel-nav-center {
  flex: 1;
  text-align: center;
  padding: 0 var(--sp-sm);
}

.day-panel-nav-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}

.day-panel-nav-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border);
  padding: 1px 8px;
  border-radius: 20px;
}
.day-panel-nav-tag--today {
  color: var(--white);
  background: var(--gold);
  font-weight: 600;
}

/* Faixa de contexto (plantão / eventos) */
.day-panel-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px var(--sp-md);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.day-panel-ctx-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
}
.day-panel-ctx-pill--shift {
  background: var(--lavender-light);
  color: var(--lavender-dark);
}
.day-panel-ctx-pill--event {
  background: #EBF3FB;
  color: #2980B9;
}

/* Grupos de período (Manhã / Tarde) */
.day-panel-body {
  position: relative;
  min-height: 180px;
}

.day-panel-group {
  padding: 8px var(--sp-md) 4px;
  border-bottom: 1px solid var(--border);
}
.day-panel-group:last-child { border-bottom: none; }

.day-panel-group-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* Linhas de paciente */
.day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  -webkit-tap-highlight-color: transparent;
}
.day-row:last-child { border-bottom: none; }

.day-row--realized {
  cursor: pointer;
  transition: background 0.13s;
  margin: 0 calc(-1 * var(--sp-md));
  padding-left: var(--sp-md);
  padding-right: var(--sp-md);
}
.day-row--realized:active { background: var(--gold-pale); }

.day-row--planned {
  cursor: pointer;
  transition: background 0.13s;
  margin: 0 calc(-1 * var(--sp-md));
  padding-left: var(--sp-md);
  padding-right: var(--sp-md);
}
.day-row--planned:active { background: #fef3c7; }

.day-row--future {
  cursor: default;
  opacity: 0.65;
}

.day-row-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.day-row-avatar--muted {
  background: var(--border);
  color: var(--text-muted);
}

/* Ponto colorido de status (canto do avatar) — leitura rápida da agenda */
.day-row-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-sizing: border-box;
}
.day-row-dot--done    { background: var(--success); }
.day-row-dot--planned { background: #D97706; }
.day-row-dot--future  { background: var(--text-muted); }

.day-row-info {
  flex: 1;
  min-width: 0;
}
.day-row-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-row-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Estado vazio */
.day-panel-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--sp-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.day-panel-watermark-img {
  width: 72px;
  opacity: 0.18;
  display: block;
  user-select: none;
  margin: auto;
}
.day-empty-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}
.day-empty-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.8;
  margin: 4px 0 0;
}

/* Botão Nova ação */
.day-panel-footer {
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
  border-top: 1px solid var(--border);
}

/* ── Day detail ── */
.day-detail-date {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: var(--sp-md);
  letter-spacing: -0.2px;
}

.day-shift-card {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: var(--lavender-light);
  border: 1.5px solid var(--lavender);
  border-radius: var(--r-md);
  padding: 12px var(--sp-md);
  margin-bottom: var(--sp-md);
}

.day-shift-info { flex: 1; }

.day-shift-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
}

.day-shift-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.day-shift-logo {
  max-height: 36px;
  max-width: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

.day-shift-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.day-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: var(--sp-sm) 0;
}

/* ── Resumo de atendimento (dentro do popup do dia) ── */
.day-sum-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
}

.day-sum-back,
.day-sum-edit {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.day-sum-back { color: var(--text-muted); }
.day-sum-edit { color: var(--gold); background: var(--gold-pale); }

.day-sum-patient-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.day-sum-patient-info { flex: 1; min-width: 0; }

.day-sum-patient-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.day-sum-patient-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.day-sum-value {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--gold-dark);
  white-space: nowrap;
}

.day-sum-notes {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
}

.day-sum-notes-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-sm);
}

.day-sum-notes-text {
  font-size: var(--text-sm);
  color: var(--text-dark);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ── Day panel (novo design do popup do dia) ── */
.day-panel-header {
  text-align: center;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-md);
}

.day-panel-weekday {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}

.day-panel-date {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
}

.day-panel-section {
  margin-bottom: var(--sp-md);
}

.day-panel-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-panel-count {
  background: var(--gold-pale);
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  letter-spacing: 0;
}

.day-panel-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--sp-lg) 0 var(--sp-md);
}

.day-detail-fab {
  margin-top: var(--sp-md);
}

/* Rows: realizados */
.day-appts-list,
.day-planned-list {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.day-appt-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
  cursor: pointer;
  transition: background 0.15s;
}
.day-appt-row:active { background: var(--gold-pale); }
.day-appt-row + .day-appt-row { border-top: 1px solid var(--border); }

.day-planned-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
  cursor: pointer;
  transition: background 0.15s;
}
.day-planned-row:active { background: #fef3c7; }
.day-planned-row + .day-planned-row { border-top: 1px solid var(--border); }

.day-appt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.day-appt-avatar--muted {
  background: var(--border);
  color: var(--text-muted);
}

.day-appt-info {
  flex: 1;
  min-width: 0;
}

.day-appt-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
}

.day-appt-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

.day-planned-badge {
  font-size: 10px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.day-planned-row--future {
  cursor: default;
  opacity: 0.7;
}
.day-planned-row--future:active { background: none; }

/* Card de confirmação rápida no action sheet */
.day-confirm-card {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: var(--r-md);
  padding: 12px var(--sp-md);
  margin-bottom: var(--sp-md);
}

.day-confirm-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
}

.day-confirm-period {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Redesign: Confirm sheet header ── */
.day-confirm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.day-confirm-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.day-confirm-patient-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.day-confirm-patient-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 3px;
}

.day-confirm-date-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-dark);
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 5px;
}

.day-confirm-mood-wrap {
  margin-bottom: 14px;
}

.day-confirm-mood-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.day-confirm-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  margin-bottom: 12px;
  box-shadow: var(--btn-shadow);
}
.day-confirm-primary-btn:active { background: var(--gold-dark); transform: scale(0.98); }

/* ── Grid 2×2 de ações ── */
.day-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.day-confirm-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 12px 16px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.day-confirm-action:active { opacity: 0.8; transform: scale(0.96); }

.day-confirm-action--green { background: #eafaf1; }
.day-confirm-action--blue  { background: #ebf5fb; }
.day-confirm-action--amber { background: #fef9e7; }
.day-confirm-action--red   { background: #fde8e8; }

.dca-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dca-icon-circle--green { background: #27ae60; color: #fff; }
.dca-icon-circle--blue  { background: #2980b9; color: #fff; }
.dca-icon-circle--amber { background: #e67e22; color: #fff; }
.dca-icon-circle--red   { background: var(--danger); color: #fff; }

.dca-label {
  font-size: 13px;
  font-weight: 700;
}
.day-confirm-action--green .dca-label { color: #1e8449; }
.day-confirm-action--blue  .dca-label { color: #1a5276; }
.day-confirm-action--amber .dca-label { color: #a04000; }
.day-confirm-action--red   .dca-label { color: var(--danger); }

.day-confirm-action--disabled,
.day-confirm-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.week-future-notice {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--lavender-light);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  margin-top: var(--sp-xs);
}

/* Rows: eventos */
.day-events-list {
  background: #f0f7fd;
  border: 1px solid #aed6f180;
  border-radius: var(--r-md);
  overflow: hidden;
}

.day-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
}
.day-event-row + .day-event-row {
  border-top: 1px solid #aed6f150;
}

.day-event-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #1a5276;
  flex: 1;
  min-width: 0;
}

.day-event-meta {
  font-size: 10px;
  font-weight: 600;
  color: #2980b9;
  background: #d6eaf8;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ── Day Delete Sheet ── */
.day-delete-subtitle {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: var(--sp-sm);
}

.day-delete-list {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}

.day-delete-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 11px var(--sp-md);
}
.day-delete-item + .day-delete-item {
  border-top: 1px solid var(--border);
}

.day-delete-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.day-delete-icon--lavender { background: var(--lavender-light); color: var(--lavender-dark); }
.day-delete-icon--blue     { background: #ebf5fb; color: #2980b9; }
.day-delete-icon--gold     { background: #fef3c7; color: #d97706; }

.day-delete-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.day-delete-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-delete-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.day-delete-btn {
  background: none;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font);
}
.day-delete-btn:active {
  background: var(--danger);
  color: #fff;
}

/* ── Day Action Sheet ── */
.day-action-header {
  position: relative;
  margin-bottom: var(--sp-md);
}
.day-action-header .day-action-date {
  margin-bottom: 0;
}
.day-action-header .plan-week-add-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.day-action-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-dark);
  text-align: center;
  margin-bottom: var(--sp-md);
  padding: 7px 18px;
  background: var(--gold-pale);
  border-radius: 999px;
  display: inline-block;
  margin-left: 50%;
  transform: translateX(-50%);
}

.day-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(196, 168, 220, 0.12);
  border: 1px solid rgba(196, 168, 220, 0.35);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin-bottom: var(--sp-md);
}
.day-summary-row {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.day-summary-row--shift  { color: var(--lavender-dark); }
.day-summary-row--appt   { color: #1a7a3a; }
.day-summary-row--planned { color: #c49a00; }
.day-summary-row--event  { color: #4a85cd; }

.day-action-list {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}

.day-action-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  padding: 14px var(--sp-md);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.day-action-item:last-child { border-bottom: none; }
.day-action-item:active { background: var(--gold-pale); }

.day-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.day-action-icon--green   { background: #eafaf1; color: #27ae60; }
.day-action-icon--gold    { background: #fef3c7; color: #d97706; }
.day-action-icon--blue    { background: #ebf5fb; color: #2980b9; }
.day-action-icon--lavender { background: var(--lavender-light); color: var(--lavender-dark); }
.day-action-icon--red     { background: #fde8e8; color: var(--danger); }

.day-action-label {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dark);
}
.day-action-label--danger { color: var(--danger); font-weight: 600; }

.day-action-chevron {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.day-action-chevron--danger { color: var(--danger); }

.day-action-item--danger:active { background: #fde8e8; }

/* ── Agenda Month View — read-only day cards ── */
.agenda-day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.agenda-day-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  transition: background 0.15s;
}
.agenda-day-item:active { background: var(--gold-pale); }

.agenda-day-item--pending {
  background: var(--cream);
  border-style: dashed;
}

.agenda-day-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.agenda-day-item-body {
  flex: 1;
  min-width: 0;
}

.agenda-day-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-day-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 3px 0 0;
}

.agenda-day-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px 0 8px;
}

.day-action-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--sp-xs) 0 var(--sp-sm);
  cursor: pointer;
}

.day-action-sub-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-sm);
}

.day-action-period-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-sm);
}

.day-action-period-btn {
  padding: 14px var(--sp-md);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.day-action-period-btn:active { background: var(--gold-pale); }

/* ════════════════════════════════
   SELEÇÃO DE SESSÕES (Pagamento)
═══════════════════════════════════ */
.appt-check-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: var(--sp-md) 0 var(--sp-sm);
}

.appt-check-card {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 11px var(--sp-sm);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--cream);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.appt-check-card.selected {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.appt-check-card:active { transform: scale(0.99); }

.appt-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.15s;
}

.appt-check-box.checked {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.appt-check-body { flex: 1; min-width: 0; }

.appt-check-date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
}

.appt-check-period {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

.appt-check-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.pay-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md);
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: var(--r-md);
  margin: var(--sp-sm) 0 var(--sp-md);
}

.pay-total-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.pay-total-value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.3px;
}

/* ── Logo mini no cabeçalho ── */
.header-logo-mini {
  height: 34px;
  width: auto;
  opacity: 0.82;
  flex-shrink: 0;
  order: 10;          /* sempre o último item do header → fixo no canto direito */
  margin-left: 4px;
}

/* ── Input currency desabilitado ── */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ════════════════════════════════
   PLANEJAMENTO SEMANAL
═══════════════════════════════════ */
.plan-disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  padding: var(--sp-xs) 0 var(--sp-md);
  letter-spacing: 0.1px;
}

.plan-week-day {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-sm);
  overflow: hidden;
}

.plan-week-day--today { border-color: var(--gold); }
.plan-week-day--today .plan-day-header { background: var(--gold-pale); }
.plan-week-day--shift .plan-day-header { background: var(--lavender-light); }
.plan-week-day--shift { border-color: var(--lavender); }

/* Dia com evento dia-todo — borda e header azul */
.plan-week-day--event { border-color: #AED6F1; }
.plan-week-day--event .plan-day-header { background: #EBF3FB; }

/* Dia passado — opacidade reduzida, travado */
.plan-week-day--past { opacity: 0.72; }
.plan-week-day--past .plan-day-header { background: var(--cream); }

.plan-past-lock {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.plan-past-content {
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
}

.plan-past-period {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.plan-past-period-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 38px;
}

.plan-past-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.plan-past-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 8px;
}

.plan-past-empty {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

.plan-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--border);
  gap: var(--sp-sm);
}

.plan-day-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-day-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
}

.plan-day-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.plan-day-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-day-add-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: transparent;
  border: 1.5px solid var(--gold-light);
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.plan-day-add-btn:active { opacity: 0.6; }

.plan-week-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--gold-light);
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.plan-week-add-btn:active {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.plan-capacity {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.plan-capacity--shift {
  background: var(--lavender-light);
  color: var(--lavender-dark);
}

.plan-event-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--font);
  flex-shrink: 0;
}
.plan-event-btn:active { opacity: 0.6; }

/* Day-level events (period: all) — azul */
.plan-day-events {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px var(--sp-md);
  background: rgba(74, 133, 205, 0.07);
  border-left: 3px solid rgba(74, 133, 205, 0.30);
  border-bottom: 1px solid var(--border);
}

/* Period sections */
.plan-period {
  border-top: 1px solid var(--border);
}

/* Período bloqueado por plantão — roxo */
.plan-period--blocked {
  background: rgba(196, 168, 220, 0.13);
  border-left: 3px solid rgba(155, 125, 190, 0.38);
}

/* Período bloqueado por evento pessoal — azul */
.plan-period--event-blocked {
  background: rgba(41, 128, 185, 0.06);
  border-left: 3px solid rgba(41, 128, 185, 0.35);
}

.plan-period-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px var(--sp-md);
}

.plan-period-icon {
  font-size: 12px;
  line-height: 1;
}

.plan-period-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
}

.plan-period-shift-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--lavender-dark);
  background: var(--lavender-light);
  padding: 2px 7px;
  border-radius: 10px;
}

/* Tag de evento no header do período */
.plan-period-event-tag {
  font-size: 10px;
  font-weight: 700;
  color: #2980B9;
  background: #EBF3FB;
  border: 1px solid #AED6F1;
  padding: 2px 6px 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-event-remove {
  background: none;
  border: none;
  color: #2980B9;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  flex-shrink: 0;
}
.plan-event-remove:active { opacity: 1; }

/* Badge de evento dia-todo no header do dia */
.plan-alldayevent-tag {
  font-size: 10px;
  font-weight: 700;
  color: #2980B9;
  background: #D6EAF8;
  border: 1px solid #AED6F1;
  padding: 2px 4px 2px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-alldayevent-remove {
  background: none;
  border: none;
  color: #2980B9;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  flex-shrink: 0;
}
.plan-alldayevent-remove:active { opacity: 1; }

.plan-period-content {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px var(--sp-md) 8px;
  align-items: center;
}

.plan-period-add {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: none;
  border: 1px dashed var(--gold-light);
  border-radius: 14px;
  padding: 3px 9px;
  cursor: pointer;
  font-family: var(--font);
}
.plan-period-add:active { opacity: 0.6; }

/* Patient chips */
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: 20px;
  padding: 3px 8px 3px 10px;
  cursor: pointer;
  transition: opacity 0.12s;
}
.plan-chip:active { opacity: 0.6; }

.plan-chip-remove {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1;
  margin-left: 1px;
}

.plan-chip-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-dark);
}


.plan-chip-period {
  font-size: 9px;
  font-weight: 700;
  color: var(--lavender-dark);
  background: rgba(196,168,220,0.3);
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1.4;
}

.plan-chip-twice {
  font-size: 9px;
  font-weight: 700;
  color: #2980b9;
  background: #d6eaf8;
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1.4;
}

/* Chip de atendimento realizado — verde */
.plan-chip--realized {
  background: #E8F8F0;
  border-color: #82E0AA;
  cursor: default;
}
.plan-chip--realized:active { opacity: 1; }
.plan-chip--realized .plan-chip-name { color: #1E8449; }
.plan-chip-check {
  font-size: 11px;
  color: #27AE60;
  font-weight: 700;
  line-height: 1;
}

/* Event chips (personal events) — azul */
.plan-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(74, 133, 205, 0.10);
  border: 1px solid rgba(74, 133, 205, 0.28);
  border-radius: 20px;
  padding: 3px 4px 3px 9px;
  font-size: 12px;
  color: #2C6BAD;
}

.plan-event-chip--day {
  font-weight: 600;
}

.plan-event-title {
  font-weight: 500;
}

/* Period tabs inside planning sheet */
.plan-sheet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: var(--sp-md);
  flex-wrap: wrap;
}

.plan-sheet-tab {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 4px;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
}

.plan-sheet-tab--active {
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

.plan-sheet-tab--disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.plan-sheet-tab-count {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 1px;
}

/* Planning sheet patient list */
.plan-sheet-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 12px var(--sp-sm);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.1s;
}
.plan-sheet-item:last-child { border-bottom: none; }
.plan-sheet-item:active { background: var(--gold-pale); }
.plan-sheet-item--on { background: var(--gold-pale); }

.plan-sheet-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.plan-sheet-check--on {
  background: var(--gold);
  border-color: var(--gold);
}

.plan-sheet-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  min-width: 0;
}

.plan-sheet-name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-dark);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-sheet-badges {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.plan-sheet-freq {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--lavender-light);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.plan-sheet-period {
  font-size: var(--text-xs);
  color: var(--lavender-dark);
  background: var(--lavender-light);
  border: 1px solid var(--lavender);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.plan-freq-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--border);
  padding: 2px 7px;
  border-radius: 10px;
}
.plan-freq-count--done {
  background: rgba(39, 174, 96, 0.15);
  color: var(--success);
}

/* Event sheet period selector */
.event-period-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.event-period-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.event-period-btn--active {
  background: #ebf5fb;
  border-color: #aed6f1;
  color: #2980b9;
}
.event-period-btn:active { opacity: 0.7; }

/* ════════════════════════════════
   ABA AGENDA — TOGGLE
═══════════════════════════════════ */
.agenda-toggle-bar {
  padding: var(--sp-xs) var(--sp-md) 0;
  flex-shrink: 0;
}

/* ════════════════════════════════
   ABA SEMANA — SESSÕES
═══════════════════════════════════ */
.week-sessions-list { padding: 2px 0 4px; }

.week-session-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--white);
  border-radius: var(--r-md);
  margin-bottom: 6px;
  box-shadow: 0 1px 5px rgba(46,78,52,.07);
  cursor: pointer;
  transition: opacity 0.15s;
}
.week-session-card:active { opacity: 0.75; }
.week-session-card--past { cursor: default; }
.week-session-card--past:active { opacity: 1; }
.week-session-card--pending {
  border: 1.5px dashed var(--lavender);
  box-shadow: none;
  background: var(--lavender-light);
}

.week-badge-pending {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--lavender);
  color: var(--lavender-dark);
  flex-shrink: 0;
}

.week-session-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  min-width: 40px;
  flex-shrink: 0;
}
.week-session-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
}

.week-empty-day {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0 6px;
}

.week-day-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}


/* ════════════════════════════════
   HOJE — BLOCOS UNIFICADOS
═══════════════════════════════════ */

.today-block {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

.today-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--sp-md);
  background: var(--gold-pale);
  border-bottom: 1px solid var(--border);
}

.today-block-header--plan {
  background: var(--lavender-light);
  border-bottom-color: var(--lavender);
}
.today-block-header--plan .today-block-title {
  color: var(--lavender-dark);
}

.today-block-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold-dark);
}

.today-block-date-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.today-block-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.today-block-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gold);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font);
}
.today-block-link:active { opacity: 0.6; }

.today-block-empty {
  padding: var(--sp-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Agrupamento por período — atendimentos */
.today-period-group + .today-period-group {
  border-top: 1px solid var(--border);
}

.today-period-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px var(--sp-md) 2px;
}

.today-appt-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 9px var(--sp-md);
}
.today-appt-row + .today-appt-row {
  border-top: 1px solid var(--border);
}

.today-appt-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-dark);
  flex-shrink: 0;
}

.today-appt-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.today-appt-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold-dark);
  flex-shrink: 0;
}

/* Bloco de planejamento */
#today-plan-block { margin-top: var(--sp-md); }

.today-plan-alldayevents {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.today-plan-periods > .today-plan-period + .today-plan-period {
  border-top: 1px solid var(--border);
}

.today-plan-period {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 8px var(--sp-md);
  flex-wrap: wrap;
}

.today-plan-period-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.today-plan-period-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 100px;
}

.today-plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.today-plan-pat-chip {
  display: inline-flex;
  align-items: center;
  background: var(--lavender-light);
  border: 1.5px solid var(--lavender);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lavender-dark);
  cursor: pointer;
  font-family: var(--font);
}
.today-plan-pat-chip:active { opacity: 0.6; }

.today-plan-event-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(74, 133, 205, 0.10);
  border: 1px solid rgba(74, 133, 205, 0.28);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #2C6BAD;
}

/* ════════════════════════════════
   ANIVERSÁRIOS
═══════════════════════════════════ */
.birthday-card {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: #FCE8E8;
  border: 1.5px solid #F1A8A8;
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-sm);
  cursor: pointer;
  transition: opacity 0.15s;
}
.birthday-card:active { opacity: 0.75; }

.birthday-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.birthday-body { flex: 1; min-width: 0; }

.birthday-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #A93226;
}

.birthday-age {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

/* ════════════════════════════════
   SEMANA EM NÚMEROS
═══════════════════════════════════ */
.week-stats-pill {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--lavender-light);
  border: 1.5px solid var(--lavender);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-sm);
}

.week-stats-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.week-stats-emoji {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}

.week-stats-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--lavender-dark);
  white-space: nowrap;
}

.week-stats-sep {
  font-size: var(--text-xs);
  color: var(--lavender);
}

.week-stats-value {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ════════════════════════════════
   PENDÊNCIAS FINANCEIRAS (aba Hoje)
═══════════════════════════════════ */
.today-pending-card {
  background: #FEF3E8;
  border: 1.5px solid #F4A261;
  border-radius: var(--r-md);
  margin-bottom: var(--sp-sm);
  overflow: hidden;
}

.today-pending-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 14px var(--sp-md);
  cursor: pointer;
  user-select: none;
}

.today-pending-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F4A261;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.today-pending-body { flex: 1; min-width: 0; }

.today-pending-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #7C3A00;
  margin: 0;
}

.today-pending-sub {
  font-size: var(--text-xs);
  color: #A04000;
  margin-top: 3px;
}

.today-pending-chevron {
  flex-shrink: 0;
  color: #A04000;
  transition: transform 0.2s ease;
}
.today-pending-card.is-open .today-pending-chevron {
  transform: rotate(180deg);
}

.today-pending-list {
  display: none;
  border-top: 1px solid rgba(244, 162, 97, 0.5);
  background: var(--white);
}
.today-pending-card.is-open .today-pending-list {
  display: block;
}

.pending-patient-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
  border-bottom: 1px solid rgba(244, 162, 97, 0.25);
}
.pending-patient-row:last-child { border-bottom: none; }

.pending-patient-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.pending-patient-info { flex: 1; min-width: 0; }

.pending-patient-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-patient-value {
  font-size: var(--text-xs);
  color: #A04000;
  margin-top: 1px;
}

.pending-cobrar-btn {
  flex-shrink: 0;
  background: #E07820;
  border: 1.5px solid #E07820;
  color: #fff;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.pending-cobrar-btn:active { opacity: 0.8; }

/* ════════════════════════════════
   PRÓXIMAS SESSÕES (aba Hoje) — variante verde do accordion
═══════════════════════════════════ */
.today-upcoming-card {
  background: var(--gold-pale);
  border-color: var(--gold-light);
}
.today-upcoming-card .today-pending-title { color: var(--gold-dark); }
.today-upcoming-card .today-pending-sub   { color: var(--text-muted); }
.today-upcoming-card .today-pending-chevron { color: var(--gold-dark); }
.today-upcoming-card .today-pending-list {
  border-top-color: var(--gold-light);
}

.today-upcoming-icon {
  background: var(--gold);
}

.upcoming-remind-btn {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
}

.upcoming-date-group + .upcoming-date-group {
  border-top: 1px solid var(--border);
}

.upcoming-date-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gold-dark);
  padding: 8px var(--sp-md) 2px;
  margin: 0;
  background: var(--gold-pale);
}

/* ════════════════════════════════
   PREVIEW DE AMANHÃ (aba Hoje)
═══════════════════════════════════ */
.today-tomorrow-card {
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-sm);
}

.tmrw-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold-dark);
  margin: 0 0 6px;
}

.tmrw-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
}

.tmrw-period {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 60px;
}

.tmrw-names {
  font-size: var(--text-xs);
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Card da cliente (lista) — avatar circular ── */
.pcard {
  display: flex;
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(46, 78, 52, 0.08);
  transition: transform 0.12s, box-shadow 0.15s;
}
.pcard:active { transform: scale(0.992); }
.pcard-rail { display: none; }
.pcard-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.pcard-body {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 12px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pcard-info { flex: 1; min-width: 0; }
.pcard-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}
.pcard-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.3px;
  text-align: right;
  flex-shrink: 0;
}
.pcard-val small {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.pcard--inactive { opacity: 0.62; }

/* ── Alerta de sessões pendentes de meses anteriores ── */
.overdue-alert {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--white);
  border: 1px solid rgba(192, 57, 43, 0.12);
  border-radius: var(--r-md);
  padding: 14px var(--sp-md);
  margin-bottom: var(--sp-md);
  box-shadow: 0 2px 10px rgba(192, 57, 43, 0.10);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.overdue-alert:active {
  transform: scale(0.99);
  box-shadow: 0 1px 5px rgba(192, 57, 43, 0.10);
}
.overdue-alert__chip {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--danger-pale);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
}
.overdue-alert__body { flex: 1; min-width: 0; }
.overdue-alert__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}
.overdue-alert__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.overdue-alert__amount {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--danger);
  margin-top: 3px;
}
.overdue-alert__arrow {
  flex-shrink: 0;
  color: var(--danger);
  opacity: 0.65;
}

/* ════════════════════════════════
   SALDO A FAVOR (crédito do cliente) — bottomsheet de Finanças
═══════════════════════════════════ */
.fin-saldo-card {
  margin-top: var(--sp-sm);
  padding: 12px var(--sp-md);
  background: var(--success-pale);
  border: 1px solid rgba(39, 174, 96, 0.25);
  border-radius: var(--r-md);
}
.fin-saldo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.fin-saldo-lbl {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.fin-saldo-amt {
  font-size: 15px;
  font-weight: 800;
  color: var(--success);
}
.fin-saldo-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 8px 0 6px;
}

/* ════════════════════════════════
   RESUMO FINANCEIRO EM 3 MINI-CARDS (bottomsheet do cliente)
═══════════════════════════════════ */
.fin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: var(--sp-sm) 0 2px;
}
.fin-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--lavender-light);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 6px;
}
.fin-stat--billed {
  background: var(--lavender-light);
  border-color: rgba(155, 122, 90, 0.20);
}
.fin-stat--paid {
  background: var(--success-pale);
  border-color: rgba(39, 174, 96, 0.22);
}
.fin-stat--due {
  background: var(--danger-pale);
  border-color: rgba(192, 57, 43, 0.18);
}
.fin-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.fin-stat-val--paid { color: var(--success); }
.fin-stat-val--due  { color: var(--danger); }
.fin-stat-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Divisória entre a ação principal (Registrar pagamento) e as secundárias */
.fin-action-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-md) 0 var(--sp-sm);
}

/* ── Card financeiro (lista) — bloco de status lateral ── */
.fcard {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 42, 74, 0.06);
  transition: transform 0.12s;
}
.fcard:active { transform: scale(0.992); }
.fcard-main {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.fcard-info { min-width: 0; }
.fcard-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}
.fcard-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fcard-side {
  width: 110px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
}
.fcard-side-lbl {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.9;
}
.fcard-side-amt {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.fcard-side--pend { background: #FCEEDA; color: #B5781A; }
.fcard-side--quit { background: #E4F3EA; color: #2E7D4F; }

/* ── Chips de info no card do paciente (lista) ── */
.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.card-chip {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-dark);
  background: var(--gold-pale);
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 1.5;
}
.card-chip--period {
  color: var(--lavender-dark);
  background: var(--lavender-light);
}

/* ════════════════════════════════
   RESUMO DO PACIENTE — HERO (cabeçalho com gradiente + onda)
═══════════════════════════════════ */
.patient-hero {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  margin-bottom: var(--sp-md);
  box-shadow: 0 4px 16px rgba(27, 42, 74, 0.10);
}
.patient-hero .brand-wave { height: 66px; }

/* Anel de progresso de recebimento no hero */
.hero-ring-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.hero-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-ring-hole {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-ring-hole span { font-size: 12px; font-weight: 800; letter-spacing: -0.3px; }
.hero-ring-cap {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.patient-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.patient-hero-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
}

.patient-hero-info { flex: 1; min-width: 0; }

.patient-hero-name {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin: 0 0 2px;
}

.patient-hero-diag {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 7px;
}

.patient-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ════════════════════════════════
   RESUMO DO PACIENTE — PROFILE CARD
═══════════════════════════════════ */
.summary-profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  margin-bottom: var(--sp-md);
  box-shadow: var(--shadow-sm);
}

.summary-profile-top {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.summary-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  font-size: var(--text-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.summary-profile-info {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.summary-profile-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin: 0 0 3px;
}

.summary-profile-diag {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.3;
  margin: 0 0 var(--sp-sm);
}

.summary-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.summary-chip--gold {
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  color: var(--gold-dark);
}

.summary-chip--lavender {
  background: var(--lavender-light);
  border: 1px solid var(--lavender);
  color: var(--lavender-dark);
}

.summary-chip--muted {
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.summary-stats-strip {
  display: flex;
  align-items: center;
  background: var(--cream);
  border-radius: var(--r-md);
  padding: var(--sp-sm) 0;
}

.summary-stat {
  flex: 1;
  text-align: center;
  padding: 2px 0;
}

.summary-stat-num {
  display: block;
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.summary-stat-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.summary-stat-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* ════════════════════════════════
   RESUMO DO PACIENTE — DETAILS CARD
═══════════════════════════════════ */
.summary-details-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0 var(--sp-md);
  margin-bottom: var(--sp-md);
  box-shadow: var(--shadow-sm);
}

.summary-detail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
}

.summary-detail-row + .summary-detail-row {
  border-top: 1px solid var(--border);
}

.summary-detail-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-detail-value {
  font-size: var(--text-sm);
  color: var(--text-dark);
  line-height: 1.45;
}

.summary-detail-notes {
  color: var(--text-dark);
  font-style: italic;
}

/* ════════════════════════════════
   TIMELINE DE EVOLUÇÃO
═══════════════════════════════════ */
.evolution-section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 var(--sp-md);
}

.evolution-timeline {
  display: flex;
  flex-direction: column;
}

.evolution-item {
  display: flex;
  gap: 10px;
  padding-bottom: var(--sp-md);
}

.evolution-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 14px;
  padding-top: 3px;
}

.evolution-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  flex-shrink: 0;
}

.evolution-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
  min-height: 12px;
}

.evolution-content {
  flex: 1;
  min-width: 0;
}

.evolution-date {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.evolution-text-wrap {
  position: relative;
}

.evolution-text-wrap[data-expanded="false"] .evolution-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.evolution-text-wrap[data-expanded="true"] .evolution-text {
  display: block;
  overflow: visible;
}

.evolution-text {
  font-size: 12.5px;
  color: var(--text-dark);
  line-height: 1.5;
  margin: 0;
}

.evolution-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, var(--cream));
  pointer-events: none;
}

.evolution-text-wrap[data-expanded="true"] .evolution-fade {
  display: none;
}

.evolution-toggle {
  background: none;
  border: none;
  padding: 4px 0 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  display: block;
}

.evo-kw {
  font-style: normal;
  font-weight: 700;
  color: inherit;
}

/* ════════════════════════════════
   CARDS DE PACIENTE — ABA FINANÇAS
═══════════════════════════════════ */
.fin-card-sessions {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 4px;
}

.fin-card-values {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--text-dark);
  font-weight: 600;
}

.fin-card-due { color: var(--danger); }

/* ── Botão secundário Relatório Mensal ── */
.btn-report-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: var(--sp-md);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-report-secondary:active { background: var(--gold-pale); color: var(--gold-dark); }

/* ─── Accordion de Ajustes (sheet de perfil) ─────────────────────────────── */
.settings-acc {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-sm);
  overflow: hidden;
  background: var(--white);
}
.settings-acc-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 14px var(--sp-md);
  cursor: pointer;
  user-select: none;
}
.settings-acc-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gold-pale);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-acc-title {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}
.settings-acc-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.settings-acc.is-open .settings-acc-chevron { transform: rotate(180deg); }
.settings-acc-body {
  display: none;
  padding: var(--sp-md);
  border-top: 1px solid var(--border);
}
.settings-acc.is-open .settings-acc-body { display: block; }

/* ── Sheet de detalhe financeiro do paciente ── */
.fin-appt-list {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}
.fin-appt-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 9px 12px;
  font-size: var(--text-xs);
}
.fin-appt-row + .fin-appt-row { border-top: 1px solid var(--border); }
.fin-appt-date { flex: 1; color: var(--text-dark); font-weight: 500; }
.fin-appt-value { color: var(--gold-dark); font-weight: 700; flex-shrink: 0; }
.fin-appt-totals {
  display: flex;
  gap: 8px;
  margin-top: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}
.fin-appt-totals > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 8px 8px;
}
.fin-appt-totals .fin-card-due {
  background: #FFF2F2;
  border-color: #FFD0D0;
}
.fin-card-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}
.fin-appt-totals > span > :last-child {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}
.fin-appt-totals .fin-card-due > :last-child {
  color: var(--danger);
}

/* ════════════════════════════════
   RESUMO FINANCEIRO (ABA PAGAMENTOS)
═══════════════════════════════════ */
.payment-fin-summary {
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.payment-fin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.payment-fin-row + .payment-fin-row {
  border-top: 1px solid rgba(184, 150, 42, 0.15);
}

.payment-fin-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.payment-fin-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
}

/* ════════════════════════════════
   HISTÓRICO MENSAL (ABA PAGAMENTOS)
═══════════════════════════════════ */
.summary-month-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: var(--sp-md) 0 var(--sp-sm);
}

.summary-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-sm) var(--sp-md);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 6px;
}

.summary-month-left { flex: 1; min-width: 0; }

.summary-month-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
}

.summary-month-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.summary-month-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

/* ════════════════════════════════
   EXCLUIR PACIENTE — BOTÃO + SHEET
═══════════════════════════════════ */
.btn-delete-patient {
  display: block;
  width: 100%;
  padding: 12px var(--sp-md);
  background: none;
  border: 1.5px solid rgba(192, 57, 43, 0.35);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.01em;
}

.delete-patient-header {
  text-align: center;
  padding: var(--sp-sm) 0 var(--sp-md);
}

.delete-patient-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--danger-pale);
  color: var(--danger);
  margin-bottom: var(--sp-sm);
}

.delete-patient-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--danger);
  margin: 0 0 4px;
}

.delete-patient-name {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

.delete-patient-warning {
  background: var(--danger-pale);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.delete-patient-warning-lead {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--danger);
  margin: 0 0 var(--sp-sm);
}

.delete-patient-list {
  margin: 0;
  padding-left: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.delete-patient-list li {
  font-size: var(--text-xs);
  color: #7a2020;
  line-height: 1.4;
}

.btn-delete-confirm {
  display: block;
  width: 100%;
  padding: 14px var(--sp-md);
  background: var(--danger);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-delete-confirm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ════════════════════════════════
   PLANTÕES MK — Tela de resumo
════════════════════════════════ */

/* Logo no header da tela de plantões */
#page-shifts-overview .page-header {
  position: relative;
}

.shifts-header-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* Lista de estatísticas de plantões */
.shifts-stats {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-md);
  box-shadow: 0 1px 4px rgba(44, 31, 14, 0.07);
}
.shifts-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px var(--sp-md);
  border-bottom: 1px solid var(--border);
}
.shifts-stat-row--secondary {
  padding: 9px var(--sp-md);
}
.shifts-stat-row--secondary .shifts-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
}
.shifts-stat-row--secondary .shifts-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.shifts-stat-row--secondary .shifts-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}
.shifts-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.shifts-stat-icon--green { background: #e8f5ee; color: #1e8449; }
.shifts-stat-icon--gold  { background: var(--gold-pale); color: var(--gold-dark); }
.shifts-stat-icon--blue  { background: #eef4fb; color: #2980b9; }
.shifts-stat-label {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dark);
}
.shifts-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  line-height: 1;
}
.shifts-stat-of {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
.shifts-stat-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--sp-md);
  background: var(--lavender-light);
}
.shifts-stat-total-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--lavender-dark);
}
.shifts-stat-total-value {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--lavender-dark);
}

/* Barra de total (legado) */
.shifts-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--lavender-light);
  border: 1.5px solid var(--lavender);
  border-radius: var(--r-md);
  padding: 12px var(--sp-md);
  margin-bottom: var(--sp-md);
}
.shifts-total-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--lavender-dark);
}
.shifts-total-value {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--lavender-dark);
}

/* Seções (Regulares / Trocas / Avulsos) */
.shift-section {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-sm);
  overflow: hidden;
}
.shift-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.shift-section-icon { font-size: 14px; }
.shift-section-title {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-dark);
}
.shift-section-count {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--lavender-dark);
  background: var(--lavender-light);
  border: 1px solid var(--lavender);
  border-radius: 10px;
  padding: 1px 8px;
}
.shift-section-body { padding: 4px 0; }
.shift-section-body--cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.shift-section-body--cols .shift-item {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.shift-section-body--cols .shift-item:nth-child(even) { border-right: none; }
.shift-section-body--cols .shift-item:nth-last-child(-n+2) { border-bottom: none; }
.shift-section-empty {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  padding: var(--sp-md) 0;
  margin: 0;
}

/* ════════════════════════════════
   CARDS DE SESSÃO — detalhe do cliente
═══════════════════════════════════ */
.sess-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  padding: 12px 14px 12px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.sess-card:active { transform: scale(0.99); box-shadow: none; }

/* Faixa lateral colorida por status */
.sess-card--realizada,
.sess-card--realizado { border-left-color: var(--gold); }
.sess-card--pendente  { border-left-color: #F59E0B; }
.sess-card--faltou    { border-left-color: #E67E22; opacity: 0.65; }
.sess-card--cancelou  { border-left-color: #EF4444; opacity: 0.65; }

/* Bloco de data (dia + mês) */
.sess-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 8px 6px;
  border-radius: 10px;
  background: var(--gold-pale);
  flex-shrink: 0;
}
.sess-date-day {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-dark);
}
.sess-date-mon {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  margin-top: 2px;
}

/* Corpo */
.sess-body { flex: 1; min-width: 0; }
.sess-body-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.sess-dow {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}
.sess-notes {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.sess-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.sess-value {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-left: auto;
}

/* Item de data dentro de cada seção */
.shift-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px var(--sp-md);
  border-bottom: 1px solid var(--border);
}
.shift-item:last-child { border-bottom: none; }
.shift-item-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shift-item-check--cedido { background: var(--danger); }
.shift-item-cedido-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shift-item-check--troca { background: var(--gold); }
.shift-item-troca-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shift-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shift-item-date {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-dark);
}
.shift-item-notes {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* Item de troca (par de datas) */
.shift-swap-item {
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--border);
}
.shift-swap-item:last-child { border-bottom: none; }
.shift-swap-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.shift-swap-from {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--danger);
  opacity: 0.8;
}
.shift-swap-arrow {
  font-size: 15px;
  color: var(--text-muted);
}
.shift-swap-to {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #1a7a3a;
}

/* Campo de data do dia substituto no formulário de troca */
.shift-swap-date-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
  display: block;
  margin-bottom: 4px;
}

/* ── Seletor de tipo na action sheet do calendário ── */
.shift-type-btns {
  display: flex;
  gap: var(--sp-sm);
  margin: var(--sp-sm) 0 var(--sp-md);
}
.shift-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
}
.shift-type-btn--active {
  background: var(--lavender-light);
  border-color: var(--lavender);
  color: var(--lavender-dark);
}
.shift-notes-textarea {
  width: 100%;
  min-height: 72px;
  resize: none;
  font-size: var(--text-sm);
  box-sizing: border-box;
}

/* ════════════════════════════════
   HEADER DE MARCA (aba Hoje) — eco do login: gradiente suave + símbolo
═══════════════════════════════════ */
/* O gradiente sangra até o topo (a própria faixa cuida da safe area) */
#page-today { padding-top: 0; }

.brand-header {
  position: relative;        /* ancora a onda decorativa */
  background: transparent;   /* funde no gradiente da página (.page → --app-bg) */
  padding: calc(var(--safe-top) + 14px) var(--sp-md) 14px;
  flex-shrink: 0;
}

/* Onda suave no topo do header — eco do fundo do login (atrás do conteúdo) */
.brand-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 145px;
  z-index: 0;
  pointer-events: none;
}
.brand-wave-1 { fill: var(--wave-1); }
.brand-wave-2 { fill: var(--wave-2); }

.brand-header-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.metrics-strip { position: relative; z-index: 1; }

/* Painel de métricas reaproveitado na aba Resumo do paciente */
.summary-metrics {
  margin-top: 0;
  margin-bottom: var(--sp-md);
}

/* Marca-assinatura "3 barrinhas" (detalhe do "E"): turquesa→azul (AP: lavanda→dourado) */
.brand-bars {
  display: inline-block;
  vertical-align: -4px;
  margin-right: 8px;
  flex-shrink: 0;
  color: var(--gold);
}

/* Header das abas secundárias (H4): pílula de título flutuante, coesa
   com a tab bar. 3 barrinhas da marca + título + ação. Altura fixa da
   pílula padroniza todas as abas (com ou sem botão). */
.page-header--brand {
  background: transparent;
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
}
.ph-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  padding: 0 8px 0 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(27, 42, 74, 0.10);
}
[data-theme="ap"] .ph-pill { background: rgba(255, 253, 250, 0.92); }
.ph-pill .brand-bars { margin-right: 0; flex-shrink: 0; }
.page-header--brand .page-title {
  flex: 1;
  color: var(--navy);
  font-size: var(--text-md);
}
.page-header--brand .btn-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--btn-shadow);
}

.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-greet {
  flex: 1;
  min-width: 0;
}

.brand-hello {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.brand-action {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.brand-action:active { transform: scale(0.9); }

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex-shrink: 0;
  text-transform: uppercase;
}
.brand-avatar:active { transform: scale(0.93); }

/* ── Faixa de métricas (mini-painel) ── */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

/* Ícone "chip" (duotone): glyph dentro de quadradinho suave */
.metric-card .ui-icon {
  width: 28px;
  height: 28px;
  padding: 5.5px;
  border-radius: 8px;
  box-sizing: border-box;
  background: var(--gold-pale);
  color: var(--gold-dark);
}
.metric-card--accent .ui-icon {
  background: var(--accent-pale);
  color: var(--accent-dark);
}

.metric-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}

/* ── Card de assiduidade (detalhe do cliente) ── */
.attendance-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px 10px;
  margin-bottom: 7px;
  box-shadow: var(--shadow-sm);
}
.attendance-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}
.attendance-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.attendance-pct {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.attendance-bar {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.attendance-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gold);
}
.attendance-fill--warning { background: #E67E22; }
.attendance-fill--danger  { background: #E74C3C; }
.attendance-detail {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Gráfico de humor (sparkline SVG) ── */
.mood-chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px 8px;
  margin-bottom: var(--sp-md);
  box-shadow: var(--shadow-sm);
}
.mood-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.mood-chart-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Rodapé de crédito (só aparece no tema silvia) ─────────────────────────── */
.dev-credit {
  display: block;
  text-align: center;
  padding: var(--sp-lg) var(--sp-md) calc(var(--sp-xl) + env(safe-area-inset-bottom, 0px));
  margin-top: var(--sp-md);
}
.dev-credit-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--sp-sm);
  color: var(--gold-light);
}
.dev-credit-sep::before,
.dev-credit-sep::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--border);
}
.dev-credit-version {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.dev-credit-text {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
/* quando o SaaS expandir para tema neutro: .dev-credit { display: none } lá */

/* ════════════════════════════════
   BOAS-VINDAS (primeiro acesso, sem clientes)
═══════════════════════════════════ */
.today-welcome-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-xl) var(--sp-lg);
  margin: 0 var(--sp-md) var(--sp-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-sm);
}
.today-welcome-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: var(--sp-xs);
}
.today-welcome-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.3px;
  margin: 0;
}
.today-welcome-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 var(--sp-sm);
  max-width: 300px;
}

/* ════════════════════════════════
   FRASE DIÁRIA (sempre visível na aba Hoje)
═══════════════════════════════════ */
.today-phrase-card {
  margin: var(--sp-sm) var(--sp-md) 0;
  padding: var(--sp-md) var(--sp-lg);
  background: #E2EFE3;
  border-radius: var(--r-sm);
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
}
.today-phrase-icon {
  flex-shrink: 0;
  color: var(--gold-dark);
  margin-top: 1px;
}
.today-phrase-text {
  font-size: 11px;
  color: var(--gold-dark);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

