/* ============================================================
   AUTH — Login & Register (uiverse-inspired, Hospital matte)
   ============================================================ */

body.page-auth main {
    min-height: calc(100vh - 120px);
    padding-top: calc(var(--nav-height) + var(--safe-area-top) + 12px);
    padding-bottom: 32px;
}

/* На login/register — свои блики за карточкой, без глобальных орбов по углам */
body.page-auth .ambient-orbs {
    display: none;
}

body.page-auth #particles-canvas {
    opacity: 0.28;
}

body.page-auth .page-bg {
    opacity: 0.72;
    background:
        radial-gradient(ellipse 70% 55% at 50% 42%, rgba(60, 28, 28, 0.14) 0%, transparent 62%),
        #0c0a0a;
}

.auth-scene {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: 24px 16px 48px;
    overflow-x: hidden;
    max-width: 100%;
}

/* Мягкое свечение строго за карточкой по центру */
.auth-scene::before,
.auth-scene::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    pointer-events: none;
    z-index: 0;
}

.auth-scene::before {
    width: 420px;
    height: 420px;
    background: rgba(139, 64, 64, 0.16);
    top: 50%;
    left: 50%;
    transform: translate(-58%, -54%);
    animation: authGlowA 16s ease-in-out infinite;
}

.auth-scene::after {
    width: 300px;
    height: 300px;
    background: rgba(70, 32, 32, 0.14);
    top: 50%;
    left: 50%;
    transform: translate(-42%, -46%);
    animation: authGlowB 18s ease-in-out infinite;
}

@keyframes authGlowA {
    0%, 100% { transform: translate(-58%, -54%) scale(1); opacity: 0.9; }
    50% { transform: translate(-52%, -50%) scale(1.06); opacity: 1; }
}

@keyframes authGlowB {
    0%, 100% { transform: translate(-42%, -46%) scale(1); opacity: 0.85; }
    50% { transform: translate(-48%, -52%) scale(1.05); opacity: 1; }
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    width: 100%;
    max-width: 920px;
    min-height: 520px;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(12, 10, 10, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    isolation: isolate;
}

.auth-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 90% 70% at 22% 12%, rgba(139, 64, 64, 0.22), transparent 52%),
        radial-gradient(ellipse 55% 45% at 88% 92%, rgba(80, 35, 35, 0.1), transparent 48%);
}

.auth-brand {
    position: relative;
    z-index: 1;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(145deg, rgba(30, 14, 14, 0.95) 0%, rgba(18, 10, 10, 0.88) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 28% 18%, rgba(139, 64, 64, 0.28), transparent 58%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
}

.auth-brand-logo img {
    max-height: 52px;
    width: auto;
    filter: drop-shadow(0 6px 24px rgba(139, 64, 64, 0.35));
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.45s ease;
}

.auth-brand-logo:hover img {
    transform: translateY(-3px) scale(1.07) rotate(-4deg);
    filter:
        drop-shadow(0 0 14px rgba(225, 60, 60, 0.55))
        drop-shadow(0 8px 28px rgba(139, 64, 64, 0.45))
        brightness(1.1);
}

.auth-brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(139, 64, 64, 0.15);
    border: 1px solid rgba(139, 64, 64, 0.35);
    color: #e8b4b4;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.auth-brand h1 {
    margin: 20px 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.auth-brand p {
    margin: 0;
    color: rgba(236, 234, 234, 0.5);
    font-size: 0.88rem;
    line-height: 1.65;
    max-width: 320px;
}

.auth-brand-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    font-weight: 500;
}

.auth-feature i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c97878;
    flex-shrink: 0;
}

.auth-panel {
    position: relative;
    z-index: 1;
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 100% 0%, rgba(139, 64, 64, 0.06), transparent 55%);
    z-index: 0;
}

.auth-panel > * {
    position: relative;
    z-index: 1;
}

.auth-panel-head {
    margin-bottom: 26px;
}

