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

.profile-page {
    width: 100%;
    min-height: calc(100vh - 96px);
    background: #f3f2ee;
    color: #050505;
}

.profile-shell {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 880px);
    justify-content: center;
    gap: clamp(46px, 5vw, 86px);
    padding: clamp(34px, 3.8vw, 56px) 0 clamp(58px, 6vw, 92px);
}

/* =========================
   LEFT SIDE
========================= */

.profile-aside {
    min-width: 0;
}

.profile-aside__sticky {
    position: sticky;
    top: 112px;
}

.profile-aside__accent {
    width: 48px;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
}

.profile-aside__accent span {
    width: 9px;
    height: 22px;
    display: block;
    background: #ff2118;
    transform: skewX(-16deg);
}

.profile-aside h1 {
    max-width: 310px;
    margin: 0;
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(44px, 4vw, 72px);
    font-weight: 400;
    line-height: 0.86;
    letter-spacing: -0.082em;
    text-transform: uppercase;
}

.profile-aside p {
    max-width: 310px;
    margin: clamp(24px, 2.2vw, 32px) 0 clamp(36px, 3.2vw, 52px);
    color: rgba(5, 5, 5, 0.56);
    font-size: clamp(14px, 0.95vw, 16px);
    font-weight: 800;
    line-height: 1.34;
}

/* =========================
   MENU
========================= */

.profile-menu {
    width: min(100%, 320px);
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(5, 5, 5, 0.16);
}

.profile-menu__link {
    min-height: 82px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(5, 5, 5, 0.16);
    background: transparent;
    color: #050505;
    text-decoration: none;
    transition:
        background 0.22s ease,
        color 0.22s ease,
        padding-left 0.22s ease;
}

.profile-menu__num {
    color: currentColor;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 400;
    line-height: 0.82;
    letter-spacing: -0.08em;
}

