/* /local/assets/status.css — публичная страница /status/ (вход обратным звонком,
   бонусы + список сделок). Палитра фирменная Аспро (розовая). */

:root {
    --pa-accent: #e8a2e1;
    --pa-accent-hover: #d987d1;
    --pa-accent-soft: #f7d9f3;
    --pa-text: #2b2b2b;
    --pa-muted: #6e6e6e;
    --pa-border: #ececec;
    --pa-error: #d63832;
}

/* ==== Контейнеры ====================================================== */
.status-auth-wrapper {
    max-width: 460px;
    margin: 8px auto 48px;
    padding: 0 16px;
}
.status-result {
    max-width: 680px;
    margin: 0 auto 48px;
    padding: 0 16px;
}

/* ==== Форма (карточка входа / экран звонка) =========================== */
.status-auth__form {
    background: #fff;
    border: 1px solid var(--pa-border);
    border-radius: 22px;
    padding: 32px 28px;
    box-shadow: 0 10px 34px rgba(180, 120, 175, .12);
    text-align: center;
}

.status-auth__badge {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pa-accent-soft), #fff);
    box-shadow: 0 4px 14px rgba(232, 162, 225, .28);
}
/* Иконка-подарок (icons8, line). PNG перекрашиваем в фирменный розовый через маску. */
.status-auth__gift {
    width: 34px;
    height: 34px;
    background-color: var(--pa-accent-hover);
    -webkit-mask: url(/local/assets/status_gift.png) center / contain no-repeat;
    mask: url(/local/assets/status_gift.png) center / contain no-repeat;
}

.status-auth__lead {
    margin: 0 0 22px;
    color: var(--pa-muted);
    font-size: 15px;
    line-height: 1.5;
    text-wrap: balance; /* строки поровну, без «висячих» одиночных слов */
}
.status-auth__phone { color: var(--pa-text); font-weight: 600; white-space: nowrap; }

.status-auth__label {
    display: block;
    text-align: left;
    font-size: 13px;
    color: var(--pa-muted);
    margin-bottom: 6px;
}

.status-auth__input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    font-size: 18px;
    text-align: left;      /* по левому краю: каретка в начале, а не в центре пустого поля */
    letter-spacing: .5px;
    border: 1.5px solid var(--pa-border);
    border-radius: 14px;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.status-auth__input:focus { border-color: var(--pa-accent); }
.status-auth__input.is-invalid { border-color: var(--pa-error); }

.status-auth__error { color: var(--pa-error); font-size: 13px; margin-top: 8px; }

.status-auth__consent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 20px;
    font-size: 13px;
    color: var(--pa-muted);
    line-height: 1.4;
}
.status-auth__consent a { color: var(--pa-accent-hover); }
.status-auth__consent input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--pa-accent);
    flex-shrink: 0;
}

.status-auth__btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pa-accent), var(--pa-accent-hover));
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(217, 135, 209, .32);
    transition: filter .15s;
}
.status-auth__btn:hover:not(:disabled) { filter: brightness(1.04); }
.status-auth__btn:disabled { opacity: .55; cursor: default; box-shadow: none; }

.status-auth__note { margin: 16px 0 0; font-size: 12.5px; color: #9a9a9a; text-wrap: balance; }

/* ==== Экран звонка (обратный звонок) ================================== */
.status-auth__callnum {
    display: block;
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--pa-accent-hover);
    text-decoration: none;
    margin: 16px 0;
    padding: 18px;
    background: var(--pa-accent-soft);
    border-radius: 16px;
}
/* Форсируем розовый во всех состояниях ссылки — иначе после клика браузер
   красит :visited в чёрный. */
.status-auth__callnum:link,
.status-auth__callnum:visited,
.status-auth__callnum:active { color: var(--pa-accent-hover); }
.status-auth__callnum:hover { color: var(--pa-accent-hover); text-decoration: underline; }

.status-auth__wait {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px 0 4px;
    color: var(--pa-muted);
    font-size: 14px;
}
.status-auth__spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--pa-accent-soft);
    border-top-color: var(--pa-accent);
    border-radius: 50%;
    animation: status-spin .8s linear infinite;
    flex-shrink: 0;
}
@keyframes status-spin { to { transform: rotate(360deg); } }

