﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --purple: #6E4F8E;
    --purple-dark: #4B3264;
    --purple-deep: #2E1E40;
    --purple-light: #9A78BA;
    --purple-pale: #F3EFF8;
    --purple-mid: #8663A8;
    --white: #FFFFFF;
    --gray-100: #F7F6F9;
    --gray-300: #D4CFE0;
    --gray-500: #8F87A0;
    --gray-700: #4A445A;
    --text: #1E1830;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--gray-100);
}

/* ── LAYOUT ── */
.screen {
    display: flex;
    height: 100vh;
    min-height: 600px;
}

/* ── LEFT PANEL ── */
.panel-left {
    flex: 0 0 48%;
    background: linear-gradient(145deg, var(--purple-deep) 0%, var(--purple-dark) 45%, var(--purple) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
}

/* Animated grid */
.grid-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.grid-node {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    animation: pulse-node var(--dur, 3s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes pulse-node {
    0% {
        opacity: 0.12;
        transform: scale(1);
    }

    100% {
        opacity: 0.55;
        transform: scale(1.6);
    }
}

/* SVG connector lines */
.connector-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.connector-line {
    stroke: rgba(255,255,255,0.08);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 4 6;
    animation: line-flow 6s linear infinite;
}

@keyframes line-flow {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: -80;
    }
}

/* Brand */
.brand {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
}

    .brand-icon svg {
        width: 22px;
        height: 22px;
    }

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.3px;
}

    .brand-name span {
        color: var(--purple-light);
        font-weight: 300;
    }

/* Hero copy */
.hero {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--purple-light);
    margin-bottom: 16px;
}

.hero-headline {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

    .hero-headline em {
        font-style: normal;
        color: var(--purple-light);
    }

.hero-sub {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    max-width: 340px;
}

/* Stats strip */
.stats {
    display: flex;
    gap: 36px;
    position: relative;
    z-index: 2;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── RIGHT PANEL ── */
.panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 48px 40px;
    position: relative;
}

    .panel-right::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--purple), var(--purple-light));
    }

.form-wrap {
    width: 100%;
    max-width: 380px;
}

.form-header {
    margin-bottom: 40px;
}

.form-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 400;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    background: var(--gray-100);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 9px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

    .auth-tab.active {
        background: var(--white);
        color: var(--purple);
        box-shadow: 0 1px 4px rgba(110,79,142,0.12);
    }

/* Fields */
.field {
    margin-bottom: 18px;
}

    .field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--gray-700);
        letter-spacing: 0.3px;
        margin-bottom: 7px;
        text-transform: uppercase;
    }

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-300);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.input-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 42px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .input-wrap input::placeholder {
        color: var(--gray-300);
    }

    .input-wrap input:focus {
        border-color: var(--purple);
        box-shadow: 0 0 0 3px rgba(110,79,142,0.12);
    }

        .input-wrap input:focus ~ .input-icon,
        .input-wrap:focus-within .input-icon {
            color: var(--purple);
        }

.toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

    .toggle-pw:hover {
        color: var(--purple);
    }

/* Row */
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    margin-top: -6px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

    .checkbox-wrap input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--purple);
        cursor: pointer;
    }

    .checkbox-wrap span {
        font-size: 13px;
        color: var(--gray-500);
    }

.link {
    font-size: 13px;
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

    .link:hover {
        color: var(--purple-dark);
    }

/* CTA */
.btn-primary {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 16px rgba(110,79,142,0.35);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(110,79,142,0.45);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

    .divider::before, .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--gray-300);
    }

    .divider span {
        font-size: 11px;
        color: var(--gray-500);
        letter-spacing: 1px;
    }

    .divider a {
        color: var(--purple);
        font-weight: 500;
        text-decoration: none;
    }

/* SSO */
.btn-sso {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    background: var(--white);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color 0.2s, background 0.2s;
}

    .btn-sso:hover {
        border-color: var(--purple-light);
        background: var(--purple-pale);
        color: var(--purple);
    }

/* Footer note */
.form-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--gray-500);
}

    .form-footer a {
        color: var(--purple);
        font-weight: 500;
        text-decoration: none;
    }

/* Version badge */
.version-badge {
    position: absolute;
    bottom: 24px;
    right: 28px;
    font-size: 11px;
    color: var(--gray-300);
    letter-spacing: 0.5px;
}

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
    .panel-left {
        display: none;
    }

    .panel-right {
        padding: 32px 24px;
    }
}

.panel-message {
    padding: 13px 15px 13px 15px !important;
    border-radius: 10px 10px !important;
    background-color: #D9534F !important;
    color: white !important;
    font-size: 13px !important;
}

.logotipo-login {
    width: 100%;
    text-align: center !important;
    padding-bottom: 70px;
    margin-top: -100px;
}