/* site.css - ObentoppTienda Unified Styles (complementa noumeno.css) */

/* Ficha de producto expandida = panel flotante tipo modal (StoreHome.razor.css): mientras está
   abierta, la página de fondo no debe hacer scroll por su cuenta. :has() vive aquí (no en el
   .razor.css con scope) porque <body> queda fuera del árbol que Blazor le asigna al componente. */
body:has(.product-card--expanded),
body:has(.lightbox-panel) {
    overflow: hidden;
}

/* <Router><FocusOnNavigate Selector="h1"/></Router> (Routes.razor) enfoca el <h1> de cada página
   después de navegar — es accesibilidad real (lectores de pantalla anuncian el nuevo título), no
   se quita. Pero varios navegadores sí dibujan el anillo de foco ahí, y un <h1> nunca es un
   elemento con el que el usuario interactúa a propósito — se ve como un contorno "pegado" sin
   motivo. Se oculta solo el anillo visual; el foco funcional para lectores de pantalla queda igual. */
h1:focus {
    outline: none;
}

/* Galería única del producto (product-images.js): la primera imagen es la portada */
.pimg {
    border: 2px dashed var(--border-normal);
    border-radius: 12px;
    padding: 1rem;
    transition: border-color 150ms, background 150ms;
}

.pimg--files-over {
    border-color: var(--brand);
    background: var(--brand-faint);
}

.pimg__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.pimg__tile {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid var(--border-normal);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    cursor: grab;
}

.pimg__tile--cover {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-faint);
}

.pimg__tile--dragging {
    opacity: 0.4;
}

.pimg__tile--drop-before {
    box-shadow: -6px 0 0 0 var(--brand);
}

.pimg__tile--drop-after {
    box-shadow: 6px 0 0 0 var(--brand);
}

.pimg__tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pimg__badge {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.pimg__badge--cover {
    background: var(--brand);
}

.pimg__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem;
    background: linear-gradient(transparent, rgba(17, 24, 39, 0.55));
    opacity: 0;
    transition: opacity 120ms;
}

.pimg__tile:hover .pimg__bar,
.pimg__tile:focus-within .pimg__bar {
    opacity: 1;
}

@media (hover: none) {
    .pimg__bar { opacity: 1; }
}

.pimg__btn {
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: var(--text-base);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.pimg__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pimg__btn--remove {
    background: var(--error);
    color: #fff;
}

.pimg__add {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 2px dashed var(--border-normal);
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.pimg__add:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.pimg__add-plus {
    font-size: 1.8rem;
    line-height: 1;
}

.pimg__hint {
    margin: 0.75rem 0 0;
}

/* Miniatura de producto en tablas del dashboard */
.product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-subtle);
}

.product-thumb--empty {
    display: grid;
    place-items: center;
    background: var(--brand-faint);
    color: var(--brand);
    font-family: 'Shrikhand', system-ui, sans-serif;
    font-size: 1.1rem;
}

/* Scroll automático del menú lateral del panel (MainLayout): con muchos enlaces (ej. Admin)
   la lista se salía del alto fijo del sidebar sin forma de llegar a los últimos. Duplicado aquí
   (fuera del CSS aislado de MainLayout.razor.css) para que no dependa del bundling de scoped CSS. */
.dash-sidebar { overflow-y: auto; }
.dash-nav { min-height: 0; overflow-y: auto; }

/* --- Global Loading Overlay --- */
#global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

#global-loading-overlay.show {
    display: flex !important;
}

.loading-spinner-container {
    text-align: center;
}

.loading-text {
    margin-top: 15px;
    font-weight: 600;
    color: #ffffff;
}

/* Spinner propio (reemplaza al de Bootstrap) */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: nm-spin 0.75s linear infinite;
    color: var(--brand-light);
}

