/* =========================================
   1. ESTILOS BASE DE BLAZOR (NO BORRAR)
   ========================================= */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTA2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

/* =========================================
   1b. PERFIL DE USUARIO
   ========================================= */
.profile-avatar {
    font-size: 4rem;
    color: var(--accent);
    line-height: 1;
}
.profile-avatar i {
    display: inline-block;
    animation: fadeInUp 0.5s ease-out;
}

/* =========================================
   1c. NAVBAR — Dark header matching shop bar
   ========================================= */
.cb-nav {
    background: #131921;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cb-nav .navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff !important;
    letter-spacing: -0.3px;
}
.cb-nav .nav-link {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.cb-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}
.cb-nav .nav-link.active {
    color: #febd69 !important;
    background: rgba(254,189,105,0.1);
}
.cb-nav .btn-outline-light {
    border-color: rgba(255,255,255,0.25);
    font-size: 0.82rem;
    padding: 0.3rem 0.75rem;
}
.cb-nav .btn-outline-light:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
}
.cb-nav-user {
    color: rgba(255,255,255,0.65) !important;
    font-size: 0.84rem;
    text-decoration: none;
    transition: color 0.15s;
}
.cb-nav-user:hover { color: #fff !important; }

/* =========================================
   1d. TIENDA — SEARCH BAR
   ========================================= */
.shop-search-bar {
    background: #232f3e;
    padding: 10px 0;
    position: sticky;
    top: 56px;
    z-index: 100;
}
.shop-input {
    border: 2px solid #febd69;
    border-right: none;
    border-radius: 0 !important;
    padding: 8px 16px;
    font-size: 0.95rem;
}
.shop-input:first-child {
    border-radius: 8px 0 0 8px !important;
}
.shop-input:focus {
    border-color: #febd69;
    box-shadow: 0 0 0 2px rgba(254,189,105,0.3);
}
.shop-btn {
    border-radius: 0 8px 8px 0 !important;
    padding: 8px 18px;
    font-weight: 600;
    border: 2px solid #febd69;
    border-left: none;
}

/* Home button (left of search input) */
.shop-home-btn {
    border-radius: 8px 0 0 8px !important;
    border: 2px solid rgba(255,255,255,0.25);
    border-right: none;
    color: rgba(255,255,255,0.8);
    padding: 8px 12px;
    font-size: 1rem;
}
.shop-home-btn:hover {
    color: #febd69;
    border-color: rgba(254,189,105,0.5);
    background: rgba(255,255,255,0.08);
}

/* Clear X button (inside input group, before search btn) */
.shop-clear-btn {
    border: 2px solid #febd69;
    border-left: none;
    border-right: none;
    background: #fff;
    color: #999;
    padding: 8px 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}
.shop-clear-btn:hover {
    color: #cc0c39;
    background: #fff;
}

/* Chips */
.shop-chips-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.shop-chips-bar::-webkit-scrollbar { display: none; }
.shop-entry-mode-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.shop-entry-mode-btn {
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.84);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.shop-entry-mode-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.4);
}
.shop-entry-mode-btn-active {
    background: #febd69;
    color: #111827;
    border-color: #febd69;
    box-shadow: 0 4px 12px rgba(254,189,105,0.24);
}
.shop-mode-helper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.78);
    font-size: 0.8rem;
    white-space: nowrap;
}
.shop-chip-sm {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #ddd;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.shop-chip-sm:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

/* =========================================
   1e. TIENDA — 2-COLUMN LAYOUT
   ========================================= */
.shop-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    padding: 16px 20px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}
.shop-main {
    min-width: 0;
    position: relative;
}
.shop-sidebar {
    position: sticky;
    top: 160px;
    max-height: calc(100vh - 156px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

/* ---- Search controls ---- */
.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

/* ---- Loading overlay ---- */
.shop-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    border-radius: 8px;
}
.shop-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #565959;
    font-size: 0.88rem;
}

