/* ============================================================
   COPSOQ SaaS — Auth Pages (Login / Cadastro / Esqueci Senha)
   Design: Split Layout — Dark Left + White Right
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --ink: #0b0f1a;
    --ink-2: #131929;
    --ink-3: #1a2138;
    --slate: #2a3352;
    --muted: #6b7a99;
    --soft: #8d9ab7;
    --cloud: #c4cedf;
    --snow: #eef1f7;
    --white: #f8f9fc;
    --pure: #ffffff;
    --emerald: #10b981;
    --emerald-bright: #34d399;
    --emerald-deep: #059669;
    --emerald-glow: rgba(16, 185, 129, .12);
    --sky: #38bdf8;
    --violet: #8b5cf6;
    --coral: #f43f5e;
    --r: 10px;
    --r2: 14px;
    --r3: 20px;
    --bez: cubic-bezier(.22, 1, .36, 1);
}

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

body {
    font-family: 'Instrument Sans', -apple-system, sans-serif;
    color: var(--ink);
    background: var(--pure);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─── Split Layout ─── */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ─── Left Panel (Dark Branding) ─── */
.auth-brand {
    background: var(--ink);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3.5rem;
    overflow: hidden;
}

/* Gradient orbs */
.auth-brand::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    top: -15%; left: -10%;
    background: radial-gradient(circle, rgba(16,185,129,.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.auth-brand::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    bottom: -10%; right: -5%;
    background: radial-gradient(circle, rgba(56,189,248,.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

/* Grid pattern */
.auth-grid-bg {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

/* Logo/Icon */
.auth-logo-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(16,185,129,.25);
}
.auth-logo-icon i {
    font-size: 1.6rem;
    color: var(--ink);
}

.auth-brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pure);
    margin-bottom: .4rem;
    letter-spacing: -.02em;
}

.auth-brand-desc {
    font-size: .95rem;
    color: var(--soft);
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* Feature list */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-feat {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .85rem 1.1rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--r2);
    transition: all .3s var(--bez);
}
.auth-feat:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(16,185,129,.15);
    transform: translateX(4px);
}

.auth-feat-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.auth-feat-icon.fg { background: var(--emerald-glow); color: var(--emerald-bright); }
.auth-feat-icon.fb { background: rgba(56,189,248,.1); color: var(--sky); }
.auth-feat-icon.fv { background: rgba(139,92,246,.1); color: var(--violet); }
.auth-feat-icon.fa { background: rgba(245,158,11,.08); color: #f59e0b; }

.auth-feat span {
    font-size: .88rem;
    color: var(--cloud);
    font-weight: 500;
}

/* Bottom version */
.auth-brand-footer {
    position: absolute;
    bottom: 2rem;
    left: 3.5rem;
    right: 3.5rem;
    z-index: 1;
    font-size: .72rem;
    color: var(--slate);
    display: flex;
    justify-content: space-between;
}

/* ─── Right Panel (Form) ─── */
.auth-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: var(--pure);
    position: relative;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-heading {
    font-family: 'Sora', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: .3rem;
    letter-spacing: -.02em;
}

.auth-subheading {
    font-size: .92rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

/* Form Elements */
.auth-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: .4rem;
    letter-spacing: .01em;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .95rem;
    pointer-events: none;
    transition: color .25s;
}

.auth-input {
    width: 100%;
    padding: .75rem .9rem .75rem 2.7rem;
    border: 1.5px solid var(--snow);
    border-radius: var(--r2);
    font-family: 'Instrument Sans', sans-serif;
    font-size: .92rem;
    color: var(--ink);
    background: var(--pure);
    transition: all .25s var(--bez);
    outline: none;
}
.auth-input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px var(--emerald-glow);
}
.auth-input:focus + .auth-input-icon,
.auth-input:focus ~ .auth-input-icon {
    color: var(--emerald);
}
.auth-input::placeholder {
    color: var(--cloud);
}

/* Password toggle */
.auth-pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 1rem;
    padding: 4px;
    transition: color .25s;
}
.auth-pw-toggle:hover { color: var(--emerald); }

/* Link row */
.auth-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .4rem;
}

.auth-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--emerald-deep);
    transition: color .2s;
}
.auth-link:hover { color: var(--emerald); }

/* Submit button */
.auth-submit {
    width: 100%;
    padding: .85rem;
    border: none;
    border-radius: var(--r2);
    font-family: 'Sora', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--emerald);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: .5rem;
    margin-bottom: 1.5rem;
    transition: all .3s var(--bez);
    box-shadow: 0 2px 12px rgba(16,185,129,.3);
}
.auth-submit:hover {
    background: var(--emerald-bright);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16,185,129,.35);
}

/* Divider */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
    font-size: .78rem;
    color: var(--muted);
}
.auth-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--snow);
}
.auth-divider span {
    position: relative;
    background: var(--pure);
    padding: 0 .8rem;
}

/* Bottom link */
.auth-bottom {
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
}
.auth-bottom a {
    font-weight: 700;
    color: var(--emerald-deep);
    transition: color .2s;
}
.auth-bottom a:hover { color: var(--emerald); }

/* Voltar ao site */
.auth-back {
    text-align: center;
    margin-top: 1.5rem;
}
.auth-back a {
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: color .2s;
}
.auth-back a:hover { color: var(--emerald); }

/* Alert */
.auth-alert {
    padding: .7rem 1rem;
    border-radius: var(--r);
    font-size: .84rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.auth-alert.danger {
    background: rgba(244,63,94,.06);
    border: 1px solid rgba(244,63,94,.15);
    color: var(--coral);
}
.auth-alert.success {
    background: var(--emerald-glow);
    border: 1px solid rgba(16,185,129,.2);
    color: var(--emerald-deep);
}
.auth-alert.warning {
    background: rgba(245,158,11,.06);
    border: 1px solid rgba(245,158,11,.15);
    color: #b45309;
}

/* Checkbox */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-bottom: 1rem;
}
.auth-check input[type="checkbox"] {
    width: 17px; height: 17px;
    margin-top: 2px;
    accent-color: var(--emerald);
    flex-shrink: 0;
    cursor: pointer;
}
.auth-check label {
    font-size: .82rem;
    color: var(--muted);
    cursor: pointer;
}
.auth-check label a {
    color: var(--emerald-deep);
    font-weight: 600;
}

/* Version */
.auth-version {
    position: absolute;
    bottom: 1.5rem;
    left: 0; right: 0;
    text-align: center;
    font-size: .72rem;
    color: var(--cloud);
}

/* ─── Animations ─── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-anim { animation: fadeSlideUp .6s var(--bez) both; }
.auth-anim-d1 { animation-delay: .05s; }
.auth-anim-d2 { animation-delay: .1s; }
.auth-anim-d3 { animation-delay: .15s; }
.auth-anim-d4 { animation-delay: .2s; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .auth-split {
        grid-template-columns: 1fr;
    }
    .auth-brand {
        display: none;
    }
    .auth-form-side {
        min-height: 100vh;
    }
}
