/* EnergiaFit: componentes propios sobre la plantilla Webkit (mismo lenguaje visual que FisioPower). */

/* ---------- Logo ---------- */
.ef-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none !important;
}
.ef-logo-marca {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #5773FF, #F35421);
  color: #fff;
  font-size: 1.3rem;
}
.ef-logo-grande {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 2.2rem;
}
.ef-logo-texto {
  color: #01041b;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .02em;
}
body.sidebar-main .iq-sidebar:not(:hover) .ef-logo-texto { display: none; }
.ef-auth-lado { text-align: center; }
.ef-auth-marca { padding: 1.5rem 1rem 0; }

/* ---------- Avatar con iniciales ---------- */
.ef-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: #e3e8ff;
  color: #3049c9;
  font-weight: 700;
  overflow: hidden;
}
.ef-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ef-avatar-sm { width: 36px; height: 36px; font-size: .9rem; }
.ef-avatar-lg { width: 96px; height: 96px; font-size: 2rem; }

/* ---------- Medidores, KPIs y dashboard (heredados de FisioPower) ---------- */
.ef-meter {
  display: inline-block;
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e3e8ff;
  overflow: hidden;
  vertical-align: middle;
}
.ef-meter > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #5773FF;
}
.ef-meter.ef-lleno > span { background: #F35421; }
.ef-progreso {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 120px;
  white-space: nowrap;
  font-size: .85rem;
}
.ef-progreso .ef-meter { width: 64px; flex: none; }
.ef-num { font-variant-numeric: tabular-nums; }
.ef-tabla td, .ef-tabla th { vertical-align: middle; }

.ef-cabecera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ef-acciones { display: flex; flex-wrap: wrap; gap: .5rem; }
.ef-kpi .card-body { display: flex; flex-direction: column; }
.ef-kpi-etiqueta { color: #605C8D; font-size: .85rem; font-weight: 500; }
.ef-kpi-valor { margin: .35rem 0 .5rem; color: #01041b; font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
.ef-kpi-de { color: #6b7488; font-size: .95rem; font-weight: 500; }
.ef-kpi-pie { margin-top: auto; font-size: .8rem; }
.ef-delta { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; }
.ef-delta-sube { color: #1a7f37; }
.ef-delta-baja { color: #a12622; }
.ef-delta-igual { color: #6b7488; font-weight: 500; }
.ef-vacio { margin: 1.5rem 0; color: #6b7488; text-align: center; }
.ef-ver-datos { margin-top: .5rem; font-size: .85rem; }
.ef-ver-datos summary { color: #5773FF; cursor: pointer; }
.ef-lista { margin: 0; padding: 0; list-style: none; }
.ef-lista > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1rem;
  padding: .65rem 0;
}
.ef-lista > li + li { border-top: 1px solid #eef0f5; }

/* ---------- Filtros de listados ---------- */
.ef-filtros { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.ef-filtros .form-group { margin-bottom: 0; }
.ef-filtros .ef-buscar { flex: 1 1 240px; }
.ef-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.ef-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .75rem;
  border: 1px solid #dfe3ec;
  border-radius: 1rem;
  background: #fff;
  color: #3f4254;
  font-size: .82rem;
  white-space: nowrap;
}
.ef-chip:hover { border-color: #5773FF; color: #3f4254; text-decoration: none; }
.ef-chip.activo { border-color: #5773FF; background: #5773FF; color: #fff; }
.ef-chip b { font-variant-numeric: tabular-nums; }

/* ---------- Ficha de cliente ---------- */
.ef-ficha { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.ef-ficha-datos { flex: 1 1 260px; }
.ef-ficha-datos h3 { margin-bottom: .25rem; }
.ef-dato { color: #6b7488; font-size: .875rem; margin-right: 1rem; white-space: nowrap; }
.ef-dato i { color: #5773FF; }
.ef-plan-actual {
  border: 1px solid #e3e8ff;
  border-left: 4px solid #5773FF;
  border-radius: .6rem;
  padding: 1rem 1.25rem;
  background: #f8f9ff;
}
.ef-plan-actual.ef-sin-plan { border-left-color: #F35421; background: #fff7f4; }

/* ---------- Agenda / horario ---------- */
.ef-semana {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: .75rem;
  overflow-x: auto;
}
.ef-dia h6 { padding-bottom: .4rem; margin-bottom: .6rem; border-bottom: 2px solid #eef0f5; font-size: .85rem; }
.ef-dia.hoy h6 { border-bottom-color: #5773FF; color: #5773FF; }
.ef-sesion {
  display: block;
  padding: .5rem .6rem;
  margin-bottom: .5rem;
  border: 1px solid #e3e6ee;
  border-left: 4px solid var(--c, #5773FF);
  border-radius: .5rem;
  background: #fff;
  color: #3f4254;
  font-size: .82rem;
  line-height: 1.35;
}
.ef-sesion:hover { box-shadow: 0 2px 8px rgba(1, 4, 27, .08); color: #3f4254; text-decoration: none; }
.ef-sesion strong { display: block; font-size: .88rem; color: #01041b; }
.ef-sesion.cancelada { opacity: .55; text-decoration: line-through; }
.ef-sesion .ef-meter { margin-top: .35rem; }

/* Portal: tarjetas de clase reservable */
.ef-clase-portal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  padding: .85rem 1rem;
  border: 1px solid #e3e6ee;
  border-left: 5px solid var(--c, #5773FF);
  border-radius: .6rem;
  background: #fff;
}
.ef-clase-portal + .ef-clase-portal { margin-top: .6rem; }
.ef-clase-hora { min-width: 64px; font-size: 1.15rem; font-weight: 700; color: #01041b; font-variant-numeric: tabular-nums; }
.ef-clase-info { flex: 1 1 200px; }
.ef-clase-info strong { color: #01041b; }
.ef-clase-cupo { min-width: 130px; font-size: .8rem; color: #6b7488; }
.ef-clase-accion { margin-left: auto; }

/* ---------- Heatmap de horas pico ---------- */
.ef-heatmap { border-collapse: separate; border-spacing: 3px; font-size: .78rem; }
.ef-heatmap th { color: #6b7488; font-weight: 500; text-align: center; padding: 0 .2rem; }
.ef-heatmap td {
  min-width: 34px;
  height: 30px;
  border-radius: 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: rgba(87, 115, 255, var(--a, 0));
  color: #01041b;
}
.ef-heatmap td.alto { color: #fff; font-weight: 600; }
.ef-heatmap td.cero { background: #f4f5fa; color: transparent; }

/* ---------- Check-in ---------- */
.ef-checkin-input { font-size: 1.4rem; height: auto; padding: .75rem 1rem; letter-spacing: .05em; }
.ef-checkin-resultado { border-radius: .8rem; padding: 1.25rem; display: flex; gap: 1rem; align-items: center; }
.ef-checkin-resultado.ok { background: #e9f7ef; border: 1px solid #3aa76d; }
.ef-checkin-resultado.no { background: #fdecea; border: 1px solid #d9534f; }

/* ---------- Planes (portal) ---------- */
.ef-plan-card { border: 1px solid #e3e6ee; border-radius: .8rem; transition: box-shadow .15s, transform .15s; }
.ef-plan-card:hover { box-shadow: 0 6px 20px rgba(87, 115, 255, .15); transform: translateY(-2px); }
.ef-plan-precio { font-size: 2rem; font-weight: 800; color: #01041b; }
.ef-plan-precio small { font-size: .9rem; font-weight: 500; color: #6b7488; }
.ef-plan-incluye { padding-left: 0; list-style: none; }
.ef-plan-incluye li { padding: .2rem 0; }
.ef-plan-incluye i { color: #50C6B4; margin-right: .35rem; }

/* ---------- Venta de membresía ---------- */
.ef-resumen-venta { border: 1px solid #e3e6ee; border-radius: .8rem; padding: 1.25rem; background: #f8f9ff; position: sticky; top: 90px; }
.ef-resumen-venta dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.ef-resumen-venta dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ef-resumen-venta .ef-total { padding-top: .5rem; border-top: 1px solid #dfe3ec; font-size: 1.25rem; font-weight: 700; color: #01041b; }
.ef-modos .custom-control { padding: .6rem .8rem .6rem 2.4rem; border: 1px solid #e3e6ee; border-radius: .5rem; margin-bottom: .5rem; }
.ef-horario-fila { display: flex; gap: .5rem; margin-bottom: .5rem; }
.ef-horario-fila select { flex: 1 1 auto; }
.ef-horario-fila input { width: 130px; flex: none; }

/* ---------- SweetAlert2 ---------- */
.ef-swal { font-family: inherit; border-radius: 1rem !important; }
.ef-swal .swal2-title { font-size: 1.35rem; color: #01041b; }
.ef-swal .swal2-html-container, .ef-swal .swal2-content { font-size: .98rem; color: #3f4254; }
.ef-swal-nota { margin: .8rem 0 0; color: #6b7488; font-size: .85rem; }
.ef-swal-lista { margin: 0; padding-left: 1.2rem; text-align: left; }
.swal2-timer-progress-bar { background: rgba(87, 115, 255, .6) !important; }

/* ---------- Recibo imprimible ---------- */
.ef-recibo { max-width: 720px; margin: 0 auto; }
.ef-recibo table td { padding: .4rem 0; }
@media print {
  .iq-sidebar, .iq-top-navbar, .iq-footer, .ef-no-imprimir { display: none !important; }
  .content-page { margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 0 !important; }
}

@media (max-width: 575.98px) {
  .ef-kpi-valor { font-size: 1.7rem; }
  .ef-clase-accion { margin-left: 0; width: 100%; }
  .ef-clase-accion .btn { width: 100%; }
}
