/* ==========================================================================
   Auth pages (login / register) — общая стилистика с лендингом
   ========================================================================== */

:root {
    --main-bg-color: #17181d;
    --main-text-color: #fffef1;
    --color-1: #d59c2c;
    --color-2: #e09758;
    --red: #EE053B;
}

* , *::before, *::after { box-sizing: border-box; }

html, body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--main-bg-color);
    color: var(--main-text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- page shell ---------- */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 26px 24px 40px;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    opacity: .45;
    z-index: 0;
}

.auth-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
    width: fit-content;
}

.auth-brand-mark {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.auth-brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }

/* ---------- centered card area ---------- */
.auth-main {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.auth-card-wrap { width: 100%; max-width: 420px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    color: var(--color-2);
    background: rgba(224, 151, 88, .1);
    border: 1px solid rgba(224, 151, 88, .28);
    border-radius: 100px;
    padding: 6px 14px;
    margin-bottom: 18px;
}

.eyebrow i { font-size: 13px; }

/* ---------- glow card (border + light-circle only on the outline) ---------- */
.glow-card {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(135deg, rgba(255, 254, 241, .14), rgba(255, 254, 241, .05));
    padding: 1px;
    border-radius: 20px;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .65);
}

.glow-card .inner {
    position: relative;
    background: #1b1c22;
    border-radius: 19px;
    padding: 36px 34px;
}

.light-circle {
    width: 220px; height: 220px;
    border-radius: 50%;
    position: absolute;
    pointer-events: none;
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 0 30px 15px rgba(255, 255, 255, .22);
    transform: scale(.5);
    opacity: 0;
    transition: opacity .3s ease, transform .2s ease;
}

.auth-card h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    position: relative; z-index: 2;
}

.auth-sub {
    font-size: 14.5px;
    color: rgba(255, 254, 241, .5);
    margin: 0 0 28px;
    position: relative; z-index: 2;
}

/* ---------- alerts ---------- */
.auth-alert {
    position: relative; z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(238, 5, 59, .08);
    border: 1px solid rgba(238, 5, 59, .3);
    color: #ff8fa3;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    margin-bottom: 20px;
}

.auth-alert.success {
    background: rgba(74, 222, 128, .08);
    border-color: rgba(74, 222, 128, .3);
    color: #86efac;
}

.auth-alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.auth-alert ul { margin: 0; padding: 0; list-style: none; }

/* ---------- form ---------- */
.auth-form { position: relative; z-index: 2; }

.field-group { margin-bottom: 18px; }

.field-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2px;
    color: rgba(255, 254, 241, .55);
    margin-bottom: 7px;
    cursor: default;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="number"] {
    width: 100%;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14.5px;
    color: var(--main-text-color);
    outline: none;
    transition: border-color .18s, background .18s, box-shadow .18s;
    font-family: inherit;
}

.field-group input::placeholder { color: rgba(255, 254, 241, .28); }

.field-group input:focus {
    border-color: var(--color-2);
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 0 0 3px rgba(224, 151, 88, .14);
}

.field-group.has-error input {
    border-color: rgba(238, 5, 59, .55);
}

.field-hint {
    font-size: 11.5px;
    color: rgba(255, 254, 241, .35);
    margin-top: 6px;
}

.field-error {
    font-size: 12px;
    color: #ff8fa3;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* password field with show/hide toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px !important; }

.pw-toggle {
    position: absolute;
    top: 50%; right: 6px;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 254, 241, .4);
    cursor: pointer;
    font-size: 16px;
    border-radius: 7px;
    transition: color .15s, background .15s;
}

.pw-toggle:hover { color: rgba(255, 254, 241, .8); background: rgba(255, 255, 255, .06); }

/* checkbox field (remember me) */
.field-group.checkbox-field {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
}

.field-group.checkbox-field label { margin: 0; cursor: pointer; }

.field-group.checkbox-field input[type="checkbox"] {
    width: 18px; height: 18px;
    flex-shrink: 0;
    appearance: none;
    border: 2px solid rgba(255, 254, 241, .3);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: border-color .15s, background .15s;
}

.field-group.checkbox-field input[type="checkbox"]:checked {
    background: var(--color-2);
    border-color: var(--color-2);
}

.field-group.checkbox-field input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px; top: 1px;
    width: 4px; height: 8px;
    border: solid #17181d;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s, background .2s, color .2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-2), var(--color-1));
    color: #17181d;
    box-shadow: 0 10px 24px -8px rgba(224, 151, 88, .55);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(224, 151, 88, .7); }
.btn-block { width: 100%; }

/* ---------- switch / footer links ---------- */
.auth-switch {
    position: relative; z-index: 2;
    text-align: center;
    font-size: 13.5px;
    color: rgba(255, 254, 241, .45);
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.auth-switch a { color: var(--color-2); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.auth-back {
    position: relative; z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 254, 241, .4);
    margin-top: 18px;
}

.auth-back:hover { color: rgba(255, 254, 241, .7); }

.auth-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 12.5px;
    color: rgba(255, 254, 241, .3);
    padding-top: 20px;
}

.captcha-field .captcha-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-field img.captcha {
    width: 140px;
    height: 50px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: #fff;
    display: block;
    object-fit: contain;
}

.captcha-field .captcha-input {
    width: 100%;
}

.captcha-refresh {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 254, 241, .75);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, transform .15s;
}

.captcha-refresh:hover {
    background: rgba(224, 151, 88, .12);
    border-color: rgba(224, 151, 88, .35);
    color: var(--color-2);
}

.captcha-refresh:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
}

.captcha-refresh.is-spinning i {
    animation: captcha-spin .8s linear infinite;
}

@keyframes captcha-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .glow-card .inner { padding: 28px 22px; }
    .auth-page { padding: 20px 16px 30px; }
}