.status-auth__row {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.status-auth__link {
    background: none; border: none;
    color: var(--pa-accent-hover);
    font-size: 14px; cursor: pointer; padding: 4px 0;
}
.status-auth__link:disabled { color: var(--pa-muted); cursor: default; }

/* ==== Экран 3: код из SMS (запасной канал входа) ====================== */
.status-auth__link--sms {
    display: block;
    margin: 14px auto 0;
    text-decoration: underline;
}
.status-auth__otp-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 4px 0 18px;
}
.status-auth__otp-cell {
    width: 56px;
    height: 64px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: var(--pa-text);
    background: #fff;
    border: 1.5px solid var(--pa-border);
    border-radius: 12px;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
    -moz-appearance: textfield;      /* убрать стрелки числового поля */
}
.status-auth__otp-cell::-webkit-outer-spin-button,
.status-auth__otp-cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.status-auth__otp-cell:focus     { border-color: var(--pa-accent); }
.status-auth__otp-cell.is-filled { border-color: var(--pa-accent); }
.status-auth__otp-cell.is-invalid { border-color: var(--pa-error); }

@media (max-width: 480px) {
    .status-auth__otp-cell { width: 48px; height: 56px; font-size: 22px; }
    .status-auth__otp-row  { gap: 8px; }
}

/* ==== Экран данных: шапка ============================================= */
.status-result__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}
.status-result__phone { font-size: 14px; color: var(--pa-muted); }
.status-result__phone b { color: var(--pa-text); }
.status-result__logout {
    background: #fff;
    border: 1px solid var(--pa-border);
    border-radius: 12px;
    padding: 9px 18px;
    font-size: 14px;
    color: var(--pa-text);
    cursor: pointer;
}
.status-result__logout:hover { border-color: var(--pa-accent); }

/* ==== Карта лояльности =============================================== */
.status-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 26px 28px;
    color: #fff;
    background: linear-gradient(135deg, #e8a2e1 0%, #d987d1 60%, #c66fbd 100%);
    box-shadow: 0 14px 40px rgba(198, 111, 189, .30);
    margin-bottom: 26px;
}
.status-card::after {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 180px; height: 180px; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}
.status-card::before {
    content: ""; position: absolute; right: 40px; bottom: -70px;
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(255, 255, 255, .10);
}
.status-card__top {
    position: relative; z-index: 1;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px;
}
.status-card__num { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.status-card__unit { font-size: 15px; opacity: .9; margin-top: 4px; }
.status-card__level {
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px; font-weight: 600; white-space: nowrap;
}
.status-card__progress { position: relative; z-index: 1; margin-top: 22px; }
.status-card__bar { height: 8px; background: rgba(255, 255, 255, .28); border-radius: 999px; overflow: hidden; }
.status-card__bar > span { display: block; height: 100%; background: #fff; border-radius: 999px; }
.status-card__hint { margin-top: 8px; font-size: 13px; opacity: .92; }
.status-card__foot {
    position: relative; z-index: 1;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .22);
    font-size: 12.5px; opacity: .92;
    display: flex; gap: 18px; flex-wrap: wrap;
}

/* карта-заглушка (нет данных о бонусах) */
.status-card--empty {
    color: var(--pa-text);
    background: linear-gradient(135deg, var(--pa-accent-soft) 0%, #fff 100%);
    box-shadow: 0 6px 20px rgba(232, 162, 225, .16);
    text-align: center;
}
.status-card--empty h3 { margin: 0 0 8px; font-size: 18px; }
.status-card--empty p { margin: 0; color: var(--pa-muted); font-size: 14px; line-height: 1.5; }

/* ==== Список заказов ================================================== */
.status-orders__title {
    font-size: 19px;
    margin: 0 0 14px;
    display: flex; align-items: baseline; gap: 8px;
    color: var(--pa-text);
}
.status-orders__title .cnt { font-size: 14px; color: var(--pa-muted); font-weight: 400; }
.status-orders__empty { color: var(--pa-muted); }

.status-order {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; padding: 16px 18px;
    background: #fff; border: 1px solid var(--pa-border);
    border-radius: 16px; margin-bottom: 12px;
    transition: box-shadow .15s;
}
.status-order:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .05); }
.status-order__name { font-size: 15px; font-weight: 600; color: var(--pa-text); }
.status-order__date { margin-top: 5px; font-size: 13px; color: var(--pa-muted); }
.status-order__right { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; }
.status-order__sum { font-size: 16px; font-weight: 700; color: var(--pa-text); }
.status-order__paid { font-size: 11px; color: #2e7d32; font-weight: 600; }
.status-pill {
    font-size: 12px; font-weight: 600;
    padding: 5px 12px; border-radius: 999px;
    color: #333; background: var(--st, #eee);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .status-auth__form { padding: 24px 18px; }
    .status-card__num { font-size: 44px; }
    .status-order { flex-direction: column; align-items: flex-start; }
    .status-order__right { flex-direction: row; align-items: center; align-self: stretch; justify-content: space-between; }
}
