/* ==========================================================================
   HOSPITAL DAS CLÍNICAS - PORTAL DE AGENDAMENTO DO PACIENTE
   Mobile-First Harmonious Design System & Responsive Styling
   ========================================================================== */

:root {
  /* Brand Palette */
  --hc-navy-dark: #07172c;
  --hc-navy: #0d2847;
  --hc-navy-light: #163e6d;
  --hc-blue-primary: #0077b6;
  --hc-blue-hover: #0096c7;
  --hc-blue-accent: #38bdf8;
  --hc-blue-soft: #e0f2fe;
  --hc-blue-badge: #dbeafe;
  --hc-teal: #0d9488;
  --hc-teal-soft: #ccfbf1;
  
  /* Status Colors */
  --status-free: #10b981;
  --status-free-bg: #ecfdf5;
  --status-free-border: #6ee7b7;
  --status-free-dark: #047857;
  
  --status-busy: #ef4444;
  --status-busy-bg: #fef2f2;
  --status-busy-border: #fca5a5;
  --status-busy-dark: #b91c1c;

  --status-empty: #f8fafc;
  --status-empty-text: #94a3b8;
  
  --status-alert: #f59e0b;
  --status-alert-bg: #fffbeb;
  --status-alert-border: #fcd34d;
  --status-alert-dark: #b45309;

  /* Neutral Palette */
  --bg-app: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px -2px rgba(13,40,71,0.08), 0 2px 6px -1px rgba(13,40,71,0.04);
  --shadow-lg: 0 14px 34px -4px rgba(13,40,71,0.12), 0 4px 12px -2px rgba(13,40,71,0.05);
  --shadow-voucher: 0 16px 40px -8px rgba(7,23,44,0.16), 0 6px 14px -3px rgba(7,23,44,0.07);

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --header-height: 64px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   HEADER (STRICTLY SINGLE LINE ON ALL DEVICES)
   -------------------------------------------------------------------------- */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--hc-navy);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(7, 23, 44, 0.2);
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
}

.header-inner {
  max-width: 1280px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo-wrap {
  width: auto;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hc-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--hc-blue-accent);
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Direct Clickable WhatsApp Button (Single Line Pill) */
.header-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-whatsapp-btn:hover {
  background: #1eb956;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
}

.header-whatsapp-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Header Patient Area Button ("Área do Cliente") */
.header-patient-area-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.header-patient-area-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header-patient-area-btn:hover {
  background: #ffffff;
  color: var(--navy-hc);
  border-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.hc-header-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.hc-hero-logo-img {
  height: 42px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.voucher-hc-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   STEPPER PROGRESS BAR
   -------------------------------------------------------------------------- */
.stepper-wrap {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  padding: 12px 16px;
}

.stepper-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s ease;
  user-select: none;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.2s;
}

.step-name {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
}

.step-item.active {
  color: var(--hc-blue-primary);
}

.step-item.active .step-num {
  background: var(--hc-blue-primary);
  border-color: var(--hc-blue-primary);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2);
}

.step-item.completed {
  color: var(--hc-teal);
}

.step-item.completed .step-num {
  background: var(--hc-teal);
  border-color: var(--hc-teal);
  color: #ffffff;
}

.step-item.disabled {
  opacity: 0.38;
  cursor: not-allowed !important;
  pointer-events: none !important;
  color: #94A3B8;
}

.step-item.disabled .step-num {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #94A3B8;
  box-shadow: none;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-light);
  margin: 0 10px;
  transition: background 0.3s;
}

.step-line.completed {
  background: var(--hc-teal);
}

.mobile-step-status {
  display: none;
  text-align: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-light);
}

.mobile-step-indicator {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--hc-blue-primary);
}

/* --------------------------------------------------------------------------
   PORTAL MAIN & WELCOME HERO (WITH HC BRANDING)
   -------------------------------------------------------------------------- */
