/* =============================================
   ЛИЧНЫЙ КАБИНЕТ
   ============================================= */

/* --- Layout --- */
.account {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.account__sidebar {
    width: 220px;
    flex-shrink: 0;
}

.account__content {
    flex: 1;
    width: 100%;
}

.account__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

.account__back {
    margin-bottom: 20px;
}

.account__back a {
    color: #b4b4b4;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.account__back a:hover {
    color: var(--primary-black);
}

/* --- Sidebar Nav --- */
.account__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account__nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--primary-black);
    text-decoration: none;
    transition: background 0.2s;
}

.account__nav-item:hover {
    background: #e5e5e5;
}

.account__nav-item--active {
    background: var(--primary-black);
    color: #fff;
}
.account__nav-item--active:hover {
    background: var(--primary-black);
    color: #fff;
}
.account__nav-item--active svg path {
    stroke: #fff;
}

/* --- Empty state --- */
.account__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    text-align: center;
    color: #b4b4b4;
}

.account__empty p {
    font-size: 16px;
}

/* --- Order cards list --- */
.account__orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    display: block;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 14px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--primary-black);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.order-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-card__number {
    font-weight: 600;
    font-size: 15px;
    margin-right: 10px;
}

.order-card__date {
    font-size: 13px;
    color: #b4b4b4;
}

.order-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-card__delivery {
    font-size: 14px;
    color: #6e6e6e;
}

.order-card__total {
    font-size: 16px;
    font-weight: 600;
}

/* --- Status badge --- */
.order-card__status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.order-card__status--gray {
    background: #f0f0f0;
    color: #6e6e6e;
}

.order-card__status--blue {
    background: #e8f0fe;
    color: #1a56db;
}

.order-card__status--green {
    background: #e6f4ea;
    color: #1e8e3e;
}

.order-card__status--red {
    background: #fce8e6;
    color: #c5221f;
}

/* --- Order detail --- */
.order-detail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 16px;
}

.order-detail__date {
    font-size: 14px;
    color: #b4b4b4;
    margin-top: 4px;
}

.order-detail__section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ebebeb;
}

.order-detail__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.order-detail__section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.order-detail__items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-detail__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.order-detail__item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.order-detail__item-name {
    font-size: 15px;
    font-weight: 500;
}

.order-detail__item-attrs {
    font-size: 13px;
    color: #6e6e6e;
}

.order-detail__item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.order-detail__item-qty {
    font-size: 13px;
    color: #b4b4b4;
}

.order-detail__item-total {
    font-size: 15px;
    font-weight: 600;
}

.order-detail__totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin-left: auto;
}

.order-detail__total-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #6e6e6e;
}

.order-detail__total-row--main {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-black);
    padding-top: 10px;
    border-top: 1px solid #ebebeb;
    margin-top: 4px;
}

/* --- Profile --- */
.profile__phone-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.profile__phone-label {
    font-size: 13px;
    color: #6e6e6e;
    flex: 1;
}

.profile__phone-value {
    font-size: 15px;
    font-weight: 600;
}

.profile__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 440px;
}

.profile__form .btn {
    align-self: flex-start;
    padding: 12px 32px;
}

.profile__msg {
    font-size: 14px;
    min-height: 18px;
}

.profile__msg--ok {
    color: #1e8e3e;
}

.profile__msg--err {
    color: #c5221f;
}

.profile__logout {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ebebeb;
}

.profile__logout-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #b4b4b4;
    cursor: pointer;
    transition: color 0.2s;
}

.profile__logout-btn:hover {
    color: #c5221f;
}

/* --- Login modal --- */
.login-modal__content {
    width: 420px;
    max-width: 90vw;
    border-radius: 16px;
    padding: 0;
}

.login-modal__wrap {
    padding: 40px 36px 32px;
}

.login-modal__header {
    margin-bottom: 28px;
}

.login-modal__logo {
    height: 28px;
}

.login-modal__step h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-modal__subtitle {
    font-size: 14px;
    color: #6e6e6e;
    margin-bottom: 20px;
}

.login-modal__step {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-modal__step .text-field {
    margin-bottom: 0;
}

.login-modal__error {
    font-size: 13px;
    margin: 11px 0;
    color: #c5221f;
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #ffeeee;
    border: 1px solid #ff0000;
    display: none;
}

.login-modal__error.active {
    display: block;
}

.login-modal__resend {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #383838;
    cursor: pointer;
    transition: color 0.2s;
    text-align: center;
    margin: 14px auto 5px;
    display: block;
}

.login-modal__resend:not(:disabled):hover {
    color: var(--primary-black);
}

.login-modal__resend:disabled {
    cursor: default;
}

.login-modal__privacy {
    margin-top: 20px;
    font-size: 12px;
    color: #b4b4b4;
    line-height: 1.4;
}

.login-modal__privacy a {
    color: #b4b4b4;
    text-decoration: underline;
}

.login-modal__privacy a:hover {
    color: var(--primary-black);
}

/* --- Вход по звонку (общее для попапа и страницы входа) --- */
.call-auth__number {
    display: block;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-black, #090909);
    text-decoration: none;
    padding: 14px 10px;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    background-color: #f7f7f7;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

.call-auth__number:hover {
    border-color: #b4b4b4;
}

.call-auth__waiting-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #383838;
}

.call-auth__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #d9d9d9;
    border-top-color: #383838;
    border-radius: 50%;
    animation: call-auth-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes call-auth-spin {
    to { transform: rotate(360deg); }
}

.call-auth__note {
    font-size: 12px;
    color: #b4b4b4;
    line-height: 1.4;
}

.call-auth__retry-error {
    font-size: 13px;
    color: #c5221f;
    text-align: center;
}

.call-auth__retry-error:empty {
    display: none;
}

/* --- Login page --- */
.account-login {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.account-login__box {
    width: 100%;
    max-width: 520px;
    padding: 50px;
    background-color: #fff;
    border-radius: 16px;
}

.account-login__box h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
}

.account-login__subtitle {
    font-size: 15px;
    color: #6e6e6e;
    margin-bottom: 28px;
}

.account-login__step {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-login__hint {
    font-size: 14px;
    color: #6e6e6e;
}

.account-login__error {
    font-size: 14px;
    color: #c5221f;
    min-height: 18px;
}

.account-login__resend {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #b4b4b4;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.account-login__resend:not(:disabled):hover {
    color: var(--primary-black);
}

.account-login__resend:disabled {
    cursor: default;
}

/* Code input */
.text-field__input--code {
    letter-spacing: 8px;
    font-size: 24px;
    text-align: center;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .account {
        flex-direction: column;
        gap: 24px;
    }

    .account__sidebar {
        width: 100%;
    }

    .account__nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .account__nav-item {
        white-space: nowrap;
    }

    .account__title {
        font-size: 22px;
    }

    .order-detail__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-detail__totals {
        max-width: 100%;
        margin-left: 0;
    }

    .order-card__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