@keyframes nm-spin {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Estructura de la tienda (StoreLayout) --- */
.store-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.store-main {
    flex: 1;
    padding-top: 84px; /* compensa el nav fijo de 60px */
    padding-bottom: 3rem;
}

/* Carrito: badge del AppBar y ticket (los pinta store.js) */
.cart-btn {
    position: relative;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #FDFBF7;
    border-radius: 9999px;
    font-size: 0.62rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    border: 1.5px solid var(--bg-card);
}

.cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.cart-line__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.cart-line__controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-line__qty {
    width: 70px;
    text-align: center;
}

.cart-line__price {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--brand);
    min-width: 90px;
    text-align: right;
}

.cart-ticket__total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0 0.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-ticket__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Fila de 2 campos lado a lado en formularios (dashboard, checkout) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Filas de pedido (usado en Mis pedidos, dashboard de pedidos y su detalle) */
.order-row__code {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.order-row__total {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: var(--brand);
}

/* Gráficas del dashboard (línea SVG + barras) — usadas desde F6, sin estilo propio hasta ahora */
.chart-line {
    width: 100%;
    height: 140px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    height: 140px;
    padding-top: 0.5rem;
}

.chart-bar {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar__track {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: var(--bg-subtle);
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar__fill {
    width: 100%;
    background: var(--brand);
    min-height: 2px;
}

.chart-bar__count {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
}

.chart-bar__label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* Bitácora (F11): link inline al producto/pedido referido en el detalle del log */
.activity-log__link {
    margin-left: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Ticket de empaque imprimible: solo el bloque .only-print se ve al imprimir */
.only-print {
    display: none;
}

@media print {
    .no-print, .dash-sidebar, .dash-topbar {
        display: none !important;
    }
    .only-print {
        display: block !important;
    }
    .packing-slip table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 0.5rem;
    }
    .packing-slip th, .packing-slip td {
        border: 1px solid #999;
        padding: 0.4rem 0.6rem;
        text-align: left;
    }
}

/* Código de confirmación de compra */
.confirm-code {
    font-family: 'Space Mono', monospace;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--brand);
    background: var(--brand-faint);
    border: 2px dashed var(--border-accent);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0 1.25rem;
}

/* Iconos del theme toggle: el atributo data-theme decide cuál se ve */
.icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: inline; }
[data-theme="dark"] .icon-sun { display: none; }

/* --- Puente de utilidades (clases que usaban Bootstrap, mapeadas a tokens Noumeno) --- */
.text-muted   { color: var(--text-muted); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--error); }
.text-border  { display: flex; align-items: center; text-align: center; }
.fw-semibold  { font-weight: 600; }
.small        { font-size: 0.875em; }
.d-flex       { display: flex; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.flex-grow-1  { flex-grow: 1; }
.mb-3 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.ms-1 { margin-left: 0.25rem; }

.text-border::before,
.text-border::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-subtle);
}

.text-border::before { margin-right: .5em; }
.text-border::after  { margin-left: .5em; }

/* --- Formularios (mapeo de form-control/form-label al estilo Noumeno .input) --- */
.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.form-control, .form-select {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-normal);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    outline: none;
    transition: border-color 150ms, box-shadow 150ms;
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:hover, .form-select:hover { border-color: var(--border-accent); }

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--shadow-glow);
}

.form-control:disabled {
    background-color: var(--bg-subtle);
    opacity: 1;
    cursor: not-allowed;
}

.form-control.is-invalid { border-color: var(--error); }
.form-control.is-warning-border { border-color: var(--warning); }

.validation-message {
    font-size: 0.75rem;
    color: var(--error);
    font-weight: 500;
}

/* ============================================================
   Puente legacy Bootstrap-lite — SOLO para páginas aún no
   rediseñadas (Users, SetPassword). Se elimina al terminar F6.
   ponytail: bridge temporal; borrar cuando los módulos usen clases Noumeno
   ============================================================ */

/* Spacing */
.m-0{margin:0}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1.5rem}
.mt-2{margin-top:.5rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}.me-1{margin-right:.25rem}.me-3{margin-right:1rem}
.ms-2{margin-left:.5rem}.p-0{padding:0}.p-3{padding:1rem}.p-4{padding:1.5rem}.p-md-5{padding:2rem}
.px-3{padding-left:1rem;padding-right:1rem}.px-4{padding-left:1.5rem;padding-right:1.5rem}
.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}
.py-3{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:3rem;padding-bottom:3rem}
.ps-4{padding-left:1.5rem}.pe-4{padding-right:1.5rem}.pt-3{padding-top:1rem}