.portal-main {
  width: 100%;
  max-width: 1100px;
  margin: 20px auto 40px;
  padding: 0 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.portal-welcome-hero {
  background: linear-gradient(135deg, var(--hc-navy-dark), var(--hc-navy));
  border-radius: 16px;
  padding: 20px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--hc-blue-accent);
}

.hc-logo-hero-badge {
  width: auto;
  min-width: 104px;
  height: 52px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.welcome-text {
  flex: 1;
  min-width: 0;
}

.hc-logo-svg-lg {
  width: 100%;
  height: 100%;
  display: block;
}

.welcome-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--hc-blue-accent);
  text-transform: uppercase;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.15;
}

.welcome-desc {
  font-size: 0.86rem;
  color: #cbd5e1;
  margin-top: 3px;
  line-height: 1.35;
}

.step-panel {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.step-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-box {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.form-card {
  max-width: 680px;
  margin: 0 auto;
}

.card-header-styled {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.header-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--hc-blue-soft);
  color: var(--hc-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-icon-circle svg {
  width: 24px;
  height: 24px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--hc-navy);
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 2px;
}

/* Form Styles with iOS Safari Zoom Prevention */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hc-navy);
}

.form-input, .form-select {
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 16px; /* Crucial: 16px prevents iOS Safari from auto-zooming! */
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
  width: 100%;
}

.form-input:focus, .form-select:focus {
  border-color: var(--hc-blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.form-input.input-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-action-row {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--hc-blue-primary), #023e8a);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 119, 182, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 119, 182, 0.4);
}

.btn-primary:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-outline {
  background: #ffffff;
  color: var(--hc-navy);
  border: 1.5px solid var(--border-subtle);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: var(--text-muted);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: #1eb956;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.btn-download {
  background: var(--hc-navy);
  color: #ffffff;
}

.btn-download:hover {
  background: var(--hc-navy-light);
  transform: translateY(-2px);
}

.btn-lg {
  height: 50px;
  padding: 0 24px;
  font-size: 0.98rem;
}

.btn-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.btn-ghost {
  background: transparent;
  color: var(--hc-blue-primary);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
  height: 34px;
}

.btn-text-sm {
  background: none;
  border: none;
  color: var(--hc-blue-primary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 6px;
  white-space: nowrap;
}

.btn-mobile-block {
  width: auto;
}

.btn-pulse {
  animation: pulseShadow 2s infinite;
}

@keyframes pulseShadow {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --------------------------------------------------------------------------
   STEP 2: CATEGORY & CATALOG
   -------------------------------------------------------------------------- */
.patient-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--hc-blue-soft);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.session-brand-mini {
  display: flex;
  align-items: center;
}

.hc-emblem-micro {
  width: 26px;
  height: 26px;
  background: var(--hc-blue-primary);
  color: #ffffff;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
}

.patient-session-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--hc-navy);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-session-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--hc-blue-primary);
  letter-spacing: 0.5px;
}

.patient-session-cpf {
  color: var(--text-muted);
  font-size: 0.8rem;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 5px;
}

.step-heading {
  margin-bottom: 20px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--hc-navy);
  line-height: 1.2;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 3px;
}

.step-selection-highlight-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-left: 5px solid #10b981;
  padding: 10px 16px;
  border-radius: 10px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.selection-prompt-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.selection-prompt-text {
  font-size: 0.98rem;
  font-weight: 600;
  color: #065f46;
  line-height: 1.35;
}

