/* ============================================
   NOMIFY - Login Page Styles
   Modern Glassmorphism Design
   ============================================ */

/* Variables CSS */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --input-border: #cbd5e1;
    --gradient-1: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    --gradient-2: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gradient-1);
    min-height: 100vh;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* Formas de fondo animadas */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--secondary);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* Layout principal */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

/* Panel de marca */
.brand-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.brand-content {
    text-align: center;
    color: var(--white);
    max-width: 400px;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: pulse 3s ease-in-out infinite;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.1);
    }
}

.brand-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 48px;
    font-weight: 300;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature span:last-child {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Panel del formulario */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

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

/* Alertas */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    animation: shake 0.5s ease;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.alert-error svg {
    stroke: var(--error);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Grupos de input */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

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

.input-wrapper > svg {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    stroke: var(--gray-light);
    pointer-events: none;
    transition: stroke 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    font-size: 1rem;
    color: var(--dark);
    background: var(--white);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
    color: var(--gray-light);
}

.input-wrapper input:hover {
    border-color: var(--gray);
}

.input-wrapper input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-wrapper:has(input:focus) > svg {
    stroke: var(--primary);
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.toggle-password:hover {
    background: rgba(0, 0, 0, 0.05);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    stroke: var(--gray);
    transition: stroke 0.2s ease;
}

.toggle-password:hover svg {
    stroke: var(--dark);
}

/* Botón submit */
.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-2);
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    margin-top: 8px;
}

.btn-submit svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-submit:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

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

/* Footer */
.form-footer {
    margin-top: 32px;
    text-align: center;
}

.form-footer p {
    font-size: 0.8rem;
    color: var(--gray-light);
}

/* Responsive */
@media (max-width: 968px) {
    .login-wrapper {
        flex-direction: column;
    }

    .brand-panel {
        padding: 60px 40px 40px;
    }

    .brand-content h1 {
        font-size: 2.5rem;
    }

    .features {
        display: none;
    }

    .form-panel {
        border-radius: 32px 32px 0 0;
        margin-top: -32px;
    }
}

@media (max-width: 480px) {
    .brand-panel {
        padding: 40px 24px 32px;
    }

    .brand-content h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .logo svg {
        width: 30px;
        height: 30px;
    }

    .form-panel {
        padding: 32px 24px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .input-wrapper input {
        padding: 14px 14px 14px 48px;
    }
}

/* Animaciones de entrada */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    animation: slideUp 0.6s ease-out;
}

.brand-content {
    animation: slideUp 0.6s ease-out 0.2s both;
}