/* Display / flex */
.d-block{display:block}.d-grid{display:grid}.d-none{display:none}
.flex-fill{flex:1 1 auto}.flex-wrap{flex-wrap:wrap}.flex-column{flex-direction:column}
.justify-content-between{justify-content:space-between}.justify-content-center{justify-content:center}
.justify-content-end{justify-content:flex-end}
.gap-2{gap:.5rem}.gap-3{gap:1rem}

/* Grid simplificado */
.row{display:flex;flex-wrap:wrap;gap:1rem}
.row>[class*="col"]{flex:1 1 0;min-width:0}
.col-12{flex:0 0 100%}
@media (max-width:768px){.row>[class*="col"]{flex:0 0 100%}}

/* Texto */
.text-center{text-align:center}.text-end{text-align:right}.text-uppercase{text-transform:uppercase}
.text-primary{color:var(--brand)}.text-secondary{color:var(--text-secondary)}
.text-success{color:var(--success)}.text-dark{color:var(--text-primary)}.text-white{color:#FDFBF7}
.fw-bold{font-weight:700}.fs-1{font-size:2.25rem}.fs-2{font-size:1.875rem}.fs-3{font-size:1.5rem}
.display-3{font-size:3.5rem}.opacity-25{opacity:.25}

/* Botones legacy → tokens Noumeno */
.btn-primary,.btn-secondary,.btn-light,.btn-link,
.btn-outline-dark,.btn-outline-primary,.btn-outline-secondary{
    display:inline-flex;align-items:center;justify-content:center;gap:.4rem;
    font-family:inherit;font-size:.85rem;font-weight:600;line-height:1;cursor:pointer;
    text-decoration:none;padding:.55rem 1.1rem;border-radius:6px;border:2px solid transparent;
    transition:all 150ms;
}
.btn-primary{background:var(--brand);color:#FDFBF7;border-color:var(--brand)}
.btn-primary:hover{background:var(--brand-dark);border-color:var(--brand-dark);text-decoration:none}
.btn-secondary,.btn-light{background:var(--bg-card);color:var(--text-primary);border-color:var(--border-normal)}
.btn-secondary:hover,.btn-light:hover{border-color:var(--border-accent);color:var(--brand);text-decoration:none}
.btn-outline-dark,.btn-outline-secondary{background:transparent;color:var(--text-primary);border-color:var(--border-normal)}
.btn-outline-dark:hover,.btn-outline-secondary:hover{background:var(--bg-overlay);text-decoration:none}
.btn-outline-primary{background:transparent;color:var(--brand);border-color:var(--border-accent)}
.btn-outline-primary:hover{background:var(--brand-faint);text-decoration:none}
.btn-link{background:transparent;color:var(--brand);border:none;padding:.25rem .5rem}
.btn-sm{font-size:.75rem;padding:.35rem .8rem}
.btn-group{display:inline-flex;gap:.35rem}

/* Badges legacy */
.badge{display:inline-flex;align-items:center;gap:.25rem;font-size:.68rem;font-weight:600;
    padding:.2rem .6rem;border-radius:9999px;line-height:1.4}
.bg-light{background:var(--bg-overlay);color:var(--text-secondary)}
.bg-primary{background:var(--brand);color:#FDFBF7}
.bg-warning{background:var(--warning-bg);color:var(--warning)}
.bg-success{background:var(--success);color:#FDFBF7}
.bg-info{background:var(--info);color:#FDFBF7}
.bg-white{background:var(--bg-card)}
.bg-primary-subtle{background:var(--brand-faint);color:var(--brand)}
.bg-secondary-subtle{background:var(--bg-overlay);color:var(--text-secondary)}
.bg-success-subtle{background:var(--success-bg);color:var(--success)}
.bg-info-subtle{background:var(--info-bg);color:var(--info)}
.bg-warning-subtle{background:var(--warning-bg);color:var(--warning)}
.text-info-emphasis{color:var(--info)}
.text-warning-emphasis{color:var(--warning)}
.border-success-subtle{border-color:var(--success-border)}
.border-info-subtle{border-color:var(--info-border)}
.border-warning-subtle{border-color:var(--warning-border)}
.border-secondary-subtle{border-color:var(--border-subtle)}
.px-2{padding-left:.5rem;padding-right:.5rem}
.progress{display:flex;overflow:hidden;height:1rem;background-color:var(--bg-overlay)}
.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;height:100%;color:#FDFBF7}
.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}
.progress-bar-animated{animation:progress-bar-stripes 1s linear infinite}
@keyframes progress-bar-stripes{0%{background-position-x:1rem}}

/* Card legacy (la clase .card base ya la da noumeno.css) */
.card-body{padding:.5rem 0}
.card-header{padding:.5rem 0;border-bottom:1px solid var(--border-subtle);font-weight:600}
.shadow-sm{box-shadow:var(--shadow-card)}
.border{border:1px solid var(--border-subtle)}.border-0{border:0}
.border-top{border-top:1px solid var(--border-subtle)}.border-bottom{border-bottom:1px solid var(--border-subtle)}
.rounded{border-radius:6px}.rounded-3{border-radius:10px}.rounded-4{border-radius:16px}.rounded-pill{border-radius:9999px}
.overflow-hidden{overflow:hidden}

/* Tabla */
.table-responsive{overflow-x:auto}
.table{width:100%;border-collapse:collapse;font-size:.875rem;color:var(--text-primary)}
.table th{font-size:.7rem;letter-spacing:.06em;color:var(--text-muted);text-align:left;
    border-bottom:1.5px solid var(--border-normal);padding:.6rem .5rem}
.table td{padding:.65rem .5rem;border-bottom:1px solid var(--border-subtle);vertical-align:middle}
.table-hover tbody tr:hover{background:var(--bg-overlay)}
.table-light{background:var(--bg-subtle)}
.align-middle{vertical-align:middle}

/* Paginación */
.pagination{display:flex;gap:.25rem;list-style:none;padding:0}
.page-link{display:inline-flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;
    padding:0 .5rem;border:1.5px solid var(--border-normal);border-radius:6px;font-size:.8rem;
    color:var(--text-primary);text-decoration:none}
.page-link:hover{border-color:var(--brand);color:var(--brand);text-decoration:none}
.active>.page-link{background:var(--brand);border-color:var(--brand);color:#FDFBF7}

/* Inputs agrupados y placeholders */
.input-group{display:flex}
.input-group>.form-control{border-top-right-radius:0;border-bottom-right-radius:0}
.input-group>.btn-primary,.input-group>.btn-secondary{border-top-left-radius:0;border-bottom-left-radius:0}
.placeholder-glow .placeholder{display:inline-block;min-height:1em;background:var(--bg-overlay);
    border-radius:4px;animation:pulse-bridge 1.4s ease-in-out infinite}
@keyframes pulse-bridge{0%,100%{opacity:1}50%{opacity:.5}}

/* Avatar circle usado en listados */
.avatar-circle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;
    border-radius:50%;background:var(--brand-faint);color:var(--brand);font-weight:700;font-size:.8rem}

/* .user-menu*: dropdown de cuenta en el AppBar. Vive en global (no en un .razor.css con scope)
   porque lo comparten dos componentes hermanos que se alternan en el mismo slot (UserDropdown
   para sesión iniciada, GuestMenu para anónimo, ver StoreLayout.razor) — con CSS isolation cada
   uno tendría su propio atributo de scope y solo uno de los dos heredaría estos estilos. */
.user-menu {
    position: relative;
}

.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

.user-menu__trigger::-webkit-details-marker {
    display: none;
}

.user-menu__trigger:hover {
    background: var(--bg-overlay);
}

.user-menu__name {
    /* "Hola, <nombre>" — max-width amplio para que quepa el saludo completo y la mayor parte
       posible del nombre; el ellipsis corta solo la cola (el nombre), nunca el "Hola". */
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .user-menu__name {
        display: none;
    }
}

.user-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 5px 5px 0 var(--shadow-brutal);
    padding: 0.4rem;
    z-index: 200;
}

.user-menu__header {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.65rem 0.35rem;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.user-menu__item:hover {
    background: var(--brand-faint);
    color: var(--brand);
    text-decoration: none;
}

.user-menu__item--danger {
    color: var(--error);
}

.user-menu__item--danger:hover {
    background: var(--error-bg);
    color: var(--error);
}

.user-menu__divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.35rem 0.25rem;
}

/* Password checklist (Register.razor): reglas en vivo mientras se escribe, ver
   initPasswordChecklists() en site.js — mismas reglas que RegisterRequestValidator. */
.password-checklist {
    list-style: none;
    margin: -0.25rem 0 1rem 0; /* Reset left margin */
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Force left alignment */
    gap: 0.2rem;
}

.password-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.password-checklist li::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background-color: transparent;
    flex-shrink: 0;
}

.password-checklist li.password-checklist__item--met {
    color: var(--success);
}

.password-checklist li.password-checklist__item--met::before {
    border-color: var(--success);
    background-color: transparent;
}

/* Pseudomodal genérico (dashboard, etc.): mismo patrón que la ficha de producto de StoreHome
   (position:fixed saca el panel del algoritmo de layout, backdrop oscurecido detrás) pero como
   clases globales — StoreHome.razor.css tiene su propia versión con scope de componente
   (.store-backdrop/.product-card--expanded), y un componente hermano como AdminProductsPage no
   puede heredar CSS con scope de otro componente (ver F14.3, mismo problema con GuestMenu). */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60; /* por encima de la barra superior del dashboard (z-index 50) */
    background: rgba(3, 7, 18, 0.6);
    cursor: pointer;
    animation: lightbox-backdrop-in 220ms ease forwards;
}

@keyframes lightbox-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 70;
    max-height: 88vh;
    overflow-y: auto;
    transform-origin: center;
    animation: lightbox-panel-in 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightbox-panel-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.product-card__close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 5;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 2px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--shadow-brutal);
}

