/* ═══════════════════════════════════════
   AUTH PAGES — Login, Register, Forgot
   Светлая тема Ai business map
   ═══════════════════════════════════════ */

@font-face{
    font-family:'Evolventa';
    src:url('/fonts/evolventa-400.ttf') format('truetype');
    font-weight:400;font-style:normal;font-display:swap;
}
@font-face{
    font-family:'Evolventa';
    src:url('/fonts/evolventa-700.ttf') format('truetype');
    font-weight:700;font-style:normal;font-display:swap;
}

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

body {
    font-family: 'Evolventa', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f7fb;
    color: #0e1b2e;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Container ─── */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
}

/* ─── Card ─── */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 20px;
    padding: 48px 40px;
    position: relative;
    z-index: 2;
    box-shadow:
        0 8px 30px rgba(20, 40, 90, 0.08),
        0 2px 8px rgba(20, 40, 90, 0.04);
}

/* ─── Logo ─── */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 32px;
    justify-content: center;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 4px 10px rgba(47, 91, 240, 0.25));
}

.logo-text {
    font-family: 'Evolventa', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #2f5bf0, #6d8bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Titles ─── */
.auth-title {
    font-family: 'Evolventa', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: #56657c;
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-note {
    text-align: center;
    color: #234bd6;
    background: rgba(47, 91, 240, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin: -20px 0 24px;
}

/* ─── Form ─── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #56657c;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #2f5bf0;
}

.form-group input {
    background: #f4f7fb;
    border: 1px solid #e4eaf2;
    border-radius: 10px;
    padding: 14px 16px;
    color: #0e1b2e;
    font-size: 15px;
    font-family: 'Evolventa', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: #8a98ad;
}

.form-group input:focus {
    border-color: #2f5bf0;
    box-shadow: 0 0 0 3px rgba(47, 91, 240, 0.15);
}

.forgot-link {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    color: #8a98ad;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #2f5bf0;
}

/* ─── Button ─── */
.btn-primary {
    background: linear-gradient(135deg, #2f5bf0, #234bd6);
    border: none;
    border-radius: 10px;
    padding: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Evolventa', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(47, 91, 240, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Divider ─── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e4eaf2;
}

.auth-divider span {
    font-size: 12px;
    color: #8a98ad;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Switch ─── */
.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #56657c;
}

.auth-switch a {
    color: #2f5bf0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: #234bd6;
}

/* ─── Error / Success ─── */
.auth-error {
    background: rgba(220, 40, 40, 0.07);
    border: 1px solid rgba(220, 40, 40, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #d12f2f;
    font-size: 14px;
    text-align: center;
}

.auth-success {
    background: rgba(15, 174, 114, 0.08);
    border: 1px solid rgba(15, 174, 114, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #0a8a5a;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}

/* ─── Background decoration ─── */
.auth-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: #6d8bff;
    top: -200px;
    right: -100px;
    animation: float1 12s ease-in-out infinite alternate;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: #2f5bf0;
    bottom: -150px;
    left: -100px;
    animation: float2 10s ease-in-out infinite alternate;
}

@keyframes float1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-60px, 40px); }
}

@keyframes float2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, -30px); }
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 22px;
    }
}
