
/* ---------- Профиль ---------- */

.profile-page{
    display:flex;
    align-items:flex-start;
    gap:40px;
    width:100%;
    min-width:0;
    margin:40px auto;
}

.profile-sidebar{
    flex:0 0 280px;
    width:280px;
    max-width:100%;
    height:fit-content;
    align-self:flex-start;
    box-sizing:border-box;
    background:#fff;
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.profile-content{
    flex:1;
    min-width:0;
    width:100%;
    box-sizing:border-box;
    background:#fff;
    border-radius:20px;
    padding:40px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.profile-avatar{

    width:180px;

    height:180px;

    border-radius:50%;

    object-fit:cover;

    border:4px solid #C9A96E;

    transition:.25s;

}

.profile-content h1{
    margin-bottom:30px;
}

.avatar-wrapper{

    position:relative;

    width:180px;

    height:180px;

    margin:0 auto;

    cursor:pointer;

}


.avatar-overlay{

    position:absolute;

    top:0;

    left:0;

    width:100%;

    height:100%;

    border-radius:50%;

    background:rgba(0,0,0,.45);

    display:flex;

    justify-content:center;

    align-items:center;

    opacity:0;

    transition:.25s;

}

.avatar-wrapper:hover .avatar-overlay{

    opacity:1;

}

.avatar-overlay span{

    color:white;

    font-size:56px;

    font-weight:300;

}

.avatar-menu{

    position:absolute;

    display:none;

    width:240px;

    background:#fff;

    border-radius:18px;

    box-shadow:0 15px 35px rgba(0,0,0,.12);

    overflow:hidden;

    z-index:100;

    left:50%;

    top: calc(100% + 10px);

    transform:translateX(-50%);

}

.avatar-menu button{

    width:100%;

    border:none;

    background:white;

    padding:16px;

    text-align:left;

    cursor:pointer;

    transition:.25s;

}

.avatar-menu button:hover{

    background:#F7F7F7;

}

.readonly-field{
    padding:15px;
    border:1px solid #e5e5e5;
    border-radius:12px;
    background:#f8f8f8;
    color:#666;
    font-size:16px;
}

.profile-messages{
    display:grid;
    gap:10px;
    margin:0 0 22px;
}

.profile-message{
    padding:13px 15px;
    border:1px solid #ded4c5;
    border-radius:13px;
    color:#594f43;
    background:#faf6ef;
    font-weight:700;
    line-height:1.45;
}

.profile-message--success{
    border-color:#b9dcc3;
    color:#316642;
    background:#eff9f2;
}

.profile-message--error{
    border-color:#ecc4bd;
    color:#9a382c;
    background:#fff2ef;
}

.profile-email-state{
    display:grid;
    gap:7px;
    margin-top:9px;
    color:#746a5f;
    font-size:13px;
    line-height:1.45;
}

.profile-email-verified{color:#39714a;font-weight:700}

.profile-email-pending{
    padding:10px 12px;
    border:1px solid #ead4a8;
    border-radius:11px;
    color:#805a21;
    background:#fff7e6;
    font-weight:700;
}

.profile-email-help{
    display:block;
    margin-top:8px;
    color:#82786d;
    line-height:1.4;
}

.profile-field-errors{
    margin-top:8px;
    color:#aa3028;
    font-size:13px;
    font-weight:700;
}

.profile-phone-confirm{
    margin:22px 0 8px;
    padding:20px;
    display:grid;
    grid-template-columns:minmax(220px,1fr) minmax(150px,220px) auto;
    gap:16px;
    align-items:end;
    border:1px solid #e5d3b6;
    border-radius:18px;
    background:#fffaf1;
}
.profile-phone-confirm label{display:block;font-weight:700;margin-bottom:5px}
.profile-phone-confirm p{margin:0;color:#796d5d;font-size:13px;line-height:1.45}
.profile-phone-confirm input{
    width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #d8c8ae;
    border-radius:10px;font:inherit;letter-spacing:.18em;text-align:center
}
@media(max-width:760px){
    .profile-phone-confirm{grid-template-columns:1fr}
}

.profile-rating {
    display: grid;
    gap: 5px;
    margin: 16px 0 20px;
    color: #6f6253;
    text-align: center;
}

.profile-rating-stars {
    color: #d19b39;
    font-size: 22px;
    letter-spacing: .04em;
    line-height: 1;
}

.profile-rating-label {
    font-size: 13px;
    font-weight: 700;
}

.profile-documents {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid #eee4d5;
}

.profile-documents-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-section-kicker {
    margin: 0 0 6px;
    color: #a27432;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.profile-documents-heading h2 {
    margin: 0;
    color: #3d3427;
    font-size: clamp(21px, 3vw, 28px);
}

.profile-documents-note {
    flex: 0 0 auto;
    padding: 7px 11px;
    color: #6f5730;
    font-size: 12px;
    font-weight: 700;
    background: #f8efdf;
    border-radius: 999px;
}

.profile-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.profile-document-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #eadfc9;
    border-radius: 16px;
    background: #fffaf2;
}

.profile-document-button {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    color: #4f4a43;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.profile-document-button span {
    font: inherit;
    font-weight: 750;
    line-height: 1.4;
}

.profile-document-button small {
    flex: 0 0 auto;
    color: #a27432;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.profile-document-button:hover span,
.profile-document-button:focus-visible span {
    color: #9a6c2a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.profile-marketing-toggle {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #5f584e;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.profile-marketing-toggle .consent-checkbox {
    flex: 0 0 auto;
    margin-top: 2px;
}

.profile-document-status {
    min-height: 18px;
    margin: -4px 0 0;
    color: #52734b;
    font-size: 12px;
}

.profile-max{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:28px;padding:20px;border:1px solid #dce6f0;border-radius:18px;background:linear-gradient(135deg,#f7fbff,#eef6fc)}
.profile-max h2,.profile-max p{margin:0}.profile-max h2{color:#273c50}.profile-max>div>p:last-child{margin-top:7px;color:#607181;line-height:1.5}
.profile-max-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border:0;border-radius:12px;background:#1785e5;color:#fff;text-decoration:none;font-weight:800;white-space:nowrap;cursor:pointer}
.profile-max-button--secondary{background:#e1ebf4;color:#456078}

.profile-security-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    min-height:44px;
    padding:0 18px;
    border-radius:12px;
    color:#fff;
    background:linear-gradient(135deg,#D8BC82,#B88A44);
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
}
.profile-security-button:hover{background:#b99355}
.profile-sidebar-password{
    width:100%;
    box-sizing:border-box;
    margin-bottom:10px;
}

.profile-password-page{
    display:flex;
    justify-content:center;
    padding:40px 0;
}
.profile-password-card{
    width:min(100%,620px);
    box-sizing:border-box;
    padding:40px;
    border-radius:24px;
    background:#fff;
    box-shadow:0 16px 45px rgba(0,0,0,.09);
}
.profile-password-card h1{margin:0 0 10px}
.profile-password-back{
    display:inline-flex;
    margin-bottom:28px;
    color:#8a672f;
    font-weight:700;
    text-decoration:none;
}
.profile-password-back:hover{text-decoration:underline}
.profile-password-intro{
    margin:0 0 28px;
    color:#746a5f;
    line-height:1.55;
}
.profile-password-form .gold-btn{margin-top:6px}
.profile-password-help{
    margin-top:8px;
    color:#7b7268;
    font-size:13px;
    line-height:1.45;
}
.profile-password-help ul{
    margin:7px 0 0;
    padding-left:20px;
}
.profile-password-resend{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    margin-top:18px;
}
.profile-password-resend-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-width:220px;
    min-height:44px;
    box-sizing:border-box;
    padding:10px 18px;
    color:#8a672f;
    background:transparent;
    border:1px solid currentColor;
    border-radius:12px;
    font:inherit;
    font-weight:750;
    line-height:1.35;
    text-align:center;
    white-space:normal;
    cursor:pointer;
}
.profile-password-resend-button:disabled{
    color:#a9a19a;
    text-decoration:none;
    cursor:not-allowed;
}
.profile-password-resend [data-password-code-countdown]{
    min-height:18px;
    color:#7b7268;
    font-size:13px;
}

@media (max-width: 768px) {
    .profile-page {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        width: 100%;
        margin: 18px auto;
    }

    .profile-sidebar {
        flex: none;
        width: 100%;
        height: auto;
        align-self: stretch;
        padding: 22px 18px;
    }

    .profile-content {
        width: 100%;
        min-width: 0;
        padding: 24px 18px;
        border-radius: 18px;
    }

    .profile-content h1 {
        margin-bottom: 22px;
        font-size: clamp(25px, 8vw, 32px);
        overflow-wrap: anywhere;
    }

    .profile-content form,
    .profile-content .form-group,
    .profile-content input,
    .profile-content textarea,
    .profile-content select {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .profile-email-pending,
    .profile-field-errors,
    .profile-message {
        overflow-wrap: anywhere;
    }

    .profile-documents {
        margin-top: 26px;
        padding-top: 24px;
    }

    .profile-documents-heading {
        flex-direction: column;
        gap: 10px;
    }

    .profile-documents-note {
        align-self: flex-start;
    }

    .profile-documents-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-document-button {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .profile-document-button small {
        white-space: normal;
    }

    .profile-max{align-items:stretch;flex-direction:column}.profile-max-button{width:100%;box-sizing:border-box}
    .profile-password-page{padding:20px 0}
    .profile-password-card{padding:24px 18px;border-radius:18px}
    .profile-password-resend-button{width:100%;min-width:0}
}

@media (max-width: 390px) {
    .profile-sidebar {
        padding: 18px 14px;
    }

    .profile-content {
        padding: 20px 14px;
    }

    .profile-avatar,
    .avatar-wrapper {
        width: 150px;
        height: 150px;
    }
}
