/* =================================
   PROFILE PAGE STYLES
   ================================= */

.profile-page {
    /* Scoped container for all profile-specific styles */
}

/* =================================
   PROFILE HEADER
   ================================= */

.profile-page .profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.profile-page .profile-header .header-left h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: var(--primary);
}

.profile-page .profile-header .header-left p {
    margin: 0;
    color: var(--text-medium);
    font-size: 1rem;
}

/* =================================
   PROFILE CONTENT LAYOUT
   ================================= */

.profile-page .profile-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.profile-page .profile-section {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* =================================
   PROFILE ALERT MESSAGES
   ================================= */

.profile-page .alert {
    margin-bottom: 2rem;
    border-radius: var(--border-radius-lg);
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideInDown 0.3s ease-out;
}

.profile-page .alert i {
    font-size: 1.3rem;
    margin-right: 0.75rem;
}

.profile-page .alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #c3e6cb;
    border-left: 4px solid var(--success);
}

.profile-page .alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #f5c6cb;
    border-left: 4px solid var(--error);
}

.profile-page .profile-avatar-section .alert {
    margin-top: 1.5rem;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================
   LOADING AND EMPTY STATES
   ================================= */

.profile-page .loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-medium);
}

.profile-page .loading-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.profile-page .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    color: var(--text-medium);
}

.profile-page .empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.profile-page .empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.profile-page .empty-state p {
    margin: 0 0 2rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.profile-page .profile-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.profile-page .profile-loading-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 300px;
}

.profile-page .profile-loading-content i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.profile-page .profile-loading-content p {
    margin: 0;
    color: var(--text-dark);
    font-weight: 500;
}

/* =================================
   AVATAR SECTION
   ================================= */

.profile-page .profile-avatar-section {
    margin-bottom: 2rem;
}

.profile-page .avatar-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-page .avatar-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-light);
    border: 3px solid var(--border-light);
    transition: var(--transition);
}

.profile-page .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-page .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 3rem;
}

.profile-page .avatar-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* =================================
   SECTION HEADERS (SHARED)
   ================================= */

.profile-page .section-header {
    margin-bottom: 2rem;
}

.profile-page .section-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
    font-size: 1.5rem;
}

.profile-page .section-header p {
    margin: 0;
    color: var(--text-medium);
    font-size: 1rem;
}

/* =================================
   PROFILE INFO FORM
   ================================= */

.profile-page .profile-info-section {
    margin-bottom: 2rem;
}

.profile-page .profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.profile-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-page .form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.profile-page .input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-page .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-medium);
    font-size: 1.1rem;
    z-index: 1;
    pointer-events: none;
}

.profile-page .profile-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    box-sizing: border-box;
}

.profile-page .profile-form .form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

.profile-page .profile-form .form-control.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* =================================
   PASSWORD CHANGE FORM
   ================================= */

.profile-page .password-section {
    margin-bottom: 2rem;
}

.profile-page .password-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-page .password-form .form-control {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    box-sizing: border-box;
}

.profile-page .password-form .form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

.profile-page .password-form .form-control.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.profile-page .password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.profile-page .password-toggle:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* =================================
   PASSWORD STRENGTH INDICATOR
   ================================= */

.profile-page .password-requirements {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}

.profile-page .password-requirements h4 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
}

.profile-page .requirements-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-page .requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-medium);
    transition: var(--transition);
}

.profile-page .requirement.valid {
    color: var(--success);
}

.profile-page .requirement i {
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.profile-page .requirement.valid i {
    color: var(--success);
}

.profile-page .password-strength-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-page .strength-bar {
    flex: 1;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.profile-page .strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.profile-page .strength-fill.very-weak {
    background: #ef4444;
}

.profile-page .strength-fill.weak {
    background: #f59e0b;
}

.profile-page .strength-fill.fair {
    background: #eab308;
}

.profile-page .strength-fill.good {
    background: #22c55e;
}

.profile-page .strength-fill.strong {
    background: #16a34a;
}

.profile-page .strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
}

.profile-page .strength-text.very-weak {
    color: #ef4444;
}

.profile-page .strength-text.weak {
    color: #f59e0b;
}

.profile-page .strength-text.fair {
    color: #eab308;
}

.profile-page .strength-text.good {
    color: #22c55e;
}

.profile-page .strength-text.strong {
    color: #16a34a;
}

/* =================================
   FORM ACTIONS
   ================================= */

.profile-page .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 768px) {
    .profile-page .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .profile-page .profile-content {
        gap: 2rem;
    }

    .profile-page .profile-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .profile-page .avatar-container {
        flex-direction: column;
        text-align: center;
    }

    .profile-page .avatar-controls {
        flex-direction: row;
        justify-content: center;
    }

    .profile-page .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-page .form-actions {
        flex-direction: column-reverse;
    }

    .profile-page .form-actions .action-btn {
        justify-content: center;
    }

    .profile-page .alert {
        padding: 1rem;
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .profile-page .alert i {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .profile-page .profile-header .header-left h1 {
        font-size: 1.5rem;
    }

    .profile-page .profile-loading-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .profile-page .avatar-preview {
        width: 100px;
        height: 100px;
    }

    .profile-page .avatar-placeholder {
        font-size: 2.5rem;
    }

    .profile-page .password-requirements {
        padding: 0.75rem;
    }

    .profile-page .alert {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
}