
/* ---------- Профиль ---------- */

.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-document-status.is-error {
    color: #a33f3f;
}

.profile-legal-documents-action {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid #eee4d5;
}

.profile-legal-documents-open {
    display: inline-flex;
    min-height: 48px;
    padding: 12px 20px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: linear-gradient(135deg, #c9a96e, #a98443);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 9px 22px rgba(120, 86, 37, .18);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.profile-legal-documents-open:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(120, 86, 37, .24);
}

body.profile-legal-documents-modal-open {
    overflow: hidden;
}

.profile-legal-documents-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    padding: clamp(12px, 3vw, 32px);
    box-sizing: border-box;
    place-items: center;
    background: rgba(35, 28, 20, .6);
    backdrop-filter: blur(8px);
}

.profile-legal-documents-modal[hidden] {
    display: none;
}

.profile-legal-documents-dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: min(860px, calc(100dvh - 24px));
    padding: clamp(22px, 4vw, 34px);
    box-sizing: border-box;
    overflow-y: auto;
    background: #fffdfa;
    border: 1px solid rgba(201, 169, 110, .35);
    border-radius: 24px;
    box-shadow: 0 28px 75px rgba(28, 21, 14, .3);
}

.profile-legal-documents-close {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0 0 -42px auto;
    padding: 0;
    place-items: center;
    color: #735b37;
    background: #f5ecdd;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 23px;
}

.profile-legal-documents-heading {
    padding-right: 54px;
}

.profile-legal-documents-heading > span {
    color: #a27432;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.profile-legal-documents-heading h2 {
    margin: 7px 0 8px;
    color: #3b3227;
    font-size: clamp(25px, 4vw, 36px);
}

.profile-legal-documents-heading p {
    margin: 0;
    color: #7d7367;
    line-height: 1.55;
}

.profile-legal-documents-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.profile-legal-document {
    overflow: hidden;
    background: #fff;
    border: 1px solid #eadfc9;
    border-radius: 16px;
}

.profile-legal-document summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 17px 19px;
    align-items: center;
    color: #4d4235;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.profile-legal-document summary::-webkit-details-marker {
    display: none;
}

.profile-legal-document summary::after {
    content: "+";
    grid-column: 3;
    color: #9d7539;
    font-size: 22px;
}

.profile-legal-document[open] summary::after {
    content: "−";
}

.profile-legal-document summary small {
    color: #a27432;
    font-size: 11px;
    white-space: nowrap;
}

.profile-legal-document-text {
    max-height: 46vh;
    padding: 18px 20px;
    overflow-y: auto;
    color: #625a50;
    background: #fcf8f1;
    border-top: 1px solid #eee3d2;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.profile-legal-document-text > :first-child {
    margin-top: 0;
}

.profile-legal-document-text > :last-child {
    margin-bottom: 0;
}

.profile-legal-document-consent {
    padding: 14px 20px;
    background: #fffaf2;
    border-top: 1px solid #eee3d2;
}

