/* /local/assets/auth.css — стили страниц /auth/login/ и /auth/register/.
   Палитра и решения взяты из sms_auth.css (фирменный розовый Аспро).
   Mobile-first, адаптив до 480px.
*/

:root {
    --auth-accent: #e8a2e1;
    --auth-accent-hover: #d987d1;
    --auth-accent-soft: #f7d9f3;
    --auth-text: #2b2b2b;
    --auth-muted: #6e6e6e;
    --auth-border: #e0e0e0;
    --auth-error: #d63832;
    --auth-radius: 14px;
    --auth-radius-input: 12px;
}

.auth-wrapper {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: inherit;
    color: var(--auth-text);
}

.auth-card {
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    padding: 32px 28px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .04);
}

.auth-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.4;
}

/* ---- Поля --------------------------------------------------------------- */
.auth-field {
    margin-bottom: 16px;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-input);
    font-size: 16px;
    color: var(--auth-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.auth-input:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-input::placeholder { color: #b6b6b6; }
.auth-input.is-invalid   { border-color: var(--auth-error); }

.auth-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--auth-muted);
}

/* ---- Honeypot ----------------------------------------------------------- */
.auth-hp {
    position: absolute;
    left: -10000px;
    top: -10000px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ---- Согласие ----------------------------------------------------------- */
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 24px;
    font-size: 13px;
    color: var(--auth-muted);
    line-height: 1.4;
}

.auth-consent input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--auth-accent);
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-consent label { cursor: pointer; }
.auth-consent a {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ---- Кнопка ------------------------------------------------------------- */
.auth-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--auth-radius-input);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, transform .05s, opacity .15s;
    font-family: inherit;
}

.auth-btn--primary {
    background: var(--auth-accent);
    color: #fff;
}

.auth-btn--primary:hover:not(:disabled) { background: var(--auth-accent-hover); }
.auth-btn--primary:active:not(:disabled) { transform: translateY(1px); }

.auth-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ---- Ссылки под кнопкой ------------------------------------------------- */
.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 14px;
    color: var(--auth-muted);
    flex-wrap: wrap;
    text-align: center;
}

.auth-links--secondary {
    margin-top: 8px;
}

.auth-link {
    color: var(--auth-accent-hover);
    text-decoration: underline;
    cursor: pointer;
}

.auth-link--muted {
    color: var(--auth-muted);
    text-decoration: underline dotted;
}

/* ---- Ошибка ------------------------------------------------------------- */
.auth-error {
    margin: 10px 0 0;
    color: var(--auth-error);
    font-size: 13px;
    line-height: 1.4;
}

/* ---- OAuth-кнопки (VK / Яндекс) ----------------------------------------- */
.auth-oauth {
    margin-top: 18px;
}

/* В форме регистрации oauth-блок стоит сверху — отступ под ним до формы. */
.auth-card > .auth-oauth:first-child {
    margin-top: 0;
    margin-bottom: 22px;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 12px 0 14px;
    font-size: 12px;
    color: var(--auth-muted);
    text-transform: lowercase;
    letter-spacing: .02em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: var(--auth-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-oauth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-btn--oauth {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--auth-radius-input);
    text-decoration: none;
    transition: background-color .15s, transform .05s, opacity .15s;
    box-sizing: border-box;
}

.auth-btn--oauth img,
.auth-btn--oauth svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 5px;       /* мягкие углы у квадратных логотипов */
    display: block;
}

.auth-btn--vk      { background: #0077FF; color: #fff; }
.auth-btn--vk:hover{ background: #0064D6; color: #fff; }

.auth-btn--yandex      { background: #FC3F1D; color: #fff; }
.auth-btn--yandex:hover{ background: #E03613; color: #fff; }

.auth-btn--oauth:active { transform: translateY(1px); }

/* ---- Адаптив ------------------------------------------------------------ */
@media (max-width: 480px) {
    .auth-wrapper { margin: 20px auto; }
    .auth-card { padding: 24px 20px; border-radius: 12px; }
    .auth-title { font-size: 20px; }
    .auth-row { grid-template-columns: 1fr; gap: 0; }
    .auth-oauth-buttons { grid-template-columns: 1fr; }
}