.profile-menu__text {
    color: currentColor;
    font-family: var(--font-display);
    font-size: clamp(12px, 0.85vw, 15px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.profile-menu__link:hover,
.profile-menu__link--active {
    padding-left: 26px;
    background: rgba(255, 33, 24, 0.08);
    color: #ff2118;
}

.profile-menu__link:hover .profile-menu__num,
.profile-menu__link--active .profile-menu__num {
    color: #ff2118;
}

/* =========================
   RIGHT CONTENT
========================= */

.profile-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(22px, 2.2vw, 32px);
}

.profile-card {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.profile-card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: clamp(15px, 1.4vw, 20px);
}

.profile-section-label {
    display: block;
    color: rgba(5, 5, 5, 0.52);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.profile-card h2 {
    margin: 0;
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(34px, 3vw, 54px);
    font-weight: 400;
    line-height: 0.86;
    letter-spacing: -0.078em;
    text-transform: uppercase;
}

/* =========================
   ACCOUNT DATA
========================= */

.profile-card--account {
    padding-bottom: 0;
}

.profile-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 2px solid #050505;
}

.profile-data-item {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(5, 5, 5, 0.18);
}

.profile-data-item:nth-child(odd) {
    padding-right: clamp(24px, 3vw, 46px);
}

.profile-data-item:nth-child(even) {
    padding-left: clamp(24px, 3vw, 46px);
    border-left: 1px solid rgba(5, 5, 5, 0.14);
}

.profile-data-item--wide {
    grid-column: 1 / -1;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-left: 0 !important;
}

.profile-data-item span {
    color: rgba(5, 5, 5, 0.54);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.015em;
    text-transform: uppercase;
}

.profile-data-item strong {
    color: #050505;
    font-size: clamp(15px, 1vw, 18px);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* =========================
   EDIT DATA
========================= */

.profile-card--edit {
    padding-top: clamp(8px, 1.2vw, 14px);
}

.profile-card--edit .profile-card__head {
    margin-bottom: clamp(15px, 1.4vw, 20px);
}

.profile-form {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.profile-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    background: rgba(255, 33, 24, 0.08);
    border: 1px solid rgba(255, 33, 24, 0.18);
    color: #b71c1c;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 2px solid #050505;
}

.profile-field {
    min-width: 0;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(5, 5, 5, 0.18);
}

.profile-field:nth-child(odd) {
    padding-right: clamp(24px, 3vw, 46px);
}

.profile-field:nth-child(even) {
    padding-left: clamp(24px, 3vw, 46px);
    border-left: 1px solid rgba(5, 5, 5, 0.14);
}

.profile-field label {
    display: block;
    margin-bottom: 8px;
    color: #050505;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.012em;
    text-transform: uppercase;
}

.profile-input-wrap {
    width: 100%;
}

.profile-input-wrap input,
.profile-input-wrap select,
.profile-input-wrap textarea {
    width: 100% !important;
    height: 38px !important;
    padding: 0 2px !important;
    border: 0 !important;
    border-bottom: 2px solid rgba(5, 5, 5, 0.38) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #050505 !important;
    font-size: clamp(15px, 1vw, 18px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

.profile-input-wrap input:focus,
.profile-input-wrap select:focus,
.profile-input-wrap textarea:focus {
    border-bottom-color: #050505 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.profile-input-wrap input::placeholder,
.profile-input-wrap textarea::placeholder {
    color: #9e9e9e;
    font-weight: 800;
    opacity: 1;
}

.profile-input-wrap input:-webkit-autofill,
.profile-input-wrap input:-webkit-autofill:hover,
.profile-input-wrap input:-webkit-autofill:focus,
.profile-input-wrap input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #f3f2ee inset !important;
    -webkit-text-fill-color: #050505 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.profile-error {
    margin-top: 8px;
    color: #d50000;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.profile-error ul,
.profile-alert ul {
    margin: 0;
    padding-left: 18px;
}

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

.profile-form-actions {
    margin-top: clamp(22px, 2.2vw, 30px);
}

.profile-submit {
    width: min(100%, 470px);
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    border: 1px solid #ff2118;
    border-radius: 0;
    background: #ff2118;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(11px, 0.82vw, 14px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.profile-submit::after {
    content: "→";
    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.profile-submit:hover {
    border-color: #050505;
    background: #050505;
    color: #ffffff;
}

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

@media (max-width: 1200px) {
    .profile-shell {
        grid-template-columns: 290px minmax(0, 1fr);
        gap: 44px;
    }
}

@media (max-width: 992px) {
    .profile-page {
        min-height: auto;
    }

    .profile-shell {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 34px 0 58px;
    }

    .profile-aside__sticky {
        position: static;
    }

    .profile-aside h1 {
        max-width: 620px;
        font-size: clamp(42px, 8vw, 68px);
    }

    .profile-aside p {
        max-width: 560px;
        margin-bottom: 28px;
    }

    .profile-menu {
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-menu__link {
        min-height: 72px;
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 0 16px;
        border-right: 1px solid rgba(5, 5, 5, 0.14);
    }

    .profile-menu__link:last-child {
        border-right: 0;
    }

    .profile-menu__num {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .profile-shell {
        padding-top: 28px;
    }

    .profile-aside__accent {
        margin-bottom: 18px;
    }

    .profile-aside h1 {
        font-size: clamp(38px, 10vw, 56px);
    }

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

    .profile-menu__link {
        border-right: 0;
    }

    .profile-card h2 {
        font-size: clamp(30px, 8vw, 44px);
    }

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

    .profile-data-item,
    .profile-data-item:nth-child(odd),
    .profile-data-item:nth-child(even),
    .profile-data-item--wide,
    .profile-field,
    .profile-field:nth-child(odd),
    .profile-field:nth-child(even) {
        min-height: 72px;
        padding: 16px 0 !important;
        border-left: 0 !important;
    }

    .profile-submit {
        width: 100%;
        min-height: 52px;
        padding: 0 18px;
        font-size: 11px;
    }
}

@media (max-width: 420px) {
    .profile-aside h1 {
        font-size: 34px;
    }

    .profile-aside p {
        font-size: 13px;
    }

    .profile-card h2 {
        font-size: 28px;
    }

    .profile-data-item strong {
        font-size: 14px;
    }
}