/* ============================================================
   Páginas de autenticação - Split-screen premium
   ============================================================ */

html, body { height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg-deepest, #0A0E1A);
    color: var(--text-primary, #F1F3F5);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Layout */
.auth-shell {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    position: relative;
    z-index: 1;
}

/* ====== Lado esquerdo: foto + frase + benefícios ====== */
.auth-side {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    isolation: isolate;
    color: #FFFFFF;
}

.auth-side-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: authSideZoom 28s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes authSideZoom {
    from { transform: scale(1.05) translateX(0); }
    to   { transform: scale(1.12) translateX(-1.5%); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-side-bg { animation: none; }
}

.auth-side::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(10,14,26,0.55) 0%, rgba(15,19,32,0.78) 60%, rgba(10,14,26,0.92) 100%),
        linear-gradient(180deg, rgba(10,14,26,0) 0%, rgba(10,14,26,0.4) 100%),
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(0,188,212,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 80% 80%, rgba(21,101,192,0.15) 0%, transparent 60%);
}

/* Decorações no lado esquerdo */
.auth-side-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at 30% 50%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 30% 50%, black 0%, transparent 70%);
}

.auth-side-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    z-index: 1;
}
.auth-side-brand img {
    height: 40px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}
.auth-side-brand:hover img {
    transform: scale(1.05);
}

.auth-side-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-side-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid rgba(0, 188, 212, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4DD0E1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.auth-side-tag .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4DD0E1;
    box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.6);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(0, 188, 212, 0); }
}

.auth-side-quote {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(1.85rem, 3vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0 0 1.25rem;
    text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
.auth-side-quote .text-gradient {
    background: linear-gradient(135deg, #00BCD4 0%, #4DD0E1 50%, #00BCD4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(0, 188, 212, 0.4));
}
.auth-side-lead {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.auth-side-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
}
.auth-side-feature {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: rgba(255,255,255,0.92);
    font-size: 0.93rem;
}
.auth-side-feature-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(0, 188, 212, 0.16);
    border: 1px solid rgba(0, 188, 212, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4DD0E1;
    font-size: 0.95rem;
}

.auth-side-stats {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.10);
}
.auth-side-stat-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    line-height: 1;
    background: linear-gradient(135deg, #00BCD4, #4DD0E1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-side-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ====== Lado direito: form ====== */
.auth-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: linear-gradient(180deg, #0F1320 0%, #0A0E1A 100%);
}
.auth-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 40% at 80% 0%, rgba(0,188,212,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 20% 100%, rgba(21,101,192,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: rgba(20, 25, 41, 0.85);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.5),
        0 0 60px rgba(0, 188, 212, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: authCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,188,212,0.65), rgba(21,101,192,0.65), transparent);
    border-radius: 20px 20px 0 0;
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card-header {
    margin-bottom: 1.75rem;
}
.auth-card-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4DD0E1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}
.auth-card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.65rem;
    color: #F1F3F5;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}
.auth-card-subtitle {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    margin: 0;
}

/* Form fields */
.auth-card .form-label {
    display: block;
    color: #E1E6F0 !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.auth-card .input-group {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.auth-card .input-group:focus-within {
    border-color: rgba(0,188,212,0.55);
    background: rgba(0,188,212,0.04);
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.10);
}
.auth-card .input-group-text {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.55) !important;
    padding: 0 0.85rem !important;
    font-size: 1rem;
}
.auth-card .input-group:focus-within .input-group-text {
    color: #4DD0E1 !important;
}
.auth-card .form-control,
.auth-card .form-select {
    background: transparent !important;
    border: none !important;
    color: #F1F3F5 !important;
    padding: 0.85rem 0.85rem !important;
    font-size: 0.95rem;
    box-shadow: none !important;
}
.auth-card .form-control::placeholder {
    color: rgba(255,255,255,0.35) !important;
}
.auth-card .input-group .btn-outline-secondary {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.45) !important;
    padding: 0 0.85rem !important;
}
.auth-card .input-group .btn-outline-secondary:hover {
    color: #4DD0E1 !important;
    background: transparent !important;
}

