@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Tokens de design centralizados em assets/css/tokens.css (carregado antes deste arquivo) */
/* Aliases --auth-* são definidos lá e mantidos por compatibilidade. */

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

body {
    font-family: var(--font-family);
    min-height: 100vh;
    background: var(--color-bg, #F1F5F9);
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, #0A1428 0%, #1A3A5F 50%, #2563EB 100%);
}

.auth-split-left {
    flex: 0 0 420px;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.82) 60%, rgba(255,255,255,0.5) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 2;
    padding: 40px 32px;
}

.auth-split-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3), transparent);
}

.auth-split-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.auth-brand-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 40px;
    pointer-events: none;
}

.auth-brand-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
}

.auth-brand-title {
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.auth-brand-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

.auth-container {
    width: 100%;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.auth-logo svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.auth-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--auth-text);
    letter-spacing: -0.3px;
}

.auth-heading {
    font-size: 26px;
    font-weight: 800;
    color: var(--auth-text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-subheading {
    font-size: 14px;
    color: var(--auth-text-secondary);
    margin-bottom: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form .form-group { margin-bottom: 16px; }

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

.auth-form input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-size: 14px;
    font-family: var(--font-family);
    background: #FFFFFF;
    transition: all var(--auth-transition);
    color: var(--auth-text);
}

.auth-form input::placeholder { color: var(--auth-text-secondary); }

.auth-form input:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-error {
    color: var(--auth-error);
    font-size: 13px;
    margin-bottom: 8px;
    min-height: 0;
    background: var(--auth-error-bg);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: none;
}

.form-error:not(:empty) { display: block; }

.auth-submit-wrap {
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Padrão GeoManager: 36px (normal) · 30px (.btn-sm) */
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--auth-transition);
    text-decoration: none;
    font-family: var(--font-family);
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

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

.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-secondary { background: #64748B; color: #fff; }
.btn-secondary:hover { background: #475569; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-block { width: 100%; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--auth-text-secondary);
    font-size: 13px;
}

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

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--auth-text-secondary);
}

.auth-link a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover { text-decoration: underline; }

.auth-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: var(--auth-text-secondary);
}

@media (max-width: 900px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-split-left {
        flex: 1;
        max-width: 100%;
        min-height: 100vh;
        padding: 60px 24px 40px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .auth-split-left::after {
        display: none;
    }

    .auth-split-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-split-left {
        padding: 40px 16px 32px;
    }

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

    .auth-form-wrapper {
        max-width: 100%;
    }
}