.selection-prompt-text strong {
  color: #047857;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   STEP INSTRUCTION CARDS (FOR LAYMEN INTUITIVENESS)
   -------------------------------------------------------------------------- */
.step-instruction-card {
  background: #F0F9FF;
  border: 1.5px solid #BAE6FD;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.instruction-step-pill {
  background: #0284C7;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.instruction-text-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  color: #1E293B;
  line-height: 1.35;
}

.badge-inline-glow {
  background: #00A896;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 168, 150, 0.6);
  letter-spacing: 0.5px;
}

.step-instruction-2 {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  margin: 22px 0 16px;
}

.pill-step-2 {
  background: #004F71;
  box-shadow: 0 2px 6px rgba(0, 79, 113, 0.25);
}

/* --------------------------------------------------------------------------
   BIG CATEGORY SELECTOR CARDS ("ACESO" ILLUMINATED STATE)
   -------------------------------------------------------------------------- */
.type-selection-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.type-card {
  border: 2px dashed #CBD5E1;
  border-radius: 16px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  background: #F8FAFC;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.type-card:hover {
  border-color: #94A3B8;
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Luminous Glowing "Aceso" State */
.type-card.active {
  border: 2.5px solid #00A896;
  background: linear-gradient(180deg, #F0FDFB 0%, #FFFFFF 100%);
  transform: translateY(-3px);
  box-shadow: 0 0 0 4px rgba(0, 168, 150, 0.25), 0 10px 24px -2px rgba(0, 79, 113, 0.16);
}

.type-card-active-glow-bar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #00C7B1, #004F71);
  box-shadow: 0 2px 10px rgba(0, 199, 177, 0.7);
}

.type-card.active .type-card-active-glow-bar {
  display: block;
}

.type-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.type-card-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #EDF2F7;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.type-card.active .type-card-icon-wrap {
  background: #E0F7F5;
  box-shadow: 0 0 10px rgba(0, 168, 150, 0.3);
}

.type-card-icon {
  font-size: 1.85rem;
  line-height: 1;
}

.type-card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 50px;
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
  transition: all 0.2s;
}

.type-card.active .type-card-status-pill {
  background: #004F71;
  color: #FFFFFF;
  border-color: #004F71;
  box-shadow: 0 2px 8px rgba(0, 79, 113, 0.35);
}

.active-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00E5C9;
  box-shadow: 0 0 8px #00E5C9;
  animation: neonGlow 1.5s infinite;
}

.unselected-circle {
  font-size: 0.8rem;
  line-height: 1;
  color: #94A3B8;
}

@keyframes neonGlow {
  0% { transform: scale(0.9); box-shadow: 0 0 4px #00E5C9, 0 0 8px rgba(0, 229, 201, 0.6); }
  50% { transform: scale(1.15); box-shadow: 0 0 10px #00E5C9, 0 0 18px rgba(0, 229, 201, 0.9); }
  100% { transform: scale(0.9); box-shadow: 0 0 4px #00E5C9, 0 0 8px rgba(0, 229, 201, 0.6); }
}

.type-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #475569;
  transition: color 0.2s;
}

.type-card.active .type-card-title {
  color: #003853;
  font-weight: 900;
}

.type-card-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.type-card-footer-state {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #E2E8F0;
  font-size: 0.775rem;
  font-weight: 700;
}

.state-active-check {
  color: #00A896;
  display: flex;
  align-items: center;
  gap: 4px;
}

.state-inactive-hint {
  color: #94A3B8;
  font-weight: 600;
}

/* Catalog Filter & Search */
.catalog-section {
  border-top: 1px solid var(--border-light);
  padding-top: 22px;
}

.catalog-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.catalog-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hc-dot-pill {
  width: 24px;
  height: 24px;
  background: var(--hc-navy);
  color: #ffffff;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hc-navy);
}

.search-input-wrap {
  position: relative;
  width: 300px;
  max-width: 100%;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: all 0.2s;
}

.search-input-wrap input:focus {
  border-color: var(--hc-blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.12);
}

/* Horizontally Scrollable Specialty Filters */
.exam-specialty-filter-bar {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.filter-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.filter-chips-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.filter-chips-wrap::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.filter-chip.active {
  background: var(--hc-blue-primary);
  border-color: var(--hc-blue-primary);
  color: #ffffff;
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.item-card {
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.item-card:hover {
  border-color: var(--hc-blue-accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.item-card.selected {
  border-color: var(--hc-blue-primary);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.item-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.item-card-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.item-card-header {
  flex: 1;
}

.item-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hc-teal);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.item-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--hc-navy);
  line-height: 1.25;
}

.item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 3px;
}

.item-prescription-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--status-alert-bg);
  border: 1px solid var(--status-alert-border);
  color: var(--status-alert-dark);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  margin-top: 6px;
}

.item-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.item-slots-info {
  font-size: 0.75rem;
  color: var(--status-free-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-item-select {
  background: var(--hc-blue-soft);
  color: var(--hc-blue-primary);
  border: none;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.item-card:hover .btn-item-select {
  background: var(--hc-blue-primary);
  color: #ffffff;
}

.step-footer-actions {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.step-footer-actions.space-between {
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   STEP 3: CALENDAR & TIME SLOTS
   -------------------------------------------------------------------------- */
.selected-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.summary-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.summary-details {
  flex: 1;
}

.summary-hc-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.hc-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hc-blue-primary);
}

.summary-category {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--hc-blue-primary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.summary-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hc-navy);
  line-height: 1.2;
}

.summary-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Exam Notice Box */
.exam-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
}

.exam-notice-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.exam-notice-text strong {
  display: block;
  font-size: 0.88rem;
  color: #92400e;
  margin-bottom: 2px;
}

.exam-notice-text p {
  font-size: 0.82rem;
  color: #78350f;
  line-height: 1.35;
}

/* Layout */
.calendar-and-time-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 8px;
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.col-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--hc-navy);
}

.two-months-badge, .time-range-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--hc-blue-soft);
  color: var(--hc-blue-primary);
  padding: 2px 8px;
  border-radius: 50px;
}

