/* =========================================
   1. CONTENEDOR Y HEADER
   ========================================= */
.profile-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    min-height: 80vh;
}

.profile-header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 90px; height: 90px;
    background: #e2e8f0;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #64748b;
}

.profile-email { color: #64748b; margin-top: 5px; font-size: 0.9rem; }

/* Estadísticas */
.profile-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    background: #f8fafc;
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex; /* Para que se ajuste al contenido */
}
.stat-item { text-align: center; min-width: 70px; }
.stat-num { display: block; font-weight: 700; font-size: 1.1rem; color: #0f172a; }
.stat-label { font-size: 0.7rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 25px; background: #cbd5e1; margin: 0 15px; }

/* =========================================
   2. PESTAÑAS (TABS)
   ========================================= */
.tabs-wrapper {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 25px;
    background: white;
    position: sticky; top: 0; z-index: 10; /* Pegajoso al hacer scroll */
    padding-top: 10px;
}

.tab-link {
    background: none; border: none;
    padding: 12px 10px;
    font-size: 0.85rem; color: #64748b;
    cursor: pointer; font-weight: 600;
    position: relative;
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    transition: color 0.3s;
}
.tab-link i { font-size: 1.1rem; margin-bottom: 2px; }
.tab-link:hover { color: #334155; }

.tab-link.active { color: #0f172a; }
.tab-link.active::after {
    content: '';
    position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
    background: #0f172a; border-radius: 3px 3px 0 0;
}

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active-tab { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   3. ESTILOS DE CONTENIDO (TICKETS, FORM, SOPORTE)
   ========================================= */

/* --- Lista de Tickets --- */
.tickets-list { min-height: 200px; }
.loading-state { text-align: center; color: #94a3b8; padding: 40px; }

.ticket-card {
    background: white; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 15px; margin-bottom: 15px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}
.ticket-card:active { transform: scale(0.98); }
.ticket-card.is-used { background: #f1f5f9; opacity: 0.8; }

.ticket-info h4 { margin: 0 0 4px 0; font-size: 1rem; color: #1e293b; }
.ticket-info p { margin: 0 0 8px 0; font-size: 0.85rem; color: #64748b; }

.ticket-footer-row { display: flex; align-items: center; gap: 10px; }
.badge-type {
    background: #e0e7ff; color: #4338ca;
    padding: 3px 8px; border-radius: 4px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
}
.badge-used { background: #e2e8f0; color: #64748b; text-decoration: line-through; }

.ticket-ref {
    font-family: monospace; font-size: 0.7rem; color: #94a3b8;
    background: #f8fafc; padding: 2px 5px; border-radius: 4px; border: 1px solid #e2e8f0;
}

.btn-qr {
    width: 45px; height: 45px; border-radius: 10px;
    background: #0f172a; color: white; border: none;
    font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.btn-qr:disabled { background: #cbd5e1; }

/* --- Pestaña: Mis Datos (Formularios) --- */
.info-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.info-card h3 { margin-top: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.info-desc { font-size: 0.85rem; color: #64748b; margin-bottom: 20px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 5px; }
.input-readonly {
    width: 100%; padding: 10px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 8px;
    color: #334155; font-size: 0.9rem;
}
.btn-secondary {
    width: 100%; padding: 12px; background: white; border: 1px solid #cbd5e1;
    border-radius: 8px; color: #475569; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* --- Pestaña: Reclamos (Empty State) --- */
.empty-state { text-align: center; padding: 40px 20px; }
.icon-circle-check {
    width: 60px; height: 60px; background: #dcfce7; color: #16a34a;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 15px;
}
.mt-20 { margin-top: 20px; }

/* --- Pestaña: Soporte --- */
.support-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.support-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: white; padding: 20px; border: 1px solid #e2e8f0; border-radius: 12px;
    text-decoration: none; color: #334155;
}
.support-card i { font-size: 1.8rem; margin-bottom: 10px; color: #0f172a; }
.whatsapp-color { color: #25D366; }
.logout-zone { margin-top: 30px; }
.btn-logout-big {
    width: 100%; padding: 15px; background: #fee2e2; color: #dc2626;
    border: none; border-radius: 12px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}

/* =========================================
   4. MODAL QR
   ========================================= */
.qr-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.qr-modal.hidden { display: none; }
.qr-box {
    background: white; width: 90%; max-width: 320px;
    padding: 30px 20px; border-radius: 20px; text-align: center;
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popUp { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.qr-canvas { margin: 20px auto; display: flex; justify-content: center; }
.btn-close-qr {
    margin-top: 20px; padding: 10px 30px; border-radius: 30px;
    border: 2px solid #e2e8f0; background: white; font-weight: 700; cursor: pointer;
}