/**
 * GIPIX CRM — auth: кнопки, OAuth Yandex, ссылки, divider.
 * После pages-auth-panel.css.
 */

/* Совместимость: старые классы, если где-то остались */
.auth-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.auth-header {
    background: linear-gradient(135deg, #1565c0 0%, #00838f 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.auth-header h2 { margin: 0; font-weight: 300; }
.auth-header .logo { font-size: 3rem; margin-bottom: 10px; }
.auth-body { padding: 30px; }

.form-floating { margin-bottom: 20px; }
.auth-panel__body form .form-floating { margin-bottom: 0.65rem; }
.auth-panel__body .auth-form-grid > .form-floating { margin-bottom: 0.55rem; }

.form-floating .form-control {
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 12px;
    height: calc(3.35rem + 2px);
}
.form-floating .form-control:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 0.25rem rgba(21, 101, 192, 0.2);
}
.btn-primary.auth-btn {
    background: linear-gradient(135deg, #1565c0 0%, #00838f 100%);
    border: none;
    border-radius: 12px;
    padding: 11px 12px;
    font-weight: 600;
    width: 100%;
    margin-bottom: 0.65rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.28);
}
.btn-primary.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(21, 101, 192, 0.38);
}
.form-check { margin: 16px 0; }
.form-check-input:checked { background-color: #1565c0; border-color: #1565c0; }
.auth-links { text-align: center; margin-top: 0.65rem; }
.auth-links a { color: #0d47a1; text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.alert { border: none; border-radius: 12px; margin-bottom: 0.75rem; }
.alert-danger { background: rgba(248, 215, 218, 0.92); color: #721c24; }
.alert-success { background: rgba(209, 237, 255, 0.92); color: #0c5460; }
.auth-panel__body .divider { text-align: center; margin: 0.85rem 0; position: relative; }
.auth-panel__body .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.35), transparent);
}
.auth-panel__body .divider span {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 0 12px;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* === OAuth секция === */
.oauth-section {
    margin: 0.65rem 0;
}

.oauth-title {
    text-align: center;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
    position: relative;
    letter-spacing: 0.02em;
}

.oauth-title::before,
.oauth-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.3), transparent);
}

.oauth-title::before {
    left: 0;
}

.oauth-title::after {
    right: 0;
}

@media (max-width: 991.98px) {
    .auth-layout {
        flex-direction: column-reverse;
        align-items: stretch;
        justify-content: flex-end;
        padding: 0.5rem clamp(0.85rem, 3vw, 1.25rem) 0.65rem;
        margin-left: auto;
        margin-right: auto;
        max-width: 480px;
        min-height: 100dvh;
        min-height: 100vh;
        gap: 0.65rem;
    }

    .auth-hero-copy {
        max-width: none;
        padding-bottom: 0.35rem;
    }

    .auth-hero__chips {
        margin-bottom: 0.65rem;
    }

    .auth-hero__lead {
        margin-bottom: 0.75rem;
    }

    .auth-hero__quote {
        display: none;
    }

    .auth-panel {
        flex: none;
        max-width: none;
        width: 100%;
    }

    .auth-panel__inner {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-page--register .auth-panel__inner {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-canvas .auth-hero__orb,
    .auth-canvas .auth-hero__grid,
    .auth-hero__dot,
    .auth-panel__inner,
    .auth-hero__eyebrow,
    .auth-hero__title,
    .auth-hero__lead,
    .auth-hero__chips,
    .auth-hero__footer {
        animation: none !important;
    }

    .auth-canvas .auth-hero__mesh {
        transition: none;
    }

    .auth-hero__chip {
        transition: none;
    }
}

/* === OAuth кнопки === */
.btn-oauth-yandex {
    background: linear-gradient(135deg, #ff3333 0%, #ff6b6b 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: all var(--md-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--md-elevation-1);
    font-size: 0.95rem;
}

.btn-oauth-yandex:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, #ff5252 100%);
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-2);
    color: #fff;
    text-decoration: none;
}

.btn-oauth-yandex:focus {
    outline: none;
    box-shadow: var(--md-elevation-2), 0 0 0 3px rgba(255, 51, 51, 0.25);
    color: #fff;
}

.btn-oauth-yandex:active {
    transform: translateY(0);
    box-shadow: var(--md-elevation-1);
}

/* Адаптивный дизайн для мобильных */
@media (max-width: 768px) {
    .btn-oauth-yandex {
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    .btn-oauth-yandex i {
        font-size: 1.1rem;
    }
}

/* Анимация спиннера */
.btn-oauth-yandex .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Улучшение доступности */
.btn-oauth-yandex:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Состояние загрузки */
.btn-oauth-yandex[style*="opacity"] {
    cursor: not-allowed;
    transform: none !important;
}

/* Улучшения для divider */
.divider {
    margin: 25px 0;
    font-weight: 500;
}

.divider::before {
    background: linear-gradient(to right, transparent, #e9ecef, transparent);
}

/* Стили для auth-links */
.auth-links {
    margin-top: 25px;
}

.auth-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--md-transition-fast);
}

.auth-links a:hover {
    transform: translateY(-1px);
} 
