/* ============================================================
          AVATAR PICKER
       ============================================================ */
.avatar-section {
    margin-bottom: 1.3rem;
}

.avatar-section label {
    color: white;
    display: block;
    margin-bottom: 10px;
}

/* Vista previa + botón de aleatoriedad */
.avatar-preview-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #8a40d5;
    box-shadow: 0 0 12px rgba(138,64,213,.4);
    background: rgba(255,255,255,0.05);
    object-fit: cover;
    flex-shrink: 0;
    transition: .3s;
}

.avatar-preview:hover {
    box-shadow: 0 0 20px rgba(138,64,213,.65);
}

.btn-random {
    width: auto;
    padding: 10px 18px;
    font-size: .85rem;
    border-radius: 10px;
    background: rgba(138,64,213,.2);
    border: 1px solid rgba(138,64,213,.5);
    color: #d0abff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: .3s;
}

.btn-random:hover {
    background: rgba(138,64,213,.35);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(138,64,213,.3);
}

/* Grid de estilos de avatar */
.avatar-styles-label {
    color: #9ca3af;
    font-size: .8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.avatar-styles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 0.5rem;
}

.avatar-style-btn {
    width: 100%;
    padding: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    transition: .25s;
    box-shadow: none;
}

.avatar-style-btn img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.avatar-style-btn span {
    color: #9ca3af;
    font-size: .65rem;
    text-align: center;
    line-height: 1.1;
}

.avatar-style-btn:hover {
    border-color: rgba(138,64,213,.5);
    background: rgba(138,64,213,.12);
    transform: translateY(-1px);
}

.avatar-style-btn.active {
    border-color: #8a40d5;
    background: rgba(138,64,213,.2);
    box-shadow: 0 0 10px rgba(138,64,213,.3);
}

.avatar-style-btn.active span {
    color: #d0abff;
}

/* Input oculto que guarda la URL final */
#avatarUrl {
    display: none;
}

/* ============================================================
   ALERT MESSAGES
============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    font-size: .9rem;
    text-align: center;
}

.alert-error {
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(239,68,68,.35);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.35);
    color: #86efac;
}

/* Password strength bar */
.strength-bar {
    height: 4px;
    border-radius: 4px;
    margin-top: 6px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width .4s, background .4s;
}

.strength-text {
    font-size: .75rem;
    color: #6b7280;
    margin-top: 4px;
}

.meta-barra-fill {
    transition: width 0.3s ease;
    height: 100%;
    border-radius: 30px;
}

.barra-gradiente-0 {
    background: linear-gradient(90deg, #7c43f2, #ed437d);
}

.barra-gradiente-1 {
    background: linear-gradient(90deg, #5277d4, #7c43f2);
}

.barra-gradiente-2 {
    background: linear-gradient(90deg, #ed437d, #f8b527);
}

.barra-gradiente-3 {
    background: linear-gradient(90deg, #f8b527, #11a29f);
}

.barra-gradiente-4 {
    background: linear-gradient(90deg, #11a29f, #5277d4);
}

.barra-completada {
    background: linear-gradient(90deg, #11a29f, #2dd4bf);
}
/* ============================================================
   RESPONSIVE — hereda breakpoint del CSS base
============================================================ */
@media (max-width: 1200px) {
    .avatar-styles {
        grid-template-columns: repeat(5, 1fr);
    }

    .avatar-style-btn img {
        width: 44px;
        height: 44px;
    }

    .avatar-style-btn span {
        font-size: .7rem;
    }

    .btn-random {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
}
/* ══════════════════════════════════════════════════
   AVATAR PICKER — TABS + GRILLA
══════════════════════════════════════════════════ */
.avatar-style-tabs {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 6px;
    margin-bottom: 12px;
}
.avatar-tab-btn {
    padding: 5px 11px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,.12);
    background: transparent;
    color: rgba(255,255,255,.5);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex: 0 0 auto;
}
.avatar-tab-btn:hover {
    border-color: rgba(123,69,243,.5);
    color: rgba(255,255,255,.8);
}
.avatar-tab-btn.active {
    background: rgba(123,69,243,.2);
    border-color: #7b45f3;
    color: #c4b5fd;
}

.avatar-grid-registro {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    background: rgba(255,255,255,.03);
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.06);
    margin-bottom: 8px;
}
.avatar-grid-option {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    overflow: hidden;
    background: rgba(255,255,255,.05);
    transition: transform .15s, border-color .2s;
}
.avatar-grid-option:hover {
    transform: scale(1.1);
    border-color: rgba(123,69,243,.5);
}
.avatar-grid-option.selected {
    border-color: #7b45f3;
    box-shadow: 0 0 0 3px rgba(123,69,243,.25);
}
.avatar-grid-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Asegurar tabs horizontales ── */
.avatar-style-tabs { display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; }
.avatar-tab-btn    { width:auto !important; flex:0 0 auto !important; }