

.account-auth {
    max-width: 560px;
    margin: 0 auto 40px;
    padding-top: 20px;
}

.account-auth__tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.account-auth__tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    border: 1.5px solid var(--temno-belyy);
    font-weight: 500;
    color: var(--chernyy);
    text-decoration: none;
}

.account-auth__tab.is-active {
    border-color: var(--firmennyy);
    color: var(--firmennyy);
}

.account-auth__panel {
    background: var(--belyy);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.login__header,
.registration__header {
    margin-bottom: 16px;
}

.login__password-hidden,
.mobitech-toggle-password {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    max-width: 26px;
    position: absolute;
    bottom: 17px;
    right: 10px;
}

.login__password-hidden img,
.mobitech-toggle-password img {
    display: block;
    width: 100%;
    height: auto;
}

.account-edit__field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
    width: 100%;
    float: none;
}

.account-edit__field label {
    color: var(--seryy);
    font-weight: 500;
}

.account-edit__field .woocommerce-Input,
.account-edit__field input[type="text"],
.account-edit__field input[type="email"],
.account-edit__field input[type="tel"],
.account-edit__field input[type="password"],
.account-edit__field input[type="date"] {
    border: 2px solid var(--temno-belyy);
    padding: 10px;
    font: inherit;
    color: var(--chernyy);
    background: var(--belyy);
}

.account-edit__section {
    margin-bottom: 28px;
}

.account-edit__hint {
    margin: 0 0 12px;
    color: var(--seryy);
    font-size: 14px;
    line-height: 140%;
}