.product-card__close:hover {
    color: var(--error);
    text-decoration: none;
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--shadow-brutal);
}
/* Reconnect Modal - Minimalista Bottom Right */
#components-reconnect-modal {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    background-color: #ffffff;
    color: #111827;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none !important;
}

/* Solo mostramos el div que corresponde al estado */
#components-reconnect-modal > div {
    display: none;
    align-items: center;
}

#components-reconnect-modal.components-reconnect-show .show,
#components-reconnect-modal.components-reconnect-failed .failed,
#components-reconnect-modal.components-reconnect-rejected .rejected {
    display: flex;
}

#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* Editor pell compacto (instrucciones de funcionamiento del producto) */
.pell-editor--sm .pell-content { height: 170px; }

/* TotpInput: 6 casillas sobre un <input> transparente (site.js: initTotpInputs las llena y marca la activa) */
.totp__label { text-align: center; display: block; }
.totp__boxes { display: flex; gap: 0.5rem; justify-content: center; position: relative; margin-top: 0.5rem; }
.totp__box {
    width: 3rem; height: 3.5rem; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border-subtle); border-radius: 8px; background: white;
    font-size: 1.5rem; font-weight: bold; color: var(--text-base); transition: all 0.2s ease;
}
.totp__box.is-active { border-color: var(--color-primary, #2563eb); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.totp__box.is-active:empty::after {
    content: ""; width: 2px; height: 1.5rem; background: var(--text-muted); animation: totp-blink 1s step-end infinite;
}
@keyframes totp-blink { 50% { opacity: 0; } }
.totp__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: text; }