/* Month Tabs (Strictly 2 Months) */
.month-tabs-portal {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.month-tab-portal-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.month-tab-portal-btn:hover {
  border-color: var(--hc-blue-primary);
  color: var(--hc-blue-primary);
}

.month-tab-portal-btn.active {
  background: var(--hc-navy);
  border-color: var(--hc-navy);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(13, 40, 71, 0.2);
}

/* Portal Calendar Card */
.portal-calendar-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.calendar-legend-portal {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.cal-free {
  color: var(--status-free-dark);
}

.cal-busy {
  color: var(--status-busy-dark);
}

.portal-weekdays-row, .editor-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.col-weekend {
  color: #ef4444;
}

.portal-days-grid, .days-editor-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day-btn-portal {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  background: #ffffff;
  padding: 2px;
}

.day-btn-portal.empty-cell {
  background: transparent;
  cursor: default;
  border: none;
}

.day-btn-portal.status-free {
  background: var(--status-free-bg);
  border-color: var(--status-free-border);
  color: var(--status-free-dark);
}

.day-btn-portal.status-free:hover {
  background: #d1fae5;
  transform: scale(1.05);
}

.day-btn-portal.status-free.selected {
  background: var(--status-free);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4);
}

.day-btn-portal.status-busy {
  background: var(--status-busy-bg);
  border-color: var(--status-busy-border);
  color: var(--status-busy-dark);
  cursor: not-allowed;
  opacity: 0.65;
}

.day-btn-portal.status-empty {
  background: var(--status-empty);
  border-color: #e2e8f0;
  color: var(--status-empty-text);
  cursor: not-allowed;
  opacity: 0.45;
}

.day-sub-label {
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 1px;
}

/* Time Slots */
.time-selection-placeholder {
  background: #f8fafc;
  border: 2px dashed var(--border-subtle);
  border-radius: 14px;
  padding: 30px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.time-selection-placeholder svg {
  width: 36px;
  height: 36px;
  color: var(--hc-blue-primary);
}

.selected-day-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.selected-day-tag svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.time-group {
  margin-bottom: 14px;
}

.time-group-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--hc-navy);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.slot-btn {
  height: 42px;
  padding: 0 4px;
  border-radius: 8px;
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--hc-navy);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-btn:hover {
  border-color: var(--hc-blue-primary);
  background: var(--hc-blue-soft);
  color: var(--hc-blue-primary);
}

.slot-btn.selected {
  background: var(--hc-navy);
  border-color: var(--hc-navy);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(13, 40, 71, 0.25);
  transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   STEP 4: OFFICIAL RECEIPT VOUCHER & ACTIONS
   -------------------------------------------------------------------------- */
.receipt-action-bar {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.badge-success {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 50px;
}

.action-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.receipt-card-frame {
  display: flex;
  justify-content: center;
}

.medical-voucher {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border-radius: 16px;
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-voucher);
  overflow: hidden;
  font-family: var(--font-body);
}

.voucher-header {
  background: linear-gradient(135deg, var(--hc-navy-dark), var(--hc-navy));
  color: #ffffff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--hc-blue-accent);
  gap: 12px;
}

.voucher-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voucher-logo {
  width: auto;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voucher-hospital {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.voucher-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #93c5fd;
  text-transform: uppercase;
}

.voucher-protocol-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  text-align: right;
  flex-shrink: 0;
}

.protocol-lbl {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  color: #93c5fd;
  letter-spacing: 0.8px;
}

.protocol-code {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.voucher-body {
  padding: 20px;
}

/* Symbolic Fee Banner (R$ 0,99) */
.symbolic-fee-banner {
  background: linear-gradient(135deg, #F0FDF4 0%, #E8F5E9 100%);
  border: 1.5px solid #86EFAC;
  border-left: 5px solid #16A34A;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.fee-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.badge-confirmed-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: #15803D;
  letter-spacing: 0.5px;
}

.fee-value-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
  border-radius: 50px;
  padding: 3px 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
}

.fee-msg-text {
  font-size: 0.82rem;
  color: #1E3A1E;
  line-height: 1.35;
  margin: 0;
}

/* PIX Donation Box for Hospital do Cancer */
.pix-donation-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(22, 163, 74, 0.35);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pix-donation-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #14532D;
}

.pix-heart-icon {
  font-size: 0.85rem;
}

.pix-key-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #86EFAC;
  border-radius: 6px;
  padding: 4px 8px;
}

.pix-key-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #15803D;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pix-key-val {
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0F172A;
  flex: 1;
  user-select: all;
  word-break: break-all;
}