/* Skeleton placeholder card */
.az-skeleton {
    display: flex;
    gap: 16px;
    padding: 18px 16px;
    border-bottom: 1px solid #e8e8e8;
}
.az-skeleton-img {
    width: 160px;
    height: 180px;
    border-radius: 8px;
    background: linear-gradient(110deg, #f0f0f0 30%, #fafafa 50%, #f0f0f0 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
.az-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}
.az-skeleton-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(110deg, #f0f0f0 30%, #fafafa 50%, #f0f0f0 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.az-skeleton-line:nth-child(1) { width: 85%; height: 16px; }
.az-skeleton-line:nth-child(2) { width: 50%; }
.az-skeleton-line:nth-child(3) { width: 30%; height: 22px; }
.az-skeleton-line:nth-child(4) { width: 40%; }

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================
   1f. PRODUCT CARDS (horizontal Amazon-style)
   ========================================= */
.az-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.az-product {
    display: flex;
    gap: 16px;
    padding: 18px 16px;
    border-bottom: 1px solid #e8e8e8;
    background: white;
    transition: background 0.15s;
}
.az-product:first-child {
    border-top: 1px solid #e8e8e8;
    border-radius: 8px 8px 0 0;
}
.az-product:last-child {
    border-radius: 0 0 8px 8px;
}
.az-product:hover { background: #fafafa; }

/* Image — constrained, never overflow */
.az-product-img {
    flex-shrink: 0;
    width: 180px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.az-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.az-product-img a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Info column */
.az-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.az-product-title {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: #0f1111;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.az-product-title:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* Rating */
.az-product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
}
.az-review-count {
    color: #007185;
    text-decoration: none;
    font-size: 0.82rem;
    margin-left: 4px;
}
.az-review-count:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* Price block */
.az-product-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 2px 0;
}
.az-discount-label {
    color: #cc0c39;
    font-size: 1.3rem;
    font-weight: 700;
}
.az-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f1111;
}
.az-price-before {
    font-size: 0.8rem;
    color: #565959;
}
.az-price-old {
    text-decoration: line-through;
}

/* Prime */
.az-prime-text {
    display: flex;
    align-items: center;
    gap: 6px;
}
.az-prime-logo {
    font-weight: 700;
    font-size: 0.78rem;
    color: #00a8e1;
    letter-spacing: 1px;
    font-style: italic;
}
.prime-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #232f3e;
    color: #00a8e1;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.discount-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #cc0c39;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Book/media format pills */
.az-format-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.az-format-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.75rem;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.az-format-pill:hover:not(:disabled) {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.az-format-pill:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.az-format-pill-added {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.az-format-pill-added:hover:not(:disabled) {
    background: #c3e6cb;
    border-color: #28a745;
    color: #155724;
}

.az-format-price {
    font-weight: 600;
    color: #b12704;
    margin-left: 2px;
}

.az-format-pill-added .az-format-price {
    color: #155724;
}

.az-format-note {
    font-size: 0.75rem;
    color: #6c757d;
}

.az-product-info-book .az-format-pills {
    margin-top: 0 !important;
}

.az-product-info-book .az-format-note {
    margin-top: 2px !important;
}

.az-product-info-book .az-product-actions {
    margin-top: 2px;
}

/* Format selection hint */
.az-format-hint {
    font-size: 0.78rem;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    font-style: italic;
}

/* Actions */
.az-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* =========================================
   1g. CART SIDEBAR
   ========================================= */
.sidebar-cart {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.sidebar-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.sidebar-cart-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 14px 0;
}
.sidebar-cart-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d5d9d9;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.sidebar-cart-filter:hover {
    border-color: #f3a847;
    color: #111827;
    background: #fffaf3;
}
.sidebar-cart-filter-active {
    background: #fff2df;
    border-color: #febd69;
    color: #92400e;
}
.sidebar-cart-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(35,47,62,0.08);
    font-size: 0.7rem;
}
.sidebar-cart-filter-note {
    padding: 10px 14px 0;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}
.sidebar-cart-items {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.sidebar-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f5;
}
.sidebar-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.sidebar-item-name {
    font-size: 0.8rem;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-item-source {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sidebar-item-price {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}
.sidebar-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}
.sidebar-item-qty {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
}
.btn-xs {
    padding: 1px 8px;
    font-size: 0.78rem;
    line-height: 1.5;
}
.sidebar-cart-totals {
    padding: 12px 14px;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
}
.sidebar-checkout {
    padding: 12px 14px;
    border-top: 1px solid #f0f0f0;
}
.sidebar-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-checkout-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
}
.sidebar-checkout-notes {
    min-height: 92px;
    resize: vertical;
}
.sidebar-checkout-help {
    margin-top: 4px;
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.4;
}
.sidebar-checkout-actions {
    display: flex;
    gap: 8px;
}
.sidebar-qr {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* =========================================
   1h. WELCOME STATE
   ========================================= */
.shop-welcome {
    text-align: center;
    padding: 3rem 1rem;
}
.shop-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    font-size: 0.88rem;
    color: #333;
}
.shop-cat-card:hover {
    border-color: #febd69;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.shop-cat-icon {
    font-size: 1.8rem;
    color: #2563eb;
}
.shop-external-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin-inline: auto;
    max-width: 760px;
    border-radius: 16px;
    border: 1px solid rgba(254,189,105,0.5);
    background: linear-gradient(135deg, rgba(254,189,105,0.14), rgba(255,255,255,0.95));
    text-align: left;
}
.shop-external-callout-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(35,47,62,0.08);
    color: #232f3e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* =========================================
   1i. RESPONSIVE + MOBILE CART
   ========================================= */

/* --- Toast notification bar (inside sticky search bar) --- */
.shop-toast {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: toast-slide-in 0.3s ease-out;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.shop-toast-success {
    background: #065f46;
    color: #d1fae5;
}
.shop-toast-error {
    background: #7c2d12;
    color: #fed7aa;
}
.shop-toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    margin-left: auto;
    padding: 0 0 0 12px;
    cursor: pointer;
    font-size: 0.8rem;
}
.shop-toast-close:hover { opacity: 1; }

@keyframes toast-slide-in {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* --- Mobile cart FAB button --- */
.shop-cart-fab {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 200;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #232f3e;
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.shop-cart-fab:active { transform: scale(0.93); }
.shop-cart-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #232f3e;
}

/* --- Mobile cart backdrop --- */
.shop-cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 299;
    animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Mobile offcanvas cart header (visible only in mobile drawer) --- */
.sidebar-cart-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-external-callout {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .shop-external-callout-icon {
        margin-inline: auto;
    }

    /* Cart sidebar becomes a slide-up drawer */
    .shop-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 300;
        max-height: 85vh;
        overflow-y: auto;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    .shop-sidebar.mobile-open {
        transform: translateY(0);
    }
}

@media (min-width: 992px) {
    /* Desktop: hide mobile-only elements */
    .sidebar-cart-mobile-header { display: none !important; }

    .admin-order-detail {
        position: sticky;
        top: 92px;
    }
}

@media (max-width: 576px) {
    .shop-search-bar { top: 56px; }
    .shop-entry-mode-bar {
        flex-direction: column;
    }
    .shop-mode-helper {
        white-space: normal;
    }
    .az-product {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .az-product-img {
        width: 140px;
        height: 160px;
    }
    .az-product-price-block,
    .az-product-actions {
        justify-content: center;
    }
    .az-product-actions {
        flex-wrap: wrap;
    }
    .sidebar-checkout-row,
    .sidebar-checkout-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .sidebar-checkout-actions .btn {
        width: 100%;
    }
    .sidebar-cart-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .sidebar-cart-filters::-webkit-scrollbar {
        display: none;
    }
}

/* =========================================
   2. TEMA CLEAN BANKING (Light & Refined)
   ========================================= */
:root {
    --bg-app: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --brand-navy: #131921;
    --brand-slate: #232f3e;
    --brand-gold: #febd69;
    --brand-gold-strong: #f3a847;
    --brand-link: #007185;
    --surface-soft: #f8fafc;
    --card-radius-lg: 16px;
    --card-shadow-soft: 0 10px 30px rgba(15,23,42,0.04);
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Tarjetas (Cards) --- */
.card-crypto {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius-lg);
    box-shadow: var(--card-shadow-soft);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-crypto-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- Inputs Modernos --- */
.form-control-crypto {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.form-control-crypto:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* --- Tabla Profesional --- */
.table-crypto {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-crypto th {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.table-crypto td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-crypto tr:last-child td {
    border-bottom: none;
}

/* --- Badges (Pastillas de Estado) --- */
.badge-soft {
    padding: 0.35em 0.8em;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-soft-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-soft-warning {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-soft-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-soft-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* --- Utilidades --- */
.wallet-box {
    font-family: 'Roboto Mono', monospace;
    color: var(--accent);
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #dbeafe;
    display: inline-flex;
    align-items: center;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.home-order-notes {
    min-height: 110px;
    resize: vertical;
}

.home-order-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.home-order-address,
.home-order-instructions {
    word-break: break-word;
}

.home-order-instructions {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
}

.orders-dashboard {
    max-width: 1200px;
}

.orders-hero {
    position: relative;
    overflow: hidden;
}

.orders-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,0.10), transparent 28%),
        radial-gradient(circle at bottom left, rgba(16,185,129,0.10), transparent 32%);
    pointer-events: none;
}

.orders-hero .card-body {
    position: relative;
    z-index: 1;
}

.orders-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.orders-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.orders-subtitle {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.orders-hero-note {
    min-width: min(100%, 320px);
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.25);
    background: rgba(255,255,255,0.82);
    box-shadow: 0 10px 30px rgba(15,23,42,0.05);
}

.orders-hero-note-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #ecfeff;
    color: #0f766e;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.orders-stat-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.35rem 1.1rem;
}

.orders-stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.25rem;
}

.orders-stat-label {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    max-width: 12ch;
}

.orders-stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
}

.orders-stat-value-sm {
    font-size: 1.05rem;
    line-height: 1.4;
}

.orders-empty-state {
    border-style: dashed;
}

.orders-empty-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--accent);
    font-size: 2rem;
}

.orders-empty-copy {
    max-width: 560px;
}

.orders-feedback {
    border-radius: 14px;
}

.orders-section-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.orders-guide-card,
.orders-priority-card,
.orders-toolbar-card {
    border-radius: 18px;
}

.orders-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.orders-guide-step {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,0.95);
}

.orders-guide-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--accent);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.orders-priority-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

.orders-priority-copy {
    color: var(--text-muted);
    line-height: 1.65;
}

.orders-priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--accent);
    font-weight: 600;
}

