/* ==========================================================================
   «Вход по коду» (pages/auth-code.twig, макет Auth)
   Слева форма (до 520px), справа пояснения (до 420px); на узком экране – друг под другом.
   ========================================================================== */

.ac {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;

    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 64px;
    box-sizing: border-box;
}

.ac-card {
    flex: 1 1 460px;
    max-width: 520px;
    box-sizing: border-box;

    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 20px;

    background: var(--card);
}

.ac-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ac-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-head h1,
.ac-done h1 {
    margin: 0;

    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ac-head span {
    color: var(--muted);
}

/* Шаги: три полоски с подписями */
.ac-steps {
    display: flex;
    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.ac-steps li {
    flex: 1 1 0;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-steps i {
    height: 4px;
    border-radius: 999px;

    background: var(--line);
}

.ac-steps span {
    overflow: hidden;

    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-steps li.is-done i    { background: var(--up); }
.ac-steps li.is-done span { color: var(--up); }
.ac-steps li.is-on i      { background: var(--accent); }
.ac-steps li.is-on span   { color: var(--ink); font-weight: 600; }

.ac-err {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 12px 14px;
    border-radius: 12px;

    background: var(--down-soft);
    color: var(--down);
    font-size: 13px;
    font-weight: 500;
}

.ac-err svg,
.ac-note svg,
.ac-warn svg {
    flex: 0 0 auto;
    margin-top: 1px;
}

.ac-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* «Запустите @BotStatRobot» */
.ac-bot {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px;
    border-radius: 14px;

    background: var(--soft);
}

.ac-bot__ic {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    border-radius: 50%;

    background: #229ED9;
}

.ac-bot__text {
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.ac-bot__text span {
    color: var(--muted);
    font-size: 13px;
}

.ac-bot__btn {
    flex: 0 0 auto;

    padding: 9px 14px;
    border-radius: 10px;

    background: #229ED9;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
}

.ac-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac-field label {
    font-weight: 600;
}

.ac-input {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--card);
    color: var(--ink);
    font-size: 16px;
}

.ac-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(61, 111, 245, .25);
}

.ac-input--code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 20px;
    letter-spacing: 0.12em;
}

.ac-count {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    color: var(--muted);
    font-size: 12px;
}

.ac-count span:last-child {
    font-variant-numeric: tabular-nums;
}

.ac-btn {
    margin-top: 6px;
    padding: 13px 18px;
    border-radius: 12px;

    font-size: 15px;
}

.ac-btn:disabled {
    opacity: .6;
}

/* «Отправили код …» */
.ac-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 12px 14px;
    border-radius: 12px;

    background: var(--accent-soft);
    color: var(--ink-2);
    font-size: 13px;
}

.ac-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;

    font-size: 13px;
}

.ac-links button {
    padding: 0;
    border: 0;

    background: transparent;
    color: var(--accent-ink);
    cursor: pointer;
    font: inherit;
    font-weight: 500;
}

.ac-links button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* «или» */
.ac-or {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--muted);
    font-size: 12px;
}

.ac-or i {
    flex: 1;
    height: 1px;

    background: var(--line);
}

.ac-classic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--card);
    color: var(--ink-2);
    font-weight: 600;
}

.ac-classic:hover {
    border-color: var(--line-hover);
}

/* Вошёл */
.ac-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;

    padding: 20px 0;

    text-align: center;
}

.ac-done__ic {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;
    border-radius: 50%;

    background: color-mix(in srgb, var(--up) 12%, var(--card));
    color: var(--up);
}

.ac-done > span {
    color: var(--muted);
}

.ac-done b {
    color: var(--ink);
}

.ac-done .btn {
    margin-top: 6px;
}

/* ---------- Справа ---------- */

.ac-side {
    flex: 1 1 340px;
    max-width: 420px;

    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-box {
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;

    background: var(--card);
}

.ac-box b {
    font-family: var(--font-head);
    font-size: 18px;
}

.ac-box > span {
    color: var(--ink-2);
}

.ac-perk {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ac-perk svg {
    flex: 0 0 auto;
    margin-top: 3px;

    color: var(--up);
}

.ac-warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 14px 16px;
    border-radius: 14px;

    background: var(--warm-soft);
    color: var(--ink-2);
    font-size: 13px;
}

.ac-warn svg {
    color: var(--warm);
}

/* Телефон */
@media (max-width: 720px) {
    .ac {
        padding: 20px 16px 40px;
    }

    .ac-card {
        padding: 20px;
    }

    .ac-side {
        max-width: none;
    }
}

/* @BotStatRobot в текстах – ссылка на бота */
.ac-bsr {
    color: var(--accent-ink);
    font-weight: 600;
}

.ac-bsr:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* В красной плашке ошибки ссылка того же цвета, что текст */
.ac-err .ac-bsr {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
