/* NES LifeCare — Monitorização Domiciliar — v1.0 — 2026-06-27 */

/* ── Layout principal ─────────────────────────────────────── */
.lc-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 48px;
}

.lc-consentimento {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #78350f;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.lc-consentimento-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Cards de tipo ────────────────────────────────────────── */
.lc-tipos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.lc-tipo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.lc-tipo-card:hover,
.lc-tipo-card.active {
  border-color: #0f4c66;
  background: #f0f9ff;
  color: #0f4c66;
}

.lc-tipo-icon { font-size: 1.8rem; line-height: 1; }

/* ── Formulário de registro ───────────────────────────────── */
.lc-form-area {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px 20px;
  margin-bottom: 20px;
}

.lc-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f4c66;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

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

.lc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}

.lc-field.full { grid-column: 1 / -1; }

.lc-field input,
.lc-field select,
.lc-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #111;
  background: #f9fafb;
  font-family: inherit;
  transition: border-color 0.15s;
}

.lc-field input:focus,
.lc-field select:focus,
.lc-field textarea:focus {
  outline: none;
  border-color: #0f4c66;
  background: #fff;
}

.lc-field textarea { resize: vertical; min-height: 60px; }

.lc-datetime-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.lc-form-footer {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Alerta inline ────────────────────────────────────────── */
.lc-alerta {
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  border-left: 4px solid transparent;
}

.lc-alerta-verde   { background: #f0fdf4; border-left-color: #16a34a; color: #14532d; }
.lc-alerta-amarelo { background: #fffbeb; border-left-color: #d97706; color: #78350f; }
.lc-alerta-vermelho{ background: #fef2f2; border-left-color: #dc2626; color: #7f1d1d; }

.lc-alerta-title { font-weight: 700; display: block; margin-bottom: 3px; }
.lc-alerta-disclaimer {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 4px;
}

/* ── Histórico ────────────────────────────────────────────── */
.lc-hist-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.lc-hist-filter {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  background: #fff;
}

.lc-hist-table-wrap { overflow-x: auto; }

.lc-hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.80rem;
  min-width: 520px;
}

.lc-hist-table th,
.lc-hist-table td {
  border: 1px solid #e2e8f0;
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}

.lc-hist-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f4c66;
  white-space: nowrap;
}

.lc-hist-table tbody tr:nth-child(even) { background: #f8fafc; }

.lc-badge-verde   { background: #dcfce7; color: #166534; padding: 2px 7px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; }
.lc-badge-amarelo { background: #fef9c3; color: #854d0e; padding: 2px 7px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; }
.lc-badge-vermelho{ background: #fee2e2; color: #991b1b; padding: 2px 7px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; }

/* ── Gráficos ─────────────────────────────────────────────── */
.lc-charts-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.lc-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
}

.lc-chart-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f4c66;
  margin: 0 0 10px;
}

.lc-chart-canvas { width: 100% !important; max-height: 180px; }

/* ── Premium gate ─────────────────────────────────────────── */
.lc-premium-gate {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}

.lc-premium-gate-icon { font-size: 2rem; margin-bottom: 8px; }
.lc-premium-gate h4 { color: #0369a1; margin: 0 0 6px; }
.lc-premium-gate p { font-size: 0.85rem; color: #374151; margin: 0; }

/* ── Seção do painel farmacêutico ────────────────────────── */
.lc-farm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.lc-farm-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 100px;
}

.lc-farm-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f4c66;
  display: block;
}

.lc-farm-stat-lbl {
  font-size: 0.72rem;
  color: #64748b;
}

.lc-farm-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* ── Estado vazio ─────────────────────────────────────────── */
.lc-empty {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
  font-size: 0.88rem;
}

.lc-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }

/* ── Section titles ───────────────────────────────────────── */
.lc-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f4c66;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
}

/* ── Adesão radio group ───────────────────────────────────── */
.lc-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lc-radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
}

.lc-radio-opt input { width: 15px; height: 15px; cursor: pointer; accent-color: #0f4c66; }

/* ── Spinner ──────────────────────────────────────────────── */
.lc-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .lc-tipos-grid { grid-template-columns: repeat(3, 1fr); }
  .lc-form-grid { grid-template-columns: 1fr; }
  .lc-form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .lc-datetime-row { grid-template-columns: 1fr; }
  .lc-charts-wrap { grid-template-columns: 1fr; }
  .lc-form-footer .btn { flex: 1 1 auto; min-height: 44px; }
  .lc-farm-header { flex-direction: column; align-items: flex-start; }
}