/* Campo de contraseña con botón "ojito" (site.js: data-toggle-password) */
/* Se apaga el ojito nativo de Edge/Safari para no duplicar el nuestro (Chrome/Firefox no inyectan uno). */
.input-eye input::-ms-reveal, .input-eye input::-ms-clear { display: none; }
.input-eye input::-webkit-credentials-auto-fill-button { visibility: hidden; pointer-events: none; position: absolute; right: 0; }
.input-eye { position: relative; }
.input-eye .input { padding-right: 2.5rem; }
.input-eye__btn {
    position: absolute; top: 0; right: 0; height: 100%; width: 2.5rem;
    background: none; border: 0; color: var(--text-muted); cursor: pointer;
}
.input-eye__btn:hover, .input-eye__btn:focus-visible { color: var(--text-base); }

/* Compositor del chat de vendedora: campo completo y envío integrado. */
.wa-widget__footer form.wa-composer { display: block; width: 100%; }
.wa-composer__field {
    position: relative;
    width: 100%;
    min-width: 0;
    border: 1px solid #cbd9d4;
    border-radius: 22px;
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.wa-composer__field:focus-within {
    border-color: #128c7e;
    box-shadow: 0 0 0 3px rgb(18 140 126 / 14%);
}
.wa-widget__footer .wa-composer__input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    max-height: 120px;
    margin: 0;
    padding: 11px 53px 10px 15px;
    border: 0;
    border-radius: 22px;
    outline: 0;
    background: transparent;
    box-shadow: none;
    resize: vertical;
    font: inherit;
    line-height: 1.35;
    box-sizing: border-box;
}
.wa-widget__footer .wa-composer__input:focus { border: 0; outline: 0; box-shadow: none; }
.wa-widget__footer .wa-composer__send {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #128c7e;
    color: #fff;
    box-shadow: none;
}
.wa-widget__footer .wa-composer__send:hover,
.wa-widget__footer .wa-composer__send:focus-visible { background: #075e54; color: #fff; }
.wa-widget__footer .wa-composer__send:focus-visible { outline: 2px solid #075e54; outline-offset: 2px; }
.nbell { position: relative; display: inline-block; }
.nbell > summary { list-style: none; cursor: pointer; }
.nbell > summary::-webkit-details-marker { display: none; }

.nbell__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; color: inherit; line-height: 1; }

.nbell__badge {
    position: absolute; top: -0.45rem; right: -0.55rem; min-width: 1.1rem; height: 1.1rem; padding: 0 0.25rem;
    border-radius: 999px; background: #d9363e; color: #fff; font-size: 0.65rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}

.nbell__panel {
    position: absolute; right: 0; top: calc(100% + 0.6rem); z-index: 1060; width: 320px; max-width: 90vw; max-height: 420px; overflow-y: auto;
    background: #fff; color: #222; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 0.5rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem; text-align: left;
}

.nbell__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.nbell__head form { margin: 0; }
.nbell__link { background: none; border: 0; padding: 0; color: #1f6fb2; font-size: 0.75rem; cursor: pointer; }

.nbell__item { display: flex; align-items: flex-start; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.nbell__open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.8rem; color: inherit; text-decoration: none; }
/* Selector con más peso que los estilos de enlaces del tema (.cg a) para que ningún texto de la notificación salga subrayado */
.nbell a.nbell__open,
.nbell a.nbell__open:hover,
.nbell a.nbell__open:focus,
.nbell a.nbell__open * { text-decoration: none; }
.nbell__mark { flex: none; margin: 0.5rem 0.5rem 0 0; padding: 0.25rem 0.4rem; background: none; border: 0; border-radius: 0.3rem; color: #1f6fb2; cursor: pointer; }
.nbell__mark:hover { background: rgba(31, 111, 178, 0.15); }
.nbell__item:hover { background: rgba(0, 0, 0, 0.04); }
.nbell__item.is-unread { background: rgba(31, 111, 178, 0.08); }
.nbell__item.is-unread .nbell__title::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.4rem; border-radius: 50%; background: #1f6fb2; }
.nbell__title { font-weight: 700; }
.nbell__body { color: #555; overflow-wrap: anywhere; }
.nbell__time { color: #888; }
.nbell__empty { margin: 0; padding: 1rem; text-align: center; color: #777; }
