/* ==========================================================================
   NEXO SAÚDE — PAGE-SPECIFIC STYLES
   Login, Dashboard, Atendimento Wizard, Receita Médica, Kanban & Relatórios
   ========================================================================== */

/* --------------------------------------------------------------------------
   LOGIN SCREEN
   -------------------------------------------------------------------------- */
.login-page-wrapper {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  background: radial-gradient(circle at 10% 20%, #0F172A 0%, #020617 100%);
  position: relative;
  overflow: hidden;
}

.login-page-wrapper::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-container {
  margin: auto;
  width: 100%;
  max-width: 440px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 10;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.login-brand-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: var(--shadow-glow);
}

.login-brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
}

.login-brand-sub {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.4;
}

.login-demo-helper {
  background: var(--slate-50);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.login-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--slate-400);
  text-align: center;
}

/* --------------------------------------------------------------------------
   DASHBOARD
   -------------------------------------------------------------------------- */
.dashboard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.chart-container {
  width: 100%;
  height: 280px;
  position: relative;
}

.progress-indicator-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.progress-indicator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
}

.progress-indicator-bar {
  width: 100%;
  height: 8px;
  background: var(--slate-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-indicator-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* --------------------------------------------------------------------------
   AÇÕES ITINERANTES
   -------------------------------------------------------------------------- */
.acoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.acao-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.acao-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}

.acao-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.acao-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}

.acao-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--slate-500);
  margin-top: 0.2rem;
}

.acao-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--slate-50);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-align: center;
}

.acao-stat-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-900);
}

.acao-stat-lbl {
  font-size: 0.68rem;
  color: var(--slate-500);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   PATIENT 360 PROFILE
   -------------------------------------------------------------------------- */
.patient-profile-header {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: var(--radius-xl);
  padding: 2rem;
  color: #FFFFFF;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.patient-profile-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.patient-big-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--blue-600));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.patient-profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.35rem;
}

.patient-tags-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.patient-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-200);
}

/* --------------------------------------------------------------------------
   ATENDIMENTO WIZARD (STEP PROGRESSIVO)
   -------------------------------------------------------------------------- */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1rem 1.5rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow-x: auto;
}

.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  opacity: 0.5;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.wizard-step-item.active {
  opacity: 1;
}

.wizard-step-item.completed {
  opacity: 0.85;
}

.wizard-step-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--slate-100);
  border: 2px solid var(--slate-300);
  color: var(--slate-600);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-step-item.active .wizard-step-bubble {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.35);
}

.wizard-step-item.completed .wizard-step-bubble {
  background: var(--success-bg);
  border-color: var(--success-solid);
  color: var(--success-solid);
}

.wizard-step-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
}

/* Visual Acuity Grid */
.acuidade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
  gap: 0.5rem;
}

.acuidade-option {
  padding: 0.6rem 0.25rem;
  text-align: center;
  background: var(--slate-50);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.acuidade-option:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
}

.acuidade-option.selected {
  background: var(--primary-600);
  border-color: var(--primary-700);
  color: #FFFFFF;
}

/* Exam Cards in Attendance */
.exam-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.exam-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.exam-card-item:hover {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-md);
}

.exam-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-900);
}

/* --------------------------------------------------------------------------
   PRESCRIÇÃO OFTALMOLÓGICA (RECEITA MÉDICA)
   -------------------------------------------------------------------------- */
.prescription-sheet {
  background: #FFFFFF;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.prescription-sheet::before {
  content: 'RECEITUÁRIO OFTALMOLÓGICO OFICIAL';
  position: absolute;
  top: 0.75rem;
  right: 1.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--slate-400);
  letter-spacing: 0.1em;
}

.prescription-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}

.prescription-table th, .prescription-table td {
  border: 1px solid var(--slate-300);
  padding: 0.65rem;
  text-align: center;
  font-size: 0.85rem;
}

.prescription-table th {
  background: var(--slate-50);
  font-weight: 700;
  color: var(--slate-700);
}

/* --------------------------------------------------------------------------
   KANBAN FILA OPERACIONAL
   -------------------------------------------------------------------------- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  align-items: flex-start;
}

.kanban-column {
  background: var(--slate-100);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

.kanban-column-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kanban-counter {
  background: var(--slate-200);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-700);
}

.kanban-cards-list {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  flex: 1;
}

.kanban-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: grab;
  transition: all var(--transition-fast);
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-300);
}

.kanban-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-900);
}

.kanban-card-meta {
  font-size: 0.75rem;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   ÓCULOS PIPELINE JORNADA
   -------------------------------------------------------------------------- */
.journey-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 1.5rem 0;
}

.journey-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--slate-200);
  z-index: 1;
  transform: translateY(-50%);
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  padding: 0 0.5rem;
}

.journey-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--slate-200);
  border: 3px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
}

.journey-step.active .journey-dot {
  background: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.journey-step.completed .journey-dot {
  background: var(--success-solid);
}

.journey-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
}

/* --------------------------------------------------------------------------
   RELATÓRIO CONSOLIDADO FINAL (GOV / EXEC)
   -------------------------------------------------------------------------- */
.report-paper {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 1040px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.report-official-header {
  border-bottom: 2px solid var(--slate-900);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-badge-gov {
  background: var(--slate-900);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-xs);
}