/* Checkbox lembrar-me */
.auth-card .form-check-label {
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.875rem;
}
.auth-card .form-check-input {
    background-color: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
    width: 1.05rem;
    height: 1.05rem;
}
.auth-card .form-check-input:checked {
    background-color: #00BCD4;
    border-color: #00BCD4;
}

/* Botão principal (Entrar / Criar / etc) */
.auth-card .btn-neon,
.auth-card .btn-primary-auth {
    width: 100%;
    padding: 0.95rem 1.25rem;
    background: linear-gradient(135deg, #1565C0 0%, #00BCD4 100%);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    box-shadow: 0 8px 24px rgba(0, 188, 212, 0.28);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.auth-card .btn-neon::before,
.auth-card .btn-primary-auth::before {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.45) 50%, transparent 80%);
    transform: skewX(-20deg);
    z-index: -1;
    animation: authShineSweep 4s ease-in-out infinite;
}
@keyframes authShineSweep {
    0%, 55%   { left: -120%; }
    80%, 100% { left: 200%; }
}
.auth-card .btn-neon:hover,
.auth-card .btn-primary-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.40);
    filter: brightness(1.06);
    color: #FFFFFF;
}

/* Divider */
.divider-text {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: rgba(255,255,255,0.45) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1.5rem 0;
}
.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

/* Botão Google */
.btn-google {
    width: 100%;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #F1F3F5 !important;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}
.btn-google:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(0,188,212,0.32) !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}
.btn-google img {
    width: 20px;
    height: 20px;
}

/* Footer do card (links) */
.auth-card-foot {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255,255,255,0.62);
    font-size: 0.875rem;
}
.auth-card-foot a {
    color: #4DD0E1 !important;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}
.auth-card-foot a:hover {
    color: #80DEEA !important;
}
.auth-card-foot .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    color: rgba(255,255,255,0.6) !important;
    font-weight: 500;
    font-size: 0.82rem;
}
.auth-card-foot .back-link:hover {
    color: #4DD0E1 !important;
}

/* Strength bar (register / reset) */
.strength-bar-bg {
    flex: 1;
    height: 5px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-top: 0.4rem;
}
.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}
.password-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 0.55rem;
}
.password-rules small {
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}
.password-rules small.valid { color: #4DD0E1; }
.password-rules small.valid i::before { content: "\F26B"; }

/* Alertas dentro do card */
.auth-card .alert {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
}
.auth-card .alert-success { background: rgba(16, 185, 129, 0.10); color: #6EE7B7; }
.auth-card .alert-danger  { background: rgba(239, 68, 68, 0.10);  color: #FCA5A5; }
.auth-card .alert-info    { background: rgba(0, 188, 212, 0.10);  color: #4DD0E1; }

.auth-card .btn-close {
    filter: invert(1) opacity(0.6);
}

/* ====== Responsivo ====== */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-side {
        min-height: 38vh;
        min-height: 38svh;
        padding: 2rem 1.5rem;
    }
    .auth-side-brand img { height: 32px; }
    .auth-side-quote { font-size: clamp(1.5rem, 5vw, 2.1rem); }
    .auth-side-lead { font-size: 0.95rem; margin-bottom: 1.25rem; }
    .auth-side-features { display: none; }
    .auth-side-stats { display: none; }
    .auth-main { padding: 2rem 1rem 3rem; }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
        max-width: 100%;
        border-radius: 16px;
    }
    .auth-side {
        padding: 1.5rem 1.25rem;
        min-height: 30vh;
        min-height: 30svh;
    }
    .auth-card-title { font-size: 1.4rem; }
    .auth-side-tag { font-size: 0.65rem; padding: 0.35rem 0.75rem; }
}