.orders-toolbar-card {
    position: static;
    z-index: 1;
}

.orders-toolbar-top {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.orders-search-group {
    flex: 1 1 420px;
}

.orders-search-icon {
    background: #fff;
    border-right: none;
    color: var(--text-muted);
}

.orders-search-input {
    border-left: none;
    min-height: 42px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.orders-search-input:focus {
    box-shadow: none;
}

.orders-toolbar-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.orders-results-count {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.orders-filter-bar {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
    position: relative;
    z-index: 1;
}

.orders-filter-bar::-webkit-scrollbar {
    display: none;
}

.orders-filter-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--text-main);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.orders-filter-chip:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.orders-filter-chip.is-active {
    background: #232f3e;
    color: #febd69;
    border-color: #232f3e;
}

.order-card {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.04);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
}

.order-card-header-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.order-card-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.order-card-date {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 600;
}

.order-card-total {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

.order-attention-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.78rem;
    font-weight: 700;
}

.order-toggle-btn {
    min-width: 122px;
}

.order-summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem 0 1.1rem;
    border-top: 1px solid rgba(226,232,240,0.9);
}

.order-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,0.95);
}

.order-summary-chip-product {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-color: #cfe0fb;
    box-shadow: inset 0 0 0 1px rgba(37,99,235,0.04);
}