.auth-panel-head h2 {
    margin: 0 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-panel-head p {
    margin: 0;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.84rem;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.auth-alert-error {
    background: rgba(139, 64, 64, 0.12);
    border: 1px solid rgba(139, 64, 64, 0.35);
    color: #f0a8a8;
}

.auth-alert-success {
    background: rgba(34, 120, 70, 0.12);
    border: 1px solid rgba(34, 120, 70, 0.3);
    color: #8fd4a8;
}

.auth-field {
    margin-bottom: 20px;
}

.auth-field label {
    display: block;
    color: rgba(236, 230, 230, 0.82);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 9px;
    padding-left: 2px;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 52px;
    background: linear-gradient(180deg, #1e1414 0%, #181010 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.auth-input-group.is-focused,
.auth-input-group:focus-within {
    border-color: rgba(201, 120, 120, 0.55);
    box-shadow: inset 0 0 0 1px rgba(201, 120, 120, 0.2), 0 0 0 3px rgba(139, 64, 64, 0.12);
    background: linear-gradient(180deg, #241818 0%, #1c1212 100%);
}

.auth-input-icon {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c97878;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.25s, transform 0.25s;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.auth-input-group:focus-within .auth-input-icon {
    color: #f0b0b0;
    border-right-color: rgba(201, 120, 120, 0.2);
}

.auth-input,
.auth-input-group input {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    padding: 14px 16px;
    color: #f8f4f4 !important;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-shadow: none !important;
    transition: color 0.25s;
    -webkit-text-fill-color: #f8f4f4;
    caret-color: #f8f4f4;
    line-height: 1.35;
}

.auth-input-group input.auth-input-has-toggle {
    padding-right: 48px;
}

.auth-input-group input:focus {
    outline: none;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input-group input:-webkit-autofill,
.auth-input-group input:-webkit-autofill:hover,
.auth-input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1e1414 inset !important;
    box-shadow: 0 0 0 1000px #1e1414 inset !important;
    -webkit-text-fill-color: #f8f4f4 !important;
    transition: background-color 9999s ease-out 0s;
}

.auth-input-group:focus-within input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #241818 inset !important;
    box-shadow: 0 0 0 1000px #241818 inset !important;
}

.auth-input::placeholder,
.auth-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.auth-toggle-pass {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: rgba(139, 64, 64, 0.12);
    border: 1px solid rgba(139, 64, 64, 0.25);
    color: #e8b4b4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s, transform 0.2s;
    z-index: 2;
}

.auth-toggle-pass:hover {
    color: #fff;
    background: rgba(139, 64, 64, 0.28);
    transform: scale(1.05);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-checkbox,
.auth-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    user-select: none;
}

.auth-checkbox label {
    cursor: pointer;
    line-height: 1.4;
}

.auth-checkbox input,
.auth-checkbox-inline input {
    width: 17px;
    height: 17px;
    accent-color: #8b4040;
}

.auth-link,
.auth-footer-link a,
.auth-switch a,
.auth-checkbox a {
    color: #d4a0a0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover,
.auth-footer-link a:hover,
.auth-switch a:hover,
.auth-checkbox a:hover {
    color: #f0c8c8;
}

.auth-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #3d1515 0%, #6b2828 40%, #8b4040 100%);
    box-shadow: 0 10px 28px rgba(139, 64, 64, 0.28);
    transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}

.auth-btn > span,
.auth-btn > i {
    position: relative;
    z-index: 1;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(139, 64, 64, 0.38);
    filter: brightness(1.06);
}

.auth-btn:hover::before {
    left: 140%;
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer-link,
.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.84rem;
}

.auth-security-banner {
    margin-top: 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(60, 22, 22, 0.95) 0%, rgba(35, 14, 14, 0.92) 100%);
    border: 1px solid rgba(201, 120, 120, 0.45);
    box-shadow:
        0 8px 28px rgba(139, 64, 64, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.auth-security-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 50%, rgba(139, 64, 64, 0.25), transparent 55%);
    pointer-events: none;
}

.auth-security-banner-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 64, 64, 0.35);
    border: 1px solid rgba(232, 180, 180, 0.35);
    color: #ffd4d4;
    font-size: 1.05rem;
    animation: authBannerPulse 2.8s ease-in-out infinite;
}

@keyframes authBannerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 120, 120, 0.35); }
    50% { box-shadow: 0 0 0 8px rgba(201, 120, 120, 0); }
}