.btn-copy-pix {
  background: #16A34A;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-copy-pix:hover {
  background: #15803D;
  transform: translateY(-1px);
}

/* Compact Integrated Actions */
.receipt-actions-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.receipt-actions-compact .btn {
  width: 100%;
}

/* App Tracking Callout Section */
.app-tracking-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  width: 100%;
}

.app-tracking-phrase {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--hc-navy);
  letter-spacing: -0.2px;
}

.btn-app-redirect {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF !important;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.btn-app-redirect:hover {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

.app-btn-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
  flex-shrink: 0;
}

.app-btn-text-wrap {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  line-height: 1.15;
}

.app-btn-sub {
  font-size: 0.62rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.app-btn-main {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: #FFFFFF;
}

.app-btn-arrow {
  width: 16px;
  height: 16px;
  color: #94A3B8;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.btn-app-redirect:hover .app-btn-arrow {
  transform: translateX(3px);
  color: #FFFFFF;
}

.service-highlight-ribbon {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.service-type-badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  color: #15803d;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.service-main-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.service-extra {
  font-size: 0.78rem;
  color: #475569;
  display: block;
  margin-top: 2px;
}

.service-status-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #16a34a;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
}

.appointment-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.detail-block {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 10px;
}

.detail-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-value-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-value-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--hc-blue-primary);
  flex-shrink: 0;
}

.detail-strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--hc-navy);
  line-height: 1.1;
}

.detail-strong.time-color {
  color: #0284c7;
  font-size: 1.05rem;
}

.detail-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* MANDATORY EXAM PRESCRIPTION NOTICE (DISCREET & COMPACT) */
.prescription-alert-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

.prescription-alert-banner.compact {
  padding: 8px 12px;
  margin-bottom: 10px;
}

.prescription-mini-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.prescription-mini-text {
  flex: 1;
  font-size: 0.78rem;
  color: #92400e;
  line-height: 1.35;
}

.prescription-mini-text strong {
  color: #78350f;
  font-weight: 700;
}

