.account-page {
    min-height: 100vh;
    background: #f7f6f2;
    color: #151515;
}

.account-page.modal-open { overflow: hidden; }
.account-header { display: flex; align-items: center; justify-content: space-between; padding: 28px clamp(20px, 6vw, 84px); }
.account-header img { width: 176px; height: auto; }
.account-header > a:last-child { color: #555; font-size: .82rem; }
.account-main { width: min(1120px, calc(100% - 40px)); margin: 6vh auto 12vh; }
.eyebrow { margin: 0 0 18px; font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }

.account-welcome { max-width: 740px; padding-top: 7vh; }
.account-welcome h1,
.account-title h1 { margin: 0; font-size: clamp(2.65rem, 6vw, 4.85rem); line-height: 1; letter-spacing: -.045em; }
.account-welcome > p:last-of-type { max-width: 620px; margin: 28px 0 0; color: #666; font-size: 1.1rem; line-height: 1.65; }
.account-auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.account-primary,
.account-secondary,
.auth-form button,
.profile-form > button,
.avatar-upload-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 19px; border: 1px solid #151515; border-radius: 999px; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.account-primary,
.auth-form button,
.profile-form > button { background: #151515; color: #fff; }
.account-secondary,
.avatar-upload-button { background: transparent; color: #151515; }
.account-primary:hover,
.auth-form button:hover,
.profile-form > button:hover { background: #333; }
.account-secondary:hover,
.avatar-upload-button:hover { background: #ecebe7; }

.account-message,
.account-error { margin-bottom: 24px; padding: 13px 16px; border-radius: 12px; background: #e9f7ed; font-size: .88rem; }
.account-error { background: #fff0f0; color: #8d2020; }
.account-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 34px; }
.account-title p:last-child { color: #777; }

.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; max-width: 860px; padding: 26px; border: 1px solid #ddd; border-radius: 22px; background: #fff; box-shadow: 0 18px 60px rgb(0 0 0 / .05); }
.profile-form label,
.auth-form label { display: grid; gap: 7px; color: #555; font-size: .78rem; font-weight: 650; }
.profile-form input,
.profile-form textarea,
.auth-form input { width: 100%; padding: 12px 13px; border: 1px solid #d8d8d8; border-radius: 10px; outline: 0; background: #fff; color: #151515; font: inherit; font-size: .9rem; }
.profile-form input:focus,
.profile-form textarea:focus,
.auth-form input:focus { border-color: #8a8a8a; box-shadow: 0 0 0 3px rgb(0 0 0 / .06); }
.profile-form .wide,
.profile-form > button { grid-column: 1 / -1; }
.profile-form .check { display: flex; grid-template-columns: auto 1fr; align-items: center; }
.profile-form .check input { width: auto; }
.profile-form label > small { color: #858585; font-size: .72rem; font-weight: 500; }
.specializations-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.specializations-preview span { padding: 5px 9px; border-radius: 999px; background: #f1f1ef; color: #333; font-size: .72rem; font-weight: 650; }

.avatar-upload { display: flex; align-items: center; gap: 18px; padding: 8px 0 18px; border-bottom: 1px solid #ececec; }
.avatar-upload-preview { width: 88px; height: 88px; flex: 0 0 88px; overflow: hidden; border: 1px solid #ddd; border-radius: 50%; background: #f1f1ef; }
.avatar-upload-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-upload strong { display: block; margin-bottom: 5px; font-size: .9rem; }
.avatar-upload p { margin: 0 0 12px; color: #777; font-size: .78rem; line-height: 1.45; }
.avatar-upload-button { min-height: 38px; padding: 7px 15px; font-size: .78rem; }

.profile-location-editor { padding: 8px 0 18px; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec; }
.profile-location-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 12px 0; }
.profile-location-heading strong { display: block; margin-bottom: 4px; font-size: .9rem; }
.profile-location-heading p { margin: 0; color: #777; font-size: .78rem; line-height: 1.45; }
.profile-location-map { width: 100%; height: 300px; overflow: hidden; border: 1px solid #ddd; border-radius: 14px; background: #f1f1ef; }
.profile-location-pin span { display: block; width: 24px; height: 24px; border: 6px solid #151515; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .24); }
.profile-service-radius { display: flex !important; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 15px; }
.profile-service-radius strong { color: #151515; }
.profile-radius-range { padding: 0 !important; border: 0 !important; box-shadow: none !important; accent-color: #151515; }

.account-auth-modal { width: min(94vw, 520px); }
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin: 20px 0; padding: 4px; border-radius: 12px; background: #f2f2ef; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #666; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.auth-tabs button.active { background: #fff; color: #151515; box-shadow: 0 1px 5px rgb(0 0 0 / .08); }
.auth-form { display: grid; gap: 14px; }
.auth-form button { width: 100%; margin-top: 5px; }

.avatar-crop-card { width: min(94vw, 590px); }
.avatar-crop-stage { position: relative; width: min(100%, 430px); aspect-ratio: 1; margin: 20px auto; overflow: hidden; border-radius: 50%; background: #e6e6e3; box-shadow: 0 0 0 1px #d5d5d1; }
.avatar-crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.avatar-crop-stage canvas.dragging { cursor: grabbing; }
.avatar-zoom { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; color: #555; font-size: .8rem; font-weight: 700; }
.avatar-zoom input { width: 100%; accent-color: #151515; }
.avatar-crop-card .request-actions { margin-top: 22px; }

@media (max-width: 760px) {
    .account-main { margin-top: 3vh; }
    .account-welcome { padding-top: 3vh; }
    .account-title { align-items: start; gap: 20px; }
    .profile-form { grid-template-columns: 1fr; padding: 20px; }
    .profile-form label { grid-column: 1; }
    .avatar-upload { align-items: flex-start; }
    .profile-location-heading { align-items: flex-start; }
}

@media (max-width: 480px) {
    .account-header { padding-block: 20px; }
    .account-header img { width: 150px; }
    .account-auth-actions { display: grid; }
    .account-primary,
    .account-secondary { width: 100%; }
    .avatar-upload { display: grid; }
    .account-auth-modal,
    .avatar-crop-card {
        width: 100%;
        max-width: 100%;
    }
    .avatar-crop-stage {
        width: min(72dvh, 100%);
        margin-block: 14px;
    }
}