.auth-security-banner-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.auth-security-banner-body strong {
    display: block;
    color: #ffd4d4;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.auth-security-banner-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    line-height: 1.55;
}

.auth-security-banner-body kbd {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffe0e0;
    font-family: 'Inter', monospace;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Terms modal */
.auth-modal {
    z-index: 1060 !important;
}

.auth-modal-backdrop,
.modal-backdrop.show {
    z-index: 1055 !important;
}

.auth-modal.show {
    display: block !important;
    pointer-events: auto;
}

.auth-modal .modal-dialog {
    pointer-events: auto;
    z-index: 1061;
}

.auth-modal .modal-content {
    background: #141111;
    color: #eceaea;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.auth-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 24px 16px;
}

.auth-modal .modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #fff;
}

.auth-modal .modal-body {
    font-size: 0.9rem;
    color: rgba(236, 234, 234, 0.78);
    padding: 16px 24px;
    line-height: 1.65;
}

.auth-modal .modal-body ul {
    padding-left: 1.2rem;
    margin: 0.75rem 0 0;
}

.auth-modal .modal-body li {
    margin-bottom: 0.45rem;
}

.auth-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 24px 20px;
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    z-index: 2;
}

.auth-modal-close:hover {
    background: rgba(139, 64, 64, 0.45);
    border-color: rgba(232, 180, 180, 0.45);
    transform: scale(1.06);
}

.auth-modal .modal-header {
    position: relative;
    padding-right: 56px;
}

.auth-btn-outline {
    width: auto;
    min-width: 140px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(139, 64, 64, 0.45);
    box-shadow: none;
}

.auth-btn-outline:hover {
    background: rgba(139, 64, 64, 0.15);
    box-shadow: none;
}

a.auth-btn {
    text-decoration: none;
}

a.auth-btn.auth-btn-outline {
    width: 100%;
}

.auth-switch a i {
    margin-right: 6px;
    font-size: 0.72rem;
}

/* OAuth — Google / Яндекс (uiverse-style glass) */
.auth-oauth-block {
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-oauth-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.auth-oauth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
    pointer-events: none;
    z-index: 0;
}

.auth-oauth-btn:hover::before {
    transform: translateX(120%);
}

.auth-oauth-btn > * {
    position: relative;
    z-index: 1;
}

.auth-oauth-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

.auth-oauth-google {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.12), rgba(255, 255, 255, 0.03));
    border-color: rgba(66, 133, 244, 0.28);
}

.auth-oauth-google:hover {
    border-color: rgba(66, 133, 244, 0.5);
    box-shadow: 0 12px 28px rgba(66, 133, 244, 0.15);
}

.auth-oauth-google .auth-oauth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.auth-oauth-yandex {
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 12px 18px;
    background: #fff;
    border-color: rgba(255, 255, 255, 0.85);
    color: #111;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.auth-oauth-yandex::before {
    background: linear-gradient(120deg, transparent 30%, rgba(252, 63, 29, 0.06) 50%, transparent 70%);
}

.auth-oauth-yandex:hover {
    transform: translateY(-2px);
    color: #111;
    border-color: rgba(252, 63, 29, 0.3);
    box-shadow: 0 12px 28px rgba(252, 63, 29, 0.14);
}

.auth-yandex-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    line-height: 0;
}

.auth-yandex-logo svg,
.auth-yandex-logo img {
    display: block;
    width: 32px;
    height: 32px;
}

.auth-yandex-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
    white-space: nowrap;
}

.auth-yandex-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.auth-yandex-sub {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.48);
}

.auth-oauth-label {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;
}

.auth-oauth-sub {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.auth-remember-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    white-space: nowrap;
}

