/* ============================================================
   panel-cliente.css - Panel de cliente profesional
   (Solo estilos específicos del panel, no de navbar/offcanvas)
   ============================================================ */

/* ===== CONTENEDOR PRINCIPAL ===== */
.panel-cliente-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2rem;
    overflow-x: hidden; /* Evita desbordamiento horizontal */
}

/* ===== SECCIONES ===== */
.panel-section {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.panel-section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: var(--color-marca);
    margin-bottom: 1.5rem;
}
.section-title i {
    color: var(--color-marca-claro);
}

/* ===== PERFIL RESUMEN ===== */
.perfil-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--sombra);
    margin-bottom: 2rem;
    align-items: center;
    justify-content: space-between;
}
.perfil-saludo {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}
.perfil-email {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}
.perfil-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.stat-number {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--color-marca);
}
.stat-label {
    color: #888;
}
.perfil-acciones {
    display: flex;
    gap: 0.8rem;
}
.btn-editar-perfil {
    background: var(--color-marca-claro);
    color: #2c1810;
    border: 2px solid var(--color-marca-claro);
    border-radius: 60px;
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-editar-perfil:hover {
    background: #c4a03a;
}
.btn-pedir {
    background: var(--color-marca);
    color: #fff;
    border-radius: 60px;
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-pedir:hover {
    background: var(--color-marca-oscuro);
}

/* ===== ÚLTIMO PEDIDO ===== */
.ultimo-pedido-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.2rem 1.8rem;
    box-shadow: var(--sombra);
    margin-bottom: 1.5rem;
}
.ultimo-pedido-titulo {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}
.ultimo-pedido-titulo i {
    color: var(--color-marca);
}

/* ===== FILTROS ===== */
.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.filtro-pedido {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--color-borde);
    border-radius: 40px;
    background: transparent;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-texto);
    cursor: pointer;
    transition: all 0.2s;
}
.filtro-pedido:hover {
    background: var(--color-fondo);
    border-color: var(--color-marca);
}
.filtro-pedido.active {
    background: var(--color-marca);
    color: #fff;
    border-color: var(--color-marca);
}

