
/* --- INLINE STYLES (SETUP WIZARD) --- */
@keyframes spin { to { transform: rotate(360deg); } }
            .tab-content { display: none; }
            .tab-content.active { display: block; min-height: 600px; }
            #admin-section .profile-card, 
#superadmin-section .profile-card,
            #stats-view .profile-card,
            #perfil-section .profile-card { display: block !important; overflow: visible !important; }

            .setup-section-title {
                font-size: 0.75rem;
                font-weight: 800;
                color: #60a5fa;
                letter-spacing: 1px;
                text-transform: uppercase;
                margin: 0 0 20px 0;
                padding-bottom: 8px;
                border-bottom: 1px solid rgba(255,255,255,0.05);
                display: flex;
                align-items: center;
                gap: 10px;
            }
            .setup-info-block {
                background: rgba(59, 130, 246, 0.05);
                padding: 15px;
                border-radius: 8px;
                border: 1px solid rgba(59, 130, 246, 0.1);
                margin-bottom: 15px;
            }
            .setup-info-block label {
                color: #60a5fa !important;
            }
            /* WIZARD STEPS */
            .setup-step { display: none; }
            .setup-step.active { display: block; animation: stepFadeIn 0.4s ease; }
            @keyframes stepFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

            .step-indicator {
                display: flex;
                justify-content: space-between;
                margin-bottom: 30px;
                position: relative;
                padding: 0 10px;
            }
            .step-indicator::before {
                content: '';
                position: absolute;
                top: 15px;
                left: 20px;
                right: 20px;
                height: 2px;
                background: rgba(255,255,255,0.05);
                z-index: 1;
            }
            .step-dot {
                width: 32px;
                height: 32px;
                background: var(--bg-panel);
                border: 2px solid rgba(255,255,255,0.1);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 0.75rem;
                font-weight: 800;
                z-index: 2;
                color: var(--text-muted);
                transition: all 0.3s;
                position: relative;
            }
            .step-dot.active {
                background: #3b82f6;
                border-color: #3b82f6;
                color: white;
                box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
            }
            .step-dot.completed {
                background: #10b981;
                border-color: #10b981;
                color: white;
            }
            .step-label {
                position: absolute;
                top: 40px;
                font-size: 0.5rem;
                white-space: nowrap;
                opacity: 0.5;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
            .step-dot.active .step-label { opacity: 1; color: #60a5fa; font-weight: 800; }

            .wizard-nav {
                display: flex;
                gap: 15px;
                margin-top: 30px;
                padding-top: 20px;
                border-top: 1px solid rgba(255,255,255,0.05);
            }

            #setup-view .ri-checkbox-circle-fill { color: #60a5fa !important; }
            #setup-strength-label { color: #60a5fa !important; }
            #setup-strength-bar { background: #3b82f6 !important; }
            .error-message {
                color: #ef4444;
                font-size: 0.75rem;
                text-align: center;
                margin-top: 10px;
                font-weight: 600;
                line-height: 1.4;
                padding: 10px;
                background: rgba(239, 68, 68, 0.05);
                border-radius: 8px;
            }

        
/* --- AUTH VIEW --- */
.view {
    display: none;
    height: 100vh;
    width: 100%;
}

.view.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}
#auth-view {
    justify-content: center; /* Centrado vertical absoluto */
    align-items: center;    /* Centrado horizontal absoluto */
    padding: 20px;
}

.auth-container {
    margin: auto;
    width: 100%;
    max-width: 340px; /* Un poco más estrecho */
    padding: 18px;    /* Compacto */
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 0;
    max-height: 98vh;
    overflow-y: auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 15px;
}
.logo-container h1 { font-size: 1.4rem !important; margin: 8px 0 2px 0; font-weight: 800; }
.logo-container p { font-size: 0.7rem !important; margin: 0; opacity: 0.6; text-transform: uppercase; letter-spacing: 1.5px; }

.logo-icon {
    font-size: 2.5rem; /* Icono más equilibrado */
    color: var(--primary);
    margin-bottom: 5px;
}

.auth-form .form-group {
    margin-bottom: 12px;
}
.form-group label { 
    display: block; 
    font-size: 0.65rem; 
    margin-bottom: 6px; 
    color: var(--text-muted); 
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 5;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    z-index: 10;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 15px 14px 55px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

/* Alineación Profesional del Login (Consolidada en regla general) */
.auth-form .input-wrapper i {
    left: 15px !important;
}

.pass-toggle-icon,
.toggle-pass {
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: 0.2s;
}
.pass-toggle-icon:hover,
.toggle-pass:hover { color: var(--primary) !important; }

.btn {
    padding: 12px 20px;
    border-radius: 0;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-block { width: 100%; }

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    padding-bottom: 100px; /* Espacio extra para que la nav no tape nada */
} 

/* --- QR & SHARE --- */
.share-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.7;
}

.share-container:hover {
    opacity: 1;
    color: var(--primary);
}

.share-container i {
    font-size: 1.2rem;
}

.qr-modal-content {
    max-width: 320px;
    text-align: center;
    padding: 40px 30px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.qr-modal-content::-webkit-scrollbar {
    width: 4px;
}

.qr-modal-content::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
}


.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.qr-header {
    margin-bottom: 25px;
}

.qr-header i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.qr-header h3 {
    margin: 0;
    color: var(--text-main);
}

.qr-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 5px 0 0;
}

#qr-container {
    background: white;
    padding: 15px;
    border-radius: var(--radius-md);
    display: inline-block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    margin: 10px 0;
}

#qr-container img {
    display: block;
    width: 200px;
    height: 200px;
}


