/* =========================================================
   PREMIUM PICKS ELITE · Paneles de agente y administrador,
   registro y cuenta del miembro.
   Se carga después de estilos.css y paginas.css.
   ========================================================= */

/* ---------- Botones y chips extra ---------- */
.btn.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: none;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #34d572, #1fa855);
  color: #04140a;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.15s, filter 0.15s;
}

.btn-wa:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-linea.btn-icono {
  padding: 7px 10px;
  font-size: 15px;
}

button.link-gold {
  padding: 0;
  font-size: inherit;
}

.chip-ok {
  background: rgba(34, 197, 94, 0.14);
  color: var(--win);
}

.chip-warn {
  background: rgba(245, 158, 11, 0.14);
  color: var(--draw);
}

.chip-bad {
  background: rgba(239, 68, 68, 0.14);
  color: var(--loss);
}

.chip-gold {
  background: rgba(242, 193, 78, 0.14);
  color: var(--gold);
}

.chip-neutro {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.chip i {
  margin-right: 3px;
}

.up {
  color: var(--win);
  font-weight: 700;
}

.down {
  color: var(--loss);
  font-weight: 700;
}

.t-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.monto {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.monto.oro {
  color: var(--gold);
}

/* ---------- Encabezado (agente, miembro, reporte) ---------- */
.ag-head,
.adm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.ag-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1d3a63, #0b1a30);
  border: 2px solid var(--gold);
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
}

.ag-head h1,
.adm-head h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
}

.ag-head .sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ag-head-right {
  margin-left: auto;
  text-align: right;
}

.ag-head-right span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ag-head-right b {
  font-family: 'Oswald', sans-serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.adm-head form {
  margin-left: auto;
}

/* ---------- Enlace y QR ---------- */
.link-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border-radius: 10px;
  background: #071224;
  border: 1px solid var(--line);
}

.link-box code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Inter', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--cyan);
}

.link-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.msg-venta {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px dashed rgba(34, 197, 94, 0.4);
  font-size: 13px;
  color: #c9d4e6;
}

.msg-venta span {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--win);
}

.qr-box {
  text-align: center;
}

.qr-img {
  display: inline-block;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 24px -6px rgba(242, 193, 78, 0.55);
}

.qr-img img,
.qr-img canvas {
  display: block;
  width: 150px;
  height: 150px;
}

.qr-box small {
  display: block;
  margin: 8px 0;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Tarjetas de números ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  position: relative;
  padding: 14px;
  border-radius: 12px;
  background: #071224;
  border: 1px solid var(--line-soft);
}

.kpi > i {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 16px;
  color: var(--muted-2);
}

