/* ==========================================
   SAAS MODERN LOGIN DESIGN SYSTEM
   Design split-screen moderno, estilo SaaS Premium
   ========================================== */

:root {
    /* Paleta de cores SaaS Premium */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --primary-light: #6366f1;
    /* Indigo 500 */

    /* Neutros - Clean & Crisp */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status */
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --success-bg: #ecfdf5;
    --success-text: #065f46;
    --warning-bg: #fffbeb;
    --warning-text: #92400e;

    /* Sombras Suaves */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */

    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--white);
    color: var(--gray-900);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* ==========================================
   LAYOUT SPLIT SCREEN
   ========================================== */

/* Lado Esquerdo - Visual / Branding */
.login-visual {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    overflow: hidden;
    color: white;
}

/* Mesh Gradient Effect no fundo */
.login-visual::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(60px);
    animation: floatShape 20s infinite alternate;
}

.login-visual::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(80px);
    animation: floatShapeReverse 25s infinite alternate;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20%, 20%) scale(1.1);
    }
}

@keyframes floatShapeReverse {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-20%, -20%) scale(0.9);
    }
}

.visual-content {
    position: relative;
    z-index: 10;
    max-width: 480px;
    text-align: center;
}

.visual-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.visual-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Lado Direito - Form */
.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--white);
    position: relative;
    overflow-y: auto;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* ==========================================
   COMPONENTES DO FORMULÁRIO
   ========================================== */

.logo-area {
    margin-bottom: 2.5rem;
    text-align: center;
    /* Centralizado ou left-align conforme preferência */
}

.logo-area img {
    height: 48px;
    width: auto;
}

.welcome-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.welcome-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.welcome-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Inputs Modernos */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    /* Better for mobile taps */
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-family: var(--font-primary);
}

.input-field:hover {
    border-color: var(--gray-300);
    background-color: var(--white);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    /* Ring effect */
}

.input-field::placeholder {
    color: var(--gray-400);
}

/* Ícone de senha */
.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Botão Principal SaaS */
.btn-submit {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
}

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

.btn-submit:disabled {
    background-color: var(--primary-light);
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-submit.loading svg {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    display: block !important;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Alertas */
.alert-box {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.alert-error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #fee2e2;
}

.alert-warning {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid #fef3c7;
}

/* Footer Links */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
    /* Ajuste visual próximo ao campo de senha */
}

.forgot-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.1s;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Responsive Mobile */
@media (max-width: 1024px) {
    .login-visual {
        display: none;
        /* Em tablet/mobile, esconde o lado visual ou empilha */
    }

    .login-content {
        flex: 1;
        width: 100%;
        padding: 1.5rem;
    }
}

/* Caso queira mostrar uma barra colorida no topo em mobile invés de esconder */
@media (max-width: 640px) {
    body {
        flex-direction: column;
    }

    .login-visual {
        display: flex;
        flex: 0 0 120px;
        /* Altura fixa pequena */
        padding: 1.5rem;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .visual-content,
    .visual-glass-card {
        display: none;
        /* Esconde conteúdo complexo */
    }

    /* Opcional: mostrar apenas logo no topo em fundo azul */
}