:root {
  --hg-bg: #eef1f6;
  --hg-surface: #ffffff;
  --hg-accent: #a67c00;
  --hg-accent-hover: #8a6600;
  --hg-accent-soft: rgba(166, 124, 0, 0.12);
  --hg-muted: #5c5c5c;
  --hg-border: #e2e6ec;
  --hg-shadow: 0 0.35rem 1.25rem rgba(33, 37, 41, 0.06);
  --hg-shadow-hover: 0 0.5rem 1.75rem rgba(33, 37, 41, 0.1);
  --hg-radius: 1rem;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: var(--hg-bg) !important;
  color: #212529;
}

.hg-main {
  background: radial-gradient(1200px 400px at 10% -10%, rgba(166, 124, 0, 0.08), transparent 50%),
    radial-gradient(800px 300px at 100% 0%, rgba(13, 110, 253, 0.04), transparent 45%);
}

/* Cabeçalho de página (todo o app) */
.hg-page-head__pill {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hg-accent);
  margin-bottom: 0.35rem;
}

.hg-hero-shell {
  background: #fff;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow);
  padding: 1.75rem 1.5rem;
}

@media (min-width: 992px) {
  .hg-hero-shell {
    padding: 2rem 2.25rem;
  }
}

.hg-auth-card .card-header {
  padding: 1.1rem 1.35rem;
  font-size: 1.1rem;
}

.hg-auth-card .card-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.hg-input-group-icon .input-group-text {
  background: #f8f9fa;
  border-color: #ced4da;
  color: var(--hg-accent);
}

.hg-feature-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hg-accent-soft);
  color: var(--hg-accent);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.font-serif {
  font-family: "Playfair Display", Georgia, serif;
}

.bg-nav {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.hg-navbar .nav-link {
  border-radius: 0.5rem;
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
}

.hg-navbar .nav-link:hover {
  background: rgba(166, 124, 0, 0.08);
}

.bg-footer {
  background: #e8ecf2 !important;
}

.logo-img {
  filter: none;
}

/* Títulos de página */
.hg-page-title {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
}

.hg-lead {
  max-width: 42rem;
  line-height: 1.55;
}

/* Cartões */
.card {
  background-color: var(--hg-surface) !important;
  border-color: var(--hg-border) !important;
  border-radius: var(--hg-radius) !important;
}

.hg-card-elevated {
  box-shadow: var(--hg-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hg-card-elevated:hover {
  box-shadow: var(--hg-shadow-hover);
}

.card-header {
  background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%) !important;
  border-bottom-color: var(--hg-border) !important;
  color: #212529;
  border-radius: var(--hg-radius) var(--hg-radius) 0 0 !important;
  font-weight: 600;
}

.form-control,
.form-select {
  background-color: #fff !important;
  border-color: #ced4da !important;
  color: #212529 !important;
  border-radius: 0.65rem !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--hg-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(166, 124, 0, 0.18) !important;
}

.form-label {
  font-weight: 500;
  color: #495057;
}

.btn {
  border-radius: 0.65rem;
}

.btn-gold {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--hg-accent);
  --bs-btn-border-color: var(--hg-accent);
  --bs-btn-hover-bg: var(--hg-accent-hover);
  --bs-btn-hover-border-color: var(--hg-accent-hover);
  --bs-btn-hover-color: #fff;
  font-weight: 600;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.text-gold {
  color: var(--hg-accent) !important;
}

.hero-video {
  border-radius: var(--hg-radius);
  overflow: hidden;
  border: 1px solid var(--hg-border);
  aspect-ratio: 16 / 9;
  background: #fff;
  box-shadow: var(--hg-shadow);
}

.hero-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.day-pill {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hg-muted);
  font-weight: 600;
}

/* Painel — estatísticas */
.hg-stat-card {
  position: relative;
  overflow: hidden;
}

.hg-stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 5rem;
  height: 5rem;
  background: var(--hg-accent-soft);
  border-radius: 0 0 0 100%;
  pointer-events: none;
}

.hg-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--hg-accent-soft);
  color: var(--hg-accent);
}

/* Boas-vindas painel */
.hg-welcome {
  background: linear-gradient(135deg, #fff 0%, #fffbf0 50%, #f8fafc 100%);
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow);
}