/* ===== TARJETAS DE PEDIDOS ===== */
.pedido-card-cliente {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra);
    margin-bottom: 1rem;
    border: 1px solid var(--color-borde);
}
.pedido-header-cliente {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: #fff;
    transition: background 0.1s;
}
.pedido-header-cliente:hover {
    background: #faf5ee;
}
.pedido-info-resumen h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-texto);
}
.pedido-info-resumen .pedido-fecha {
    font-size: 0.8rem;
    color: #888;
}
.pedido-info-resumen .pedido-items-resumen {
    font-size: 0.9rem;
    color: #555;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.pedido-estado {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.badge-estado-cliente {
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-estado-cliente.en-cocina {
    background: #f39c12;
    color: #fff;
}
.badge-estado-cliente.enviado {
    background: #3498db;
    color: #fff;
}
.badge-estado-cliente.entregado {
    background: #27ae60;
    color: #fff;
}
.badge-estado-cliente.archivado {
    background: #95a5a6;
    color: #fff;
}
.accordion-icon {
    transition: transform 0.3s ease;
    color: #aaa;
    flex-shrink: 0;
}
.pedido-body-cliente {
    padding: 1rem 1.5rem;
    background: #fef9f0;
    border-top: 1px solid var(--color-borde);
}
.pedido-detalle-items {
    margin-bottom: 0.8rem;
}
.item-detail-cliente {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}
.item-detail-cliente strong { flex: 1; }
.item-detail-cliente small { color: #888; font-size: 0.8rem; margin: 0 10px; }
.item-detail-cliente span { font-weight: bold; color: #e67e22; }
.pedido-acciones {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.btn-accion-cliente {
    background: transparent;
    border: 1px solid #ddd;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-accion-cliente:hover {
    border-color: var(--color-marca);
    color: var(--color-marca);
}
.btn-accion-cliente.archivar:hover {
    border-color: #e67e22;
    color: #e67e22;
}

/* ===== TIMELINE ===== */
.timeline-pedido {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 1rem 0 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.timeline-pedido::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 3px;
    background: #e0d5c0;
    transform: translateY(-50%);
    z-index: 0;
}
.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    flex: 1;
    text-align: center;
    min-width: 50px;
}
.timeline-step .step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0d5c0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.timeline-step.completed .step-icon {
    background: #27ae60;
}
.timeline-step.active .step-icon {
    background: var(--color-marca);
    box-shadow: 0 0 0 4px rgba(139,90,43,0.2);
    animation: pulse-step 1.5s infinite;
}
@keyframes pulse-step {
    0% { box-shadow: 0 0 0 0 rgba(139,90,43,0.3); }
    70% { box-shadow: 0 0 0 10px rgba(139,90,43,0); }
    100% { box-shadow: 0 0 0 0 rgba(139,90,43,0); }
}
.timeline-step .step-label {
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
}
.timeline-step.completed .step-label {
    color: #27ae60;
}
.timeline-step.active .step-label {
    color: var(--color-marca);
    font-weight: 700;
}

/* ============================================================
   SECCIÓN DE PUNTOS - RENOVADA (con corrección de desbordamiento)
   ============================================================ */

.puntos-dashboard {
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem 1.8rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0e6d8;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.puntos-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.8rem;
    width: 100%;
}

.puntos-total-container {
    flex: 0 0 auto;
    text-align: center;
    padding-right: 2rem;
    border-right: 2px solid #f0e6d8;
}

.puntos-cantidad-grande {
    font-size: 3.8rem;
    font-weight: 800;
    color: #3e2a21;
    line-height: 1;
    display: block;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
}

.puntos-label {
    font-size: 0.9rem;
    color: #888;
    font-weight: 600;
    display: block;
    margin-top: 0.2rem;
}

.puntos-progreso-container {
    flex: 1;
    min-width: 200px;
    max-width: 100%;
}

.puntos-progreso-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.puntos-siguiente-nivel {
    font-weight: 500;
}

.puntos-siguiente-nivel strong {
    color: #3e2a21;
}

.puntos-porcentaje {
    font-weight: 700;
    color: #27ae60;
}

.puntos-bar-container {
    background: #f5f0eb;
    border-radius: 30px;
    height: 14px;
    overflow: hidden;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.06);
    width: 100%;
}

.puntos-progreso {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 30px;
    transition: width 0.8s ease;
    position: relative;
}

.puntos-progreso-bar {
    height: 100%;
    width: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
}

/* ===== INFO CARDS ===== */
.puntos-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    width: 100%;
}

.puntos-info-card {
    background: #fef9f0;
    border-radius: 16px;
    padding: 1.2rem 1rem;
    text-align: center;
    border: 1px solid #f0e6d8;
    transition: transform 0.2s, box-shadow 0.2s;
}

.puntos-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.puntos-info-card i {
    font-size: 2rem;
    color: #d4af37;
    display: block;
    margin-bottom: 0.4rem;
}

.puntos-info-card h4 {
    font-family: 'Bangers', cursive;
    font-size: 1.1rem;
    color: #3e2a21;
    margin: 0 0 0.2rem 0;
    letter-spacing: 0.5px;
}

.puntos-info-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.puntos-info-card p strong {
    color: #27ae60;
}

/* ===== DIVIDER Y TÍTULO HISTORIAL ===== */
.puntos-divider {
    border: 0;
    border-top: 2px dashed #f0e6d8;
    margin: 1.5rem 0;
}

.puntos-historial-titulo {
    font-family: 'Bangers', cursive;
    font-size: 1.4rem;
    color: #3e2a21;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

/* ===== HISTORIAL ITEMS ===== */
#historialPuntosContainer {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

.historial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: #fcf8f3;
    border-radius: 12px;
    border-left: 4px solid #d4af37;
    font-size: 0.95rem;
    color: #3e2a21;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.historial-item:hover {
    background: #f5ede4;
}

.historial-item span:last-child {
    font-weight: 700;
    color: #27ae60;
}

/* ===== OFERTAS ===== */
.grid-ofertas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.oferta-card-cliente {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid var(--color-borde);
    text-align: center;
    box-shadow: var(--sombra);
}
.oferta-card-cliente img {
    max-width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
}
.oferta-card-cliente h4 {
    margin: 0.5rem 0 0.2rem;
    color: var(--color-texto);
}
.oferta-card-cliente p {
    font-size: 0.85rem;
    color: #888;
}

/* ===== PERFIL DETALLE ===== */
.perfil-detalle {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--sombra);
    width: 100%;
    box-sizing: border-box;
}
.perfil-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 500px;
}
.perfil-detalle-grid div {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-borde);
}

