/* Alfa Shop — estilos de los apartados nuevos (barra del administrador, aprobación de recargas, acreditación y
   ventana de accesos). Usa los tokens del diseño aprobado de styles.css (negro, gris oscuro, rojo vino y neón) y no
   modifica ninguna regla existente. El único color nuevo es el azul del botón de recargas pendientes. */
:root { --alfa-blue: #2f7bff; --alfa-blue-soft: #8db8ff; --alfa-green: #1fae5b; --alfa-green-soft: #6fe3a0; }

/* ---------- Barra superior del administrador ---------- */
.mq-balance-pill { height: 48px; padding: 0 18px; gap: 10px; border-color: var(--neon); box-shadow: 0 0 14px rgba(255, 31, 61, .28); }
.mq-balance-pill svg { color: var(--neon-soft); }
.mq-balance-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mq-balance-pill strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.mq-balance-pill strong.unavailable { font-size: 14px; color: #ffa6bb; }
.topup-pill svg { color: var(--muted); }
.topup-pill.has-pending { border-color: var(--alfa-blue); background: rgba(47, 123, 255, .14); color: #fff; box-shadow: 0 0 18px rgba(47, 123, 255, .55); animation: alfa-blue-pulse 2.4s ease-in-out infinite; }
.topup-pill.has-pending svg { color: var(--alfa-blue-soft); }
.topup-pill.has-pending:hover { border-color: var(--alfa-blue-soft); box-shadow: 0 0 24px rgba(47, 123, 255, .7); }
.topup-badge { background: var(--alfa-blue); box-shadow: 0 0 10px rgba(47, 123, 255, .8); }
.header-actions .topup-pill .topup-badge { display: grid; }
@keyframes alfa-blue-pulse { 50% { box-shadow: 0 0 6px rgba(47, 123, 255, .35); } }
@media (prefers-reduced-motion: reduce) { .topup-pill.has-pending { animation: none; } }

/* ---------- Aprobación de recargas ---------- */
.topup-list { display: grid; gap: 14px; }
.topup-card { display: grid; gap: 12px; border-left: 3px solid var(--wine); }
.topup-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.topup-folio { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; color: var(--neon-soft); }
.topup-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0; }
.topup-details dt { font-size: 12px; color: var(--muted); }
.topup-details dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.topup-amount { font-size: 20px; color: #fff; }
.topup-proof img { max-width: min(100%, 320px); max-height: 260px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: var(--ink); }
.proof-preview { display: inline-block; max-width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.proof-preview:focus-visible { outline: 2px solid var(--neon-soft); outline-offset: 4px; border-radius: 12px; }
.proof-viewer { width: min(1100px, calc(100vw - 24px)); max-height: 92vh; max-height: 92dvh; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-2); color: var(--text); }
.proof-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.proof-viewer::backdrop { background: #050407dd; backdrop-filter: blur(6px); }
.proof-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.proof-head h2 { font-size: 18px; }
.proof-head .icon-btn { flex: none; }
.proof-body { min-height: 0; overflow: auto; padding: 12px; }
.proof-body img { display: block; margin: auto; max-width: 100%; max-height: 75vh; max-height: 75dvh; object-fit: contain; }
.topup-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-approve, .btn-reject { flex: 1; min-width: 140px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; font-weight: 800; transition: filter .15s, box-shadow .15s; }
.btn-approve { border: 1.5px solid var(--alfa-green-soft); background: linear-gradient(180deg, #23c766, #12803f); box-shadow: 0 0 16px rgba(31, 174, 91, .35); }
.btn-reject { border: 1.5px solid #ff6b80; background: linear-gradient(180deg, #ff2a47, #9a0a1b); box-shadow: 0 0 16px rgba(255, 31, 61, .35); }
.btn-approve:hover, .btn-reject:hover { filter: brightness(1.1); }

/* ---------- Acreditar saldo ---------- */
.credit-panel { display: grid; gap: 12px; }
.credit-panel h2, .credit-panel h3 { display: flex; align-items: center; gap: 8px; }
.credit-clients { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding-right: 4px; }
.credit-client { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); }
.credit-client small { color: var(--muted); }
.credit-client.selected { border-color: var(--neon); box-shadow: 0 0 12px rgba(255, 31, 61, .3); background: rgba(109, 10, 27, .35); }
.credit-confirm { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--neon); background: rgba(109, 10, 27, .25); }
.credit-warning { color: #ffd27a; font-weight: 700; }

/* ---------- Accesos (ventana emergente y Mis compras) ---------- */
.license-window { width: min(620px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0; border: 1px solid rgba(255, 31, 61, .55); border-radius: 22px; color: var(--text);
  background: radial-gradient(120% 70% at 0% 0%, rgba(109, 10, 27, .55), transparent 60%), linear-gradient(180deg, #121216, #08080a); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 0 46px rgba(255, 31, 61, .32), 0 30px 80px #000; }
.license-window[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.license-window::backdrop { background: #050407cc; backdrop-filter: blur(8px); }
.license-head { display: flex; gap: 14px; align-items: center; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); }
.license-head div { flex: 1; }
.license-head h2 { font-size: 22px; letter-spacing: .01em; }
.license-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.license-seal { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; color: #fff; background: linear-gradient(180deg, #ff2a47, #8f0919); box-shadow: var(--glow); }
.license-body { overflow: auto; padding: 16px 22px 22px; display: grid; gap: 14px; align-content: start; }
.access-group { display: grid; gap: 10px; }
.access-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.access-group-head h3 { font-size: 16px; }
.access-group-head small, .access-unit { color: var(--muted); font-size: 13px; }
.access-unit { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-weight: 700; }
.access-card { display: grid; gap: 8px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(16, 16, 19, .9); }
.access-row { display: grid; grid-template-columns: 34px 92px minmax(0, 1fr) 40px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.access-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--neon-soft); background: rgba(255, 31, 61, .1); }
.access-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.access-value { margin: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 15px; color: #fff; overflow-wrap: anywhere; white-space: pre-wrap; user-select: all; }
.access-other .access-value { font-size: 13.5px; user-select: text; }
.access-copy { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #0e0e11; color: #fff; transition: border-color .15s, box-shadow .15s, color .15s; }
.access-copy:hover { border-color: var(--neon); box-shadow: 0 0 12px rgba(255, 31, 61, .35); }
.access-copy.copied, .access-copy-all.copied { border-color: var(--alfa-green-soft); color: var(--alfa-green-soft); box-shadow: 0 0 12px rgba(31, 174, 91, .4); }
.access-copy-all { margin-top: 2px; }
.order-credentials { display: grid; gap: 10px; margin: 8px 0; }
.access-loading { display: flex; align-items: center; gap: 6px; }
.access-error { display: grid; justify-items: start; gap: 8px; margin: 8px 0; }
@media (max-width: 560px) {
  .access-row { grid-template-columns: 30px minmax(0, 1fr) 38px; }
  .access-row .access-label { grid-column: 2; }
  .access-row .access-value { grid-column: 1 / 3; grid-row: 2; }
  .access-row .access-copy { grid-column: 3; grid-row: 1 / 3; }
  .mq-balance-label { display: none; }
}