.profile-login-links{display:grid;gap:18px;margin-top:28px;padding:22px;border:1px solid #e8dfd2;border-radius:20px;background:linear-gradient(145deg,#fffdf9,#faf5ed);box-shadow:0 12px 30px rgba(68,52,31,.055)}
.profile-login-links-heading{display:grid;gap:8px}
.profile-login-links-heading h2{margin:4px 0 0;color:#3f372f;font-size:22px}
.profile-login-links-heading>p{margin:0;color:#7b7064;font-size:12px;line-height:1.55}
.profile-login-links-grid{display:grid;gap:10px}
.profile-login-link{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:13px;padding:14px;border:1px solid #e7ded2;border-radius:15px;background:#fff}
.profile-login-link.is-connected{border-color:#cfe3d3;background:linear-gradient(135deg,#fff,#f5fbf6)}
.profile-login-link-mark{display:grid;width:44px;height:44px;place-items:center;border-radius:13px;background:#f4eee5;color:#725a35;font-size:14px;font-weight:900}
.profile-login-link-mark img{width:100%;height:100%;border-radius:inherit;object-fit:contain}
.profile-login-link--yandex .profile-login-link-mark{background:#fff0f0;color:#e32636}
.profile-login-link--vk .profile-login-link-mark{background:#eef5ff;color:#1676d2}
.profile-login-link--gosuslugi .profile-login-link-mark{background:#eef3ff;color:#1953a6}
.profile-login-link-content{min-width:0}
.profile-login-link-title{display:flex;align-items:center;gap:8px}
.profile-login-link-title h3{margin:0;color:#443a31;font-size:15px}
.profile-login-link-title>span{padding:3px 7px;border-radius:999px;background:#dff2e3;color:#39714a;font-size:9px;font-weight:800;text-transform:uppercase}
.profile-login-link-content p{margin:4px 0 0;color:#81766a;font-size:11px;line-height:1.4}
.profile-login-link-content small{display:block;margin-top:4px;color:#62806a;font-size:10px}
.profile-login-link>a{display:inline-flex;min-height:38px;align-items:center;justify-content:center;padding:0 14px;border-radius:10px;background:#a98443;color:#fff;text-decoration:none;font-size:11px;font-weight:850}
.profile-login-link>a:hover{background:#967438}
.profile-login-link-state{display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:#dff2e3;color:#39714a;font-size:18px;font-weight:900}
.profile-login-link-actions{display:flex;align-items:center;gap:8px}
.profile-login-link-actions form{margin:0}
.profile-login-link-unlink{min-height:34px;padding:0 11px;border:1px solid #e5caca;border-radius:9px;background:#fff;color:#9a4d4d;font:inherit;font-size:10px;font-weight:850;cursor:pointer;transition:border-color .18s ease,background .18s ease,color .18s ease}
.profile-login-link-unlink:hover{border-color:#d99f9f;background:#fff5f5;color:#813737}
.profile-login-link-unavailable{padding:8px 10px;border-radius:9px;background:#f1eee9;color:#8b8175;font-size:10px;font-weight:800}
.profile-login-links-empty{margin:0;padding:14px;border:1px dashed #dacdbc;border-radius:12px;color:#807467;background:#fff;text-align:center;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-calendar-sync{display:grid;gap:18px;margin-top:28px;padding:22px;border:1px solid #e6ddcf;border-radius:20px;background:linear-gradient(145deg,#fffdf9,#faf6ef);box-shadow:0 12px 30px rgba(68,52,31,.055)}
.profile-calendar-sync header h2{margin:4px 0 0;color:#3f372f;font-size:22px}
.profile-calendar-sync header p:last-child{margin:7px 0 0;color:#7b7064;font-size:12px;line-height:1.55}
.profile-calendar-sync__grid{display:grid;grid-template-columns:1fr;gap:12px}
.profile-calendar-sync__card{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);align-content:start;gap:12px;padding:16px;border:1px solid #e4d9ca;border-radius:16px;background:#fff}
.profile-calendar-sync__card.is-connected{border-color:#bcdac4;background:linear-gradient(145deg,#fff,#f4fbf6)}
.profile-calendar-sync__mark{display:grid;width:48px;height:48px;place-items:center;border-radius:14px;color:#7d5a32;background:#f4eadc;font-size:22px;font-weight:900}
.profile-calendar-sync__card--google .profile-calendar-sync__mark{color:#3568bb;background:#edf4ff}
.profile-calendar-sync__card h3{margin:2px 0 5px;color:#443a31;font-size:15px}
.profile-calendar-sync__card p{margin:0;color:#81766a;font-size:11px;line-height:1.5}
.profile-calendar-sync__state{position:absolute;top:13px;right:13px;padding:4px 8px;border-radius:999px;color:#39714a;background:#dff2e3;font-size:9px;font-weight:850;text-transform:uppercase}
.profile-calendar-sync__card form,.profile-calendar-sync__card>a,.profile-calendar-sync__unavailable{grid-column:1/-1}
.profile-calendar-sync__primary,.profile-calendar-sync__secondary{display:inline-flex;min-height:42px;box-sizing:border-box;align-items:center;justify-content:center;padding:0 15px;border:0;border-radius:11px;font:inherit;font-size:11px;font-weight:850;cursor:pointer;text-decoration:none}
.profile-calendar-sync__primary{color:#fff;background:#a98443}
.profile-calendar-sync__secondary{width:100%;color:#8c4a4a;background:#fff;border:1px solid #e3caca}
.profile-calendar-sync__unavailable{padding:11px;border-radius:10px;color:#81776b;background:#f2eee8;font-size:10px;font-weight:750;line-height:1.45}

.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-input-wrap{
    position:relative;
}
.profile-password-input-wrap input{
    width:100%;
    padding-right:48px;
}
.profile-password-visibility{
    position:absolute;
    top:50%;
    right:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:36px;
    height:36px;
    padding:0;
    border:0;
    border-radius:50%;
    color:inherit;
    background:transparent;
    cursor:pointer;
    transform:translateY(-50%);
}
.profile-password-visibility:hover,
.profile-password-visibility:focus-visible{
    background:rgba(180, 130, 45, .12);
    outline:none;
}
.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;
}
.profile-password-alternative{
    margin-top:22px;
    padding-top:22px;
    border-top:1px solid #eadfce;
}
.profile-password-alternative-toggle{
    display:block;
    margin:0 auto;
    padding:0;
    color:#8a672f;
    background:transparent;
    border:0;
    font:inherit;
    font-weight:750;
    text-decoration:underline;
    text-underline-offset:3px;
    cursor:pointer;
}
.profile-password-alternative-form{
    display:grid;
    gap:14px;
    margin-top:18px;
    padding:20px;
    border:1px solid #eadfce;
    border-radius:16px;
    background:#fffaf3;
}
.profile-password-alternative-form[hidden]{display:none}
.profile-password-alternative-form .form-group{margin:0}
.profile-password-alternative-form .gold-btn{width:100%;margin:0}

@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-login-links{padding:16px}.profile-login-links-heading{grid-template-columns:1fr;gap:8px}.profile-login-link{grid-template-columns:40px minmax(0,1fr)}.profile-login-link-mark{width:40px;height:40px}.profile-login-link>a,.profile-login-link-actions,.profile-login-link-unavailable{grid-column:1/-1;width:100%;box-sizing:border-box}.profile-login-link-actions{display:grid;grid-template-columns:40px minmax(0,1fr)}.profile-login-link-actions form,.profile-login-link-unlink{width:100%}.profile-login-link-state{width:40px;height:38px;border-radius:10px}.profile-login-link-unavailable{text-align:center}.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}

    .profile-legal-documents-open {
        width: 100%;
        box-sizing: border-box;
    }

    .profile-legal-documents-modal {
        padding: 0;
    }

    .profile-legal-documents-dialog {
        width: 100%;
        height: 100dvh;
        max-height: none;
        padding: 20px 14px;
        border: 0;
        border-radius: 0;
    }

    .profile-legal-document summary {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 15px;
    }

    .profile-legal-document summary small {
        grid-column: 1;
    }

    .profile-legal-document summary::after {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .profile-legal-document-text {
        max-height: 55vh;
        padding: 16px;
    }
}

@media (max-width: 390px) {
    .profile-sidebar {
        padding: 18px 14px;
    }

    .profile-content {
        padding: 20px 14px;
    }

    .profile-avatar,
    .avatar-wrapper {
        width: 150px;
        height: 150px;
    }
}
