/* ═══════════════════════════════════════
   PORTAL REVENDEDOR — tienda
   ═══════════════════════════════════════ */

/* ── Auth (login/registro) ── */
.rev-auth-wrap {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rev-auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
}
.rev-logo { text-align: center; margin-bottom: 24px; }
.rev-logo h2 { font-size: 22px; font-weight: 800; color: #1e293b; margin: 4px 0; }
.rev-logo p  { font-size: 13px; color: #94a3b8; margin: 0; }

.rev-tabs { display: flex; gap: 0; margin-bottom: 22px; border-bottom: 2px solid #e2e8f0; }
.rev-tab {
  flex: 1; padding: 9px; font-size: 13px; font-weight: 600;
  background: none; border: none; color: #94a3b8; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.rev-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }

.rev-field { margin-bottom: 14px; }
.rev-field label { display:block; font-size:12px; font-weight:600; color:#475569; margin-bottom:5px; }
.rev-field input {
  width: 100%; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; color: #1e293b; outline: none; box-sizing: border-box;
}
.rev-field input:focus { border-color: #7c3aed; }

.rev-btn-main {
  width: 100%; padding: 12px; margin-top: 8px;
  background: linear-gradient(135deg,#7c3aed,#6d28d9);
  color: #fff; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.rev-btn-main:hover { background: linear-gradient(135deg,#6d28d9,#5b21b6); }
.rev-btn-main:disabled { opacity: .6; cursor: not-allowed; }

.rev-err {
  background: #fee2e2; color: #b91c1c; border-radius: 8px;
  padding: 9px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px;
}

/* ── Panel principal ── */
.rev-panel { max-width: 900px; margin: 0 auto; padding: 20px 16px; font-family: 'Inter', sans-serif; }

.rev-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg,#7c3aed,#4f46e5);
  border-radius: 16px; padding: 18px 22px; color: #fff; margin-bottom: 20px;
  flex-wrap: wrap; gap: 10px;
}
.rev-saludo { font-size: 15px; }
.rev-saldo-pill {
  background: rgba(255,255,255,.15); padding: 6px 14px; border-radius: 20px;
  font-size: 14px; margin-top: 4px;
}
.rev-logout {
  background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 8px; padding: 6px 14px; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.rev-logout:hover { background: rgba(255,255,255,.25); }

.rev-nav-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 20px;
  overflow-x: auto;
}
.rev-nav-tab {
  padding: 9px 18px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: none; border: none; color: #64748b; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.rev-nav-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }

.rev-section { animation: fadeIn .2s; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:none} }

/* ── Billetera ── */
.rev-saldo-card {
  background: linear-gradient(135deg,#7c3aed,#4f46e5);
  border-radius: 16px; padding: 28px; color: #fff; text-align: center; margin-bottom: 20px;
}
.rev-saldo-label { font-size: 13px; opacity: .8; margin-bottom: 6px; }
.rev-saldo-monto { font-size: 42px; font-weight: 800; letter-spacing: -1px; }
.rev-saldo-sub { font-size: 12px; opacity: .7; margin-top: 6px; }

.rev-recargas-wrap h4 { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0 0 12px; }
.rev-recarga-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #f8fafc; border-radius: 10px; margin-bottom: 8px;
}

/* ── Cuentas ── */
.rev-cuenta-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
  margin-bottom: 14px; overflow: hidden;
}
.rev-cuenta-head {
  background: #f8fafc; padding: 12px 16px; display: flex;
  justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0;
}
.rev-cuenta-serv  { font-weight: 700; font-size: 14px; color: #1e293b; }
.rev-cuenta-perfil { font-size: 12px; color: #7c3aed; font-weight: 600; background: #f3e8ff; padding: 2px 10px; border-radius: 20px; }
.rev-cuenta-body { padding: 14px 16px; }
.rev-cred-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rev-cred-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; width: 52px; flex-shrink: 0; }
.rev-cred-val { font-size: 13px; color: #1e293b; font-family: monospace; }
.rev-copyable { cursor: pointer; }
.rev-copyable:hover { color: #7c3aed; }
.rev-cuenta-footer { padding: 9px 16px; font-size: 12px; font-weight: 600; text-align: right; }
.rev-venc-verde { background: #dcfce7; color: #15803d; }
.rev-venc-naranja { background: #fef3c7; color: #92400e; }
.rev-venc-rojo { background: #fee2e2; color: #b91c1c; }

/* ── Tabla códigos ── */
.rev-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rev-table th { background: #f8fafc; color: #475569; font-weight: 600; padding: 9px 12px; text-align:left; border-bottom: 2px solid #e2e8f0; }
.rev-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.rev-table tr:hover td { background: #fafbff; }
.rev-link { color: #4f46e5; font-weight: 600; text-decoration: none; }
.rev-link:hover { text-decoration: underline; }

/* ── Badges ── */
.rev-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.rev-badge-red   { background: #fee2e2; color: #b91c1c; }
.rev-badge-blue  { background: #dbeafe; color: #1d4ed8; }
.rev-badge-green { background: #dcfce7; color: #15803d; }
.rev-badge-gray  { background: #f1f5f9; color: #475569; }

/* ── Historial pedidos ── */
.rev-pedido-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
.rev-pedido-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #1e293b; }

/* ── Varios ── */
.rev-loading { text-align: center; padding: 24px; color: #94a3b8; font-size: 13px; }
.rev-empty   { text-align: center; padding: 32px; color: #94a3b8; font-size: 14px; }

/* ── Página Códigos standalone ── */
.cod-page        { max-width: 700px; margin: 0 auto; padding: 16px 14px; font-family: 'Inter', sans-serif; }
.cod-header      { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.cod-title       { font-size: 18px; font-weight: 800; color: #1e293b; }
.cod-sub         { font-size: 12px; color: #94a3b8; margin-top: 3px; }
.cod-refresh     {
  background: #f1f5f9; border: none; border-radius: 8px; padding: 8px 10px;
  cursor: pointer; display: flex; align-items: center; color: #475569; flex-shrink:0;
}
.cod-refresh:hover { background: #e2e8f0; }

/* Filtros */
.cod-filtros     { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.cod-filtro      {
  padding: 5px 13px; font-size: 12px; font-weight: 600; border-radius: 20px;
  border: 1.5px solid #e2e8f0; background: #fff; color: #64748b; cursor: pointer; white-space: nowrap;
}
.cod-filtro.active       { background: #1e293b; color: #fff; border-color: #1e293b; }
.cod-f-netflix.active    { background: #b91c1c; border-color: #b91c1c; color:#fff; }
.cod-f-disney.active     { background: #1d4ed8; border-color: #1d4ed8; color:#fff; }

/* Search */
.cod-search-wrap { position: relative; margin-bottom: 14px; }
.cod-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.cod-search      {
  width: 100%; padding: 10px 14px 10px 34px; border: 1.5px solid #e2e8f0;
  border-radius: 12px; font-size: 14px; color: #1e293b; outline: none; box-sizing: border-box;
}
.cod-search:focus { border-color: #7c3aed; }

/* Cards */
.cod-card        {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 13px 15px; margin-bottom: 10px; transition: border-color .15s;
}
.cod-card:hover  { border-color: #c4b5fd; }
.cod-card-top    { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cod-fecha       { font-size: 11px; color: #94a3b8; margin-left: auto; white-space: nowrap; }
.cod-cuenta-email { font-size: 11px; color: #94a3b8; font-family: monospace; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cod-asunto      { font-size: 13px; color: #334155; margin-bottom: 10px; line-height: 1.4; font-weight: 500; }

/* Badges */
.cod-badge       { display:inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.cod-badge-nf    { background: #fee2e2; color: #b91c1c; }
.cod-badge-ds    { background: #dbeafe; color: #1d4ed8; }
.cod-badge-gen   { background: #f1f5f9; color: #475569; }

/* Código y acciones */
.cod-accion-row  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cod-codigo-wrap { display: flex; align-items: center; gap: 8px; }
.cod-codigo      {
  font-family: monospace; font-size: 22px; font-weight: 800; color: #1e293b;
  letter-spacing: 3px; background: #f8fafc; padding: 7px 14px; border-radius: 10px;
  border: 1.5px solid #e2e8f0;
}
.cod-copy-btn    {
  background: #f3e8ff; color: #7c3aed; border: none; border-radius: 8px;
  padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.cod-copy-btn:hover   { background: #ede9fe; }
.cod-copy-btn.cod-copied { background: #dcfce7; color: #15803d; }
.cod-link-btn    {
  display: inline-flex; align-items: center; gap: 5px;
  background: #dbeafe; color: #1d4ed8; border: none; border-radius: 8px;
  padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.cod-link-btn:hover { background: #bfdbfe; }

/* ── Catálogo Inicio (RevCatalogoView) ── */
.rcat-page        { max-width: 700px; margin: 0 auto; padding: 16px; font-family: 'Inter', sans-serif; }
.rcat-hero        {
  background: linear-gradient(135deg,#7c3aed,#4f46e5);
  border-radius: 16px; padding: 20px 22px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 10px;
}
.rcat-bienvenido  { font-size: 14px; opacity: .9; margin-bottom: 6px; }
.rcat-saldo-lbl   { font-size: 12px; opacity: .7; }
.rcat-saldo-monto { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.rcat-recargar    {
  background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 10px; padding: 8px 14px; font-size: 13px;
  font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.rcat-recargar:hover { background: rgba(255,255,255,.28); }
.rcat-section-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 12px; }

/* Modal overlay */
.st-modal-bg {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.st-modal-bg.open { display: flex; }
.st-modal {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  max-height: 90vh;
  overflow-y: auto;
}

/* Modal confirmación */
.rcat-modal       { text-align: center; }
.rcat-modal-icon  { font-size: 48px; margin-bottom: 8px; }
.rcat-modal-nombre { font-size: 18px; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.rcat-modal-precio { font-size: 28px; font-weight: 800; color: #7c3aed; margin-bottom: 16px; }
.rcat-modal-detalle {
  background: #f8fafc; border-radius: 10px; padding: 12px 16px;
  margin-bottom: 16px; text-align: left;
}
.rcat-drow        { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: #475569; }
.rcat-drow-resta  { color: #b91c1c; }
.rcat-modal-btns  { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.rcat-modal-close {
  width: 100%; margin-top: 10px; padding: 10px; background: #f1f5f9;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: #475569; cursor: pointer;
}
.rcat-creds       { background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 10px; padding: 14px; margin-top: 10px; text-align: left; }
.rcat-cred-title  { font-size: 12px; font-weight: 700; color: #15803d; margin-bottom: 8px; text-transform: uppercase; }
.rcat-cred-row    { font-size: 13px; color: #1e293b; margin-bottom: 4px; }
.rcat-cred-mono   { font-family: monospace; font-weight: 700; }

/* ── Catálogo tienda ── */
.rev-catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}
.rev-cat-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 16px 12px; text-align: center;
  transition: box-shadow .15s; cursor: default;
}
.rev-cat-card:not(.rev-cat-agotado):hover { box-shadow: 0 4px 16px rgba(124,58,237,.12); border-color: #c4b5fd; }
.rev-cat-agotado { opacity: .5; }
.rev-cat-icon      { font-size: 28px; margin-bottom: 6px; }
.rev-cat-icon-emoji { font-size: 28px; margin-bottom: 6px; }
.rev-cat-img-wrap  { height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.rev-cat-img       { max-height: 52px; max-width: 110px; object-fit: contain; display: block; }
.rev-cat-nombre    { font-size: 12px; font-weight: 700; color: #1e293b; margin-bottom: 4px; line-height: 1.3; }
.rev-cat-precio    { font-size: 16px; font-weight: 800; color: #7c3aed; margin-bottom: 6px; }
.rev-cat-stock     { font-size: 11px; font-weight: 600; color: #15803d; background: #dcfce7; border-radius: 20px; padding: 2px 8px; display: inline-block; margin-bottom: 8px; }
.rev-cat-stock-0   { color: #94a3b8; background: #f1f5f9; }
.rev-cat-btn {
  width: 100%; padding: 7px 4px; font-size: 12px; font-weight: 700;
  border: none; border-radius: 8px; cursor: pointer;
}
.rev-cat-btn-ok    { background: linear-gradient(135deg,#7c3aed,#6d28d9); color: #fff; }
.rev-cat-btn-ok:hover { background: linear-gradient(135deg,#6d28d9,#5b21b6); }
.rev-cat-btn-saldo { background: #f3e8ff; color: #7c3aed; }
.rev-cat-agotado-badge { font-size: 11px; font-weight: 700; color: #94a3b8; }

/* ── Tab Perfil ── */
.rev-perfil-card    { background: linear-gradient(135deg,#7c3aed,#4f46e5); border-radius: 16px; padding: 28px; text-align: center; color: #fff; margin-bottom: 16px; }
.rev-perfil-avatar  { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; margin: 0 auto 12px; }
.rev-perfil-nombre  { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.rev-perfil-tel     { font-size: 13px; opacity: .8; }
.rev-btn-logout-full {
  width: 100%; padding: 13px; background: #fee2e2; color: #b91c1c;
  border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.rev-btn-logout-full:hover { background: #fecaca; }

/* ── Breb recharge card ── */
.rev-breb-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 18px; margin-bottom: 4px;
}
.rev-breb-title { font-size: 15px; font-weight: 800; color: #1e293b; margin-bottom: 12px; }
.rev-breb-inst  { font-size: 13px; color: #475569; margin-bottom: 10px; line-height: 1.7; }
.rev-breb-dato  {
  display: inline-block; background: #f3e8ff; color: #7c3aed;
  border-radius: 8px; padding: 4px 10px; font-size: 13px; margin: 3px 4px 3px 0;
}

/* ── Copy mini button ── */
.rev-copy-mini {
  background: none; border: none; cursor: pointer; font-size: 13px;
  padding: 0 3px; opacity: .7; vertical-align: middle;
}
.rev-copy-mini:hover { opacity: 1; }
