/* =========================================
   1. VIEW CONTAINER
   ========================================= */
#view-profile { 
    padding: calc(80px + var(--safe-top)) 20px 20px 20px; 
}

/* =========================================
   2. AUTHENTICATION (Login & Register)
   ========================================= */
.login-container { 
    background: var(--glass-bg); 
    backdrop-filter: var(--glass-blur); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--radius-xl); 
    padding: 35px 25px; 
    box-shadow: var(--shadow-deep); 
    text-align: center; 
    max-width: 400px; 
    transform: translateY(-40px); 
    margin: 40px auto 0 auto;
    min-height: 65vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

.login-input { 
    width: 100%; 
    padding: 16px; 
    margin-bottom: 15px; 
    border: 1px solid rgba(0,0,0,0.1); 
    border-radius: 14px; 
    background: rgba(255,255,255,0.7); 
    color: var(--text-main); 
    font-size: 16px; 
    outline: none; 
}

.btn-login { 
    width: 100%; 
    padding: 16px; 
    background: var(--primary); 
    color: white; 
    font-weight: bold; 
    border: none; 
    border-radius: 14px; 
    font-size: 16px; 
    cursor: pointer; 
    box-shadow: 0 6px 20px rgba(227, 0, 27, 0.3); 
    transition: transform 0.1s; 
}

.btn-login:active {
    transform: scale(0.98);
}

/* Componentes extra de Login (Google, divisores) */
.login-divider {
    margin: 20px 0;
    position: relative;
    border-top: 1px solid #ddd;
}
.login-divider span {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff; 
    padding: 0 10px;
    color: #888;
    font-size: 14px;
}

.btn-google {
    width: 100%;
    padding: 10px; 
    background-color: white;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}
.btn-google img {
    width: 12px !important;  
    height: 12px !important; 
    margin-right: 8px;
    object-fit: contain;      
    display: inline-block;
}

/* =========================================
   3. PROFILE HEADER (V6 Style)
   ========================================= */
.profile-header-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 15px;
    margin-bottom: 20px;
}

/* Avatar Grande */
#avatar-container {
    width: 90px !important;  
    height: 90px !important;
    font-size: 40px !important;
    background: transparent !important; 
    border: none !important;            
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
    /* Fallback styles from generic .avatar */
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
}
#avatar-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Nombre de Usuario */
#profile-name {
    font-size: 32px !important; 
    font-weight: 900 !important;
    letter-spacing: -1px;
    color: #FF8C00;
    line-height: 1;
    margin-bottom: 8px;
    margin-top: 0;
}

/* Botón Editar Perfil */
.btn-edit-stylish {
    background: linear-gradient(135deg, #E3001B 0%, #FF8C00 100%);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s;
}
.btn-edit-stylish:active { transform: scale(0.95); }

/* =========================================
   4. BENEFITS CARD
   ========================================= */
.benefits-card {
    background: linear-gradient(135deg, #E3001B 0%, #C40018 100%);
    border-radius: 24px;
    padding: 25px 20px;
    margin: 0 15px 30px 15px;
    box-shadow: 0 15px 35px rgba(227, 0, 27, 0.25);
    color: white;
    position: relative;
    overflow: hidden;
}
.benefits-card::before { /* Brillo decorativo */
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 150px; height: 150px; background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

/* Interactive touch feedback: simple expand (5%) on toggle */
.benefits-card { transition: transform 180ms ease, box-shadow 180ms ease; touch-action: manipulation; }
.benefits-card.expanded { transform: scale(1.05); box-shadow: 0 20px 40px rgba(227,0,27,0.22); }

.benefits-title {
    font-size: 16px; font-weight: 800; color: white;
    margin-bottom: 20px; text-align: left;
}

.benefits-grid { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
    text-align: center;
}
.b-item { width: 30%; display: flex; flex-direction: column; align-items: center; }

.b-icon { 
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(5px);
    color: white !important;
    border-radius: 14px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 20px; margin-bottom: 8px;
}
.b-value { font-weight: 900; font-size: 16px; color: white !important; }
.b-label { font-size: 10px; color: rgba(255,255,255,0.8) !important; font-weight: 600; margin-top: 2px; }

/* =========================================
   5. MENU & SETTINGS
   ========================================= */
.menu-section {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 12px; 
    margin-bottom: 40px;
}

.menu-box {
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    
    padding: 14px 18px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 600; font-size: 13px; color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: transform 0.2s;
}
.menu-box:active { transform: scale(0.98); background: rgba(255,255,255,0.6); }

.menu-icon-left {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px; margin-right: 12px; font-size: 16px;
}

/* Switch / Toggle Styles */
.switch { position: relative; width: 50px; height: 30px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #e9e9ea; border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 2px; bottom: 2px; background-color: white; border-radius: 50%; transition: .4s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* =========================================
   6. EDIT PROFILE MODAL ELEMENTS
   ========================================= */
.avatar-grid-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
    justify-items: center;
}

.avatar-option-img {
    width: 65px !important;
    height: 65px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #eee;
    padding: 2px;
    cursor: pointer;
    transition: all 0.2s;
}
.avatar-option-img.selected {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(227, 0, 27, 0.2);
}