.hg-today-box {
  border-left: 4px solid var(--hg-accent);
  background: linear-gradient(90deg, rgba(166, 124, 0, 0.06) 0%, #fff 12%);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.hg-chart-canvas {
  width: 100%;
  min-height: 280px;
  max-height: 320px;
}

/* Plano — chips dos dias */
.hg-week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

@media (min-width: 992px) {
  .hg-week-nav {
    justify-content: flex-start;
  }
}

.hg-day-nav {
  position: relative;
  border: 2px solid var(--hg-border) !important;
  background: #fff !important;
  color: #212529 !important;
  border-radius: 0.85rem !important;
  padding: 0.65rem 0.85rem !important;
  min-width: 4.5rem;
  text-align: center;
  line-height: 1.2;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.hg-day-nav:hover {
  border-color: var(--hg-accent) !important;
  transform: translateY(-2px);
}

.hg-day-nav--fill {
  border-color: rgba(166, 124, 0, 0.45) !important;
  background: #fffdf8 !important;
}

.hg-day-nav__n {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hg-muted);
}

.hg-day-nav__d {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: "Playfair Display", Georgia, serif;
}

/* Calorias — grelha tipo calendário */
.hg-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.hg-cal__head {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hg-muted);
  padding: 0.35rem 0;
}

.hg-cal__cell {
  aspect-ratio: 1;
  max-height: 3.25rem;
  border-radius: 0.5rem;
  border: 1px dashed #dee2e6;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #adb5bd;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.hg-cal__cell:hover {
  border-color: var(--hg-accent);
  color: var(--hg-accent);
  transform: scale(1.04);
}

.hg-cal__cell--muted {
  visibility: hidden;
  pointer-events: none;
  border: none;
  background: transparent;
}

.hg-cal__cell--has {
  border: 2px solid rgba(166, 124, 0, 0.5);
  background: #fffdf5;
  color: var(--hg-accent);
  font-weight: 700;
}

.hg-cal__cell--today {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

.hg-cal__num {
  font-size: 0.75rem;
  font-weight: 600;
  color: #495057;
}

.hg-cal__kcal {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--hg-accent);
  line-height: 1;
  margin-top: 1px;
}

.hg-cal-summary {
  background: linear-gradient(135deg, #fff8e6 0%, #fff 100%);
  border: 1px solid rgba(166, 124, 0, 0.25);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
}

.compare-slot {
  min-height: 220px;
  border: 1px dashed #adb5bd;
  border-radius: var(--hg-radius);
  background: #f8f9fa;
}

.compare-slot img {
  max-height: 320px;
  object-fit: contain;
}

.hg-accordion-btn {
  background-color: #fff !important;
  color: #212529 !important;
  border-color: var(--hg-border) !important;
  border-radius: 0.75rem !important;
}

.hg-accordion-btn:not(.collapsed) {
  background-color: #fff8e6 !important;
  color: #212529 !important;
  box-shadow: none;
}

.hg-accordion-body {
  background-color: #fafafa !important;
  border-color: var(--hg-border) !important;
  border-radius: 0 0 0.75rem 0.75rem !important;
}

/* Gerar plano — cartões de opção */
.hg-option-card {
  border-radius: var(--hg-radius) !important;
  border: 2px solid var(--hg-border) !important;
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hg-option-card:hover {
  border-color: rgba(166, 124, 0, 0.35) !important;
  box-shadow: var(--hg-shadow);
}

.hg-option-card--accent {
  border-color: rgba(166, 124, 0, 0.45) !important;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 40%) !important;
}

.hg-option-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--hg-accent-soft);
  color: var(--hg-accent);
}

.hg-badge-soft {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 2rem;
  background: #e7f1ff;
  color: #0d6efd;
}

.hg-badge-gold {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 2rem;
  background: var(--hg-accent-soft);
  color: var(--hg-accent);
}

/* Alertas mais amigáveis */
.alert {
  border-radius: 0.85rem !important;
  border: none !important;
}

.alert-success {
  background: linear-gradient(135deg, #d1e7dd 0%, #e8f5ec 100%) !important;
  color: #0a3622 !important;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #fdecee 100%) !important;
  color: #58151c !important;
}

/* Plano — cartões de exercício */
.hg-ex-card {
  border-radius: 1rem !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hg-ex-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.25rem rgba(33, 37, 41, 0.1) !important;
}

.hg-ex-img-wrap {
  background: linear-gradient(160deg, #f1f3f5 0%, #e9ecef 100%);
}

.hg-ex-img {
  object-fit: cover;
}

.hg-ex-mini {
  width: 4rem;
  height: 4rem;
  border-radius: 0.65rem;
  object-fit: cover;
  flex-shrink: 0;
}