/* ===== MODALES ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.modal-close:hover {
    color: #333;
}
.modal-titulo {
    margin-bottom: 1.5rem;
    color: var(--color-marca);
}
.campo {
    margin-bottom: 1.2rem;
}
.campo label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--color-texto);
}
.campo input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--color-borde);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.campo input:focus {
    border-color: var(--color-marca);
    outline: none;
}
.btn-guardar {
    width: 100%;
    padding: 0.8rem;
    background: var(--color-marca);
    color: #fff;
    border: none;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-guardar:hover {
    background: var(--color-marca-oscuro);
}

/* Ticket modal */
.ticket-modal {
    max-width: 420px;
    padding: 1rem;
    background: #f8f4ef;
}
.ticket-contenido {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #fff;
    padding: 1.2rem;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}
.ticket-cargando {
    text-align: center;
    color: #999;
}
.ticket-acciones {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.btn-ticket-imprimir {
    background: #3498db;
    color: #fff;
    padding: 0.4rem 1.2rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-ticket-imprimir:hover {
    background: #2e86c1;
}
.btn-ticket-directo {
    background: var(--color-marca);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-ticket-directo:hover {
    background: var(--color-marca-oscuro);
}
.btn-ticket-pdf {
    background: #27ae60;
    color: #fff;
    padding: 0.4rem 1.2rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-ticket-pdf:hover {
    background: #1e8449;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: #999;
}
.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-marca-claro);
}
.empty-state .btn {
    display: inline-block;
    margin-top: 0.5rem;
    background: var(--color-marca);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 60px;
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .panel-cliente-main {
        padding: 1rem 0.8rem;
    }
    .perfil-resumen {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    .perfil-stats {
        justify-content: center;
    }
    .perfil-acciones {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .perfil-detalle-grid {
        grid-template-columns: 1fr;
    }
    .puntos-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .puntos-total-container {
        border-right: none;
        padding-right: 0;
        text-align: center;
        border-bottom: 2px solid #f0e6d8;
        padding-bottom: 0.8rem;
    }
    .puntos-cantidad-grande {
        font-size: 3rem;
    }
    .puntos-info-grid {
        grid-template-columns: 1fr;
    }
    .puntos-info-card {
        padding: 1rem;
    }
    .puntos-progreso-info {
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    .historial-item {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }
    .filtros-container {
        justify-content: center;
    }
    .timeline-pedido {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .timeline-pedido::before {
        display: none;
    }
    .timeline-step {
        flex: 0 0 calc(50% - 0.5rem);
    }
    .pedido-info-resumen .pedido-items-resumen {
        max-width: 150px;
    }
    .pedido-estado {
        flex-shrink: 1;
    }
    .badge-estado-cliente {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }
    .pedido-header-cliente {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .pedido-body-cliente {
        padding: 0.8rem 1rem;
    }
    .pedido-acciones {
        flex-wrap: wrap;
    }
    .btn-accion-cliente {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    .puntos-dashboard {
        padding: 1.2rem 1rem;
    }
}

@media (max-width: 480px) {
    .panel-cliente-main {
        padding: 0.8rem 0.5rem;
    }
    .puntos-dashboard {
        padding: 1rem 0.8rem;
    }
    .puntos-cantidad-grande {
        font-size: 2.5rem;
    }
    .puntos-siguiente-nivel {
        font-size: 0.8rem;
    }
    .puntos-porcentaje {
        font-size: 0.8rem;
    }
    .perfil-resumen {
        padding: 0.8rem;
    }
    .pedido-info-resumen .pedido-items-resumen {
        max-width: 100px;
        font-size: 0.8rem;
    }
    .pedido-header-cliente h4 {
        font-size: 0.85rem;
    }
    .pedido-fecha {
        font-size: 0.7rem !important;
    }
}

/* ============================================================
   SECCIÓN: CANJE DE PUNTOS (NUEVA)
   ============================================================ */

.canje-dashboard {
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem 1.8rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0e6d8;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.canje-puntos-disponibles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #fef9f0;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-left: 6px solid #d4af37;
    width: 100%;
    box-sizing: border-box;
}

.canje-puntos-cantidad {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.canje-puntos-numero {
    font-size: 2.8rem;
    font-weight: 800;
    color: #3e2a21;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
}

.canje-puntos-label {
    font-size: 1rem;
    color: #888;
    font-weight: 600;
}

.canje-puntos-mensaje {
    font-size: 0.95rem;
    color: #666;
}

.canje-puntos-mensaje i {
    color: #d4af37;
    margin-right: 0.5rem;
}

/* Grid de recompensas */
.canje-recompensas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

.canje-recompensa-card {
    background: #fcf8f3;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #f0e6d8;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.canje-recompensa-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.canje-recompensa-card.disponible {
    border-color: #d4af37;
    background: #fffdf7;
}

.canje-recompensa-card.no-disponible {
    opacity: 0.6;
    filter: grayscale(0.4);
}

.canje-recompensa-icono {
    font-size: 2.8rem;
    color: #d4af37;
    margin-bottom: 0.8rem;
}

.canje-recompensa-info h4 {
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    color: #3e2a21;
    margin: 0 0 0.2rem 0;
    letter-spacing: 0.5px;
}

.canje-recompensa-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.canje-recompensa-coste {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.canje-recompensa-coste i {
    color: #f1c40f;
    margin-right: 0.3rem;
}

.btn-canjear {
    margin-top: 1rem;
    padding: 0.6rem 1.8rem;
    border: none;
    border-radius: 60px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    background: #d4af37;
    color: #fff;
    width: 100%;
}

.btn-canjear:hover:not(:disabled) {
    background: #c4a03a;
    transform: scale(1.02);
}

.btn-canjear:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-canjear:active:not(:disabled) {
    transform: scale(0.98);
}

/* Historial de canjes */
#historialCanjesContainer {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

#historialCanjesContainer .historial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: #fcf8f3;
    border-radius: 12px;
    border-left: 4px solid #e67e22;
    font-size: 0.95rem;
    color: #3e2a21;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

#historialCanjesContainer .historial-item:hover {
    background: #f5ede4;
}

#historialCanjesContainer .historial-item span:last-child {
    font-weight: 700;
    color: #e67e22;
}

/* ============================================================
   MEJORA: Transición suave para la barra de progreso (color y ancho)
   ============================================================ */
.puntos-progreso {
    transition: width 0.8s ease, background 0.5s ease !important;
}

/* ============================================================
   RESPONSIVE EXTRA PARA CANJE (dentro de tus media queries)
   ============================================================ */
@media (max-width: 768px) {
    .canje-puntos-disponibles {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1.2rem 1.2rem;
    }
    .canje-puntos-cantidad {
        width: 100%;
        justify-content: center;
    }
    .canje-puntos-numero {
        font-size: 2.2rem;
    }
    .canje-puntos-mensaje {
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
    }
    .canje-recompensas-grid {
        grid-template-columns: 1fr;
    }
    #historialCanjesContainer .historial-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

@media (max-width: 480px) {
    .canje-dashboard {
        padding: 1rem 0.8rem;
    }
    .canje-puntos-numero {
        font-size: 1.8rem;
    }
    .canje-puntos-label {
        font-size: 0.8rem;
    }
}