.account-edit__submit,
.account-edit__actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--firmennyy);
    color: var(--belyy);
    border: 0;
    padding: 15px 28px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.cabinet__nav ul {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cabinet__nav a {
    display: block;
    padding: 10px 14px;
    border: 1.5px solid var(--temno-belyy);
    color: var(--chernyy);
    text-decoration: none;
    font-weight: 500;
}

.cabinet__nav .is-active a,
.cabinet__nav a[aria-current="page"] {
    border-color: var(--firmennyy);
    color: var(--firmennyy);
}

.account-edit__back {
    margin: 0 0 16px;
}

.account-edit__back a {
    color: var(--firmennyy);
    font-weight: 500;
    text-decoration: none;
}

.mobitech-account-woocommerce--orders,
.mobitech-account-woocommerce--edit {
    display: block;
}

/* Dashboard blocks are laid out by .cabinet__wrapper (flex column, 2-column grid from 1200px) */
.mobitech-account-woocommerce--dashboard {
    display: flex;
}

.mobitech-account-woocommerce--dashboard > .woocommerce-MyAccount-content {
    display: contents;
}

.mobitech-account-woocommerce--dashboard .woocommerce-MyAccount-content,
.mobitech-account-woocommerce--orders .woocommerce-MyAccount-content,
.mobitech-account-woocommerce--edit .woocommerce-MyAccount-content {
    width: 100%;
}

.cabinet__logout {
    margin-top: 24px;
}

.cabinet__logout a {
    color: var(--firmennyy);
    font-weight: 500;
}

.header__login-btn {
    text-decoration: none;
    color: inherit;
}

.history-card__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.account-orders__empty {
    margin: 20px 0;
}

.account-order-view {
    background: var(--belyy);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    padding: 16px;
}

.account-order-view__back {
    display: inline-block;
    margin-top: 10px;
    color: var(--firmennyy);
    font-weight: 500;
}

.account-order-view__notes {
    margin: 0;
    padding-left: 18px;
}

.cabinet__data-edit {
    display: inline-flex;
}

.cabinet__link-item.cabinet__certificate {
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .account-auth {
        padding-top: 40px;
    }

    .account-auth__panel {
        padding: 30px;
    }

    /* Figma "Вход в аккаунт" (1920): 724px card, centred title, Montserrat 16 button */
    .account-auth:has(.login, .registration) {
        max-width: 724px;
    }

    .login__header,
    .registration__header {
        text-align: center;
        margin-bottom: 20px;
    }

    .login__button,
    .registration__button {
        font-family: var(--font3);
        font-weight: 500;
        font-size: 16px;
        line-height: 21px;
        padding: 20px 50px;
    }

    .account-edit__field .woocommerce-Input,
    .account-edit__field input {
        border-width: 3px;
        padding: 15px;
    }

    .login__password-hidden,
    .mobitech-toggle-password {
        right: 15px;
    }

    .account-order-view {
        padding: 24px;
    }
}


/* Close button: mobile full-screen auth only */
.account-auth__close { display: none; }

/* ---- Mobile auth screens (Figma "М. Вход" / "М. Регистрация", 393px) ---- */
@media (max-width: 767px) {
    body.mobitech-auth .header,
    body.mobitech-auth .navigation,
    body.mobitech-auth .footer__wrapper,
    body.mobitech-auth .mobile-menu,
    body.mobitech-auth .mobile-menu__overlay,
    body.mobitech-auth .account-auth__tabs {
        display: none;
    }

    body.mobitech-auth {
        background: var(--belyy);
    }

    body.mobitech-auth .account-auth {
        display: flex;
        flex-direction: column;
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        padding: max(24px, env(safe-area-inset-top)) 0 max(30px, env(safe-area-inset-bottom));
    }

    body.mobitech-auth .account-auth__panel {
        display: flex;
        flex: 1;
        flex-direction: column;
        padding: 0;
        background: none;
        box-shadow: none;
    }

    body.mobitech-auth .login__header,
    body.mobitech-auth .registration__header {
        position: relative;
        margin-bottom: 15px;
    }

    body.mobitech-auth .account-auth__close {
        position: absolute;
        top: -12px;
        right: -15px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 48px;
    }

    body.mobitech-auth .account-auth__close img {
        width: 14px;
        height: 14px;
    }

    body.mobitech-auth .login__content,
    body.mobitech-auth .registration__content {
        flex: 1;
    }

    body.mobitech-auth .login__form,
    body.mobitech-auth .registration__form {
        flex: 1;
        gap: 10px;
    }

    body.mobitech-auth .login__label,
    body.mobitech-auth .registration__label {
        font-size: 15px;
        line-height: 21px;
    }

    body.mobitech-auth .login__input,
    body.mobitech-auth .registration__input {
        height: 41px;
        font-size: 15px;
        line-height: 21px;
    }

    body.mobitech-auth .login__password-hidden {
        bottom: 12px;
        max-width: none;
        width: 26.6px;
    }

    body.mobitech-auth .login__recover {
        margin-top: -5px;
        font-size: 15px;
        line-height: 21px;
    }

    /* red button + switch link are pinned to the bottom of the screen */
    body.mobitech-auth .login__button,
    body.mobitech-auth .registration__button {
        height: 51px;
        margin-top: auto;
        padding: 15px;
        font-size: 15px;
        line-height: 21px;
    }

    body.mobitech-auth .login__registration {
        margin-top: 10px;
        font-size: 15px;
        line-height: 21px;
        text-align: center;
    }

    body.mobitech-auth .registration__acception {
        margin-top: 5px;
        font-size: 15px;
        line-height: 21px;
        color: var(--chernyy);
    }
}

/* Address forms: WooCommerce selects/required marks inherit the theme fields */
.account-edit__field select {
    width: 100%;
    border: 2px solid var(--temno-belyy);
    padding: 10px;
    font: inherit;
    color: var(--chernyy);
    background: var(--belyy);
}

.account-edit__field .required {
    color: var(--firmennyy);
    text-decoration: none;
    border: 0;
}

.account-edit__field .optional {
    color: var(--seryy);
}

.account-edit__field input,
.account-edit__field select {
    box-sizing: border-box;
}

.account-addresses__card {
    margin-bottom: 10px;
}

.account-addresses__text {
    margin: 0;
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    line-height: 140%;
    color: var(--chernyy);
}

.account-edit__field .woocommerce-input-wrapper {
    display: block;
    width: 100%;
}

.account-edit__field .woocommerce-input-wrapper input,
.account-edit__field .woocommerce-input-wrapper select {
    width: 100%;
}

/* Desktop dashboard (Figma "Личный профиль"): data | bonus, history | certificates, favourites | cart */
@media (min-width: 1200px) {
    .mobitech-account-woocommerce--dashboard {
        display: grid;
        align-items: start;
        grid-template-rows: auto auto auto;
    }

    .mobitech-account-woocommerce--dashboard .cabinet__data {
        grid-area: 1 / 1 / 2 / 2;
    }

    .mobitech-account-woocommerce--dashboard .cabinet__bonus {
        grid-area: 1 / 2 / 2 / 3;
    }

    .mobitech-account-woocommerce--dashboard .cabinet__links {
        grid-area: 2 / 1 / 3 / 3;
        grid-template-rows: none;
        grid-auto-rows: auto;
    }

    .mobitech-account-woocommerce--dashboard .cabinet__history { order: 1; }
    .mobitech-account-woocommerce--dashboard .cabinet__certificate { order: 2; }
    .mobitech-account-woocommerce--dashboard .cabinet__favorites { order: 3; }
    .mobitech-account-woocommerce--dashboard .cabinet__cart { order: 4; }

    .mobitech-account-woocommerce--dashboard .cabinet__logout {
        grid-area: 3 / 1 / 4 / 3;
        margin-top: 0;
    }
}

/* ---- tap targets (>= 44-48px) ---- */
.mobitech-toggle-password,
.login__password-hidden {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    max-width: none;
    height: 48px;
    right: 0;
    bottom: -3px;
}

.mobitech-toggle-password img,
.login__password-hidden img {
    width: 26px;
}

body.mobitech-auth .login__password-hidden {
    bottom: -3px;
    width: 48px;
}

@media (max-width: 1199px) {
    .cabinet__data-edit {
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        margin: -14px -14px -14px 0;
    }

    .cabinet__data-edit img {
        width: 20px;
        height: 20px;
    }

    .cabinet__bonus-conditions,
    .cabinet__logout a,
    .account-order-view__back,
    .account-edit__back a,
    .login__recover,
    .login__registration-link {
        display: inline-block;
        padding-block: 13.5px;
        margin-block: -13.5px;
    }
}

/* order status colours: done = green (design), pending/processing = neutral, cancelled/failed/refunded = red */
.history-card__status-label--processing,
.history-card__status-label--on-hold,
.history-card__status-label--pending,
.order-information__status--processing,
.order-information__status--on-hold,
.order-information__status--pending {
    color: var(--chernyy);
}

.history-card__status-label--cancelled,
.history-card__status-label--failed,
.history-card__status-label--refunded,
.order-information__status--cancelled,
.order-information__status--failed,
.order-information__status--refunded {
    color: var(--firmennyy);
}
