/* Alfa Shop — carrito en las tarjetas del inicio, barra del administrador (recargas y saldo de clientes) y
   Administración de clientes. Usa los tokens del diseño aprobado (styles.css) sin modificar reglas existentes. */

/* ---------- Tarjetas: «Agregar» y contador animado ---------- */
.card-cart { padding: 0 16px 16px; min-height: 64px; display: flex; align-items: flex-end; }
.card-add, .card-stepper { width: 100%; height: 46px; border-radius: 999px; }
.card-add { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 15.5px; color: #fff;
  border: 1.5px solid #ff6b80; background: linear-gradient(180deg, #ff2a47, #b10a1e); box-shadow: 0 0 16px rgba(255, 31, 61, .38);
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.4), box-shadow .2s, filter .2s; }
.card-add:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 26px rgba(255, 31, 61, .6); filter: brightness(1.08); }
.card-add:active { transform: scale(.96); }
.card-add.is-back { animation: alfa-card-back .32s cubic-bezier(.2, .9, .3, 1.3); }
.card-add.is-off { cursor: default; color: #8c8c96; font-size: 13.5px; font-weight: 700; border: 1px dashed #3a3a42; background: transparent; box-shadow: none; }
.card-add.is-off svg { color: #6c6c76; }
.card-add.is-off:hover { transform: none; filter: none; }
.card-stepper { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; align-items: center; padding: 3px; border: 1.5px solid var(--neon);
  background: linear-gradient(180deg, rgba(109, 10, 27, .75), rgba(20, 6, 10, .95)); box-shadow: 0 0 18px rgba(255, 31, 61, .45), inset 0 0 14px rgba(255, 31, 61, .18); }
.card-stepper.is-new { animation: alfa-card-open .38s cubic-bezier(.2, .9, .3, 1.25); }
.card-stepper.is-off { border-color: #4a4a52; background: #131317; box-shadow: none; }
.card-step { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: linear-gradient(180deg, #ff2a47, #b10a1e);
  box-shadow: 0 0 10px rgba(255, 31, 61, .55); transition: transform .15s, box-shadow .15s, opacity .15s; }
.card-step:hover:not(:disabled) { transform: scale(1.1); box-shadow: 0 0 16px rgba(255, 31, 61, .85); }
.card-step:active:not(:disabled) { transform: scale(.9); }
.card-step:disabled, .card-step.is-ghost { opacity: .35; box-shadow: none; }
.card-qty { text-align: center; font-size: 19px; font-weight: 900; color: #fff; text-shadow: 0 0 12px rgba(255, 31, 61, .7); }
.card-qty.is-up { animation: alfa-qty-up .3s ease-out; }
.card-qty.is-down { animation: alfa-qty-down .3s ease-out; }
.cart-badge-bump { animation: alfa-badge .4s cubic-bezier(.2, .9, .3, 1.5); }
@keyframes alfa-card-open { from { opacity: .3; transform: scaleX(.55); } to { opacity: 1; transform: scaleX(1); } }
@keyframes alfa-card-back { from { opacity: .3; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes alfa-qty-up { from { opacity: 0; transform: translateY(12px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes alfa-qty-down { from { opacity: 0; transform: translateY(-12px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes alfa-badge { 0% { transform: scale(.4); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .card-add, .card-stepper, .card-qty, .cart-badge-bump { animation: none !important; transition: none !important; } }

/* ---------- Barra del administrador ---------- */
.clients-balance-pill { height: 48px; padding: 0 18px; gap: 10px; border-color: var(--neon); box-shadow: 0 0 14px rgba(255, 31, 61, .28); }
.clients-balance-pill svg { color: var(--neon-soft); }
.clients-balance-pill strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.header-actions .clients-balance-pill .mq-balance-label { display: inline; }
.topup-icon svg { transition: color .2s; }
.topup-icon.has-pending { border-color: var(--alfa-blue, #2f7bff); color: #fff; background: radial-gradient(circle at 35% 30%, #5b97ff, #1f5fe0 70%);
  box-shadow: 0 0 18px rgba(47, 123, 255, .7); animation: alfa-blue-pulse 2.4s ease-in-out infinite; }
.topup-icon.has-pending:hover { box-shadow: 0 0 26px rgba(47, 123, 255, .9); }
.topup-icon .topup-badge { display: grid; background: var(--alfa-blue, #2f7bff); border: 2px solid #050506; box-shadow: 0 0 10px rgba(47, 123, 255, .9); }
@media (max-width: 1049px) { .header-actions .clients-balance-pill .mq-balance-label { display: none; } }
/* En celular el saldo de clientes queda como ícono (el total se ve al abrirlo) para que quepan recargas y notificaciones. */
@media (max-width: 640px) { .clients-balance-pill { width: 48px; padding: 0; justify-content: center; } .clients-balance-pill strong { display: none; } }

/* ---------- Ventana de saldo de clientes ---------- */
.wallets-window { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 860px); 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, .5), transparent 60%), linear-gradient(180deg, #121216, #08080a); box-shadow: 0 0 46px rgba(255, 31, 61, .3), 0 30px 80px #000; }
.wallets-window[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.wallets-window::backdrop { background: #050407cc; backdrop-filter: blur(8px); }
.wallets-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 12px; }
.wallets-head div { flex: 1; }
.wallets-head p { color: var(--muted); font-size: 14px; }
.wallets-seal { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(180deg, #ff2a47, #8f0919); box-shadow: var(--glow); }
.wallets-total { display: grid; gap: 2px; margin: 0 22px 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: #0e0e11; }
.wallets-total small, .wallets-total span { color: var(--muted); font-size: 13px; }
.wallets-total b { font-size: 30px; color: #fff; text-shadow: 0 0 16px rgba(255, 31, 61, .5); }
.wallets-list { display: grid; gap: 8px; align-content: start; overflow: auto; padding: 0 22px 22px; }
.wallets-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  border-radius: 14px; border: 1px solid var(--line); background: #121216; transition: border-color .15s, box-shadow .15s; }
.wallets-row:hover { border-color: var(--neon); box-shadow: 0 0 14px rgba(255, 31, 61, .25); }
.wallets-rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; color: var(--neon-soft); border: 1px solid rgba(255, 31, 61, .5); }
.wallets-name, .wallets-amount { display: grid; gap: 1px; }
.wallets-name small, .wallets-amount small { color: var(--muted); font-size: 12.5px; }
.wallets-amount { text-align: right; }
.wallets-amount b { font-size: 17px; }

/* ---------- Administración de clientes ---------- */
.ac-hero { position: relative; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 26px 28px; overflow: hidden; border-radius: 22px; border: 1px solid rgba(255, 31, 61, .35);
  background: radial-gradient(80% 160% at 100% 0%, rgba(255, 31, 61, .22), transparent 55%), radial-gradient(60% 120% at 0% 100%, rgba(109, 10, 27, .55), transparent 60%), #0c0b0e; }
.ac-hero > div { flex: 1; min-width: 240px; }
.ac-hero-icon { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 20px; color: var(--neon-soft); border: 1px solid rgba(255, 31, 61, .5); background: rgba(109, 10, 27, .4); box-shadow: 0 0 20px rgba(255, 31, 61, .3); }
.ac-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--neon-soft); }
.ac-hero h1 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.05; letter-spacing: -.02em; }
.ac-hero h1 em { font-style: normal; color: var(--neon); text-shadow: 0 0 20px rgba(255, 31, 61, .55); }
.ac-hero p { color: #d8d8de; margin-top: 6px; }
.ac-hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #ffc3cd; border: 1px solid rgba(255, 31, 61, .5); background: rgba(109, 10, 27, .45); align-self: flex-end; }
.ac-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.ac-stat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; text-align: left; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, #121216, #0c0c0f); transition: border-color .15s, box-shadow .15s; }
.ac-stat svg { color: var(--neon-soft); }
.ac-stat span { display: grid; }
.ac-stat small { color: var(--muted); font-size: 13.5px; }
.ac-stat b { font-size: 30px; line-height: 1.1; }
.ac-stat[aria-pressed="true"], .ac-stat:hover { border-color: var(--neon); box-shadow: 0 0 18px rgba(255, 31, 61, .3); }
.ac-panel { padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: #0d0d10; }
.ac-panel h2 { margin-bottom: 12px; }
.ac-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 10px; }
.ac-client { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border-radius: 16px; border: 1px solid var(--line); background: #121216; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ac-client:hover { border-color: var(--neon); box-shadow: 0 0 16px rgba(255, 31, 61, .28); transform: translateY(-2px); }
.ac-client[data-tone="admin"] .ac-avatar { border-color: #6fe3a0; color: #6fe3a0; }
.ac-client[data-tone="reseller"] .ac-avatar { border-color: #ffd27a; color: #ffd27a; }
.ac-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 800; color: #fff; border: 2px solid var(--neon); background: radial-gradient(circle at 30% 25%, #3a0510, #0b0b0d); }
.ac-client-main { display: grid; min-width: 0; }
.ac-client-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-client-main small { color: var(--muted); font-size: 12.5px; }
.ac-client-balance { font-weight: 800; color: #ffc3cd; }
.ac-record { display: grid; gap: 14px; }
.ac-record-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.ac-record-head h2 { margin: 0; font-size: 22px; }
.ac-record-head h2 span { font-size: 17px; font-weight: 700; color: var(--neon-soft); }
.ac-round { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(255, 31, 61, .55); background: rgba(109, 10, 27, .35); }
.ac-round:hover { border-color: var(--neon); box-shadow: 0 0 14px rgba(255, 31, 61, .35); }
.ac-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ac-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 700; border: 1px solid var(--line); background: #0e0e11; }
.ac-tab svg { color: var(--muted); }
.ac-tab[aria-pressed="true"], .ac-tab:hover { border-color: var(--neon); background: rgba(109, 10, 27, .5); box-shadow: 0 0 12px rgba(255, 31, 61, .28); }
.ac-tab[aria-pressed="true"] svg { color: var(--neon-soft); }
.ac-tab-body { display: grid; gap: 14px; }
.ac-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ac-field { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #121216; min-width: 0; }
.ac-field small { color: var(--muted); font-size: 12.5px; }
.ac-field b { overflow-wrap: anywhere; }
.ac-field.is-ok b { color: #6fe3a0; }
.ac-field.is-off b { color: #ffa6bb; }
.ac-field.is-big b { font-size: 30px; color: #fff; text-shadow: 0 0 14px rgba(255, 31, 61, .45); }
.ac-field.is-big small { font-size: 13px; }
.ac-card { display: grid; gap: 12px; padding: 18px; border-radius: 18px; border: 1px solid rgba(255, 31, 61, .4); background: radial-gradient(120% 120% at 0% 0%, rgba(109, 10, 27, .35), transparent 60%), #0e0e11; }
.ac-card h3 { display: flex; align-items: center; gap: 8px; color: #ffc3cd; }
.ac-card h3 svg { color: var(--neon-soft); }
.ac-card label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.ac-card select, .ac-card textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #08080a; color: #fff; font: inherit; resize: vertical; }
.ac-card .btn-outline { justify-self: start; flex: none; }
.ac-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(255, 31, 61, .55); background: #08080a; }
.ac-reset code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: #ffc3cd; }
.ac-credit { justify-self: start; flex: none; }
.ac-subtitle { font-size: 16px; margin-top: 4px; }
.ac-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.ac-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ac-table th { padding: 12px 14px; text-align: left; font-size: 13px; color: #ffc3cd; background: rgba(109, 10, 27, .35); white-space: nowrap; }
.ac-table td { padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.ac-table .pos { color: #6fe3a0; }
.ac-table .neg { color: #ffa6bb; }
.ac-pill { display: inline-flex; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 700; border: 1px solid #3c3c44; }
.ac-pill.is-approved { color: #6fe3a0; border-color: rgba(51, 209, 122, .45); }
.ac-pill.is-rejected { color: #ffa6bb; border-color: rgba(255, 31, 61, .45); }
.ac-pill.is-new { color: #8db8ff; border-color: rgba(47, 123, 255, .5); }
.ac-empty { padding: 22px; text-align: center; border-radius: 14px; border: 1px dashed var(--line); color: var(--muted); }
.ac-orders { display: grid; gap: 10px; }
@media (max-width: 980px) { .ac-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ac-fields { grid-template-columns: 1fr; }
  .ac-hero { padding: 20px; }
  .ac-hero-icon { width: 54px; height: 54px; }
  .ac-client { grid-template-columns: 40px minmax(0, 1fr) 16px; }
  .ac-client-balance { grid-column: 2; grid-row: 2; font-size: 14px; }
  .ac-record-head h2 { font-size: 18px; }
}

/* ---------- Existencias de MQ en las tarjetas ---------- */
.card-price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.card-price-row .price { margin-top: 0; }
.stock-chip { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 13px; color: #d8d8de;
  border: 1px solid #34343b; background: #121216; font-variant-numeric: tabular-nums; }
.stock-chip svg { color: var(--neon-soft); }
.stock-chip.is-low { color: #ffd27a; border-color: rgba(255, 210, 122, .45); background: rgba(120, 90, 20, .18); }
.stock-chip.is-low svg { color: #ffd27a; }

/* ---------- Barra del administrador: botones de solo ícono ---------- */
.header-actions .icon-pill.active { border-color: var(--neon); box-shadow: 0 0 16px rgba(255, 31, 61, .35); }
.header-actions .icon-pill.active svg { color: var(--neon-soft); }
/* «Salir» conserva el marco rojo neón del botón original. */
.icon-pill.exit-icon { border-color: var(--neon); color: var(--neon-soft); background: rgba(255, 31, 61, .08); }
.icon-pill.exit-icon svg { color: var(--neon-soft); }
.icon-pill.exit-icon:hover { background: rgba(255, 31, 61, .18); box-shadow: 0 0 18px rgba(255, 31, 61, .45); }

/* ---------- Bloque B: avisos reales, pedidos en revisión, estado de cuentas y soporte ---------- */
.notice-open { display: flex; flex: 1; gap: 10px; min-width: 0; text-align: left; }
.notice-open > svg { flex: none; margin-top: 2px; color: var(--neon-soft); }
.notice-open > span { display: grid; gap: 2px; min-width: 0; }
.notice-open strong { color: #fff; }
.notice-open span span { color: #e2c5cf; font-size: 14px; overflow-wrap: anywhere; }
.notice-open small { color: #bd9ca9; font-size: 12px; }
.notice-open:hover strong { color: var(--neon-soft); }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff; background: var(--neon); box-shadow: 0 0 10px rgba(255, 31, 61, .6); }
.review-card { display: grid; gap: 10px; border-left: 3px solid #ff9d5c; }
.review-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-card .status { color: #ffcf9e; border-color: rgba(255, 157, 92, .5); }
.review-card .ops-controls { align-items: end; }
.review-reconcile { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.review-reconcile label { display: grid; gap: 4px; font-size: 13px; }
.review-reconcile input, .code-answer input, .report-note { min-width: 0; width: min(320px, 100%); padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #08080a; color: #fff; font: inherit; }
.code-answer { display: grid; gap: 8px; }
.code-answer label, .report-note-label { display: grid; gap: 4px; font-size: 13px; width: 100%; }
.ac-off { color: #ffa6bb; }
.account-status-card .ac-status-btn { justify-self: start; flex: none; padding: 0 18px; }
.account-status-card input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #08080a; color: #fff; font: inherit; }
@media (max-width: 640px) {
  .review-reconcile, .review-reconcile input, .code-answer input, .report-note { width: 100%; }
  .notice-entry { flex-direction: column; }
}

/* ---------- Bloque C · Finanzas, garantías y reposiciones ---------- */
.fin-page { gap: 16px; }
.fin-periods { display: flex; flex-wrap: wrap; gap: 8px; }
.fin-custom { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.fin-custom label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fin-custom input { background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.fin-card { display: grid; gap: 14px; padding: 20px; border-radius: var(--radius); background: linear-gradient(180deg, #1b1b1f, var(--panel)); }
.fin-card.is-loading { opacity: .6; }
.fin-card h3 { font-size: 16px; }
.fin-card h3 small { color: var(--muted); font-weight: 400; }
.fin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fin-head h2 { font-size: 22px; }
.fin-head small { color: var(--muted); }
.fin-pill { padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; }
.fin-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fin-kpis-sm { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.fin-kpi { display: grid; gap: 4px; padding: 16px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line-soft); min-width: 0; }
.fin-kpi small { color: var(--muted); }
.fin-kpi b { font-size: clamp(22px, 4vw, 32px); line-height: 1.1; overflow-wrap: anywhere; }
.fin-kpis-sm .fin-kpi b { font-size: 22px; }
.fin-kpi span { color: var(--muted); font-size: 13px; }
.fin-kpi.is-cost b { color: var(--neon-soft); }
.fin-kpi.is-profit b { color: #3ddc84; }
.fin-box { display: grid; align-content: start; gap: 10px; padding: 16px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line-soft); min-width: 0; }
.fin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fin-empty { color: var(--muted); padding: 10px 0; }
.fin-chart { width: 100%; height: auto; display: block; }
.fin-bar { fill: var(--wine); stroke: var(--red); stroke-width: .6; }
.fin-bar:hover { fill: var(--red); }
.fin-line { fill: none; stroke: var(--neon); stroke-width: 2.4; filter: drop-shadow(0 0 4px rgba(255, 31, 61, .6)); }
.fin-zero { stroke: var(--line); }
.fin-axis { fill: var(--muted); font-size: 11px; }
.fin-legend { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.fin-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.fin-legend .is-bar::before { background: var(--wine); border: 1px solid var(--red); }
.fin-legend .is-line::before { height: 3px; vertical-align: 3px; background: var(--neon); }
.fin-rank { display: grid; gap: 10px; }
.fin-rank-row { display: grid; grid-template-columns: minmax(80px, 120px) 1fr auto auto; align-items: center; gap: 10px; }
.fin-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-rank-track { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.fin-rank-track i { display: block; height: 100%; background: var(--red); border-radius: 4px; box-shadow: 0 0 6px rgba(255, 31, 61, .6); }
.fin-rank-row small { font-size: 12px; min-width: 64px; text-align: right; }
.fin-rank-row .pos { color: #3ddc84; }
.fin-rank-row .neg { color: var(--neon-soft); }
.fin-split { display: grid; gap: 12px; }
.fin-split-item { display: grid; gap: 4px; }
.fin-split-item small, .fin-split-item span { color: var(--muted); font-size: 13px; }
.fin-split-item b { font-size: 22px; }
.fin-split-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.fin-split-bar i { display: block; height: 100%; background: var(--red); }
.fin-split-item.is-reseller .fin-split-bar i { background: var(--neon-soft); }
.fin-tabs { flex-wrap: wrap; }
.replacement-form { display: grid; gap: 10px; margin-top: 12px; border-color: var(--wine); }
.replacement-form h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.report-note-label textarea { width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.case-details dd { white-space: pre-line; }
.pc-chip.pc-replaced { color: var(--neon-soft); border-color: var(--wine); }
@media (max-width: 760px) {
  .fin-grid { grid-template-columns: 1fr; }
  .fin-card { padding: 14px; }
  .fin-head { padding-right: 34px; }
  .fin-kpi { padding: 12px; }
  .fin-rank-row { grid-template-columns: minmax(70px, 96px) 1fr auto; }
  .fin-rank-row small { display: none; }
}

/* ---------- Bloque D · Mi perfil, datos bancarios, ajustes de la tienda y documentos legales ---------- */
.auth-terms { display: flex; align-items: flex-start; gap: 11px; margin: 14px 0 4px; font-size: 14.5px; line-height: 1.45; color: #d9d9e0; cursor: pointer; text-align: left; }
.auth-terms input { appearance: none; flex: none; width: 21px; height: 21px; margin: 1px 0 0; border: 2px solid #f4f4f6; border-radius: 5px; display: grid; place-items: center; cursor: pointer; }
.auth-terms input:checked { background: var(--neon); border-color: var(--neon); }
.auth-terms input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.auth-terms .auth-link { font-size: inherit; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 14px; font-size: 14px; }
.legal-section { display: grid; gap: 6px; margin-top: 16px; }
.legal-section .legal-links { justify-content: flex-start; margin-top: 0; }
.legal-window { width: min(760px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--wine); border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: 0 0 40px rgba(255, 31, 61, .25); overflow: auto; }
.legal-window::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
.legal-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; background: linear-gradient(135deg, var(--wine-deep), var(--panel)); border-bottom: 1px solid var(--line); }
.legal-head h2 { font-size: 22px; margin: 2px 0; }
.legal-head small { color: var(--muted); }
.legal-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 20px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--wine); background: rgba(109, 10, 27, .25); color: #f3d5da; font-size: 13.5px; }
.settings-form .legal-banner { margin: 0; }
.legal-body { padding: 8px 20px 22px; color: #d9d9e0; line-height: 1.6; }
.legal-body h3 { margin: 18px 0 6px; font-size: 16.5px; color: #fff; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { margin: 0 0 10px; padding-left: 20px; }
.legal-pending { padding: 0 4px; border-radius: 4px; background: rgba(255, 31, 61, .18); color: var(--neon-soft); }
.bank-panel { display: grid; gap: 12px; }
.bank-panel h2 { display: flex; align-items: center; gap: 8px; }
.bank-rows { display: grid; gap: 8px; }
.bank-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #121216; }
.bank-row small { display: block; color: var(--muted); font-size: 12.5px; }
.bank-row b { display: block; overflow-wrap: anywhere; }
.bank-row b.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .5px; }
.profile-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-form, .settings-form { display: grid; gap: 12px; }
.profile-form h2, .settings-form h2 { display: flex; align-items: center; gap: 8px; }
.settings-form textarea { min-height: 280px; font-family: inherit; line-height: 1.5; }
@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
}
/* La tarjeta de WhatsApp es un enlace: se ve igual que las demás tarjetas de soporte. */
a.support-card { color: inherit; text-decoration: none; }
a.support-card h2 { color: #fff; }
.profile-card .kv { text-align: left; }

/* Recuperación con código de 6 dígitos */
.auth-note { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: #d9d9e0; text-align: left; }
.auth-note b { color: #fff; overflow-wrap: anywhere; }
.auth-resend { margin: 4px 0 14px; font-size: 14.5px; }
.auth-resend .auth-link:disabled { color: var(--muted); opacity: 1; text-decoration: none; }
#auth-code { letter-spacing: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 20px; }
#auth-code:placeholder-shown { letter-spacing: normal; font-family: inherit; font-size: inherit; }

/* ---------- Bloque E · catálogo definitivo, vencimientos y costos manuales ---------- */
.catalog-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-summary span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13.5px; color: #d9d9e0; }
.catalog-summary span.warn { border-color: var(--wine); color: var(--neon-soft); }
.catalog-card summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tag { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cat-tag.warn { border-color: var(--wine); color: var(--neon-soft); }
.cat-tag.on { border-color: #1f7a4a; color: #3ddc84; }
.cat-tag.off { border-color: #555; color: #888; }
.cat-evidence.ok { color: #3ddc84; }
.cat-evidence.warn { color: #f3c47a; }
.renewal-card strong { font-size: 14px; }
.renewal-card strong.warn { color: #f3c47a; }
.renewal-card strong.neg { color: var(--neon-soft); }
.renewal-card .btn-outline { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; width: fit-content; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 8px 0; }
.inline-form label { flex: 1 1 200px; }
.renewal-card a.btn-outline { color: #fff; text-decoration: none; }

/* Fase 7 · Cargas manuales (inventario propio) */
.lot-card { display: grid; gap: 12px; }
.lot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.lot-head h3 { margin: 0; }
.lot-head small { color: var(--muted, #a3a3ad); }
.lot-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.lot-numbers span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.lot-numbers small { color: var(--muted, #a3a3ad); }
.lot-numbers b { font-size: 1.2rem; }
.lot-stock { display: flex; flex-wrap: wrap; gap: 8px; }
.lot-check, .form label.lot-check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.4; }
.lot-check input[type=checkbox], .form label.lot-check input[type=checkbox] { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: #e11d48; }
.lot-edit-box summary { cursor: pointer; color: var(--muted, #a3a3ad); }
.lot-sales { overflow-x: auto; }

/* Fase 7 · Documentos oficiales */
.doc-order, .doc-admin { display: grid; gap: 10px; }
.doc-admin code { font-size: .95em; letter-spacing: .03em; }
.doc-deliver { background: linear-gradient(135deg, #1f9d55, #15803d); border-color: #22c55e; }
.doc-cost { max-width: 360px; }

/* Fase 7 · cierre: edición rápida, Centro de Reportes y garantías próximas a finalizar */
.quick-edit-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 10px; vertical-align: middle; opacity: .75; }
.quick-edit-btn:hover, .quick-edit-btn:focus-visible { opacity: 1; }
.quick-edit { margin: 14px 0; }
.quick-edit h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.05rem; }
.report-metric.is-unanswered { border-color: var(--alfa-blue, #2f7bff); background: linear-gradient(135deg, rgba(47, 123, 255, .22), rgba(47, 123, 255, .06)); box-shadow: 0 0 16px rgba(47, 123, 255, .35); }
.report-metric.is-unanswered svg, .report-metric.is-unanswered b { color: #8fb6ff; }
.report-center-section { display: grid; gap: 10px; }
.renewal-meta { display: grid; gap: 2px; color: var(--muted, #a3a3ad); font-size: .9rem; }

/* Lanzamiento 1.0 · Recargas en el orden de una transferencia (datos → formulario → billetera → historial) */
.recharge-flow { display: grid; gap: 16px; max-width: 760px; margin-inline: auto; }
.recharge-flow > .panel { margin: 0; }
.recharge-form-panel .form { gap: 14px; }
.recharge-notice { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 0; padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(255, 46, 77, .45); background: rgba(255, 46, 77, .08); color: #ffd9df; font-size: .95rem; line-height: 1.45; }
.recharge-notice svg { flex: 0 0 auto; margin-top: 2px; color: #ff4d68; }
.recharge-wallet { display: grid; gap: 4px; }
.recharge-wallet .big-money { margin: 2px 0 0; }
.recharge-wallet-caption { color: var(--muted, #a3a3ad); }
.recharge-wallet-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.recharge-wallet-stats span { display: grid; gap: 2px; }
.recharge-wallet-stats b { font-size: 1.2rem; }
.recharge-wallet-stats small { color: var(--muted, #a3a3ad); }

/* Confirmación de recarga solicitada */
.recharge-ok-window { width: min(420px, calc(100vw - 32px)); padding: 28px 24px 22px; border: 1px solid rgba(255, 46, 77, .5); border-radius: 22px;
  background: linear-gradient(180deg, #17090e, #0b0b0d); color: #fff; text-align: center; box-shadow: 0 24px 60px #000c, 0 0 30px rgba(255, 46, 77, .18); }
.recharge-ok-window::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.recharge-ok-window h2 { margin: 12px 0 6px; font-size: 1.45rem; }
.recharge-ok-window > p { margin: 0 0 14px; color: #e7dfe2; }
.recharge-ok-check { width: 76px; height: 76px; margin: 0 auto; }
.recharge-ok-check svg { width: 100%; height: 100%; fill: none; stroke: #22c55e; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.recharge-ok-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: recharge-ok-draw .6s ease-out forwards; }
.recharge-ok-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: recharge-ok-draw .4s .5s ease-out forwards; }
@keyframes recharge-ok-draw { to { stroke-dashoffset: 0; } }
.recharge-ok-data { display: grid; gap: 8px; margin: 0 0 12px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); text-align: left; }
.recharge-ok-data span { display: flex; justify-content: space-between; gap: 12px; }
.recharge-ok-data small { color: #a3a3ad; }
.recharge-ok-pending { color: #fbbf24; }
.recharge-ok-window .btn-primary { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .recharge-ok-check circle, .recharge-ok-check path { animation: none; stroke-dashoffset: 0; } }

/* Menú lateral: botón para mostrar los nombres de los accesos (celulares) */
.dock-names svg { transform: rotate(90deg); transition: transform .24s ease-out; }
.dock.names-open .dock-names svg { transform: rotate(-90deg); }
.dock.names-open .dock-label { clip-path: inset(-12px -12px -12px -12px); box-shadow: 0 0 14px var(--tone-glow); }
.dock.names-open .dock-item:nth-child(2) .dock-label { transition-delay: .03s; }
.dock.names-open .dock-item:nth-child(3) .dock-label { transition-delay: .06s; }
.dock.names-open .dock-item:nth-child(4) .dock-label { transition-delay: .09s; }
.dock.names-open .dock-item:nth-child(5) .dock-label { transition-delay: .12s; }
.dock.names-open .dock-item:nth-child(6) .dock-label { transition-delay: .15s; }
.dock.names-open .dock-item:nth-child(7) .dock-label { transition-delay: .18s; }
.dock.names-open .dock-item:nth-child(8) .dock-label { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) { .dock.names-open .dock-label, .dock-names svg { transition: none; } }

/* Edición de catálogo: costo y ganancia */
.cat-economics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 6px; }
.cat-economics span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.cat-economics small { color: var(--muted, #a3a3ad); }
.cat-economics .neg { color: #ff6b81; }
.cat-economics .pos { color: #4ade80; }

/* Recargas compactas (referencia de distribución: tarjeta única de datos y formulario en una sola pantalla de iPhone) */
.page-head.recharge-head { margin: 12px 0 10px; padding: 10px 14px; gap: 10px; border-radius: 16px; }
.recharge-head .page-head-icon { width: 38px; height: 38px; border-radius: 11px; }
.recharge-head .page-head-icon svg { width: 20px; height: 20px; }
.recharge-head h1 { font-size: 20px; line-height: 1.15; }
.recharge-head p { font-size: 13px; line-height: 1.3; }
.recharge-flow { gap: 10px; }
.recharge-flow > .panel { padding: 14px; }
.bank-compact { display: grid; gap: 6px; border-color: #5a1220; background: radial-gradient(90% 140% at 100% 0%, rgba(255, 31, 61, .14), transparent 60%), linear-gradient(180deg, #151013, #0b0b0d); }
.bank-compact small { display: block; color: var(--muted, #a3a3ad); font-size: 11.5px; line-height: 1.2; }
.bank-compact b { overflow-wrap: anywhere; }
.bank-compact-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bank-compact-top span { display: inline-flex; align-items: center; gap: 6px; color: #ff8396; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.bank-compact-top b { font-size: 15px; }
.bank-compact-line b { font-size: 14.5px; }
.bank-compact-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 46, 77, .35); background: #0b0b0d; }
.bank-compact-card b.mono { font-family: ui-monospace, Consolas, monospace; font-size: 17px; letter-spacing: .6px; }
.bank-copy { display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 34px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--neon, #ff1f3d); background: rgba(255, 31, 61, .12); color: #fff; font-weight: 700; font-size: 13px; }
.bank-compact-concept { margin: 0; color: var(--muted, #a3a3ad); font-size: 12.5px; line-height: 1.35; }
.bank-compact-concept b { color: #fff; }
.recharge-form.form { gap: 8px; }
.recharge-form.form label { gap: 4px; font-size: 13px; }
.recharge-form.form input { min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 16px; }
.recharge-form.form input[type=file] { padding: 5px 8px; font-size: 13.5px; }
.recharge-form input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 10px; border: 1px solid rgba(255, 46, 77, .55); border-radius: 8px; background: rgba(255, 31, 61, .12); color: #fff; font-weight: 700; }
.recharge-form .recharge-notice { margin: 2px 0 0; padding: 8px 10px; gap: 8px; border-radius: 11px; font-size: 12.5px; line-height: 1.35; }
.recharge-error { margin: 0; padding: 8px 10px; border-radius: 11px; border: 1px solid #ff4d68; background: rgba(255, 31, 61, .16); color: #ffe3e7; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.recharge-error[hidden] { display: none; }
.recharge-form .btn-primary { min-height: 46px; }
.recharge-form .btn-primary:disabled { opacity: .7; cursor: progress; }
@media (min-width: 760px) {
  .page-head.recharge-head { margin-top: 20px; }
  .recharge-flow > .panel { padding: 18px; }
}
/* Ajuste fino para pantallas de iPhone con las barras de Safari visibles (≈ 660 px de alto). */
.section-window:has(.recharge-flow) .section-content { padding: 10px; }
.page-head.recharge-head { margin: 0 0 8px; padding: 8px 12px; }
.recharge-head .page-head-icon { width: 34px; height: 34px; }
.recharge-head h1 { font-size: 19px; }
.recharge-flow { gap: 8px; }
.recharge-flow > .panel { padding: 11px 12px; }
.bank-compact { gap: 5px; }
.bank-compact-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.bank-compact-line small { display: inline; flex: none; }
.bank-compact-card { padding: 6px 8px 6px 10px; }
.bank-compact-card b.mono { font-size: 16px; }
.bank-copy { min-height: 32px; padding: 0 10px; }
.bank-compact-concept { font-size: 12px; }
.recharge-form.form { gap: 7px; }
.recharge-form.form label { gap: 3px; font-size: 12.5px; }
.recharge-form.form input { min-height: 38px; padding: 6px 11px; }
.recharge-form.form input[type=file] { padding: 3px 6px; }
.recharge-form input[type=file]::file-selector-button { padding: 5px 9px; }
.recharge-form .recharge-notice { padding: 6px 9px; font-size: 12px; line-height: 1.3; }
.recharge-form .btn-primary { min-height: 44px; }

/* Móvil: el dock flota sobre el contenido (mismo tamaño, posición y color), sin franja lateral,
   barra superior sin desbordes y «+» visible en el saldo. */
@media (max-width: 720px) {
  .page { padding-right: 12px; }
  .hero { margin-right: -12px; }
  .header-actions .pill.balance .balance-plus svg { display: block; }
  html, body { overflow-x: hidden; }
  .header-actions .pill.balance { padding: 0 4px 0 12px; gap: 8px; }
  .header-actions .pill.balance .balance-plus { display: grid; width: 28px; height: 28px; }
  /* Administrador: marca y saldos arriba; los botones de ícono en una segunda fila a todo lo ancho. */
  .site-header.is-admin .header-inner { flex-wrap: wrap; height: auto; padding: 8px 10px; row-gap: 8px; column-gap: 8px; }
  .site-header.is-admin .header-actions { display: contents; }
  .site-header.is-admin .header-inner::after { content: ""; order: 1; flex-basis: 100%; height: 0; }
  .site-header.is-admin .brand { order: 0; }
  .site-header.is-admin .header-actions > .pill { order: 0; }
  .site-header.is-admin .header-actions > .pill:first-of-type { margin-left: auto; }
  .site-header.is-admin .header-actions > :not(.pill) { order: 2; flex: 1 1 0; min-width: 0; max-width: 64px; justify-content: center; padding: 0; }
  .site-header.is-admin .header-inner { justify-content: space-between; }
}