.kpi > span {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi b {
  display: block;
  margin-top: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

.kpi small {
  font-size: 12px;
  color: var(--muted);
}

.kpi.dest {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(242, 193, 78, 0.16), transparent 65%),
    linear-gradient(180deg, #13284a, #0a1628);
  border: 1px solid var(--gold);
}

.kpi.dest b {
  color: var(--gold);
}

.dos-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* ---------- Embudo ---------- */
.embudo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.embudo-fila {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 60px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.embudo-fila b {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-align: right;
}

.barra {
  height: 14px;
  border-radius: 99px;
  background: #10223b;
  overflow: hidden;
}

.barra span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.barra.oro span {
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
}

.barra.verde span {
  background: linear-gradient(90deg, #16a34a, var(--win));
}

.embudo-nota {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.embudo-nota i {
  color: var(--gold);
}

/* ---------- Gráfica de comisiones ---------- */
.grafica {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 170px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
}

.gbar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.gbar em {
  margin-bottom: 4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #cfd9ea;
  white-space: nowrap;
}

.gbar span {
  width: 100%;
  max-width: 46px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}

.gbar.pend span {
  background: repeating-linear-gradient(45deg, rgba(242, 193, 78, 0.85) 0 6px, rgba(212, 154, 42, 0.6) 6px 12px);
}

.gmeses {
  display: flex;
  gap: 12px;
  padding: 6px 4px 0;
}

.gmeses span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.leyenda {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.leyenda i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 2px;
  background: var(--gold);
}

.leyenda i.pend {
  background: repeating-linear-gradient(45deg, var(--gold) 0 3px, var(--gold-2) 3px 6px);
}

/* ---------- Próximos a vencer (semáforo) ---------- */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  background: #071224;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.filtro b {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: #1b2c46;
  color: #fff;
  font-size: 11px;
  text-align: center;
}

.filtro.active {
  border-color: var(--gold);
  color: var(--gold);
}

.punto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.punto.rojo {
  background: var(--loss);
}

.punto.naranja {
  background: #fb923c;
}

.punto.amarillo {
  background: #facc15;
}

.ret-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ret {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: #071224;
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--muted-2);
  transition: opacity 0.2s;
}

.ret.rojo {
  border-top-color: var(--loss);
}

.ret.naranja {
  border-top-color: #fb923c;
}

.ret.amarillo {
  border-top-color: #facc15;
}

.ret.hecho {
  opacity: 0.55;
}

.ret-nombre {
  font-family: 'Oswald', sans-serif;
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
}

.ret-tel {
  font-size: 12px;
  color: var(--muted);
}

.ret-dias {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 2px;
}

.ret-dias b {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.ret.rojo .ret-dias b {
  color: var(--loss);
}

.ret.naranja .ret-dias b {
  color: #fb923c;
}

.ret.amarillo .ret-dias b {
  color: #facc15;
}

.ret-dias span {
  font-size: 12px;
  color: var(--muted);
}

.ret-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.ret .btn-wa {
  width: 100%;
}

.ret-contactado {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
}

.ret-contactado input {
  accent-color: var(--win);
}

/* ---------- Tablas del panel ---------- */
.tabla-herr {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.buscar {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #071224;
  border: 1px solid var(--line);
  color: var(--muted);
}

.buscar input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
}

select.sel {
  padding: 8px 12px;
  border-radius: 9px;
  background: #071224;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
}

.tabla-panel td,
.tabla-panel th {
  white-space: nowrap;
}

.tabla th.num,
.tabla td.num {
  text-align: right;
}

.tabla th.orden {
  color: var(--gold);
}

.tabla tbody tr:hover td {
  background: rgba(43, 140, 255, 0.04);
}

.tabla tfoot td {
  padding: 10px;
  border-top: 1px solid var(--line);
  font-weight: 800;
}

.tabla td.acciones {
  align-items: center;
}

.tabla td.acciones form {
  display: inline;
}

.fila-inactiva td {
  opacity: 0.55;
}

.pos {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #1b2c46;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
}

.pos.p1 {
  background: var(--gold);
  color: #0b1220;
}

.pos.p2 {
  background: #cbd5e1;
  color: #0b1220;
}

.pos.p3 {
  background: #d08b4b;
  color: #0b1220;
}

/* Alta desplegable */
.alta {
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: #071224;
}

.alta summary {
  padding: 11px 14px;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
}

.alta summary::-webkit-details-marker {
  display: none;
}

.alta[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.alta .form,
.alta .aviso {
  margin: 14px;
}

/* ---------- Reparto del dinero ---------- */
.reparto {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.reparto-barra {
  display: flex;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  margin: 4px 0 14px;
}

.reparto-barra span {
  display: grid;
  place-items: center;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0b1220;
}

.rp-tu1 {
  background: linear-gradient(180deg, #ffe08a, var(--gold));
}

.rp-tu2 {
  background: linear-gradient(180deg, #ffd56a, var(--gold-2));
}

.rp-ag {
  background: linear-gradient(180deg, #7fdcff, var(--cyan));
}

.rp-gas {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.reparto-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rl {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #071224;
  border: 1px solid var(--line-soft);
}

.rl > i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.rl b {
  display: block;
  font-size: 13.5px;
}

.rl small {
  font-size: 12px;
  color: var(--muted);
}

.rl .monto {
  font-size: 19px;
}

.rl.total {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(242, 193, 78, 0.16), transparent 65%),
    linear-gradient(180deg, #13284a, #0a1628);
  border-color: var(--gold);
}

.rl.total .monto {
  font-size: 24px;
  color: var(--gold);
}

.formula {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #071224;
  border: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.formula b {
  color: #dfe7f3;
}

/* ---------- Registrar pago ---------- */
.pago-resumen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pago-resumen div {
  padding: 10px;
  border-radius: 9px;
  background: #071224;
  border: 1px solid var(--line-soft);
  text-align: center;
}

.pago-resumen span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pago-resumen b {
  font-family: 'Oswald', sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.pago-resumen .tuyo {
  border-color: var(--gold);
}

.pago-resumen .tuyo b {
  color: var(--gold);
}

/* ---------- Registro y cuenta del miembro ---------- */
.registro-intro {
  margin-bottom: 12px;
  color: #c4d0e3;
}

.registro-agente {
  margin-bottom: 12px;
}

.registro-pie {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.login-card .aviso {
  margin-bottom: 12px;
}

.cuenta-estado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.cuenta-icono {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(242, 193, 78, 0.12);
  border: 1px solid rgba(242, 193, 78, 0.45);
  color: var(--gold);
}

.cuenta-vencido .cuenta-icono,
.cuenta-registrado .cuenta-icono {
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--line);
  color: #cbd5e1;
}

.cuenta-texto {
  flex: 1;
  min-width: 240px;
}

.cuenta-texto h1 {
  margin: 4px 0 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
}

.cuenta-texto p {
  color: #c4d0e3;
}

.cuenta-acciones {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cuenta-dato {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.cuenta-dato span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lp-wa {
  margin-top: 8px;
}

/* ---------- Formas de pago ---------- */
.fpago-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 18px 0 4px;
}

.fpago {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  background: #071224;
  border: 1px solid var(--line-soft);
}

.fpago-head {
  font-family: 'Oswald', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fpago-head i {
  margin-right: 6px;
  color: var(--gold);
}

.fpago-dato {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.fpago-dato span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.fpago-dato b {
  font-size: 15px;
  word-break: break-all;
}

.fpago-copiar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0b1a30;
  color: var(--gold);
}

.fpago-copiar:hover {
  border-color: var(--gold);
}

/* Selector de mes */
.mes-nav {
  margin-left: auto;
}

.mes-nav .sel {
  padding: 6px 10px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 1100px) {
  .ret-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dos-col,
  .reparto {
    grid-template-columns: minmax(0, 1fr);
  }

  .ret-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .link-grid,
  .ret-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ag-head-right {
    margin-left: 0;
    text-align: left;
  }

  .kpi b {
    font-size: 24px;
  }

  .embudo-fila {
    grid-template-columns: 100px minmax(0, 1fr) 46px;
  }

  .pago-resumen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cuenta-acciones {
    align-items: flex-start;
  }

  .adm-head form {
    margin-left: 0;
  }
}