.auth-remember-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.62rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.auth-remember-input:checked + .auth-remember-box {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.auth-remember-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.auth-remember:hover .auth-remember-box {
    border-color: rgba(248, 113, 113, 0.45);
}

.auth-oauth-bonus {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(252, 63, 29, 0.18);
    border: 1px solid rgba(252, 63, 29, 0.35);
    color: #ffb4a8;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.auth-oauth-google .auth-oauth-icon {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-oauth-google .auth-oauth-icon svg {
    width: 18px;
    height: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* Captcha */
.auth-captcha-field {
    margin-bottom: 16px;
}

.auth-captcha-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.captcha-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 72px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.captcha-widget.is-loading {
    border-color: rgba(96, 165, 250, 0.35);
}

.captcha-widget.is-verified {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(20, 40, 24, 0.55), rgba(0, 0, 0, 0.35));
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.captcha-widget.is-error {
    border-color: rgba(239, 68, 68, 0.55);
    animation: captchaShake 0.45s ease;
}

.captcha-check {
    flex-shrink: 0;
    align-self: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-check:disabled {
    cursor: default;
}

.captcha-check-box {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    background: rgba(255, 255, 255, 0.03);
}

.captcha-widget.is-loading .captcha-check-box {
    border-color: rgba(96, 165, 250, 0.55);
}

.captcha-widget.is-verified .captcha-check-box {
    border-color: rgba(34, 197, 94, 0.75);
    background: rgba(34, 197, 94, 0.15);
}

.captcha-widget.is-verified .captcha-check-box::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #86efac;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.captcha-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.captcha-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.captcha-sub {
    display: block;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.35;
}

.captcha-widget.is-verified .captcha-sub {
    color: #86efac;
    font-weight: 600;
}

.captcha-widget.is-loading .captcha-sub {
    color: #93c5fd;
}

.captcha-widget.is-error .captcha-sub {
    color: #fca5a5;
}

.captcha-badge {
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 58px;
    padding-left: 14px;
    margin-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.captcha-badge-icon {
    font-size: 1.05rem;
    color: rgba(252, 165, 165, 0.75);
}

.captcha-widget.is-verified .captcha-badge-icon {
    color: #86efac;
}

.captcha-badge-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
}

@keyframes captchaShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-3px); }
}

/* Legacy class alias */
.auth-btn-gradient,
button.auth-btn-gradient {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #3d1515 0%, #6b2828 40%, #8b4040 100%);
    box-shadow: 0 10px 28px rgba(139, 64, 64, 0.28);
    transition: transform 0.25s, box-shadow 0.25s;
}

.auth-btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(139, 64, 64, 0.38);
}

@media (max-width: 860px) {
    body.page-auth main.site-main {
        padding-left: 12px;
        padding-right: 12px;
        max-width: 100%;
    }

    .auth-scene {
        overflow-x: hidden;
        padding: 8px 0 28px;
        min-height: auto;
        align-items: flex-start;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 100%;
        min-height: auto;
        border-radius: 22px;
    }

    .auth-shell::after {
        background: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(139, 64, 64, 0.16), transparent 58%);
    }

    .auth-scene::before {
        transform: translate(-50%, -52%);
        width: 340px;
        height: 340px;
    }

    .auth-scene::after {
        transform: translate(-50%, -48%);
        width: 260px;
        height: 260px;
    }

    @keyframes authGlowA {
        0%, 100% { transform: translate(-50%, -52%) scale(1); }
        50% { transform: translate(-50%, -48%) scale(1.05); }
    }

    @keyframes authGlowB {
        0%, 100% { transform: translate(-50%, -48%) scale(1); }
        50% { transform: translate(-50%, -52%) scale(1.04); }
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        padding: 24px 20px 28px;
        min-width: 0;
    }

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

    .auth-input-group {
        min-height: 54px;
    }

    .auth-input-icon {
        flex: 0 0 50px;
        font-size: 1rem;
    }

    .auth-input,
    .auth-input-group input {
        font-size: 16px !important;
        padding: 15px 14px;
    }

    .auth-btn {
        min-height: 52px;
        font-size: 1rem;
    }

    .auth-oauth-btn {
        min-height: 52px;
        padding: 14px 16px;
    }
}

@media (max-width: 420px) {
    .auth-scene {
        padding: 4px 0 24px;
    }

    .auth-shell {
        border-radius: 18px;
    }

    .auth-panel {
        padding: 20px 16px 24px;
    }

    .auth-panel-head h2 {
        font-size: 1.28rem;
    }
}