.order-summary-chip-product .order-summary-chip-label {
    color: #1d4ed8;
}

.order-summary-chip-product .order-summary-chip-value,
.order-summary-product-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.65;
    color: var(--text-main);
    word-break: break-word;
}

.order-summary-product-helper {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.order-summary-product-list {
    margin: 0;
    padding-left: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.order-summary-product-item {
    color: #1d4ed8;
}

.order-summary-product-entry {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

.order-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.order-source-badge-amazon {
    background: rgba(254,189,105,0.22);
    border-color: rgba(243,168,71,0.4);
    color: #92400e;
}

.order-source-badge-external {
    background: rgba(37,99,235,0.1);
    border-color: rgba(37,99,235,0.18);
    color: #1d4ed8;
}

.order-summary-product-item::marker {
    color: #94a3b8;
}

.order-summary-product-action {
    align-self: flex-start;
    margin-top: 0.35rem;
}

.order-summary-chip-label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.order-summary-chip-value {
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.5;
}

.order-inline-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    margin-bottom: 1.1rem;
}

.order-collapsible {
    padding-top: 0.35rem;
}

.order-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.order-card-main,
.order-card-side {
    min-width: 0;
}

.order-card-side {
    padding-top: 1rem;
    border-top: 1px solid rgba(226,232,240,0.9);
}

.order-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.order-collapsible-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.order-detail-block {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,0.9);
}

.order-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.order-detail-list-item {
    position: relative;
    padding-left: 1rem;
}

.order-detail-list-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

.order-detail-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.order-detail-text,
.order-detail-link {
    color: var(--text-main);
    line-height: 1.6;
    word-break: break-word;
    font-size: 0.96rem;
}

.order-detail-link {
    font-weight: 700;
    text-decoration: none;
}

.order-detail-strong {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.order-detail-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.order-detail-helper {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

.order-copy-btn {
    align-self: flex-start;
}

.order-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.order-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(226,232,240,0.9);
    color: var(--text-main);
    font-size: 0.88rem;
    text-decoration: none;
}

.order-meta-button {
    cursor: pointer;
}

.order-meta-link:hover {
    color: var(--accent);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.order-payment-panel,
.order-summary-panel,
.order-timeline-wrapper {
    padding: 1.1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226,232,240,0.95);
}

.order-payment-title,
.order-summary-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.45rem;
    color: var(--text-main);
}

.order-payment-copy,
.order-summary-copy {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

.order-payment-list {
    margin-top: 0.9rem;
}

.order-payment-qr {
    width: 108px;
    height: 108px;
    object-fit: contain;
    display: block;
    margin: 0.9rem auto;
    padding: 0.45rem;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(226,232,240,0.95);
}

.order-payment-wallet {
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.76rem;
    line-height: 1.6;
    word-break: break-all;
}

.order-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 0.85rem;
    color: #94a3b8;
}

.order-timeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 24px;
    width: 2px;
    height: calc(100% + 0.2rem);
    background: #e2e8f0;
}