/* Exam Notice Box in Step 3 */
.exam-notice-box.compact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

.exam-notice-icon-mini {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.exam-notice-text-mini {
  flex: 1;
  font-size: 0.78rem;
  color: #92400e;
  line-height: 1.35;
}

.exam-notice-text-mini strong {
  color: #78350f;
  font-weight: 700;
}

/* Patient Voucher Card */
.patient-voucher-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
}

.patient-voucher-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--hc-navy);
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}

.patient-voucher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.pv-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

.pv-val {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--hc-navy);
}

/* Voucher Footer */
.voucher-footer {
  background: #0f172a;
  color: #ffffff;
  padding: 16px 20px;
  border-top: 1px solid #1e293b;
}

.footer-whatsapp-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.whatsapp-badge-icon {
  width: 28px;
  height: 28px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.whatsapp-badge-icon svg {
  width: 18px;
  height: 18px;
}

.whatsapp-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.whatsapp-number {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
}

.voucher-footnote {
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* --------------------------------------------------------------------------
   MODAL ADMIN (GESTÃO DE VAGAS)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 23, 44, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--hc-blue-primary);
  letter-spacing: 0.8px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--hc-navy);
}

.btn-close-modal {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 16px 20px;
}

.admin-category-switcher {
  display: flex;
  border-radius: 8px;
  background: #f1f5f9;
  padding: 3px;
}

.admin-tab-btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab-btn.active {
  background: #ffffff;
  color: var(--hc-navy);
  box-shadow: var(--shadow-sm);
}

.admin-months-row {
  display: flex;
  gap: 8px;
}

.admin-month-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.admin-month-btn.active {
  background: var(--hc-navy);
  border-color: var(--hc-navy);
  color: #ffffff;
}

