/* ---------------- PROFILE GUARD (logged-out message) ---------------- */

.profile-guard {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}

.profile-guard p {
    margin-bottom: 20px;
}

/* ---------------- PROFILE PHOTO ---------------- */

.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 10px auto 40px;
}

.profile-photo-preview {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(204, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5em;
    color: var(--crimson-bright);
    box-shadow: 0 0 24px rgba(204, 0, 0, 0.35);
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.98em;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.file-label:hover {
    background: rgba(204, 0, 0, 0.2);
    border-color: rgba(204, 0, 0, 0.5);
}

/* ---------------- PROFILE DATA GRID ---------------- */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.profile-field {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-field label {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ddd;
}

.profile-field input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1.05em;
    padding: 4px 2px;
    font-family: inherit;
}

.profile-field input:disabled {
    color: #d8d8d8;
    opacity: 0.85;
}

.profile-field input:not(:disabled) {
    border-bottom-color: var(--crimson-bright);
    outline: none;
}

.profile-field input:not(:disabled):focus {
    background: rgba(255, 255, 255, 0.06);
}

.profile-field small {
    color: #b98a8a;
    font-size: 0.78em;
}

.profile-locked-note {
    max-width: 700px;
    margin: 14px auto 0;
    text-align: center;
    color: #b98a8a;
    font-size: 0.85em;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 30px 0 10px;
}

.secondary-button {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.secondary-button:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.form-message {
    text-align: center;
    max-width: 500px;
    margin: 16px auto 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95em;
}

.form-message.success {
    background: rgba(0, 180, 90, 0.15);
    color: #8ef2b9;
    border: 1px solid rgba(0, 180, 90, 0.35);
}

.form-message.error {
    background: rgba(204, 0, 0, 0.15);
    color: #ff9d9d;
    border: 1px solid rgba(204, 0, 0, 0.4);
}

@media (max-width: 640px) {
    .profile-photo-preview {
        width: 110px;
        height: 110px;
        font-size: 3.6em;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}