.order-timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    margin-top: 0.15rem;
    position: relative;
    z-index: 1;
}

.order-timeline li.completed,
.order-timeline li.current {
    color: var(--text-main);
}

.order-timeline li.completed .order-timeline-dot {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.14);
}

.order-timeline li.current .order-timeline-dot {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.14);
}

.order-cancelled-note {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 14px;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    line-height: 1.5;
}

/* =========================================
   2b. ADMIN — SHARED MARKETPLACE STYLE
   ========================================= */
.admin-dashboard {
    max-width: 1480px;
}

.admin-dashboard-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.admin-refresh-btn {
    border-color: rgba(19,25,33,0.16);
    color: var(--brand-slate);
    font-weight: 600;
}

.admin-refresh-btn:hover {
    background: var(--brand-slate);
    border-color: var(--brand-slate);
    color: var(--brand-gold);
}

.admin-stat-card {
    border-width: 1px;
    border-style: solid;
}

.admin-stat-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.2rem 1.1rem;
}

.admin-stat-card h6 {
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-stat-card h3 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-main);
}

.admin-stat-card-warning { border-color: #fde68a; }
.admin-stat-card-success { border-color: #bbf7d0; }
.admin-stat-card-info { border-color: #bfdbfe; }
.admin-stat-card-primary { border-color: #c7d2fe; }

.admin-surface-card {
    border-radius: 18px;
}

.admin-panel-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-slate) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-detail-header {
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.admin-orders-table th {
    white-space: nowrap;
    padding: 0.8rem 0.75rem;
}

.admin-orders-table td {
    padding: 0.85rem 0.75rem;
}

.admin-orders-table tbody tr {
    transition: background-color 0.18s ease;
}

.admin-orders-table tbody tr:hover {
    background: #fbfdff;
}

.admin-orders-table .table-active,
.admin-orders-table .table-active > td {
    background: #eff6ff;
}

.admin-order-product {
    color: var(--text-main);
    line-height: 1.45;
    font-size: 0.83rem;
}

.admin-orders-layout {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.admin-surface-card .card-header {
    padding: 0.9rem 1rem;
}

.admin-order-break {
    word-break: break-word;
}

.admin-order-notes,
.admin-order-product-line {
    background: var(--surface-soft);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.admin-order-notes {
    line-height: 1.65;
    color: var(--text-main);
}

.admin-order-products {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-order-product-line {
    margin-bottom: 0 !important;
}

.admin-order-product-line .btn {
    border-color: rgba(19,25,33,0.16);
    color: var(--brand-slate);
    font-weight: 600;
}

.admin-order-product-line .btn:hover {
    background: var(--brand-slate);
    border-color: var(--brand-slate);
    color: var(--brand-gold);
}

@media (max-width: 991px) {
    .orders-guide-grid,
    .order-summary-strip,
    .order-card-grid {
        grid-template-columns: 1fr;
    }

    .order-card-header {
        flex-direction: column;
    }

    .orders-toolbar-top,
    .order-card-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .orders-toolbar-meta {
        align-items: flex-start;
    }

    .order-actions-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-header {
        gap: 1rem;
    }
}

@media (min-width: 992px) {
    .orders-toolbar-top {
        margin-bottom: 0.55rem;
    }

    .orders-toolbar-card {
        position: sticky;
        top: 72px;
        z-index: 15;
    }

    .admin-order-detail {
        top: 92px;
    }
}

@media (max-width: 767px) {
    .orders-toolbar-card {
        position: static;
    }

    .orders-search-group {
        flex: 1 1 100%;
    }

    .orders-search-icon {
        padding: 0.45rem 0.7rem;
        font-size: 0.9rem;
    }

    .orders-search-input {
        min-height: 36px;
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
        font-size: 0.92rem;
    }

    .order-detail-grid {
        grid-template-columns: 1fr;
    }

    .orders-hero-note {
        min-width: 100%;
    }

    .orders-priority-pill {
        width: 100%;
        justify-content: center;
    }

    .order-meta-list {
        flex-direction: column;
    }

    .order-meta-pill {
        border-radius: 16px;
    }

    .order-payment-qr {
        width: 92px;
        height: 92px;
    }

    .order-summary-product-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .order-source-badge {
        font-size: 0.68rem;
        padding: 0.28rem 0.58rem;
    }

    .order-summary-product-action {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .orders-title {
        font-size: 1.9rem;
    }

    .orders-subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .order-card {
        border-radius: 16px;
    }

    .order-card .card-body {
        padding: 1rem !important;
    }

    .orders-stat-value {
        font-size: 1.65rem;
    }

    .orders-stat-value-sm {
        font-size: 0.98rem;
    }

    .order-summary-chip,
    .order-detail-block,
    .order-payment-panel,
    .order-summary-panel,
    .order-timeline-wrapper {
        border-radius: 14px;
    }
}

/* --- Botones --- */
.btn-primary-crypto {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.btn-primary-crypto:hover {
    background-color: var(--accent-hover);
}

/* =========================================
   3. ESTILOS DE LOGIN/REGISTER
   ========================================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #131921;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(35,47,62,0.9) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 20%, rgba(254,189,105,0.06) 0%, transparent 50%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand icon */
.login-brand {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: #232f3e;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #febd69;
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.login-header h2 {
    margin-bottom: 0.35rem;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
}
.login-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.login-card .form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}
.login-card .form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.65rem 0.9rem;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-card .form-control:focus {
    border-color: #232f3e;
    box-shadow: 0 0 0 3px rgba(35,47,62,0.12);
}

/* Primary action button — gold accent */
.btn-login-primary {
    background: #232f3e;
    color: #febd69;
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: background 0.2s, transform 0.1s;
}
.btn-login-primary:hover {
    background: #1a2430;
    color: #febd69;
}
.btn-login-primary:active {
    transform: scale(0.98);
}
.btn-login-primary:disabled {
    background: #3a4a5c;
    color: #a0aab4;
}

/* Footer link */
.login-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f0f0;
}
.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s;
}
.login-footer a:hover {
    color: #232f3e;
}
.login-footer a strong {
    color: #232f3e;
}

.login-card .alert {
    border-radius: 8px;
    font-size: 0.88rem;
}

.login-card .form-check-label {
    font-size: 0.88rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 10px;
    }
}

/* =========================================
   4. TOGGLE PASSWORD + STRENGTH INDICATOR
   ========================================= */

/* Boton ojo toggle */
.btn-toggle-pw {
    border-color: #cbd5e1;
    color: var(--text-muted);
    padding: 0.5rem 0.85rem;
    transition: all 0.2s;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.btn-toggle-pw:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
    border-color: #94a3b8;
}

.btn-toggle-pw:focus {
    box-shadow: none;
}

/* Barra de fuerza de password */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-strength-bar {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.pw-strength-weak {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.pw-strength-fair {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.pw-strength-good {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.pw-strength-strong {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.pw-strength-excellent {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.pw-strength-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

/* Reglas individuales */
.pw-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.pw-rule {
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.pw-rule-ok {
    color: #16a34a;
}

.pw-rule-fail {
    color: #94a3b8;
}

.pw-rule-ok i {
    color: #16a34a;
}

.pw-rule-fail i {
    color: #cbd5e1;
}

/* Mensajes de validacion */
.validation-message {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