.day-btn-editor {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.day-btn-editor.empty-cell {
  background: transparent;
  cursor: default;
  border: none;
}

.day-btn-editor.status-free {
  background: var(--status-free-bg);
  border-color: var(--status-free-border);
  color: var(--status-free-dark);
}

.day-btn-editor.status-busy {
  background: var(--status-busy-bg);
  border-color: var(--status-busy-border);
  color: var(--status-busy-dark);
}

.day-btn-editor.status-empty {
  background: var(--status-empty);
  border-color: #e2e8f0;
  color: var(--status-empty-text);
}

.quick-day-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--hc-navy);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 22px;
  height: 22px;
  background: #10b981;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.toast-message {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   MOBILE FIRST OPTIMIZATIONS (TABLETS & SMARTPHONES)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 54px;
  }

  .portal-main {
    margin: 12px auto 28px;
    padding: 0 10px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .header-inner {
    padding: 0 8px;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .brand {
    gap: 6px;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
  }

  .brand-logo-wrap {
    width: auto;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .hc-header-logo-img {
    height: 26px;
    width: auto;
    object-fit: contain;
    display: block;
  }

  .brand-text {
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }

  .brand-title {
    font-size: clamp(0.68rem, 2.5vw, 0.78rem);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-sub {
    font-size: clamp(0.46rem, 1.8vw, 0.54rem);
    letter-spacing: 0.3px;
    white-space: nowrap;
  }

  .header-right {
    gap: 4px;
    flex-shrink: 0;
  }

  .header-whatsapp-btn {
    padding: 5px 8px;
    font-size: clamp(0.66rem, 2.2vw, 0.72rem);
    gap: 4px;
    height: 30px;
    flex-shrink: 0;
  }

  .header-whatsapp-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
  }

  .patient-area-btn-text {
    font-size: 0.7rem;
  }

  .header-patient-area-btn {
    padding: 0 8px;
    height: 30px;
    gap: 4px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  /* Stepper on Mobile */
  .stepper-wrap {
    padding: 10px 12px;
  }

  .step-name {
    display: none;
  }

  .step-num {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .step-line {
    margin: 0 6px;
  }

  .mobile-step-status {
    display: block;
  }

  /* Hero Banner */
  .portal-welcome-hero {
    padding: 16px 14px;
    gap: 14px;
    border-radius: 14px;
    align-items: center;
  }

  .hc-logo-hero-badge {
    width: auto;
    min-width: 88px;
    height: 46px;
    padding: 5px 10px;
    border-radius: 10px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  }

  .hc-hero-logo-img {
    height: 34px;
    max-width: 95px;
  }

  .welcome-text {
    flex: 1;
    min-width: 0;
  }

  .welcome-title {
    font-size: 1.15rem;
  }

  .welcome-desc {
    font-size: 0.8rem;
  }

  .card-box {
    padding: 16px;
    border-radius: 14px;
  }

  /* Form */
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .span-2 {
    grid-column: span 1;
  }

  .btn-mobile-block {
    width: 100%;
  }

  /* Step 2 Selection Cards */
  .type-selection-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .type-card {
    padding: 14px;
  }

  .search-input-wrap {
    width: 100%;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  /* Step 3 Calendar & Times */
  .calendar-and-time-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Step 4 Voucher & Actions - Ultra-compact mobile layout (fits single viewport) */
  .receipt-card-frame {
    padding: 0;
  }

  .medical-voucher {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .voucher-header {
    padding: 10px 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .voucher-hospital {
    font-size: 0.95rem;
  }

  .voucher-sub {
    font-size: 0.58rem;
    letter-spacing: 0.5px;
  }

  .voucher-protocol-box {
    width: auto;
    padding: 4px 8px;
    border-radius: 6px;
    text-align: right;
  }

  .protocol-lbl {
    font-size: 0.55rem;
  }

  .protocol-code {
    font-size: 0.85rem;
  }

  .voucher-body {
    padding: 10px 12px;
  }

  .symbolic-fee-banner {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .fee-badge-row {
    margin-bottom: 3px;
  }

  .badge-confirmed-pulse {
    font-size: 0.7rem;
  }

  .fee-value-pill {
    font-size: 0.72rem;
    padding: 2px 7px;
  }

  .fee-msg-text {
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .service-highlight-ribbon {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    flex-direction: row;
    align-items: center;
  }

  .service-type-badge {
    font-size: 0.62rem;
  }

  .service-main-name {
    font-size: 0.95rem;
  }

  .service-extra {
    font-size: 0.72rem;
  }

  /* Compact 3-column Grid for Date, Time & Location on mobile */
  .appointment-details-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px;
    margin-bottom: 8px;
  }

  .detail-block {
    padding: 6px 6px;
    border-radius: 8px;
  }

  .detail-label {
    font-size: 0.56rem;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
  }

  .detail-value-wrap {
    gap: 3px;
  }

  .detail-value-wrap svg {
    width: 13px;
    height: 13px;
  }

  .detail-strong {
    font-size: 0.78rem;
  }

  .detail-strong.time-color {
    font-size: 0.88rem;
  }

  .detail-sub {
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Compact Patient Card */
  .patient-voucher-card {
    padding: 6px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .patient-voucher-title {
    font-size: 0.6rem;
    margin-bottom: 4px;
    padding-bottom: 2px;
  }

  .patient-voucher-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3px 6px;
  }

  .pv-lbl {
    font-size: 0.6rem;
  }

  .pv-val {
    font-size: 0.74rem;
  }

  /* Compact Actions */
  .receipt-actions-compact {
    margin-top: 8px;
    gap: 6px;
  }

  .receipt-actions-compact .btn {
    height: 42px;
    font-size: 0.85rem;
    padding: 0 12px;
  }

  .app-tracking-section {
    margin-top: 6px;
    padding-top: 6px;
    gap: 4px;
  }

  .app-tracking-phrase {
    font-size: 0.74rem;
  }

  .btn-app-redirect {
    padding: 6px 12px;
    height: 40px;
    border-radius: 8px;
    gap: 10px;
  }

  .app-btn-logo-img {
    width: 24px;
    height: 24px;
  }

  .app-btn-main {
    font-size: 0.82rem;
  }

  .voucher-footer {
    padding: 8px 12px;
  }

  .footer-whatsapp-display {
    padding: 6px 10px;
    margin-bottom: 4px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .whatsapp-badge-icon {
    width: 22px;
    height: 22px;
  }

  .whatsapp-badge-icon svg {
    width: 14px;
    height: 14px;
  }

  .whatsapp-label {
    font-size: 0.58rem;
  }

  .whatsapp-number {
    font-size: 0.88rem;
  }

  .voucher-footnote {
    font-size: 0.62rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 6px;
    gap: 4px;
  }

  .brand {
    gap: 5px;
  }

  .brand-title {
    font-size: 0.72rem;
  }

  .brand-sub {
    font-size: 0.5rem;
  }

  .header-whatsapp-btn {
    padding: 4px 6px;
    font-size: 0.68rem;
    gap: 3px;
    height: 28px;
  }

  .patient-area-btn-text {
    display: none; /* Shows the clean SVG user icon on mobile phones */
  }

  .header-patient-area-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
  }

  .portal-welcome-hero {
    padding: 12px 10px;
    gap: 10px;
  }

  .hc-logo-hero-badge {
    min-width: 68px;
    height: 38px;
    padding: 4px 6px;
  }

  .hc-hero-logo-img {
    height: 26px;
    max-width: 65px;
  }

  .welcome-title {
    font-size: 0.98rem;
  }

  .welcome-desc {
    font-size: 0.74rem;
  }

  .card-box {
    padding: 12px 10px;
  }

  .appointment-details-grid {
    gap: 4px;
  }

  .detail-block {
    padding: 4px 2px;
  }

  .detail-strong {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .whatsapp-btn-text {
    font-size: 0.65rem;
  }
  
  .brand-title {
    font-size: 0.68rem;
  }

  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .portal-calendar-card {
    padding: 8px 6px;
  }

  .portal-weekdays-row, .portal-days-grid {
    gap: 2px;
  }

  .day-btn-portal {
    font-size: 0.78rem;
  }
}

/* --------------------------------------------------------------------------
   PATIENT AREA ("ÁREA DO CLIENTE") MODAL & DASHBOARD
   -------------------------------------------------------------------------- */
.patient-area-dialog {
  max-width: 620px;
  width: 95%;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.patient-login-intro {
  text-align: center;
  padding: 1rem 0.5rem;
}

.patient-login-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.patient-login-intro h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy-hc);
  margin-bottom: 0.35rem;
}

.patient-login-intro p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 440px;
  margin: 0 auto;
}

.patient-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.patient-welcome-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #0284C7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.patient-welcome-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin: 1px 0;
}

.patient-welcome-meta {
  font-size: 0.8rem;
  color: #64748B;
}

.new-appointment-prompt-card {
  background: #EBF8FF;
  border: 1px solid #BEE3F8;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.new-appointment-prompt-card strong {
  font-size: 0.9rem;
  color: #2B6CB0;
  display: block;
}

.new-appointment-prompt-card p {
  font-size: 0.8rem;
  color: #4A5568;
  margin-top: 2px;
}

.patient-appointments-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.patient-apt-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.2s;
}

.patient-apt-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
}

.patient-apt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apt-protocol-code {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-hc);
  background: #E8F4F8;
  padding: 2px 6px;
  border-radius: 4px;
}

.apt-badge-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.apt-status-confirmado {
  background: #DCFCE7;
  color: #15803D;
}

.apt-status-cancelado {
  background: #FEE2E2;
  color: #B91C1C;
}

.patient-apt-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
}

.patient-apt-datetime {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #475569;
}

.patient-apt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid #F1F5F9;
  padding-top: 0.65rem;
}

/* Disabled & Occupied Slot Button Styles */
.slot-btn.occupied,
.slot-btn:disabled {
  background: #F1F5F9 !important;
  color: #94A3B8 !important;
  border-color: #E2E8F0 !important;
  cursor: not-allowed !important;
  text-decoration: line-through;
  opacity: 0.7;
}

